Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
23f8d97
SIMD 0339 functionality + integration tests
nbelenkov Oct 16, 2025
1c9619b
Merge branch 'master' into increase_cpi_info_account_limit
nbelenkov Oct 16, 2025
2f3446d
refactor feature gate to be in ComputeBudget
nbelenkov Oct 16, 2025
12b7a09
Merge branch 'increase_cpi_info_account_limit' of github.com:nbelenko…
nbelenkov Oct 16, 2025
8a65c68
adding types for byte calculation and updated the comment
nbelenkov Oct 17, 2025
0d31630
fix missed invocation with new function signature
nbelenkov Oct 17, 2025
620ff0e
changed feature name to increase_cpi_account_info_limit
nbelenkov Oct 17, 2025
917abad
test renaming for new normal prospective + whitespace format
nbelenkov Oct 20, 2025
b0407e6
changing missed hardcoded value to type size on c account translation
nbelenkov Oct 20, 2025
01466de
fixing CI issue with whitespaces in C program
nbelenkov Oct 21, 2025
df4d61d
adding execution cost initialization to bank creation
nbelenkov Oct 21, 2025
8e3e3d1
adding CU tests
nbelenkov Oct 22, 2025
3c81a81
cargo fmt didn't work on some files
nbelenkov Oct 22, 2025
4629daa
c file whitespace
nbelenkov Oct 22, 2025
abc7e34
using test-v3 for CU estimations
nbelenkov Oct 22, 2025
c51ec8c
upper bound of CU test due to different sbpf versions
nbelenkov Oct 23, 2025
9071ea7
panic error fix
nbelenkov Oct 23, 2025
004ac03
constant for AccountInfo type size + account info charging relocation
nbelenkov Oct 23, 2025
c4b8563
merge CU consuming calls into 1
nbelenkov Oct 24, 2025
9076cff
cargo fmt
nbelenkov Oct 24, 2025
4db843a
mergin master into this PR
nbelenkov Oct 24, 2025
ac84ebd
cargo fmt the merge
nbelenkov Oct 24, 2025
3f722bd
renamed tests + cargo.lock update
nbelenkov Oct 24, 2025
bcf5f2b
Merge branch 'master' into increase_cpi_info_account_limit
nbelenkov Oct 25, 2025
634f923
updated keypair for feature gate + refactored total_cu_translation_co…
nbelenkov Oct 27, 2025
f44b4c8
Merge branch 'master' into increase_cpi_info_account_limit
nbelenkov Oct 27, 2025
c9e055d
fmt after upstream sync
nbelenkov Oct 27, 2025
171f59b
var renaming
nbelenkov Oct 27, 2025
3e71a15
Merge branch 'master' into increase_cpi_info_account_limit
nbelenkov Oct 27, 2025
4f474f5
Merge branch 'master' into increase_cpi_info_account_limit
nbelenkov Oct 28, 2025
7fa3a0d
Merge branch 'master' into increase_cpi_info_account_limit
nbelenkov Oct 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compute-budget/src/compute_budget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ impl Default for ComputeBudget {
}

impl ComputeBudget {
pub fn new_with_defaults(simd_0268_active: bool) -> Self {
pub fn new_with_defaults(simd_0268_active: bool, simd_0339_active: bool) -> Self {
Self::from_budget_and_cost(
&SVMTransactionExecutionBudget::new_with_defaults(simd_0268_active),
&SVMTransactionExecutionCost::default(),
&SVMTransactionExecutionCost::new_with_defaults(simd_0339_active),
)
}

Expand Down
13 changes: 12 additions & 1 deletion feature-set/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ impl FeatureSet {
raise_cpi_nesting_limit_to_8: self.is_active(&raise_cpi_nesting_limit_to_8::id()),
provide_instruction_data_offset_in_vm_r2: self
.is_active(&provide_instruction_data_offset_in_vm_r2::id()),
increase_cpi_account_info_limit: self.is_active(&increase_cpi_account_info_limit::id()),

}
}
}
Expand Down Expand Up @@ -1145,6 +1147,10 @@ pub mod discard_unexpected_data_complete_shreds {
solana_pubkey::declare_id!("8MhfKhoZEoiySpVe248bDkisyEcBA7JQLyUS94xoTSqN");
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is very nit picky but this doesn't look intentional, can you undo this?

pub mod increase_cpi_account_info_limit {
solana_pubkey::declare_id!("7wM2pdjwmSXviEdsorpcBY3T4YWUPQXDMepZudub7nGQ"); // Placeholder ID HAVE TO CHANGE BEFORE USE

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update this with a real key?

}

pub static FEATURE_NAMES: LazyLock<AHashMap<Pubkey, &'static str>> = LazyLock::new(|| {
[
(secp256k1_program_enabled::id(), "secp256k1 program"),
Expand Down Expand Up @@ -2070,7 +2076,12 @@ pub static FEATURE_NAMES: LazyLock<AHashMap<Pubkey, &'static str>> = LazyLock::n
discard_unexpected_data_complete_shreds::id(),
"SIMD-0337: Markers for Alpenglow Fast Leader Handover, DATA_COMPLETE_SHRED placement \
rules",
), /*************** ADD NEW FEATURES HERE ***************/
),
(
increase_cpi_account_info_limit::id(),
"SIMD-0339: increase CPI info account limit",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This title doesn't match the SIMD

),
/*************** ADD NEW FEATURES HERE ***************/
]
.iter()
.cloned()
Expand Down
71 changes: 68 additions & 3 deletions program-runtime/src/cpi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ struct SolSignerSeedsC {

/// Maximum number of account info structs that can be used in a single CPI invocation
const MAX_CPI_ACCOUNT_INFOS: usize = 128;
/// Maximum number of account info structs that can be used in a single CPI invocation with SIMD-0339 active
const MAX_CPI_ACCOUNT_INFOS_SIMD_0339: usize = 255;


/// Check that an account info pointer field points to the expected address
fn check_account_info_pointer(
Expand Down Expand Up @@ -159,7 +162,12 @@ fn check_account_infos(
) -> Result<(), Error> {
let max_cpi_account_infos = if invoke_context
.get_feature_set()
.increase_tx_account_lock_limit
.increase_cpi_account_info_limit
{
MAX_CPI_ACCOUNT_INFOS_SIMD_0339
} else if invoke_context
.get_feature_set()
.increase_tx_account_lock_limit
{
MAX_CPI_ACCOUNT_INFOS
} else {
Comment on lines 168 to 178

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two feature gates conflict with each other. Is SIMD-0339 supposed to supersede increase_tx_account_lock_limit ?

@nbelenkov nbelenkov Oct 20, 2025

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's my understanding of how this SIMD-0339 should behave, see here solana-foundation/solana-improvement-documents#339 (comment). But would leave it to @jstarry to confirm

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, SIMD-0339 will override the increase_tx_account_lock_limit feature here

Expand Down Expand Up @@ -536,6 +544,20 @@ pub fn translate_instruction_rust(

check_instruction_size(account_metas.len(), data.len())?;

if invoke_context.get_feature_set().increase_cpi_account_info_limit{
// Each account meta is 34 bytes (32 for pubkey, 1 for is_signer, 1 for is_writable)
let account_meta_bytes = account_metas
.len()
.saturating_mul(size_of::<AccountMeta>());

consume_compute_meter(
invoke_context,
(account_meta_bytes as u64)
.checked_div(invoke_context.get_execution_cost().cpi_bytes_per_unit)
.unwrap_or(u64::MAX),
)?;
}

consume_compute_meter(
invoke_context,
(data.len() as u64)
Expand Down Expand Up @@ -580,6 +602,22 @@ pub fn translate_accounts_rust<'a>(
check_aligned,
)?;

if invoke_context.get_feature_set().increase_cpi_account_info_limit{
//std::mem::size_of::<AccountInfo>() returns 48 bytes, which contains references to the 2 Pubkeys of owner and key,
//but we need the full size here so, need to add (32 + 32) bytes for Pubkey types and account for 8 + 8 bytes already existing for refence types.
//Hence adding 32 here due to 5 bytes being the padding and 11 bytes being the other data, see SIMD-0339 for calculations.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it makes sense to use std::mem::size_of::<AccountInfo>() here. The 80 bytes from the SIMD is just a sum of the sizes of pubkey, owner, data length, and lamports because these are the things that are translated from vm to host memory. I think it's better to define a constant with a comment explaining the calculation.

@nbelenkov nbelenkov Oct 22, 2025

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense, I do agree, it looks very messy otherwise. It works nicely for size_of::<AccountMeta>() but not here

let account_infos_bytes = account_infos
.len()
.saturating_mul(std::mem::size_of::<AccountInfo>().saturating_add(32));

consume_compute_meter(
invoke_context,
(account_infos_bytes as u64)
.checked_div(invoke_context.get_execution_cost().cpi_bytes_per_unit)
.unwrap_or(u64::MAX),
)?;
}

translate_accounts_common(
&account_info_keys,
account_infos,
Expand Down Expand Up @@ -655,6 +693,19 @@ pub fn translate_instruction_c(

check_instruction_size(ix_c.accounts_len as usize, data.len())?;

if invoke_context.get_feature_set().increase_cpi_account_info_limit{
// Each account meta is 34 bytes (32 for pubkey, 1 for is_signer, 1 for is_writable)
let account_meta_bytes = ix_c.accounts_len
.saturating_mul(34);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

size_of::<AccountMeta>()?

@nbelenkov nbelenkov Oct 20, 2025

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes, good spot, I missed that one


consume_compute_meter(
invoke_context,
(account_meta_bytes as u64)
.checked_div(invoke_context.get_execution_cost().cpi_bytes_per_unit)
.unwrap_or(u64::MAX),
)?;
}

consume_compute_meter(
invoke_context,
(data.len() as u64)
Expand Down Expand Up @@ -705,6 +756,20 @@ pub fn translate_accounts_c<'a>(
check_aligned,
)?;

if invoke_context.get_feature_set().increase_cpi_account_info_limit{
//sizeof(AccountInfo) is 80 bytes
let account_infos_bytes = account_infos
.len()
.saturating_mul(80);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just insert std::mem::sizeof::<AccountInfo>() then

@nbelenkov nbelenkov Oct 16, 2025

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::mem::size_of::<AccountInfo>() returns 48, because it contains references to the 2 Pubkey of owner and key, so that's why I didn't use it. The comment is a bit misleading I will update it

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ended up using base type to allign with the other calculation and adjusting it to 80 bytes, its a bit messy though

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since 80 bytes is not really correlated with the size of AccountInfo, this should just be a constant.


consume_compute_meter(
invoke_context,
(account_infos_bytes as u64)
.checked_div(invoke_context.get_execution_cost().cpi_bytes_per_unit)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would rather have this combined with the consume_compute_meter() call below.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean do the compute unit consumption inside translate_accounts_common()? Or did you mean to combine the 2 in translate_instruction_rust()?

.unwrap_or(u64::MAX),
)?;
}

translate_accounts_common(
&account_info_keys,
account_infos,
Expand Down Expand Up @@ -776,8 +841,8 @@ pub fn cpi_common<S: SyscallInvokeSigned>(
// changes so the callee can see them.
consume_compute_meter(
invoke_context,
invoke_context.get_execution_cost().invoke_units,
)?;
invoke_context.get_execution_cost().invoke_units
)?;
if let Some(execute_time) = invoke_context.execute_time.as_mut() {
execute_time.stop();
invoke_context.timings.execute_us += execute_time.as_us();
Expand Down
25 changes: 21 additions & 4 deletions program-runtime/src/execution_budget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ fn get_max_instruction_stack_depth(simd_0268_active: bool) -> usize {
}
}

//Default CPI invocation cost
pub const DEFAULT_INVOCATION_COST: u64 = 1000;
//CPI Invocation cost with SIMD-0339 active
pub const INVOKE_UNITS_COST_SIMD_0339: u64 = 946;

fn get_invoke_unit_cost(simd_0339_active: bool) -> u64 {
if simd_0339_active {
INVOKE_UNITS_COST_SIMD_0339
} else {
DEFAULT_INVOCATION_COST
}
}

/// Max call depth. This is the maximum nesting of SBF to SBF call that can happen within a program.
pub const MAX_CALL_DEPTH: usize = 64;

Expand Down Expand Up @@ -176,10 +189,16 @@ pub struct SVMTransactionExecutionCost {

impl Default for SVMTransactionExecutionCost {
fn default() -> Self {
Self {
Self::new_with_defaults(/* simd_0339_active */ false)
}
}

impl SVMTransactionExecutionCost {
pub fn new_with_defaults(simd_0339_active: bool) -> Self {
SVMTransactionExecutionCost {
log_64_units: 100,
create_program_address_units: 1500,
invoke_units: 1000,
invoke_units: get_invoke_unit_cost(simd_0339_active),
sha256_base_cost: 85,
sha256_byte_cost: 1,
log_pubkey_units: 100,
Expand Down Expand Up @@ -216,9 +235,7 @@ impl Default for SVMTransactionExecutionCost {
alt_bn128_g2_decompress: 13610,
}
}
}

impl SVMTransactionExecutionCost {
/// Returns cost of the Poseidon hash function for the given number of
/// inputs is determined by the following quadratic function:
///
Expand Down
4 changes: 3 additions & 1 deletion program-runtime/src/invoke_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,9 @@ macro_rules! with_mock_invoke_context_with_feature_set {
environment_config,
Some(LogCollector::new_ref()),
compute_budget,
SVMTransactionExecutionCost::default(),
SVMTransactionExecutionCost::new_with_defaults(
$feature_set.increase_cpi_account_info_limit,
),
);
};
}
Expand Down
5 changes: 4 additions & 1 deletion program-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Export tokio for test clients
pub use tokio;
use {
agave_feature_set::{raise_cpi_nesting_limit_to_8, FEATURE_NAMES},
agave_feature_set::{raise_cpi_nesting_limit_to_8, increase_cpi_account_info_limit, FEATURE_NAMES},
async_trait::async_trait,
base64::{prelude::BASE64_STANDARD, Engine},
chrono_humanize::{Accuracy, HumanTime, Tense},
Expand Down Expand Up @@ -850,6 +850,9 @@ impl ProgramTest {
genesis_config
.accounts
.contains_key(&raise_cpi_nesting_limit_to_8::id()),
genesis_config
.accounts
.contains_key(&increase_cpi_account_info_limit::id()),
)
}),
transaction_account_lock_limit: self.transaction_account_lock_limit,
Expand Down
102 changes: 101 additions & 1 deletion programs/sbf/c/src/invoke/invoke.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static const uint8_t ADD_LAMPORTS = 18;
static const uint8_t TEST_RETURN_DATA_TOO_LARGE = 19;
static const uint8_t TEST_DUPLICATE_PRIVILEGE_ESCALATION_SIGNER = 20;
static const uint8_t TEST_DUPLICATE_PRIVILEGE_ESCALATION_WRITABLE = 21;
static const uint8_t TEST_MAX_ACCOUNT_INFOS_EXCEEDED = 22;
static const uint8_t TEST_MAX_ACCOUNT_INFOS_EXCEEDED_INCREASE_CPI_INFO = 22;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally we try to prepare the code base for an easy cleanup of the feature gates, so everything is named from the perspective of the "new normal". Thus, this should stay TEST_MAX_ACCOUNT_INFOS_EXCEEDED and the other one would be TEST_MAX_ACCOUNT_INFOS_EXCEEDED_BEFORE_INCREASE or something like that.

@nbelenkov nbelenkov Oct 17, 2025

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohhhh I see what you mean, so now with feature gate enabled is the new norm, hence the previous tests become before the norm right? So we would have the following for example:

TEST_MAX_ACCOUNT_INFOS_SIMD_0339_OK -> new normal ok so TEST_MAX_ACCOUNT_INFOS_OK TEST_MAX_ACCOUNT_INFOS_OK -> the original ok test so, TEST_MAX_ACCOUNT_INFOS_OK_BEFORE_CPI_INCREASE_BEFORE_SIMD_0339

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be updated now

// TEST_CPI_INVALID_* must match the definitions in
// https://github.com/solana-labs/solana/blob/master/programs/sbf/rust/invoke/src/instructions.rs
static const uint8_t TEST_CPI_INVALID_KEY_POINTER = 35;
Expand All @@ -42,6 +42,11 @@ static const uint8_t TEST_WRITE_ACCOUNT = 40;
static const uint8_t TEST_ACCOUNT_INFO_IN_ACCOUNT = 43;
static const uint8_t TEST_NESTED_INVOKE_SIMD_0268_OK = 46;
static const uint8_t TEST_NESTED_INVOKE_SIMD_0268_TOO_DEEP = 47;
static const uint8_t TEST_MAX_ACCOUNT_INFOS_SIMD_0339_OK = 48;
static const uint8_t TEST_MAX_ACCOUNT_INFOS_SIMD_0339_EXCEEDED = 49;
static const uint8_t TEST_MAX_ACCOUNT_INFOS_OK = 50;
static const uint8_t TEST_MAX_ACCOUNT_INFOS_OK_INCREASE_CPI_INFO = 51;
static const uint8_t TEST_MAX_ACCOUNT_INFOS_EXCEEDED = 52;

static const int MINT_INDEX = 0;
static const int ARGUMENT_INDEX = 1;
Expand Down Expand Up @@ -548,9 +553,66 @@ extern uint64_t entrypoint(const uint8_t *input) {

break;
}
case TEST_MAX_ACCOUNT_INFOS_OK: {
sol_log("Test max allowed account infos");
SolAccountMeta arguments[] = {};
uint64_t account_infos_len = 64;
SolAccountInfo *account_infos = sol_calloc(account_infos_len, sizeof(SolAccountInfo));
sol_assert(0 != account_infos);
for (uint64_t i = 0; i < account_infos_len; i++) {
account_infos[i] = accounts[0];
}
uint8_t data[] = {};
const SolInstruction instruction = {accounts[INVOKED_PROGRAM_INDEX].key,
arguments, SOL_ARRAY_SIZE(arguments),
data, SOL_ARRAY_SIZE(data)};
const SolSignerSeeds signers_seeds[] = {};
sol_assert(SUCCESS == sol_invoke_signed(
&instruction, account_infos, account_infos_len,
signers_seeds, SOL_ARRAY_SIZE(signers_seeds)));

break;
}
case TEST_MAX_ACCOUNT_INFOS_EXCEEDED: {
sol_log("Test max account infos exceeded");
SolAccountMeta arguments[] = {};
uint64_t account_infos_len = 65;
SolAccountInfo *account_infos = sol_calloc(account_infos_len, sizeof(SolAccountInfo));
sol_assert(0 != account_infos);
uint8_t data[] = {};
const SolInstruction instruction = {accounts[INVOKED_PROGRAM_INDEX].key,
arguments, SOL_ARRAY_SIZE(arguments),
data, SOL_ARRAY_SIZE(data)};
const SolSignerSeeds signers_seeds[] = {};
sol_assert(SUCCESS == sol_invoke_signed(
&instruction, account_infos, account_infos_len,
signers_seeds, SOL_ARRAY_SIZE(signers_seeds)));

break;
}
case TEST_MAX_ACCOUNT_INFOS_OK_INCREASE_CPI_INFO: {
sol_log("Test max account infos allowed with increase cpi info");
SolAccountMeta arguments[] = {};
uint64_t account_infos_len = MAX_CPI_ACCOUNT_INFOS;
SolAccountInfo *account_infos = sol_calloc(account_infos_len, sizeof(SolAccountInfo));
sol_assert(0 != account_infos);
for (uint64_t i = 0; i < account_infos_len; i++) {
account_infos[i] = accounts[0];
}
uint8_t data[] = {};
const SolInstruction instruction = {accounts[INVOKED_PROGRAM_INDEX].key,
arguments, SOL_ARRAY_SIZE(arguments),
data, SOL_ARRAY_SIZE(data)};
const SolSignerSeeds signers_seeds[] = {};
sol_assert(SUCCESS == sol_invoke_signed(
&instruction, account_infos, account_infos_len,
signers_seeds, SOL_ARRAY_SIZE(signers_seeds)));

break;
}
case TEST_MAX_ACCOUNT_INFOS_EXCEEDED_INCREASE_CPI_INFO: {
sol_log("Test max account infos exceeded with increase cpi info");
SolAccountMeta arguments[] = {};
uint64_t account_infos_len = MAX_CPI_ACCOUNT_INFOS + 1;
SolAccountInfo *account_infos = sol_calloc(account_infos_len, sizeof(SolAccountInfo));
sol_assert(0 != account_infos);
Expand All @@ -565,6 +627,44 @@ extern uint64_t entrypoint(const uint8_t *input) {

break;
}
case TEST_MAX_ACCOUNT_INFOS_SIMD_0339_OK: {
sol_log("Test max account infos allowed with SIMD-0339");
SolAccountMeta arguments[] = {};
uint64_t account_infos_len = 255;
SolAccountInfo *account_infos = sol_calloc(account_infos_len, sizeof(SolAccountInfo));
sol_assert(0 != account_infos);

for (uint64_t i = 0; i < account_infos_len; i++) {
account_infos[i] = accounts[0];
}
uint8_t data[] = {};
const SolInstruction instruction = {accounts[INVOKED_PROGRAM_INDEX].key,
arguments, SOL_ARRAY_SIZE(arguments),
data, SOL_ARRAY_SIZE(data)};
const SolSignerSeeds signers_seeds[] = {};
sol_assert(SUCCESS == sol_invoke_signed(
&instruction, account_infos, account_infos_len,
signers_seeds, SOL_ARRAY_SIZE(signers_seeds)));

break;
}
case TEST_MAX_ACCOUNT_INFOS_SIMD_0339_EXCEEDED: {
sol_log("Test max account infos exceeded with SIMD-0339");
SolAccountMeta arguments[] = {};
uint64_t account_infos_len = 256;
SolAccountInfo *account_infos = sol_calloc(account_infos_len, sizeof(SolAccountInfo));
sol_assert(0 != account_infos);
uint8_t data[] = {};
const SolInstruction instruction = {accounts[INVOKED_PROGRAM_INDEX].key,
arguments, SOL_ARRAY_SIZE(arguments),
data, SOL_ARRAY_SIZE(data)};
const SolSignerSeeds signers_seeds[] = {};
sol_assert(SUCCESS == sol_invoke_signed(
&instruction, account_infos, account_infos_len,
signers_seeds, SOL_ARRAY_SIZE(signers_seeds)));

break;
}
case TEST_RETURN_ERROR: {
sol_log("Test return error");
SolAccountMeta arguments[] = {{accounts[ARGUMENT_INDEX].key, false, true}};
Expand Down
Loading
Loading