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