v0.1.0-pre.020

This commit is contained in:
2026-07-24 22:01:07 +02:00
parent fa2d9d8ecd
commit 4190b2c0ce
84 changed files with 3314 additions and 274 deletions

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/metadata.rs
// version: 4
// version: 5
//! `metadata` decoder family.
@@ -179,8 +179,6 @@ pub(crate) use self::metaplex_token_metadata::DC_METADATA_MTM_SIGN_METADATA_DISC
pub(crate) use self::metaplex_token_metadata::DC_METADATA_MTM_SURFACE_CODE;
/// Thaw Delegated Account discriminator.
pub(crate) use self::metaplex_token_metadata::DC_METADATA_MTM_THAW_DELEGATED_ACCOUNT_DISCRIMINATOR;
/// Canonical tracing target for this crate.
pub(crate) use self::metaplex_token_metadata::DC_METADATA_MTM_TRACING_TARGET;
/// Transfer discriminator.
pub(crate) use self::metaplex_token_metadata::DC_METADATA_MTM_TRANSFER_DISCRIMINATOR;
/// Transfer Out Of Escrow discriminator.
@@ -211,6 +209,8 @@ pub(crate) use self::metaplex_token_metadata::DC_METADATA_MTM_VERIFY_COLLECTION_
pub(crate) use self::metaplex_token_metadata::DC_METADATA_MTM_VERIFY_DISCRIMINATOR;
/// Verify Sized Collection Item discriminator.
pub(crate) use self::metaplex_token_metadata::DC_METADATA_MTM_VERIFY_SIZED_COLLECTION_ITEM_DISCRIMINATOR;
/// Canonical tracing target for this crate.
pub(crate) use self::metaplex_token_metadata::TRACING_TARGET_DECODER_METADATA_METAPLEX_TOKEN_METADATA;
/// Crate-root access to `decode` from `instruction`.
pub(crate) use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode;
/// Crate-root access to `entry_for_discriminator` from `instruction`.

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/metadata/metaplex_token_metadata.rs
// version: 3
// version: 4
//! Contextual instruction and bounded account decoder for Metaplex Token Metadata.
@@ -180,8 +180,6 @@ pub(crate) use self::constants::DC_METADATA_MTM_SIGN_METADATA_DISCRIMINATOR;
pub(crate) use self::constants::DC_METADATA_MTM_SURFACE_CODE;
/// Thaw Delegated Account discriminator.
pub(crate) use self::constants::DC_METADATA_MTM_THAW_DELEGATED_ACCOUNT_DISCRIMINATOR;
/// Canonical tracing target for this crate.
pub(crate) use self::constants::DC_METADATA_MTM_TRACING_TARGET;
/// Transfer discriminator.
pub(crate) use self::constants::DC_METADATA_MTM_TRANSFER_DISCRIMINATOR;
/// Transfer Out Of Escrow discriminator.
@@ -212,6 +210,8 @@ pub(crate) use self::constants::DC_METADATA_MTM_VERIFY_COLLECTION_DISCRIMINATOR;
pub(crate) use self::constants::DC_METADATA_MTM_VERIFY_DISCRIMINATOR;
/// Verify Sized Collection Item discriminator.
pub(crate) use self::constants::DC_METADATA_MTM_VERIFY_SIZED_COLLECTION_ITEM_DISCRIMINATOR;
/// Canonical tracing target for this crate.
pub(crate) use self::constants::TRACING_TARGET_DECODER_METADATA_METAPLEX_TOKEN_METADATA;
/// Crate-root access to `decode` from `instruction`.
pub(crate) use self::instruction::decoder_metadata_metaplex_token_metadata_decode;
/// Crate-root access to `entry_for_discriminator` from `instruction`.

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/metadata/metaplex_token_metadata/constants.rs
// version: 29
// version: 30
//! Internal constants for Metaplex Token Metadata decoding.
@@ -324,5 +324,5 @@ pub(crate) const DC_METADATA_MTM_INSTRUCTION_ENTRIES: &[(u8, &str, bool)] = &[
];
/// Canonical tracing target for this decoder.
pub(crate) const DC_METADATA_MTM_TRACING_TARGET: &str =
pub(crate) const TRACING_TARGET_DECODER_METADATA_METAPLEX_TOKEN_METADATA: &str =
"kb-lib.decoder.metadata.metaplex_token_metadata";

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/metadata/metaplex_token_metadata/decoder.rs
// version: 28
// version: 29
//! Exact contextual dispatch for Metaplex Token Metadata.
@@ -112,7 +112,7 @@ impl crate::DcApiInstructionDecoder for crate::DcMetadataMetaplexTokenMetadataDe
| crate::DcApiDecoderOutcomeStatus::Unsupported
) {
tracing::error!(
target: crate::DC_METADATA_MTM_TRACING_TARGET,
target: crate::TRACING_TARGET_DECODER_METADATA_METAPLEX_TOKEN_METADATA,
action = "decode_failure",
signature = %input.signature,
slot = input.slot,
@@ -127,7 +127,7 @@ impl crate::DcApiInstructionDecoder for crate::DcMetadataMetaplexTokenMetadataDe
);
}
tracing::debug!(
target: crate::DC_METADATA_MTM_TRACING_TARGET,
target: crate::TRACING_TARGET_DECODER_METADATA_METAPLEX_TOKEN_METADATA,
action = "decode",
signature = %input.signature,
instruction_path = %input.instruction_path,
@@ -498,7 +498,7 @@ mod tests {
&[kb_program_ids::METADATA_METAPLEX_TOKEN_METADATA_PROGRAM_ID]
);
assert_eq!(
crate::DC_METADATA_MTM_TRACING_TARGET,
crate::TRACING_TARGET_DECODER_METADATA_METAPLEX_TOKEN_METADATA,
"kb-lib.decoder.metadata.metaplex_token_metadata"
);
assert_eq!(crate::DcApiInstructionDecoder::coverage(&decoder).len(), 58);

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/solana.rs
// version: 4
// version: 5
//! `solana` decoder family.
@@ -32,7 +32,6 @@ pub(crate) use self::core::DC_SOLANA_CORE_SIGNATURE_BYTES;
pub(crate) use self::core::DC_SOLANA_CORE_SLASHING_SURFACE_CODE;
pub(crate) use self::core::DC_SOLANA_CORE_STAKE_SURFACE_CODE;
pub(crate) use self::core::DC_SOLANA_CORE_SYSTEM_SURFACE_CODE;
pub(crate) use self::core::DC_SOLANA_CORE_TRACING_TARGET;
pub(crate) use self::core::DC_SOLANA_CORE_U8_OFFSETS_BYTES;
pub(crate) use self::core::DC_SOLANA_CORE_U16_OFFSETS_BYTES;
pub(crate) use self::core::DC_SOLANA_CORE_VOTE_SURFACE_CODE;
@@ -40,6 +39,7 @@ pub(crate) use self::core::DC_SOLANA_CORE_ZK_ELGAMAL_PROOF_SURFACE_CODE;
pub(crate) use self::core::DC_SOLANA_CORE_ZK_TOKEN_PROOF_SURFACE_CODE;
pub(crate) use self::core::DcSolanaCoreAccountRole;
pub(crate) use self::core::DcSolanaCoreResolvedInstructionPayload;
pub(crate) use self::core::TRACING_TARGET_DECODER_SOLANA_CORE;
pub(crate) use self::core::decoder_solana_core_address_lookup_table_coverage;
pub(crate) use self::core::decoder_solana_core_address_lookup_table_decode;
pub(crate) use self::core::decoder_solana_core_address_lookup_table_recognize;

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/solana/core.rs
// version: 18
// version: 19
//! Solana Core decoder component.
@@ -94,8 +94,6 @@ pub(crate) use self::constants::DC_SOLANA_CORE_SLASHING_SURFACE_CODE;
pub(crate) use self::constants::DC_SOLANA_CORE_STAKE_SURFACE_CODE;
/// Stable System Program surface code.
pub(crate) use self::constants::DC_SOLANA_CORE_SYSTEM_SURFACE_CODE;
/// Canonical tracing target for the Solana Core decoder component.
pub(crate) use self::constants::DC_SOLANA_CORE_TRACING_TARGET;
/// Byte length of one secp256k1 offsets entry.
pub(crate) use self::constants::DC_SOLANA_CORE_U8_OFFSETS_BYTES;
/// Byte length of one Ed25519 or secp256r1 offsets entry.
@@ -106,6 +104,8 @@ pub(crate) use self::constants::DC_SOLANA_CORE_VOTE_SURFACE_CODE;
pub(crate) use self::constants::DC_SOLANA_CORE_ZK_ELGAMAL_PROOF_SURFACE_CODE;
/// Stable historical ZK Token Proof surface code.
pub(crate) use self::constants::DC_SOLANA_CORE_ZK_TOKEN_PROOF_SURFACE_CODE;
/// Canonical tracing target for the Solana Core decoder component.
pub(crate) use self::constants::TRACING_TARGET_DECODER_SOLANA_CORE;
/// Builds one exact decoded native observation.
pub(crate) use self::event::decoder_solana_core_decoded_result;
/// Builds one failed native decode result.

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/solana/core/constants.rs
// version: 13
// version: 14
//! Local constants for the Solana Core decoder component.
@@ -67,4 +67,4 @@ pub(crate) const DC_SOLANA_CORE_MAX_NATIVE_INSTRUCTION_PAYLOAD_BYTES: usize = 4_
pub(crate) const DC_SOLANA_CORE_NATIVE_EVENT_VERSION: u32 = 1;
/// Canonical tracing target for the Solana Core decoder component.
pub(crate) const DC_SOLANA_CORE_TRACING_TARGET: &str = "kb-lib.decoder.solana.core";
pub(crate) const TRACING_TARGET_DECODER_SOLANA_CORE: &str = "kb-lib.decoder.solana.core";

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/solana/core/decoder.rs
// version: 24
// version: 25
//! Runtime-native Solana program classifier for the common decode pipeline.
@@ -149,7 +149,7 @@ impl crate::DcApiProtocolDecoder for crate::DcSolanaCoreDecoder {
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
tracing::debug!(target: crate::DC_SOLANA_CORE_TRACING_TARGET, "legacy native decoder adapter classified an observation without maximal decoding");
tracing::debug!(target: crate::TRACING_TARGET_DECODER_SOLANA_CORE, "legacy native decoder adapter classified an observation without maximal decoding");
return std::result::Result::Ok(std::vec::Vec::new());
}
}
@@ -211,14 +211,14 @@ impl crate::DcApiInstructionDecoder for crate::DcSolanaCoreDecoder {
&self,
input: &crate::MdCoreInstructionReplayInput,
) -> crate::DcApiDecoderRecognition {
tracing::debug!(target: crate::DC_SOLANA_CORE_TRACING_TARGET, action = "recognize", signature = %input.signature, slot = input.slot, instruction_path = %input.instruction_path, program_id = %input.program_id, input_key = %input.replay_input_key, transaction_failed = input.transaction_failed, "recognize native Solana contextual instruction");
tracing::debug!(target: crate::TRACING_TARGET_DECODER_SOLANA_CORE, action = "recognize", signature = %input.signature, slot = input.slot, instruction_path = %input.instruction_path, program_id = %input.program_id, input_key = %input.replay_input_key, transaction_failed = input.transaction_failed, "recognize native Solana contextual instruction");
let surface = NATIVE_SURFACES
.iter()
.find(|surface| return surface.program_id == input.program_id);
let surface = match surface {
std::option::Option::Some(value) => value,
std::option::Option::None => {
tracing::debug!(target: crate::DC_SOLANA_CORE_TRACING_TARGET, action = "recognize", signature = %input.signature, instruction_path = %input.instruction_path, program_id = %input.program_id, compatible = false, "native Solana decoder does not support program id");
tracing::debug!(target: crate::TRACING_TARGET_DECODER_SOLANA_CORE, action = "recognize", signature = %input.signature, instruction_path = %input.instruction_path, program_id = %input.program_id, compatible = false, "native Solana decoder does not support program id");
return crate::DcApiDecoderRecognition::incompatible();
},
};
@@ -255,7 +255,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSolanaCoreDecoder {
crate::decoder_api_discriminator_8_hex(input),
)
};
tracing::debug!(target: crate::DC_SOLANA_CORE_TRACING_TARGET, action = "recognize", signature = %input.signature, instruction_path = %input.instruction_path, program_id = %input.program_id, surface_code = surface.surface_code, recognition = ?recognition, compatible = true, "native Solana decoder recognized contextual instruction");
tracing::debug!(target: crate::TRACING_TARGET_DECODER_SOLANA_CORE, action = "recognize", signature = %input.signature, instruction_path = %input.instruction_path, program_id = %input.program_id, surface_code = surface.surface_code, recognition = ?recognition, compatible = true, "native Solana decoder recognized contextual instruction");
return recognition;
}
@@ -298,7 +298,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSolanaCoreDecoder {
| crate::DcApiDecoderOutcomeStatus::Unsupported
) {
tracing::error!(
target: crate::DC_SOLANA_CORE_TRACING_TARGET,
target: crate::TRACING_TARGET_DECODER_SOLANA_CORE,
action = "decode_failure",
signature = %input.signature,
slot = input.slot,
@@ -317,7 +317,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSolanaCoreDecoder {
"native instruction was not decoded successfully"
);
}
tracing::debug!(target: crate::DC_SOLANA_CORE_TRACING_TARGET, action = "decode", signature = %input.signature, slot = input.slot, instruction_path = %input.instruction_path, program_id = %input.program_id, input_key = %input.replay_input_key, payload_hash = ?input.instruction_payload_hash, transaction_failed = input.transaction_failed, transaction_error = ?input.transaction_err_json, result_status = ?result.status, recognized_entry_code = ?result.recognized_entry_code, observation_count = result.observations.len(), diagnostic_count = result.diagnostics.len(), "native instruction decode completed");
tracing::debug!(target: crate::TRACING_TARGET_DECODER_SOLANA_CORE, action = "decode", signature = %input.signature, slot = input.slot, instruction_path = %input.instruction_path, program_id = %input.program_id, input_key = %input.replay_input_key, payload_hash = ?input.instruction_payload_hash, transaction_failed = input.transaction_failed, transaction_error = ?input.transaction_err_json, result_status = ?result.status, recognized_entry_code = ?result.recognized_entry_code, observation_count = result.observations.len(), diagnostic_count = result.diagnostics.len(), "native instruction decode completed");
return result;
}
}

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/solana/core/loaders.rs
// version: 9
// version: 10
//! Exact bounded decoding for Solana native loader generations.
@@ -221,7 +221,7 @@ pub(crate) fn decoder_solana_core_loaders_decode(
input: &crate::MdCoreInstructionReplayInput,
) -> crate::DcApiDecoderExecutionResult {
if input.program_id == kb_program_ids::NATIVE_LOADER_PROGRAM_ID {
tracing::debug!(target: crate::DC_SOLANA_CORE_TRACING_TARGET, action = "decode_native_loader", signature = %input.signature, instruction_path = %input.instruction_path, source = SOURCE_NATIVE_LOADER, "ignore opaque direct Native Loader invocation without inventing an instruction schema");
tracing::debug!(target: crate::TRACING_TARGET_DECODER_SOLANA_CORE, action = "decode_native_loader", signature = %input.signature, instruction_path = %input.instruction_path, source = SOURCE_NATIVE_LOADER, "ignore opaque direct Native Loader invocation without inventing an instruction schema");
return crate::DcApiDecoderExecutionResult::ignored(std::option::Option::Some(
"direct_invocation_opaque".to_string(),
));

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/spl.rs
// version: 7
// version: 8
//! `spl` decoder family.
@@ -31,10 +31,10 @@ pub(crate) use self::associated_token_account::DC_SPL_ATA_MAX_INSTRUCTION_BYTES;
pub(crate) use self::associated_token_account::DC_SPL_ATA_MAX_TRANSACTION_KEYS;
/// Stable protocol and surface code for the Associated Token Account program.
pub(crate) use self::associated_token_account::DC_SPL_ATA_SURFACE_CODE;
/// Canonical tracing target for the Associated Token Account decoder.
pub(crate) use self::associated_token_account::DC_SPL_ATA_TRACING_TARGET;
/// Exact decoder for the SPL Associated Token Account program.
pub use self::associated_token_account::DcSplAssociatedTokenAccountDecoder;
/// Canonical tracing target for the Associated Token Account decoder.
pub(crate) use self::associated_token_account::TRACING_TARGET_DECODER_SPL_ATA;
/// Decodes one bounded Associated Token Account instruction.
pub(crate) use self::associated_token_account::decoder_spl_associated_token_account_decode;
/// Returns the exact entry matching an Associated Token Account wire.
@@ -49,14 +49,14 @@ pub(crate) use self::elgamal_registry::DC_SPL_ELGAMAL_REGISTRY_EVENT_VERSION;
pub(crate) use self::elgamal_registry::DC_SPL_ELGAMAL_REGISTRY_MAX_INSTRUCTION_BYTES;
/// Stable SPL ElGamal registry surface code.
pub(crate) use self::elgamal_registry::DC_SPL_ELGAMAL_REGISTRY_SURFACE_CODE;
/// Canonical tracing target for the SPL ElGamal registry decoder.
pub(crate) use self::elgamal_registry::DC_SPL_ELGAMAL_REGISTRY_TRACING_TARGET;
/// One parsed SPL ElGamal registry instruction.
pub(crate) use self::elgamal_registry::DcSplElGamalRegistryParsedRegistryInstruction;
/// Parsed SPL ElGamal public-key registry account.
pub use self::elgamal_registry::DcSplElGamalRegistryState;
/// Exact decoder for the SPL ElGamal registry program.
pub use self::elgamal_registry::DcSplElgamalRegistryDecoder;
/// Canonical tracing target for the SPL ElGamal registry decoder.
pub(crate) use self::elgamal_registry::TRACING_TARGET_DECODER_SPL_ELGAMAL_REGISTRY;
/// Decodes one bounded SPL ElGamal registry instruction.
pub(crate) use self::elgamal_registry::decoder_spl_elgamal_registry_decode;
/// Decodes one bounded SPL ElGamal registry instruction payload.
@@ -73,8 +73,6 @@ pub(crate) use self::memo::DC_SPL_MEMO_EVENT_VERSION;
pub(crate) use self::memo::DC_SPL_MEMO_MAX_PAYLOAD_BYTES;
/// Stable protocol code shared by Memo generations.
pub(crate) use self::memo::DC_SPL_MEMO_PROTOCOL_CODE;
/// Canonical tracing target for the SPL Memo decoder.
pub(crate) use self::memo::DC_SPL_MEMO_TRACING_TARGET;
/// Stable Memo v1 surface code.
pub(crate) use self::memo::DC_SPL_MEMO_V1_SURFACE_CODE;
/// Stable Memo v3 surface code.
@@ -83,6 +81,8 @@ pub(crate) use self::memo::DC_SPL_MEMO_V3_SURFACE_CODE;
pub(crate) use self::memo::DC_SPL_MEMO_V4_SURFACE_CODE;
/// Exact decoder for the three registered SPL Memo generations.
pub use self::memo::DcSplMemoDecoder;
/// Canonical tracing target for the SPL Memo decoder.
pub(crate) use self::memo::TRACING_TARGET_DECODER_SPL_MEMO;
/// Decodes one bounded SPL Memo instruction.
pub(crate) use self::memo::decoder_spl_memo_decode;
/// Reserved `kb_decoder_spl_noop` decoder.
@@ -105,10 +105,10 @@ pub(crate) use self::token::DC_SPL_TOKEN_MAX_BATCH_INSTRUCTIONS;
pub(crate) use self::token::DC_SPL_TOKEN_MAX_INSTRUCTION_BYTES;
/// Stable protocol and surface code for the classic SPL Token program.
pub(crate) use self::token::DC_SPL_TOKEN_SURFACE_CODE;
/// Canonical tracing target for the classic SPL Token decoder.
pub(crate) use self::token::DC_SPL_TOKEN_TRACING_TARGET;
/// Exact decoder for the classic SPL Token program.
pub use self::token::DcSplTokenDecoder;
/// Canonical tracing target for the classic SPL Token decoder.
pub(crate) use self::token::TRACING_TARGET_DECODER_SPL_TOKEN;
/// Decodes one bounded classic SPL Token instruction.
pub(crate) use self::token::decoder_spl_token_decode;
/// Returns the published entry matching one classic SPL Token tag.
@@ -131,8 +131,6 @@ pub(crate) use self::token2022::DC_SPL_TOKEN2022_MAX_INSTRUCTION_BYTES;
pub(crate) use self::token2022::DC_SPL_TOKEN2022_MAX_METADATA_STRING_BYTES;
/// Stable Token-2022 surface code.
pub(crate) use self::token2022::DC_SPL_TOKEN2022_SURFACE_CODE;
/// Canonical tracing target for the Token-2022 decoder.
pub(crate) use self::token2022::DC_SPL_TOKEN2022_TRACING_TARGET;
/// Exact decoder for the Token-2022 program.
pub use self::token2022::DcSplToken2022Decoder;
/// Parsed Token-2022 Mint, Account, or Multisig state.
@@ -141,6 +139,8 @@ pub use self::token2022::DcToken2022State;
pub use self::token2022::DcToken2022StateKind;
/// One exact Token-2022 TLV entry.
pub use self::token2022::DcToken2022TlvEntry;
/// Canonical tracing target for the Token-2022 decoder.
pub(crate) use self::token2022::TRACING_TARGET_DECODER_SPL_TOKEN2022;
/// Decodes one bounded Token-2022 instruction.
pub(crate) use self::token2022::decoder_spl_token2022_decode;
/// Returns the exact entry matching one Token-2022 tag.

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/spl/associated_token_account.rs
// version: 3
// version: 4
//! Exact SPL Associated Token Account decoder component.
@@ -27,7 +27,7 @@ pub(crate) use self::constants::DC_SPL_ATA_MAX_TRANSACTION_KEYS;
/// Stable protocol and surface code for the Associated Token Account program.
pub(crate) use self::constants::DC_SPL_ATA_SURFACE_CODE;
/// Canonical tracing target for the Associated Token Account decoder.
pub(crate) use self::constants::DC_SPL_ATA_TRACING_TARGET;
pub(crate) use self::constants::TRACING_TARGET_DECODER_SPL_ATA;
/// Decodes one bounded Associated Token Account instruction.
pub(crate) use self::wire::decoder_spl_associated_token_account_decode;
/// Returns the exact entry matching an Associated Token Account wire.

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/spl/associated_token_account/constants.rs
// version: 1
// version: 2
//! Local constants for the `kb-lib` SPL Associated Token Account component.
@@ -24,4 +24,5 @@ pub(crate) const DC_SPL_ATA_INSTRUCTION_ENTRIES: &[(u8, &str, bool)] = &[
(2, "recover_nested", false),
];
/// Canonical tracing target for the Associated Token Account decoder.
pub(crate) const DC_SPL_ATA_TRACING_TARGET: &str = "kb-lib.decoder.spl.associated_token_account";
pub(crate) const TRACING_TARGET_DECODER_SPL_ATA: &str =
"kb-lib.decoder.spl.associated_token_account";

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/spl/associated_token_account/decoder.rs
// version: 1
// version: 2
//! Exact SPL Associated Token Account dispatch for the common decode pipeline.
@@ -111,7 +111,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplAssociatedTokenAccountDecode
| crate::DcApiDecoderOutcomeStatus::Unsupported
) {
tracing::error!(
target: crate::DC_SPL_ATA_TRACING_TARGET,
target: crate::TRACING_TARGET_DECODER_SPL_ATA,
action = "decode_failure",
signature = %input.signature,
slot = input.slot,
@@ -126,7 +126,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplAssociatedTokenAccountDecode
);
}
tracing::debug!(
target: crate::DC_SPL_ATA_TRACING_TARGET,
target: crate::TRACING_TARGET_DECODER_SPL_ATA,
action = "decode",
signature = %input.signature,
instruction_path = %input.instruction_path,

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/spl/elgamal_registry.rs
// version: 2
// version: 3
//! Exact SPL Token-2022 ElGamal public-key registry decoder component.
@@ -24,7 +24,7 @@ pub(crate) use self::constants::DC_SPL_ELGAMAL_REGISTRY_MAX_INSTRUCTION_BYTES;
/// Stable SPL ElGamal registry surface code.
pub(crate) use self::constants::DC_SPL_ELGAMAL_REGISTRY_SURFACE_CODE;
/// Canonical tracing target for the SPL ElGamal registry decoder.
pub(crate) use self::constants::DC_SPL_ELGAMAL_REGISTRY_TRACING_TARGET;
pub(crate) use self::constants::TRACING_TARGET_DECODER_SPL_ELGAMAL_REGISTRY;
/// One parsed SPL ElGamal registry instruction.
pub(crate) use self::wire::DcSplElGamalRegistryParsedRegistryInstruction;
/// Decodes one bounded SPL ElGamal registry instruction.

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/spl/elgamal_registry/constants.rs
// version: 1
// version: 2
//! Constants for the SPL ElGamal registry decoder.
@@ -8,5 +8,5 @@ pub(crate) const DC_SPL_ELGAMAL_REGISTRY_EVENT_VERSION: u32 = 1;
pub(crate) const DC_SPL_ELGAMAL_REGISTRY_MAX_INSTRUCTION_BYTES: usize = 16;
/// Canonical tracing target for this crate.
pub(crate) const DC_SPL_ELGAMAL_REGISTRY_TRACING_TARGET: &str =
pub(crate) const TRACING_TARGET_DECODER_SPL_ELGAMAL_REGISTRY: &str =
"kb-lib.decoder.spl.elgamal_registry";

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/spl/elgamal_registry/decoder.rs
// version: 1
// version: 2
//! Exact dispatch for the SPL ElGamal registry program.
@@ -125,7 +125,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplElgamalRegistryDecoder {
| crate::DcApiDecoderOutcomeStatus::Unsupported
) {
tracing::error!(
target: crate::DC_SPL_ELGAMAL_REGISTRY_TRACING_TARGET,
target: crate::TRACING_TARGET_DECODER_SPL_ELGAMAL_REGISTRY,
action = "decode_failure",
signature = %input.signature,
slot = input.slot,
@@ -142,7 +142,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplElgamalRegistryDecoder {
);
}
tracing::debug!(
target: crate::DC_SPL_ELGAMAL_REGISTRY_TRACING_TARGET,
target: crate::TRACING_TARGET_DECODER_SPL_ELGAMAL_REGISTRY,
action = "decode",
signature = %input.signature,
instruction_path = %input.instruction_path,

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/spl/memo.rs
// version: 2
// version: 3
//! Exact SPL Memo v1, v3 and v4 decoder component.
@@ -18,13 +18,13 @@ pub(crate) use self::constants::DC_SPL_MEMO_EVENT_VERSION;
pub(crate) use self::constants::DC_SPL_MEMO_MAX_PAYLOAD_BYTES;
/// Stable protocol code shared by Memo generations.
pub(crate) use self::constants::DC_SPL_MEMO_PROTOCOL_CODE;
/// Canonical tracing target for the SPL Memo decoder.
pub(crate) use self::constants::DC_SPL_MEMO_TRACING_TARGET;
/// Stable Memo v1 surface code.
pub(crate) use self::constants::DC_SPL_MEMO_V1_SURFACE_CODE;
/// Stable Memo v3 surface code.
pub(crate) use self::constants::DC_SPL_MEMO_V3_SURFACE_CODE;
/// Stable Memo v4 surface code.
pub(crate) use self::constants::DC_SPL_MEMO_V4_SURFACE_CODE;
/// Canonical tracing target for the SPL Memo decoder.
pub(crate) use self::constants::TRACING_TARGET_DECODER_SPL_MEMO;
/// Decodes one bounded SPL Memo instruction.
pub(crate) use self::payload::decoder_spl_memo_decode;

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/spl/memo/constants.rs
// version: 2
// version: 3
//! Local constants for the `kb-lib` SPL Memo component. Program identifiers live in `kb_program_ids`.
@@ -18,4 +18,4 @@ pub(crate) const DC_SPL_MEMO_DIAGNOSTIC_PREFIX_BYTES: usize = 32;
/// Current stable Memo decoded event contract version.
pub(crate) const DC_SPL_MEMO_EVENT_VERSION: u32 = 1;
/// Canonical tracing target for this crate.
pub(crate) const DC_SPL_MEMO_TRACING_TARGET: &str = "kb-lib.decoder.spl.memo";
pub(crate) const TRACING_TARGET_DECODER_SPL_MEMO: &str = "kb-lib.decoder.spl.memo";

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/spl/memo/decoder.rs
// version: 1
// version: 2
//! Exact SPL Memo v1, v3 and v4 dispatch for the common decode pipeline.
@@ -124,7 +124,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplMemoDecoder {
| crate::DcApiDecoderOutcomeStatus::Unsupported
) {
tracing::error!(
target: crate::DC_SPL_MEMO_TRACING_TARGET,
target: crate::TRACING_TARGET_DECODER_SPL_MEMO,
action = "decode_failure",
signature = %input.signature,
slot = input.slot,
@@ -141,7 +141,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplMemoDecoder {
);
}
tracing::debug!(
target: crate::DC_SPL_MEMO_TRACING_TARGET,
target: crate::TRACING_TARGET_DECODER_SPL_MEMO,
action = "decode",
signature = %input.signature,
instruction_path = %input.instruction_path,

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/spl/token.rs
// version: 2
// version: 3
//! Exact classic SPL Token decoder component.
@@ -25,7 +25,7 @@ pub(crate) use self::constants::DC_SPL_TOKEN_MAX_INSTRUCTION_BYTES;
/// Stable protocol and surface code for the classic SPL Token program.
pub(crate) use self::constants::DC_SPL_TOKEN_SURFACE_CODE;
/// Canonical tracing target for the classic SPL Token decoder.
pub(crate) use self::constants::DC_SPL_TOKEN_TRACING_TARGET;
pub(crate) use self::constants::TRACING_TARGET_DECODER_SPL_TOKEN;
/// Decodes one bounded classic SPL Token instruction.
pub(crate) use self::wire::decoder_spl_token_decode;
/// Returns the published entry matching one classic SPL Token tag.

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/spl/token/constants.rs
// version: 1
// version: 2
//! Local constants for the `kb-lib` SPL Token component. Program identifiers live in `kb_program_ids`.
@@ -47,4 +47,4 @@ pub(crate) const DC_SPL_TOKEN_INSTRUCTION_ENTRIES: &[(u8, &str, bool)] = &[
(255, "batch", false),
];
/// Canonical tracing target for this crate.
pub(crate) const DC_SPL_TOKEN_TRACING_TARGET: &str = "kb-lib.decoder.spl.token";
pub(crate) const TRACING_TARGET_DECODER_SPL_TOKEN: &str = "kb-lib.decoder.spl.token";

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/spl/token/decoder.rs
// version: 1
// version: 2
//! Exact classic SPL Token dispatch for the common decode pipeline.
@@ -109,7 +109,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplTokenDecoder {
| crate::DcApiDecoderOutcomeStatus::Unsupported
) {
tracing::error!(
target: crate::DC_SPL_TOKEN_TRACING_TARGET,
target: crate::TRACING_TARGET_DECODER_SPL_TOKEN,
action = "decode_failure",
signature = %input.signature,
slot = input.slot,
@@ -125,7 +125,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplTokenDecoder {
);
}
tracing::debug!(
target: crate::DC_SPL_TOKEN_TRACING_TARGET,
target: crate::TRACING_TARGET_DECODER_SPL_TOKEN,
action = "decode",
signature = %input.signature,
instruction_path = %input.instruction_path,

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/spl/token2022.rs
// version: 2
// version: 3
//! Exact Token-2022 instruction and state decoder component.
@@ -36,7 +36,7 @@ pub(crate) use self::constants::DC_SPL_TOKEN2022_MAX_METADATA_STRING_BYTES;
/// Stable Token-2022 surface code.
pub(crate) use self::constants::DC_SPL_TOKEN2022_SURFACE_CODE;
/// Canonical tracing target for the Token-2022 decoder.
pub(crate) use self::constants::DC_SPL_TOKEN2022_TRACING_TARGET;
pub(crate) use self::constants::TRACING_TARGET_DECODER_SPL_TOKEN2022;
/// Decodes one bounded Token-2022 instruction.
pub(crate) use self::wire::decoder_spl_token2022_decode;
/// Returns the exact entry matching one Token-2022 tag.

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/spl/token2022/constants.rs
// version: 1
// version: 2
//! Local constants for the exact Token-2022 decoder. Program identifiers live in `kb_program_ids`.
@@ -69,4 +69,4 @@ pub(crate) const DC_SPL_TOKEN2022_INSTRUCTION_ENTRIES: &[(u8, &str, bool)] = &[
(255, "batch", false),
];
/// Canonical tracing target for this crate.
pub(crate) const DC_SPL_TOKEN2022_TRACING_TARGET: &str = "kb-lib.decoder.spl.token2022";
pub(crate) const TRACING_TARGET_DECODER_SPL_TOKEN2022: &str = "kb-lib.decoder.spl.token2022";

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/spl/token2022/decoder.rs
// version: 1
// version: 2
//! Exact Token-2022 dispatch for the common decode pipeline.
@@ -109,7 +109,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplToken2022Decoder {
| crate::DcApiDecoderOutcomeStatus::Unsupported
) {
tracing::error!(
target: crate::DC_SPL_TOKEN2022_TRACING_TARGET,
target: crate::TRACING_TARGET_DECODER_SPL_TOKEN2022,
action = "decode_failure",
signature = %input.signature,
slot = input.slot,
@@ -125,7 +125,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplToken2022Decoder {
);
}
tracing::debug!(
target: crate::DC_SPL_TOKEN2022_TRACING_TARGET,
target: crate::TRACING_TARGET_DECODER_SPL_TOKEN2022,
action = "decode",
signature = %input.signature,
instruction_path = %input.instruction_path,