-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Replace solana_program::program::invoke with solana_invoke::invoke #2958
base: master
Are you sure you want to change the base?
Conversation
@deanmlittle is attempting to deploy a commit to the coral-xyz Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for creating the PR, it's an interesting one.
The README mentions:
The current CPI functions
solana_program::program::invoke*
perform unnecessary copies and allocations. This crate removes these inefficiencies in a manner that is 100% backwards compatible.
If this really is 100% backwards compatible, and is objectively better than solana_program
's implementation, why not PR this to change it from solana-program
side? Both Anchor and Native programs would get the benefits this way.
Yes, this should definitely be merged into solana-program. At the same time, if we can significantly reduce CU usage today without waiting for an upstream merge that may or not may not even happen, would that not be better than leaving it as is? |
Historically, I've had trouble getting PRs into agave. Either ignored or takes far too long. Since the instruction stabilizer has a few tricky unsafe bits, I suspect it will receive pushback. |
this is why lol |
Creating this PR to get the conversation started. Thanks @cavemanloverboy. Running some A/B tests locally now against my own escrow program that does some basic CPI calls. Will report back shortly. Check out solana-invoke to see how it works. 🙏