Skip to content

featr: make outbox program instruction privileged - #31

Open
taco-paco wants to merge 3 commits into
mainfrom
edwin/feat/outbox-program-privileged
Open

taco-paco wants to merge 3 commits into
mainfrom
edwin/feat/outbox-program-privileged

Conversation

@taco-paco

@taco-paco taco-paco commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

This PR. in magicblock-validator separates outbox logic from magic-program into separate program. To allow creation of ER accounts using validator keypair we need to make outbox program & discriminants privileged in svm

Summary by CodeRabbit

  • New Features

    • Added support for authorized Outbox Intent operations in privileged access validation.
    • Added a publicly available identifier for the Outbox Intent program.
  • Bug Fixes

    • Improved validation to reject unauthorized instructions while accepting approved operations from supported programs.

@taco-paco
taco-paco requested a review from bmuddha July 16, 2026 07:25
@coderabbitai

coderabbitai Bot commented Jul 16, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e46aa159-76d1-408b-be93-97b66e606a20

📥 Commits

Reviewing files that changed from the base of the PR and between 0395009 and 3071120.

📒 Files selected for processing (1)
  • svm/src/access_permissions.rs

Walkthrough

The change adds the public Outbox Intent program ID and allowlists two Outbox Intent instructions for privileged access. Validation now applies program-specific allowlists. Tests cover allowed, rejected, and mixed-program instruction sequences.

Changes

Privileged access validation

Layer / File(s) Summary
Program-specific instruction allowlists
svm/src/access_permissions.rs
The module exports the Outbox Intent program ID and validates Magic and Outbox Intent instructions against separate allowlists. Unknown programs and unlisted instructions remain rejected.
Allowlist validation tests
svm/src/access_permissions.rs
Tests cover both allowed Outbox Intent instructions, mixed Magic and Outbox Intent sequences, and rejected unlisted instructions.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: bmuddha, gabrielepicco

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes making Outbox program instructions privileged, which matches the main change and PR objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch edwin/feat/outbox-program-privileged

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.

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.

1 participant