261 lines
8.5 KiB
Markdown
261 lines
8.5 KiB
Markdown
<!-- file: deltas/0.3.13/pre.003.md -->
|
|
<!-- version: 1 -->
|
|
|
|
# Delta 0.3.13-pre.003 — Standard Solana logsSubscribe + hydration commune
|
|
|
|
## Base requise
|
|
|
|
```text
|
|
delivery précédente : 0.3.13-pre.002-fix.001
|
|
Cargo base : 0.3.13-pre.2.fix.1
|
|
delta base : deltas/0.3.13/pre.002-fix.001.md
|
|
```
|
|
|
|
Le gate opérateur de la base a été exécuté après `cargo clean` et est vert : `cargo fmt --all -- --check` silencieux, audits Rust/Markdown propres, `cargo check --workspace`, Clippy strict, 389 tests unitaires Transport, 52 tests public API Transport, 44 tests release Transport, 4 doc-tests Transport, puis 70 tests unitaires Worker et toutes ses suites d'intégration sans échec. Les smokes réseau opt-in sont restés ignorés comme prévu.
|
|
|
|
## Objectif
|
|
|
|
Ajouter la première nouvelle famille live de `0.3.13` sans dupliquer Transport ni l'admission RAW :
|
|
|
|
```text
|
|
Solana standard WS logsSubscribe
|
|
-> context.slot + signature
|
|
-> hydration HTTP getTransaction observed
|
|
-> Common RAW
|
|
-> admission centrale Worker
|
|
-> Store
|
|
```
|
|
|
|
La tranche ne démarre toujours qu'une seule source productive à la fois. La supervision simultanée de plusieurs sources reste réservée à `pre.007`.
|
|
|
|
## Version
|
|
|
|
```text
|
|
livraison : 0.3.13-pre.003
|
|
workspace.package.version : 0.3.13-pre.3
|
|
archive attendue : ksp-general-0.3.13-pre.003.zip
|
|
```
|
|
|
|
## Source Standard Logs
|
|
|
|
Nouvelle surface publique Worker :
|
|
|
|
```text
|
|
RawTransactionIngestStandardLogsSource
|
|
```
|
|
|
|
Construction caller-composed :
|
|
|
|
```text
|
|
WsEndpointSettings kind solana_standard
|
|
SolanaLogsSubscribeFilter
|
|
SolanaCommitment Confirmed ou Finalized
|
|
HttpTransportPool
|
|
HttpRoleName hydration
|
|
```
|
|
|
|
La construction ne réalise aucune I/O. Elle valide le protocole WebSocket, le commitment, le réseau, la représentation sûre provider/endpoint et l'existence d'une route HTTP `getTransaction` compatible sur le même cluster.
|
|
|
|
Au runtime, la source utilise exclusivement :
|
|
|
|
```text
|
|
SolanaStandardWsSession::connect
|
|
logs_subscribe
|
|
HttpTransportPool::get_transaction_observed
|
|
```
|
|
|
|
Le Worker ne construit aucun socket/client inférieur et ne dépend directement ni de `reqwest`, ni de `tokio-tungstenite`, ni de `tonic`, ni de `yellowstone-grpc-proto`.
|
|
|
|
## Projection et redaction
|
|
|
|
Une notification `logsSubscribe` est réduite à son matériau de référence nécessaire :
|
|
|
|
```text
|
|
context.slot
|
|
signature
|
|
commitment caller-composed
|
|
identité source/filter privée
|
|
```
|
|
|
|
Les champs distants `logs` et `err` ne sont pas copiés dans le signal Worker, le snapshot, la provenance textuelle ou `Debug`.
|
|
|
|
Les variantes :
|
|
|
|
```text
|
|
All
|
|
AllWithVotes
|
|
Mentions(pubkey)
|
|
```
|
|
|
|
participent à une empreinte SHA-256 privée. La valeur du pubkey `Mentions` n'est pas exposée par le Worker.
|
|
|
|
## Identité logique
|
|
|
|
Le `source_key` Standard Logs est dérivé de :
|
|
|
|
```text
|
|
domain KSP live-source v1
|
|
family = standard_logs
|
|
network
|
|
safe provider identity
|
|
safe endpoint identity
|
|
commitment
|
|
private filter fingerprint
|
|
```
|
|
|
|
Le rôle et le pool HTTP d'hydration n'entrent pas dans cette identité : ils décrivent la stratégie d'enrichissement, pas une nouvelle source live.
|
|
|
|
Le rejet transactionnel des doublons et le bound global `1..32` introduits en `pre.002` s'appliquent aussi à Standard Logs.
|
|
|
|
## Hydration source-neutral
|
|
|
|
Le coordinator privé précédemment utilisé par Yellowstone est généralisé en contrat d'hydration source-neutral et réutilisé par Standard Logs.
|
|
|
|
Pour `pre.003`, chaque exécution mono-source possède encore sa propre instance. Le partage réellement global entre plusieurs tâches source sera introduit avec le supervisor `pre.007`.
|
|
|
|
Bornes effectives :
|
|
|
|
```text
|
|
hydration in-flight <= persistence_concurrency
|
|
pending source signals <= admission_queue_capacity
|
|
```
|
|
|
|
Le plafond pending est donc aligné sur les settings effectifs du Worker plutôt que sur le plafond absolu maximal.
|
|
|
|
La requête commune `getTransaction observed` utilise maintenant :
|
|
|
|
```text
|
|
encoding = base64
|
|
maxSupportedTransactionVersion = 1
|
|
```
|
|
|
|
Cette adaptation s'applique également à Yellowstone. Elle prépare l'hydration aux transactions Legacy/V0/V1 mais ne qualifie aucun nouveau chemin RAW-direct V1.
|
|
|
|
## Activation runtime
|
|
|
|
Le runtime-resource aggregate peut composer Yellowstone et Standard Logs dans la collection privée bornée, mais la barrière de sûreté reste :
|
|
|
|
```text
|
|
1 source Yellowstone : productif
|
|
1 source Standard Logs : productif
|
|
2..32 sources : composition validable
|
|
start 2..32 : runtime_resources.multi_source_activation_pending avant spawn
|
|
```
|
|
|
|
Aucune source configurée n'est silencieusement ignorée.
|
|
|
|
## Preuves ajoutées
|
|
|
|
Unit tests Worker :
|
|
|
|
```text
|
|
validation standard WS / commitment / route HTTP
|
|
source_key stable et filter-sensitive
|
|
source_key indépendant du hydration role
|
|
All / AllWithVotes / Mentions distingués
|
|
Mentions/URL/source-key bytes redacted
|
|
projection reference-only
|
|
fixture signature+slot -> une hydration HTTP -> matériau Common RAW exact
|
|
getTransaction base64 + maxSupportedTransactionVersion=1
|
|
rejet duplicate Standard Logs identity
|
|
```
|
|
|
|
Canaris externes :
|
|
|
|
```text
|
|
public_api : nouvelle construction/composition accessible depuis crate root
|
|
dependency_boundary : uniquement façades Transport + Common RAW/Store existants
|
|
hardening : aucune copie logs/err/payload/url et Debug borné
|
|
release_completeness : nouvelle surface et canaris pre.003 obligatoires
|
|
```
|
|
|
|
Reconnect, resubscribe, IDs distants et backpressure WebSocket restent couverts et possédés par `ksp-onchain-transport-lib`; le Worker réutilise la façade `SolanaStandardWsSession` au lieu de reproduire ces mécanismes.
|
|
|
|
## Fichiers modifiés
|
|
|
|
```text
|
|
Cargo.toml
|
|
crates/ksp-worker-raw-transaction-ingest-lib/README.md
|
|
crates/ksp-worker-raw-transaction-ingest-lib/USAGE.md
|
|
crates/ksp-worker-raw-transaction-ingest-lib/src/lib.rs
|
|
crates/ksp-worker-raw-transaction-ingest-lib/src/runtime.rs
|
|
crates/ksp-worker-raw-transaction-ingest-lib/src/runtime_resources.rs
|
|
crates/ksp-worker-raw-transaction-ingest-lib/tests/dependency_boundary.rs
|
|
crates/ksp-worker-raw-transaction-ingest-lib/tests/hardening.rs
|
|
crates/ksp-worker-raw-transaction-ingest-lib/tests/public_api.rs
|
|
crates/ksp-worker-raw-transaction-ingest-lib/tests/release_completeness.rs
|
|
crates/ksp-worker-raw-transaction-ingest-lib/unit_tests/runtime_resources.rs
|
|
docs/plans/034-V0_3_13_MULTI_SOURCE_LIVE_CONVERGENCE_PLAN.md
|
|
docs/validation/030-V0_3_13_MULTI_SOURCE_LIVE_CONVERGENCE.md
|
|
```
|
|
|
|
## Fichiers ajoutés
|
|
|
|
```text
|
|
deltas/0.3.13/pre.003.md
|
|
```
|
|
|
|
## Fichiers supprimés
|
|
|
|
```text
|
|
aucun
|
|
```
|
|
|
|
## Non-claims
|
|
|
|
`pre.003` ne prétend pas :
|
|
|
|
```text
|
|
blockSubscribe productif
|
|
Helius transactionSubscribe productif
|
|
HTTP live block polling
|
|
supervision simultanée de plusieurs sources
|
|
fanout Store d'observations multi-source
|
|
coordinator partagé entre plusieurs tâches source simultanées
|
|
gap repair/backfill
|
|
nouvelle dépendance externe
|
|
```
|
|
|
|
## Validation dans l'environnement d'assemblage
|
|
|
|
Les contrôles réellement exécutés après finalisation de la tranche sont :
|
|
|
|
```text
|
|
python3 scripts/audit_rust_workspace_rules.py
|
|
PASS : General Rust rule audit clean
|
|
PASS : Rust export completeness audit 0 candidate
|
|
PASS : KSP workspace Rust rule audit clean
|
|
|
|
python3 scripts/audit_markdown_tables.py README.md RULES.md ROADMAP.md CHANGELOG.md docs prompts crates deltas
|
|
PASS : Markdown table audit clean (340 tables, 831 files)
|
|
|
|
supplemental normative definition-id scan
|
|
PASS : 489 definitions, 489 unique, 0 duplicate definition id
|
|
|
|
pre-packaging exhaustive diff scan
|
|
PASS : 13 fichiers modifiés, 1 ajouté, 0 supprimé
|
|
PASS : les 13 headers versionnés des fichiers modifiés sont incrémentés exactement de +1
|
|
PASS : aucune dépendance Cargo nouvelle
|
|
```
|
|
|
|
Le toolchain Rust/Cargo/Rustfmt n'est pas disponible dans cet environnement. Les commandes Cargo post-modification sont donc explicitement `NON EXÉCUTÉ LOCAL`, jamais déclarées PASS.
|
|
|
|
Les caches Python produits par les audits sont supprimés avant packaging et ne font pas partie du delta.
|
|
|
|
## Gate opérateur requis avant pre.004
|
|
|
|
```bash
|
|
cargo fmt --all -- --check
|
|
python3 scripts/audit_rust_workspace_rules.py
|
|
python3 scripts/audit_markdown_tables.py README.md RULES.md ROADMAP.md CHANGELOG.md docs prompts crates deltas
|
|
cargo check --workspace
|
|
cargo clippy --workspace --all-targets --all-features -- -D warnings
|
|
cargo test -p ksp-onchain-transport-lib
|
|
cargo test -p ksp-worker-raw-transaction-ingest-lib
|
|
cargo tree -p ksp-worker-raw-transaction-ingest-lib --edges normal
|
|
cargo tree -p ksp-worker-raw-transaction-ingest-lib -e features
|
|
cargo tree --duplicates
|
|
```
|
|
|
|
`pre.004` reste bloquée si ce gate révèle une anomalie de format, règle, compilation, API, dépendance ou test.
|