flamenco, vm: update cpi account borrowing checks#8754
Merged
topointon-jump merged 1 commit intomainfrom Mar 6, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors CPI account update helpers to borrow CPI accounts at the call sites (closer to Agave’s structure) and simplifies callee/caller update code by removing in-function account lookups.
Changes:
- Changed CPI update helper signatures to accept already-borrowed accounts rather than instruction account indices/keys.
- Moved
try_borrow_instr_account*calls to the call sites in CPI translation/entrypoint paths. - Removed dead/confusing borrowing paths and key-based lookup logic.
Performance Measurements ⏳
|
8725b7e to
9331a6e
Compare
Performance Measurements ⏳
|
9331a6e to
99ada76
Compare
Performance Measurements ⏳
|
99ada76 to
a3029b9
Compare
Performance Measurements ⏳
|
mjain-jump
approved these changes
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Align CPI error checks to better reflect Agave's structure, after feedback from auditors.
UPDATE_CALLEE_ACCandUPDATE_CALLER_ACCto align better with Agave. This aligns more closely to the Agave structure.FD_ACC_MGR_ERR_UNKNOWN_ACCOUNT, as there is no reason not to error out in this case. This is a non-functional change asFD_ACC_MGR_ERR_UNKNOWN_ACCOUNTwould never be thrown (all call sites returnFD_EXECUTOR_INSTR_ERR_MISSING_ACCwhich is a different error code) but is less confusing.