v0.1.0-pre.011

This commit is contained in:
2026-07-24 14:23:58 +02:00
parent 62bc0ffb44
commit 42e8a203ec
460 changed files with 12005 additions and 7020 deletions

View File

@@ -4,11 +4,11 @@
//! Source-neutral instruction replay input shared by decoders and stores.
/// Version of the normalized core replay contract.
pub const CORE_REPLAY_INPUT_CONTRACT_VERSION: u32 = 2;
pub const MD_CORE_REPLAY_INPUT_CONTRACT_VERSION: u32 = 2;
/// Decoder replay input containing one instruction plus extracted transaction context.
#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
pub struct CoreInstructionReplayInput {
pub struct MdCoreInstructionReplayInput {
/// Version of the normalized core replay contract.
pub core_contract_version: u32,
/// Stable deduplication key for this replay input.
@@ -45,7 +45,7 @@ pub struct CoreInstructionReplayInput {
pub balance_changes_json: serde_json::Value,
}
impl CoreInstructionReplayInput {
impl MdCoreInstructionReplayInput {
/// Builds a decoder replay input after validating its stable identity and array context.
#[allow(clippy::too_many_arguments)]
pub fn new(
@@ -71,7 +71,7 @@ impl CoreInstructionReplayInput {
));
}
let value = Self {
core_contract_version: crate::CORE_REPLAY_INPUT_CONTRACT_VERSION,
core_contract_version: crate::MD_CORE_REPLAY_INPUT_CONTRACT_VERSION,
replay_input_key: replay_input_key.into(),
signature: signature.into(),
slot,
@@ -98,7 +98,7 @@ impl CoreInstructionReplayInput {
/// Validates the stable replay identity and contract version.
pub fn validate(&self) -> kb_core::Result<()> {
if self.core_contract_version != crate::CORE_REPLAY_INPUT_CONTRACT_VERSION {
if self.core_contract_version != crate::MD_CORE_REPLAY_INPUT_CONTRACT_VERSION {
return std::result::Result::Err(kb_core::Error::invalid_state(
"unsupported core replay input contract version",
));