This repository has been archived by the owner on Jan 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
63 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#[cfg(target_os = "solana")] | ||
mod definitions; | ||
|
||
#[cfg(target_os = "solana")] | ||
pub use definitions::*; | ||
|
||
/// Maximum CPI instruction data size. 10 KiB was chosen to ensure that CPI | ||
/// instructions are not more limited than transaction instructions if the size | ||
/// of transactions is doubled in the future. | ||
pub const MAX_CPI_INSTRUCTION_DATA_LEN: u64 = 10 * 1024; | ||
|
||
/// Maximum CPI instruction accounts. 255 was chosen to ensure that instruction | ||
/// accounts are always within the maximum instruction account limit for BPF | ||
/// program instructions. | ||
pub const MAX_CPI_INSTRUCTION_ACCOUNTS: u8 = u8::MAX; | ||
|
||
/// Maximum number of account info structs that can be used in a single CPI | ||
/// invocation. A limit on account info structs is effectively the same as | ||
/// limiting the number of unique accounts. 64 was chosen to match the max | ||
/// number of locked accounts per transaction (MAX_TX_ACCOUNT_LOCKS). | ||
pub const MAX_CPI_ACCOUNT_INFOS: usize = 64; |