Skip to content

Conversation

@acheroncrypto
Copy link
Collaborator

Problem

try_to_vec allocates 1024 bytes by default which is actually the MAX_RETURN_DATA for CPI. This is not necessary for the vast majority of programs so we've recently reduced the default capacity to 256 in #2691 but set_return_data still uses try_to_vec.

Summary of changes

Remove the usage of try_to_vec and make the default allocation of 256 similar to other places in the codebase.

Related: #2231

@vercel
Copy link

vercel bot commented Dec 23, 2023

@acheroncrypto is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@acheroncrypto acheroncrypto merged commit c4f14b9 into solana-foundation:master Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant