v0.3.13-pre.003
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!-- file: crates/ksp-worker-raw-transaction-ingest-lib/USAGE.md -->
|
||||
<!-- version: 2 -->
|
||||
<!-- version: 3 -->
|
||||
|
||||
# Utilisation de ksp-worker-raw-transaction-ingest-lib
|
||||
|
||||
@@ -101,7 +101,35 @@ let handle = match ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestWo
|
||||
};
|
||||
```
|
||||
|
||||
Les deux entrées exigent un runtime Tokio courant et un `Store` portant exactement le même `RawNetworkId` que les settings. Le démarrage avec ressources exige également que la source Yellowstone/HTTP cible ce même réseau.
|
||||
Les deux entrées exigent un runtime Tokio courant et un `Store` portant exactement le même `RawNetworkId` que les settings. Le démarrage avec ressources exige également que chaque source composée cible ce même réseau. Une exécution productive accepte une source unique Yellowstone ou Standard Logs ; une collection de plusieurs sources est validable à la composition mais reste rejetée avant spawn tant que la supervision simultanée n'est pas disponible.
|
||||
|
||||
### Source Standard Logs productive
|
||||
|
||||
Une source standard Solana WS se compose ainsi :
|
||||
|
||||
```rust
|
||||
fn standard_logs_runtime_resources(
|
||||
ws_endpoint: ksp_onchain_transport_lib::WsEndpointSettings,
|
||||
filter: ksp_onchain_transport_lib::SolanaLogsSubscribeFilter,
|
||||
commitment: ksp_onchain_transport_lib::SolanaCommitment,
|
||||
http_pool: ksp_onchain_transport_lib::HttpTransportPool,
|
||||
hydration_role: ksp_onchain_transport_lib::HttpRoleName,
|
||||
) -> ksp_core_lib::Result<ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestRuntimeResources> {
|
||||
let source = match ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestStandardLogsSource::new(
|
||||
ws_endpoint,
|
||||
filter,
|
||||
commitment,
|
||||
http_pool,
|
||||
hydration_role,
|
||||
) {
|
||||
std::result::Result::Ok(value) => value,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestRuntimeResources::from_standard_logs_source(source));
|
||||
}
|
||||
```
|
||||
|
||||
`ws_endpoint` doit être un endpoint Transport valide de kind `solana_standard`. Le commitment doit être explicitement `Confirmed` ou `Finalized`. Le pool HTTP doit exposer `getTransaction` via le rôle indiqué sur le même réseau. `All`, `AllWithVotes` et `Mentions(pubkey)` sont acceptés par le contrat Transport ; la valeur du filtre reste privée dans le Worker.
|
||||
|
||||
## Préparer la source Yellowstone
|
||||
|
||||
@@ -118,15 +146,16 @@ Le caller ne passe pas de signature, `program_id`, plage de slots ou limite hist
|
||||
|
||||
## Comprendre la pipeline live
|
||||
|
||||
Les familles Yellowstone sont traitées ainsi :
|
||||
Les familles productives sont traitées ainsi :
|
||||
|
||||
```text
|
||||
Transaction -> signal -> HTTP getTransaction -> Common RAW -> admission
|
||||
TransactionStatus -> signal -> HTTP getTransaction -> Common RAW -> admission
|
||||
Block -> un signal par transaction -> HTTP getTransaction -> Common RAW -> admission
|
||||
BlockMeta -> continuity-only
|
||||
Slot -> continuity-only
|
||||
Account/Ping/Pong/Entry -> sans RAW Transaction dans cette verticale
|
||||
Yellowstone Transaction -> signal -> HTTP getTransaction -> Common RAW -> admission
|
||||
Yellowstone TransactionStatus -> signal -> HTTP getTransaction -> Common RAW -> admission
|
||||
Yellowstone Block -> un signal par transaction -> HTTP getTransaction -> Common RAW -> admission
|
||||
Standard WS logsSubscribe -> context.slot + signature -> HTTP getTransaction -> Common RAW -> admission
|
||||
Yellowstone BlockMeta -> continuity-only
|
||||
Yellowstone Slot -> continuity-only
|
||||
Yellowstone Account/Ping/Pong/Entry -> sans RAW Transaction dans cette verticale
|
||||
```
|
||||
|
||||
Les signaux de même `(network, signature, commitment)` sont coalescés avant l'hydration HTTP. Le Worker ne possède pas une boucle de retry HTTP : reroutage/retry/backoff restent dans `ksp-onchain-transport-lib`.
|
||||
@@ -266,7 +295,7 @@ Le pattern attendu est :
|
||||
```text
|
||||
Config / application / service owner
|
||||
-> résout endpoints, credentials et rôles
|
||||
-> construit YellowstoneGrpcChannel + YellowstoneSubscribeRequest
|
||||
-> construit une source Transport Yellowstone ou Standard Logs
|
||||
-> construit HttpTransportPool + hydration role
|
||||
-> construit le Store
|
||||
-> construit RawTransactionIngestRuntimeResources
|
||||
|
||||
Reference in New Issue
Block a user