Skip to content

feat: unify local accounts under magic mode - #152

Merged
bmuddha merged 1 commit into
devfrom
feat/150-magic-account-mode
Sep 19, 2026
Merged

bmuddha merged 1 commit into
devfrom
feat/150-magic-account-mode

Conversation

@bmuddha

@bmuddha bmuddha commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

What changed

Magic replaces Ephemeral as the mode for accounts that exist only inside the ephemeral rollup. These accounts can now be replaced with Delegated state through a privileged operation at the same or a newer slot. This lets locally created accounts later take on delegated state from the base chain.

Placeholder is renamed to Uninit. Callers, documentation, and existing lifecycle coverage use the new names.

Closes #150

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

coderabbitai Bot commented Sep 19, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: magicblock-labs/magicblock-engine/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: d6a0206e-227b-4b1e-8219-4660e3319fe4

📥 Commits

Reviewing files that changed from the base of the PR and between d61227c and da28980.

📒 Files selected for processing (26)
  • accountsdb/README.md
  • accountsdb/src/tests.rs
  • engine/README.md
  • engine/tests/accounts.rs
  • engine/tests/security.rs
  • engine/tests/transactions.rs
  • keeper/README.md
  • keeper/src/builder.rs
  • keeper/src/tests/caches.rs
  • programs/magic-root-program/README.md
  • programs/magic-root-program/src/tests.rs
  • replicator/tests/integration.rs
  • solana/README.md
  • solana/UPSTREAM-4.2.2.md
  • solana/account/README.md
  • solana/account/src/cow/mod.rs
  • solana/account/src/tests/account.rs
  • solana/program-runtime/src/cpi.rs
  • solana/program-runtime/src/serialization.rs
  • solana/svm/README.md
  • solana/svm/src/access_permissions.rs
  • solana/svm/src/rent_calculator.rs
  • solana/svm/src/transaction_account_state_info.rs
  • solana/transaction-context/src/instruction_accounts.rs
  • solana/transaction-context/src/transaction.rs
  • solana/transaction-context/src/transaction_accounts.rs

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


📝 Walkthrough

Walkthrough

The change renames Ephemeral to Magic and Placeholder to Uninit. It allows Magic accounts to transition to Delegated or Closed at the same or newer slot. Runtime rent, resizing, persistence, replication, keeper, program, and engine tests now use the updated modes and semantics. Serialization and discriminant tests preserve the existing numeric values.

Priority: ➖ Normal

Change: Feature · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to da289

The Magic lifecycle migration has no remaining actionable issue in the reviewed changes and is ready to merge.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes implement #150. AccountMode::Placeholder and AccountMode::Ephemeral become Uninit and Magic. Magic remains mutable, authoritative, persistent, rent-exempt for nonzero balances, a…
Out of Scope Changes check ✅ Passed The changed files stay within #150. Production changes update account modes, lifecycle validation, rent treatment, mutability and resizing rules. Test changes update coverage for Magic and Uninit acro…
Docstring Coverage ✅ Passed Docstring coverage is 91.67% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 36 functions across 18 files. (8 skipped: 8…
Title check ✅ Passed The title clearly and concisely describes the main change: consolidating local accounts under the Magic mode.
Description check ✅ Passed The description directly explains the Ephemeral-to-Magic and Placeholder-to-Uninit renames, lifecycle changes, and delegated replacement behavior.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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 19, 2026 12:07
@bmuddha bmuddha changed the title feat: unify er-local accounts under magic mode feat: unify local accounts under magic mode Sep 19, 2026
@bmuddha
bmuddha merged commit ea5c8f5 into dev Sep 19, 2026
10 checks passed
@bmuddha
bmuddha deleted the feat/150-magic-account-mode branch September 19, 2026 12:12
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.

Use Magic for rollup-local accounts and rename Placeholder to Uninit

2 participants