solana_program/syscalls/
mod.rs

1#[cfg(target_os = "solana")]
2mod definitions;
3
4#[cfg(target_os = "solana")]
5pub use definitions::*;
6
7/// Maximum CPI instruction data size. 10 KiB was chosen to ensure that CPI
8/// instructions are not more limited than transaction instructions if the size
9/// of transactions is doubled in the future.
10pub const MAX_CPI_INSTRUCTION_DATA_LEN: u64 = 10 * 1024;
11
12/// Maximum CPI instruction accounts. 255 was chosen to ensure that instruction
13/// accounts are always within the maximum instruction account limit for BPF
14/// program instructions.
15pub const MAX_CPI_INSTRUCTION_ACCOUNTS: u8 = u8::MAX;
16
17/// Maximum number of account info structs that can be used in a single CPI
18/// invocation. A limit on account info structs is effectively the same as
19/// limiting the number of unique accounts. 128 was chosen to match the max
20/// number of locked accounts per transaction (MAX_TX_ACCOUNT_LOCKS).
21pub const MAX_CPI_ACCOUNT_INFOS: usize = 128;