Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix impl alloc/write macro #43

Merged
merged 6 commits into from
Mar 29, 2024
Merged

Fix impl alloc/write macro #43

merged 6 commits into from
Mar 29, 2024

Conversation

amilz
Copy link
Contributor

@amilz amilz commented Mar 29, 2024

Need + 4 bytes to account for vec prefix

Program returned error: "Instruction passed to inner instruction is too large (1284 > 1280) should now be avoided.

I'm not certain, but my hunch is that we need to add some margin to data_len to account for the AccountMeta we're passing into the instruction.  We have 3 of them at 34 bytes ea (Pubkey + 2 bool) = 102 bytes above our limit.
edit pretty sure this is the case. check out: https://github.com/solana-labs/solana/blob/15d18a03e5203aec6452605cf6381afca46983fa/programs/bpf_loader/src/syscalls.rs#L2750-L2763
(34 * ix.accounts.len() + ix.data.len() <= 1280)
@febo febo merged commit f1f582a into nifty-oss:main Mar 29, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants