v0.3.13-pre.004
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!-- file: crates/ksp-worker-raw-transaction-ingest-lib/USAGE.md -->
|
||||
<!-- version: 3 -->
|
||||
<!-- version: 4 -->
|
||||
|
||||
# Utilisation de ksp-worker-raw-transaction-ingest-lib
|
||||
|
||||
@@ -101,7 +101,7 @@ 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 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.
|
||||
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, Standard Logs ou Standard Block ; 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
|
||||
|
||||
@@ -131,6 +131,26 @@ fn standard_logs_runtime_resources(
|
||||
|
||||
`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.
|
||||
|
||||
### Source Standard Block productive
|
||||
|
||||
Une source `blockSubscribe` standard se compose sans pool HTTP :
|
||||
|
||||
```rust
|
||||
fn standard_block_runtime_resources(
|
||||
ws_endpoint: ksp_onchain_transport_lib::WsEndpointSettings,
|
||||
filter: ksp_onchain_transport_lib::SolanaBlockSubscribeFilter,
|
||||
commitment: ksp_onchain_transport_lib::SolanaCommitment,
|
||||
) -> ksp_core_lib::Result<ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestRuntimeResources> {
|
||||
let source = match ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestStandardBlockSource::new(ws_endpoint, filter, commitment) {
|
||||
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_block_source(source));
|
||||
}
|
||||
```
|
||||
|
||||
Le Worker demande `Base64`, `Full`, `maxSupportedTransactionVersion = 1` et `showRewards = false`. Une transaction n'est RAW-direct que si sa version est explicitement `Legacy`, `0` ou `1`. Une version omise/nulle ou supérieure, `block: null`, une erreur de bloc, un champ transactions absent/nul ou une transaction non Base64 provoque une faute sûre ; ces cas ne sont jamais assimilés à une progression vide.
|
||||
|
||||
## Préparer la source Yellowstone
|
||||
|
||||
La `YellowstoneSubscribeRequest` doit :
|
||||
@@ -153,6 +173,7 @@ Yellowstone Transaction -> signal -> HTTP getTransaction -> Common RAW ->
|
||||
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
|
||||
Standard WS blockSubscribe -> Full/Base64 Legacy|V0|V1 -> Common RAW direct par transaction -> admission
|
||||
Yellowstone BlockMeta -> continuity-only
|
||||
Yellowstone Slot -> continuity-only
|
||||
Yellowstone Account/Ping/Pong/Entry -> sans RAW Transaction dans cette verticale
|
||||
@@ -295,8 +316,8 @@ Le pattern attendu est :
|
||||
```text
|
||||
Config / application / service owner
|
||||
-> résout endpoints, credentials et rôles
|
||||
-> construit une source Transport Yellowstone ou Standard Logs
|
||||
-> construit HttpTransportPool + hydration role
|
||||
-> construit une source Transport Yellowstone, Standard Logs ou Standard Block
|
||||
-> construit HttpTransportPool + hydration role seulement pour les sources hydratées
|
||||
-> construit le Store
|
||||
-> construit RawTransactionIngestRuntimeResources
|
||||
-> construit RawTransactionIngestSettings
|
||||
|
||||
Reference in New Issue
Block a user