feat: add transaction context crate#19
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
8f1a777 to
ccac233
Compare
ccac233 to
c4029f9
Compare
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Free Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
c4029f9 to
e4a023f
Compare
27ca11d to
ff1197d
Compare
9f791a8 to
aab5a4e
Compare
7f5babf to
b1bb9fd
Compare
b1bb9fd to
f7c2bac
Compare
f7c2bac to
881f449
Compare
2bad847 to
a7a8ce1
Compare
881f449 to
59ad79e
Compare
59ad79e to
a9fc42e
Compare
a9fc42e to
a5c02e4
Compare
0012407 to
a0e05c5
Compare
49572d6 to
83e3b6d
Compare
83e3b6d to
885578c
Compare
0bf814e to
21739eb
Compare
d382bc2 to
f92b443
Compare
28cf2cc to
e32412c
Compare
e32412c to
7f03467
Compare
7f03467 to
2940e4c
Compare

What changed
Added the
solana-transaction-contextcrate, an engine-shaped fork of Agave'scrate patched in workspace-wide via
[patch.crates-io].Why
Engine execution needs the low-level structures it runs over, reshaped so VM
handlers can remap account data on writes through a mapped region instead of
copying through a serialized input buffer.
Closes #10.
Impact
TransactionContext,InstructionContext, and theTransactionAccountsstore withAccountRef/AccountRefMutviews.UnsafeCellbehind explicit borrow counters, keeping borrowslocal to the context.
ExecutionRecordreturns keyed accounts, return data, touched-account count,and account resize delta;
TransactionAccountstracks resize and per-instructionlamports deltas.
Reviewer notes
Borrow counters are released on drop; outstanding references must be gone before a
context is deconstructed (
Rc::try_unwrapfailures there are real lifetime bugs).Divergences are documented in
solana/README.md(Transaction Context, VM AccountMapping, Access-Violation Growth).
Follow-up
program-runtimeandsvmbuild on this crate upstack.