v0.1.0-pre.030
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
|
||||||
|
## 0.1.0-pre.030
|
||||||
|
|
||||||
|
- Migration du replay contextuel de décodage dans `kb-pipeline`.
|
||||||
|
- Conservation de la sélection bornée, du dispatch déterministe, du ledger, du force replay et de la matérialisation optionnelle.
|
||||||
|
- Adaptation aux façades consolidées `kb-lib` et `kb-store`.
|
||||||
|
- Conservation des 19 tests de l’ancienne implémentation bot2.
|
||||||
<!-- file: CHANGELOG.md -->
|
<!-- file: CHANGELOG.md -->
|
||||||
<!-- version: 6 -->
|
<!-- version: 6 -->
|
||||||
|
|
||||||
|
|||||||
@@ -94,3 +94,7 @@ Les modules de matérialisation sont privés. Tous les contrats, types concrets
|
|||||||
### Migration pipeline
|
### Migration pipeline
|
||||||
|
|
||||||
La tranche `0.1.0-pre.029` migre la planification et l’extraction core de `kb-pipeline`.
|
La tranche `0.1.0-pre.029` migre la planification et l’extraction core de `kb-pipeline`.
|
||||||
|
|
||||||
|
### Pipeline migré
|
||||||
|
|
||||||
|
`kb-pipeline` contient désormais l’extraction core et le replay contextuel de décodage avec matérialisation optionnelle.
|
||||||
|
|||||||
@@ -284,3 +284,5 @@
|
|||||||
- [x] Extraction canonique vers les tables core.
|
- [x] Extraction canonique vers les tables core.
|
||||||
- [ ] Backfill et replay de décodage.
|
- [ ] Backfill et replay de décodage.
|
||||||
- [ ] Orchestrations Solana stateful et exécution.
|
- [ ] Orchestrations Solana stateful et exécution.
|
||||||
|
|
||||||
|
- [x] Migrer `decode_replay` dans `kb-pipeline`.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder.rs
|
// file: kb-lib/src/decoder.rs
|
||||||
// version: 9
|
// version: 10
|
||||||
|
|
||||||
//! Consolidated decoder modules.
|
//! Consolidated decoder modules.
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ pub use self::api::DcApiInstructionDecoder;
|
|||||||
/// Exposes the common protocol decoder trait.
|
/// Exposes the common protocol decoder trait.
|
||||||
pub use self::api::DcApiProtocolDecoder;
|
pub use self::api::DcApiProtocolDecoder;
|
||||||
/// Computes the deterministic contextual input hash.
|
/// Computes the deterministic contextual input hash.
|
||||||
pub use self::api::decoder_api_decoder_api_contextual_input_hash;
|
pub use self::api::decoder_api_contextual_input_hash;
|
||||||
/// Returns true when a decoder declares the exact program id.
|
/// Returns true when a decoder declares the exact program id.
|
||||||
pub use self::api::decoder_api_decoder_handles_program_id;
|
pub use self::api::decoder_api_decoder_handles_program_id;
|
||||||
/// Computes a deterministic lowercase SHA-256 hash for one JSON value.
|
/// Computes a deterministic lowercase SHA-256 hash for one JSON value.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/api.rs
|
// file: kb-lib/src/decoder/api.rs
|
||||||
// version: 4
|
// version: 5
|
||||||
|
|
||||||
//! Decoder contracts consolidated from `kb_decoder_api`.
|
//! Decoder contracts consolidated from `kb_decoder_api`.
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ pub use self::contracts::DcApiDecoderSurface;
|
|||||||
/// Contextual instruction decoder contract.
|
/// Contextual instruction decoder contract.
|
||||||
pub use self::contracts::DcApiInstructionDecoder;
|
pub use self::contracts::DcApiInstructionDecoder;
|
||||||
/// Computes the deterministic contextual input hash.
|
/// Computes the deterministic contextual input hash.
|
||||||
pub use self::contracts::decoder_api_decoder_api_contextual_input_hash;
|
pub use self::contracts::decoder_api_contextual_input_hash;
|
||||||
/// Returns true when a decoder declares the exact program id.
|
/// Returns true when a decoder declares the exact program id.
|
||||||
pub use self::contracts::decoder_api_decoder_handles_program_id;
|
pub use self::contracts::decoder_api_decoder_handles_program_id;
|
||||||
/// Computes a deterministic lowercase SHA-256 hash for one JSON value.
|
/// Computes a deterministic lowercase SHA-256 hash for one JSON value.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/decoder/api/contracts.rs
|
// file: kb-lib/src/decoder/api/contracts.rs
|
||||||
// version: 7
|
// version: 8
|
||||||
|
|
||||||
//! Backend-neutral contextual instruction decoder contracts.
|
//! Backend-neutral contextual instruction decoder contracts.
|
||||||
|
|
||||||
@@ -383,7 +383,7 @@ pub fn decoder_api_decoder_handles_program_id(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Computes a deterministic lowercase SHA-256 hash for one contextual input.
|
/// Computes a deterministic lowercase SHA-256 hash for one contextual input.
|
||||||
pub fn decoder_api_decoder_api_contextual_input_hash(
|
pub fn decoder_api_contextual_input_hash(
|
||||||
input: &crate::MdCoreInstructionReplayInput,
|
input: &crate::MdCoreInstructionReplayInput,
|
||||||
) -> kb_core::Result<std::string::String> {
|
) -> kb_core::Result<std::string::String> {
|
||||||
let serialization_result = serde_json::to_value(input);
|
let serialization_result = serde_json::to_value(input);
|
||||||
@@ -501,8 +501,8 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn contextual_input_hash_is_stable() {
|
fn contextual_input_hash_is_stable() {
|
||||||
let first = crate::decoder_api_decoder_api_contextual_input_hash(&replay_input());
|
let first = crate::decoder_api_contextual_input_hash(&replay_input());
|
||||||
let second = crate::decoder_api_decoder_api_contextual_input_hash(&replay_input());
|
let second = crate::decoder_api_contextual_input_hash(&replay_input());
|
||||||
assert!(first.is_ok());
|
assert!(first.is_ok());
|
||||||
assert_eq!(first, second);
|
assert_eq!(first, second);
|
||||||
}
|
}
|
||||||
@@ -518,8 +518,8 @@ mod tests {
|
|||||||
"payloadJson": {"dataBase64": "CAcGBQQDAgE="},
|
"payloadJson": {"dataBase64": "CAcGBQQDAgE="},
|
||||||
"payloadHash": "different-payload-hash"
|
"payloadHash": "different-payload-hash"
|
||||||
}]);
|
}]);
|
||||||
let first_hash = crate::decoder_api_decoder_api_contextual_input_hash(&first);
|
let first_hash = crate::decoder_api_contextual_input_hash(&first);
|
||||||
let second_hash = crate::decoder_api_decoder_api_contextual_input_hash(&second);
|
let second_hash = crate::decoder_api_contextual_input_hash(&second);
|
||||||
assert!(first_hash.is_ok());
|
assert!(first_hash.is_ok());
|
||||||
assert!(second_hash.is_ok());
|
assert!(second_hash.is_ok());
|
||||||
assert_ne!(first_hash, second_hash);
|
assert_ne!(first_hash, second_hash);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-lib/src/lib.rs
|
// file: kb-lib/src/lib.rs
|
||||||
// version: 23
|
// version: 24
|
||||||
|
|
||||||
//! Consolidated decoder, executor, materializer and shared model library.
|
//! Consolidated decoder, executor, materializer and shared model library.
|
||||||
#![warn(missing_docs)]
|
#![warn(missing_docs)]
|
||||||
@@ -312,7 +312,7 @@ pub use self::decoder::DcWalletJupiterApeproSmartWalletDecoder;
|
|||||||
/// Reserved `kb_decoder_weighted_swap_stabble` decoder.
|
/// Reserved `kb_decoder_weighted_swap_stabble` decoder.
|
||||||
pub use self::decoder::DcWeightedSwapStabbleDecoder;
|
pub use self::decoder::DcWeightedSwapStabbleDecoder;
|
||||||
/// Computes the deterministic contextual input hash.
|
/// Computes the deterministic contextual input hash.
|
||||||
pub use self::decoder::decoder_api_decoder_api_contextual_input_hash;
|
pub use self::decoder::decoder_api_contextual_input_hash;
|
||||||
/// Returns true when a decoder declares the exact program id.
|
/// Returns true when a decoder declares the exact program id.
|
||||||
pub use self::decoder::decoder_api_decoder_handles_program_id;
|
pub use self::decoder::decoder_api_decoder_handles_program_id;
|
||||||
/// Computes a deterministic lowercase SHA-256 hash for one JSON value.
|
/// Computes a deterministic lowercase SHA-256 hash for one JSON value.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# file: kb-pipeline/Cargo.toml
|
# file: kb-pipeline/Cargo.toml
|
||||||
# version: 4
|
# version: 5
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "kb-pipeline"
|
name = "kb-pipeline"
|
||||||
@@ -15,6 +15,7 @@ futures-util.workspace = true
|
|||||||
kb-core = { path = "../kb-core" }
|
kb-core = { path = "../kb-core" }
|
||||||
kb-lib = { path = "../kb-lib" }
|
kb-lib = { path = "../kb-lib" }
|
||||||
kb-onchain-transport = { path = "../kb-onchain-transport" }
|
kb-onchain-transport = { path = "../kb-onchain-transport" }
|
||||||
|
kb-program-ids = { path = "../kb-program-ids" }
|
||||||
kb-store = { path = "../kb-store" }
|
kb-store = { path = "../kb-store" }
|
||||||
kb-wallet = { path = "../kb-wallet" }
|
kb-wallet = { path = "../kb-wallet" }
|
||||||
serde_json.workspace = true
|
serde_json.workspace = true
|
||||||
|
|||||||
2245
kb-pipeline/src/decode_replay.rs
Normal file
2245
kb-pipeline/src/decode_replay.rs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
// file: kb-pipeline/src/lib.rs
|
// file: kb-pipeline/src/lib.rs
|
||||||
// version: 3
|
// version: 4
|
||||||
|
|
||||||
#![forbid(unsafe_code)]
|
#![forbid(unsafe_code)]
|
||||||
#![deny(unreachable_pub)]
|
#![deny(unreachable_pub)]
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
mod constants;
|
mod constants;
|
||||||
mod core_extraction;
|
mod core_extraction;
|
||||||
|
mod decode_replay;
|
||||||
mod plan;
|
mod plan;
|
||||||
|
|
||||||
/// Canonical tracing target for pipeline orchestration.
|
/// Canonical tracing target for pipeline orchestration.
|
||||||
@@ -35,6 +36,30 @@ pub use self::core_extraction::CoreExtractionSummary;
|
|||||||
pub use self::core_extraction::execute_core_extraction;
|
pub use self::core_extraction::execute_core_extraction;
|
||||||
/// Extracts one canonical raw transaction into normalized core rows.
|
/// Extracts one canonical raw transaction into normalized core rows.
|
||||||
pub use self::core_extraction::extract_raw_transaction_to_core;
|
pub use self::core_extraction::extract_raw_transaction_to_core;
|
||||||
|
/// Current common decode pipeline orchestration version.
|
||||||
|
pub use self::decode_replay::DECODE_PIPELINE_VERSION;
|
||||||
|
/// Deterministic decoder dispatch policy.
|
||||||
|
pub use self::decode_replay::DecodeDispatchPolicy;
|
||||||
|
/// Per-decoder terminal counters.
|
||||||
|
pub use self::decode_replay::DecodeProcessorSummary;
|
||||||
|
/// Decode replay observer contract.
|
||||||
|
pub use self::decode_replay::DecodeReplayObserver;
|
||||||
|
/// Decode replay progress event.
|
||||||
|
pub use self::decode_replay::DecodeReplayProgressEvent;
|
||||||
|
/// Decode replay progress severity.
|
||||||
|
pub use self::decode_replay::DecodeReplayProgressLevel;
|
||||||
|
/// Bounded contextual decode replay request.
|
||||||
|
pub use self::decode_replay::DecodeReplayRequest;
|
||||||
|
/// Final contextual decode replay summary.
|
||||||
|
pub use self::decode_replay::DecodeReplaySummary;
|
||||||
|
/// Stable materialization processing stage.
|
||||||
|
pub use self::decode_replay::EVENT_MATERIALIZATION_STAGE;
|
||||||
|
/// Stable instruction decode processing stage.
|
||||||
|
pub use self::decode_replay::INSTRUCTION_DECODE_STAGE;
|
||||||
|
/// Executes one contextual decode replay campaign.
|
||||||
|
pub use self::decode_replay::execute_decode_replay;
|
||||||
|
/// Creates one stable process-local decode campaign identifier.
|
||||||
|
pub use self::decode_replay::new_decode_campaign_id;
|
||||||
/// Pipeline stage identifier.
|
/// Pipeline stage identifier.
|
||||||
pub use self::plan::PipelineStage;
|
pub use self::plan::PipelineStage;
|
||||||
/// Replay selection scope.
|
/// Replay selection scope.
|
||||||
|
|||||||
Reference in New Issue
Block a user