Skip to content

chore: upgrade solana runtime to 4.2.2 - #127

Merged
bmuddha merged 2 commits into
devfrom
upgrade/solana-4.2.2
Sep 11, 2026
Merged

chore: upgrade solana runtime to 4.2.2#127
bmuddha merged 2 commits into
devfrom
upgrade/solana-4.2.2

Conversation

@bmuddha

@bmuddha bmuddha commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

What changed

Upgrade the Agave runtime family to 4.2.2, retaining release-compatible SDK versions and the local account 4.3.1 fork. Port memory/CPI safety fixes, invocation-stack ordering, feature-gated SIMD-0392 rent checks, fallible instruction-sysvar construction, and SlotHashes decoding.

Closes #126

Impact

Borrowed-account storage, direct VM mapping, ephemeral restrictions, and private transaction framing remain unchanged. SIMD-0392 support does not activate the feature in Engine. Instruction-sysvar encoding failures now reject loading instead of supplying empty data.

Upstream compatibility requires removing the signer method from SyscallInvokeSigned and the two modular-exponentiation cost fields. Mutable CPI slice translation becomes unsafe, and its underlying macro returns a raw pointer. The old C/Rust signer function names remain aliases of one implementation.

Reviewer notes

Focus on aliasing and error paths in memory/CPI translation, synchronization of Engine’s additional syscall-context stack, and preservation of ephemeral exemptions in pre/post rent-state checks.

Intentionally omit upstream configurable sanitization, validator touched-flag/writeback plumbing, unused ABI-v2 scratchpads, and validator cache/deployment machinery. Keep Engine’s resize-owner check and error ordering. The account 4.3.0 → 4.3.1 upstream delta is frozen-ABI metadata that this fork does not consume. See the port disposition for upstream references and rationale. MBV integration remains in magicblock-labs/magicblock-validator#1660.

@bmuddha bmuddha self-assigned this Sep 11, 2026
@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 4f670fdc-fe5f-42e5-9ca8-f9e603cd994c

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: b9b2dbf4-2979-48c2-812f-c0f2d1aa03f3

📥 Commits

Reviewing files that changed from the base of the PR and between ace00f9 and 024193f.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (19)
  • .github/workflows/ci.yml
  • Cargo.toml
  • processor/src/callback.rs
  • solana/README.md
  • solana/UPSTREAM-4.2.2.md
  • solana/program-runtime/Cargo.toml
  • solana/program-runtime/README.md
  • solana/program-runtime/src/cpi.rs
  • solana/program-runtime/src/execution_budget.rs
  • solana/program-runtime/src/invoke_context.rs
  • solana/program-runtime/src/memory.rs
  • solana/program-runtime/src/sysvar_cache.rs
  • solana/svm/Cargo.toml
  • solana/svm/README.md
  • solana/svm/src/account_loader.rs
  • solana/svm/src/transaction_account_state_info.rs
  • solana/svm/src/transaction_processor.rs
  • solana/transaction-context/Cargo.toml
  • solana/transaction-view/Cargo.toml
💤 Files with no reviewable changes (2)
  • processor/src/callback.rs
  • solana/program-runtime/src/execution_budget.rs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change aligns workspace and crate dependencies with Agave 4.2.2. It ports shared CPI signer translation, raw memory-slice handling, invocation ordering, execution-cost changes, and SlotHashes decoding. SVM account loading now propagates instruction-sysvar encoding errors. Transaction account state tracks metadata for feature-gated rent transitions. Documentation records compatibility boundaries and omitted upstream functionality.

Priority: ➖ Normal

Change: Other

Merge Risk: ⚪ Minimal · up to 02419

The runtime alignment changes retain the documented compatibility and execution contracts, with no unresolved merge-blocking behavior identified.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 47.83% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 7 files. (10 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Linked Issues check ❓ Inconclusive For #126, the summary shows Agave 4.2.2 dependency updates, relevant runtime ports, preserved runtime behavior, and an upstream disposition document. The reviewed head is 024193f Provide reviewable evidence for the Cargo.lock resolution and the targeted check results. Cargo.lock remains excluded, so its contents cannot be assessed here.
✅ Passed checks (3 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed The listed changes stay within #126. They update dependency and CI version references, port runtime and SVM changes, adapt call sites, preserve documented Engine behavior, and document upstream dispos…
Title check ✅ Passed The title clearly and concisely describes the primary change: upgrading the Solana runtime to version 4.2.2.
Description check ✅ Passed The description directly explains the runtime upgrade, ported changes, compatibility decisions, behavioral impacts, and reviewer focus areas.
Full details: Linked Issues check

Explanation

For #126, the summary shows Agave 4.2.2 dependency updates, relevant runtime ports, preserved runtime behavior, and an upstream disposition document. The reviewed head is 024193f. The assessment cannot establish that Cargo.lock resolves the intended 4.2.2 family because Cargo.lock is excluded from review. The summary also does not provide results for the required targeted checks.

Full details: Docstring Coverage

Explanation

Docstring coverage is 47.83% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 7 files. (10 skipped: 10 unsupported.)

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch upgrade/solana-4.2.2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@bmuddha
bmuddha marked this pull request as ready for review September 11, 2026 05:32
@bmuddha
bmuddha merged commit d331af8 into dev Sep 11, 2026
4 checks passed
@bmuddha
bmuddha deleted the upgrade/solana-4.2.2 branch September 11, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade Solana dependencies to 4.2.2 and port relevant upstream changes

2 participants