Files
khadhroony-bot3/kb-onchain-transport/src/constants.rs
2026-07-25 00:48:29 +02:00

42 lines
2.4 KiB
Rust

// file: kb-onchain-transport/src/constants.rs
// version: 7
//! Local constants for the `kb-onchain-transport` crate.
/// Canonical tracing target for this crate.
pub(crate) const TRACING_TARGET: &str = "kb-onchain-transport";
/// Official Devnet genesis hash.
pub(crate) const DEVNET_GENESIS_HASH: &str = "EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG";
/// Official Testnet genesis hash.
pub(crate) const TESTNET_GENESIS_HASH: &str = "4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY";
/// Official Mainnet genesis hash; RPC and CLI endpoints retain the legacy `mainnet-beta` alias.
pub(crate) const MAINNET_GENESIS_HASH: &str = "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d";
/// Local defensive maximum for one base64 message or transaction request value.
pub(crate) const MAX_EXECUTION_RPC_BASE64_LENGTH: usize = 65_536;
/// Local defensive maximum for decoded account data returned by one execution RPC request.
pub(crate) const MAX_EXECUTION_ACCOUNT_DATA_BYTES: usize = 65_536;
/// Local defensive maximum for account snapshots requested from one simulation.
pub(crate) const MAX_SIMULATION_ACCOUNT_COUNT: usize = 128;
/// Maximum signatures accepted by one `getSignatureStatuses` request.
pub(crate) const MAX_SIGNATURE_STATUS_COUNT: usize = 256;
/// Maximum confirmation polling attempts accepted by the bounded helper.
pub(crate) const MAX_CONFIRMATION_ATTEMPTS: u32 = 10_000;
/// Maximum delay between confirmation polls.
pub(crate) const MAX_CONFIRMATION_POLL_INTERVAL_MS: u64 = 60_000;
/// Maximum number of public keys accepted by `getMultipleAccounts`.
pub(crate) const MAX_MULTIPLE_ACCOUNT_COUNT: usize = 100;
/// Maximum writable-account set accepted by `getRecentPrioritizationFees`.
pub(crate) const MAX_PRIORITIZATION_FEE_ACCOUNT_COUNT: usize = 128;
/// Maximum sample count accepted by `getRecentPerformanceSamples`.
pub(crate) const MAX_PERFORMANCE_SAMPLE_COUNT: usize = 720;
/// Maximum consecutive slot leaders accepted by `getSlotLeaders`.
pub(crate) const MAX_SLOT_LEADER_COUNT: u64 = 5_000;
/// Maximum slot span or result limit accepted by block-range methods.
pub(crate) const MAX_BLOCK_RANGE: u64 = 500_000;
/// Maximum decoded memcmp payload accepted by the standard RPC contract.
pub(crate) const MAX_MEMCMP_DECODED_BYTES: usize = 128;
/// Maximum base58 text length for a 128-byte memcmp payload.
pub(crate) const MAX_MEMCMP_BASE58_LENGTH: usize = 175;
/// Maximum base64 text length for a 128-byte memcmp payload.
pub(crate) const MAX_MEMCMP_BASE64_LENGTH: usize = 172;