// file: kb-lib/src/decoder/solana/core/constants.rs // version: 14 //! Local constants for the Solana Core decoder component. /// Stable protocol code shared by native Solana events. pub(crate) const DC_SOLANA_CORE_PROTOCOL_CODE: &str = "solana_native"; /// Stable System Program surface code. pub(crate) const DC_SOLANA_CORE_SYSTEM_SURFACE_CODE: &str = "solana_native_system"; /// Stable deprecated immutable BPF Loader surface code. pub(crate) const DC_SOLANA_CORE_BPF_LOADER_DEPRECATED_SURFACE_CODE: &str = "solana_native_bpf_loader_deprecated"; /// Stable immutable BPF Loader v2 surface code. pub(crate) const DC_SOLANA_CORE_BPF_LOADER_SURFACE_CODE: &str = "solana_native_bpf_loader"; /// Stable upgradeable BPF Loader surface code. pub(crate) const DC_SOLANA_CORE_BPF_LOADER_UPGRADEABLE_SURFACE_CODE: &str = "solana_native_bpf_loader_upgradeable"; /// Stable Loader v4 surface code. pub(crate) const DC_SOLANA_CORE_LOADER_V4_SURFACE_CODE: &str = "solana_native_loader_v4"; /// Stable Native Loader surface code. pub(crate) const DC_SOLANA_CORE_NATIVE_LOADER_SURFACE_CODE: &str = "solana_native_loader"; /// Stable Compute Budget surface code. pub(crate) const DC_SOLANA_CORE_COMPUTE_BUDGET_SURFACE_CODE: &str = "solana_native_compute_budget"; /// Stable Address Lookup Table surface code. pub(crate) const DC_SOLANA_CORE_ADDRESS_LOOKUP_TABLE_SURFACE_CODE: &str = "solana_native_address_lookup_table"; /// Stable Vote Program surface code. pub(crate) const DC_SOLANA_CORE_VOTE_SURFACE_CODE: &str = "solana_native_vote"; /// Stable Stake Program surface code. pub(crate) const DC_SOLANA_CORE_STAKE_SURFACE_CODE: &str = "solana_native_stake"; /// Stable Config Program surface code. pub(crate) const DC_SOLANA_CORE_CONFIG_SURFACE_CODE: &str = "solana_native_config"; /// Stable Feature Gate surface code. pub(crate) const DC_SOLANA_CORE_FEATURE_SURFACE_CODE: &str = "solana_native_feature"; /// Stable Ed25519 signature precompile surface code. pub(crate) const DC_SOLANA_CORE_ED25519_SURFACE_CODE: &str = "solana_native_ed25519"; /// Stable secp256k1 signature precompile surface code. pub(crate) const DC_SOLANA_CORE_SECP256K1_SURFACE_CODE: &str = "solana_native_secp256k1"; /// Stable secp256r1 signature precompile surface code. pub(crate) const DC_SOLANA_CORE_SECP256R1_SURFACE_CODE: &str = "solana_native_secp256r1"; /// Stable native ZK ElGamal Proof surface code. pub(crate) const DC_SOLANA_CORE_ZK_ELGAMAL_PROOF_SURFACE_CODE: &str = "solana_native_zk_elgamal_proof"; /// Stable historical ZK Token Proof surface code. pub(crate) const DC_SOLANA_CORE_ZK_TOKEN_PROOF_SURFACE_CODE: &str = "solana_native_zk_token_proof"; /// Byte length shared by compact Ed25519, secp256k1 and secp256r1 signatures. pub(crate) const DC_SOLANA_CORE_SIGNATURE_BYTES: usize = 64; /// Byte length of an Ed25519 public key. pub(crate) const DC_SOLANA_CORE_ED25519_PUBLIC_KEY_BYTES: usize = 32; /// Byte length of a compressed secp256r1 public key. pub(crate) const DC_SOLANA_CORE_SECP256R1_PUBLIC_KEY_BYTES: usize = 33; /// Byte length of a secp256k1 Ethereum address. pub(crate) const DC_SOLANA_CORE_SECP256K1_ETHEREUM_ADDRESS_BYTES: usize = 20; /// Byte length of one Ed25519 or secp256r1 offsets entry. pub(crate) const DC_SOLANA_CORE_U16_OFFSETS_BYTES: usize = 14; /// Byte length of one secp256k1 offsets entry. pub(crate) const DC_SOLANA_CORE_U8_OFFSETS_BYTES: usize = 11; /// Stable Slashing Program decoder surface code. pub(crate) const DC_SOLANA_CORE_SLASHING_SURFACE_CODE: &str = "solana_native_slashing"; /// Runtime maximum number of secp256r1 signatures in one precompile instruction. pub(crate) const DC_SOLANA_CORE_SECP256R1_MAX_SIGNATURES: usize = 8; /// Maximum number of component bytes retained as a hexadecimal event prefix. pub(crate) const DC_SOLANA_CORE_PRECOMPILE_COMPONENT_PREFIX_BYTES: usize = 16; /// Maximum retained native instruction payload accepted by the first decoder phase. pub(crate) const DC_SOLANA_CORE_MAX_NATIVE_INSTRUCTION_PAYLOAD_BYTES: usize = 4_096; /// Current native event payload contract version. pub(crate) const DC_SOLANA_CORE_NATIVE_EVENT_VERSION: u32 = 1; /// Canonical tracing target for the Solana Core decoder component. pub(crate) const TRACING_TARGET_DECODER_SOLANA_CORE: &str = "kb-lib.decoder.solana.core";