Fix InstructionHolder scratch ownership - #165
Open
edo-chan wants to merge 3 commits into
Open
Conversation
tracy-codes
requested changes
Jun 11, 2026
edo-chan
force-pushed
the
codex/swi-483-instruction-holder-ownership
branch
from
June 17, 2026 01:30
e43fb7b to
5bfdbaf
Compare
Contributor
Author
|
Rebased this on top of CU rerun on the updated branch:
These match the current Validation run:
|
Contributor
|
@edo-chan since this is a code change to the instruction parser, let's also test this branch with the litesvm test suite of the typescript sdk to ensure the typescript sdk remains compatible with the program and there's no edges or regressions. |
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.
Summary
This PR is stacked on
codex/sign-v2-cu-comparisonand fixes theInstructionHolderscratch lifetime issue without adding heap allocation.Key changes:
MaybeUninitarrays with a lending parser API:InstructionIterator::process_nextInstructionScratchfixed buffers forAccountMeta, original account indexes, and CPIAccountvaluesInstructionHolderborrow test for scratch-backed account metadataCU Benchmark
cargo test -p swig --test sign_v2_cu_comparison -- --nocaptureThese match the current
codex/sign-v2-cu-comparisonresults, so the fixed-scratch rewrite did not increase the LiteSVM CU harness numbers.Validation
cargo fmtcargo test -p swig-compact-instructionscargo test -p swig --test sub_account_test test_sub_account_sign -- --nocapturecargo test -p swig --test sign_v2 test_sign_v2_transfer_sol -- --nocapturecargo test -p swig --test sol_destination_limit_v2 --test token_destination_limit_v2 -- --nocapturecargo test -p swig --test sign_v2_cu_comparison -- --nocapturegit diff --checkcargo build-sbf --arch v1