solana_system_interface/
lib.rs

1//! The System program interface.
2
3#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
4#![cfg_attr(docsrs, feature(doc_auto_cfg))]
5
6pub mod error;
7pub mod instruction;
8#[cfg(target_arch = "wasm32")]
9mod wasm;
10
11#[cfg(test)]
12static_assertions::const_assert!(MAX_PERMITTED_DATA_LENGTH <= u32::MAX as u64);
13/// Maximum permitted size of account data (10 MiB).
14///
15// SBF program entrypoint assumes that the max account data length
16// will fit inside a u32. If this constant no longer fits in a u32,
17// the entrypoint deserialization code in the SDK must be updated.
18pub const MAX_PERMITTED_DATA_LENGTH: u64 = 10 * 1024 * 1024;
19
20#[cfg(test)]
21static_assertions::const_assert_eq!(MAX_PERMITTED_DATA_LENGTH, 10_485_760);
22/// Maximum permitted size of new allocations per transaction, in bytes.
23///
24/// The value was chosen such that at least one max sized account could be created,
25/// plus some additional resize allocations.
26pub const MAX_PERMITTED_ACCOUNTS_DATA_ALLOCATIONS_PER_TRANSACTION: i64 =
27    MAX_PERMITTED_DATA_LENGTH as i64 * 2;
28
29pub mod program {
30    solana_pubkey::declare_id!("11111111111111111111111111111111");
31}