You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the restriction on the serialized size of cpi instructions is too strict. The current CPI size restriction is useful for preventing programs from invoking overly large instructions that wouldn't otherwise be possible to invoked via serialized transaction instructions. However, with the introduction of address lookup tables, it will soon be possible to invoke transaction instructions with many more accounts and so this restriction needs to be adjusted to allow programs to have the same ability to invoke instructions with more accounts.
There are two different checks imposed on CPI's:
check_instruction_size which enforces that 34 * ix.accounts.len() + ix.data.len() <= 1280
Problem
Currently, the restriction on the serialized size of cpi instructions is too strict. The current CPI size restriction is useful for preventing programs from invoking overly large instructions that wouldn't otherwise be possible to invoked via serialized transaction instructions. However, with the introduction of address lookup tables, it will soon be possible to invoke transaction instructions with many more accounts and so this restriction needs to be adjusted to allow programs to have the same ability to invoke instructions with more accounts.
There are two different checks imposed on CPI's:
check_instruction_size
which enforces that34 * ix.accounts.len() + ix.data.len() <= 1280
solana/programs/bpf_loader/src/syscalls.rs
Lines 2750 to 2763 in 15d18a0
check_account_infos
which enforces that32 * account_infos.len() <= 1280
solana/programs/bpf_loader/src/syscalls.rs
Lines 2765 to 2785 in 15d18a0
Proposed Solution
max_cpi_instruction_size
)The text was updated successfully, but these errors were encountered: