Skip to content

fix: allow transient account closure - #162

Merged
bmuddha merged 1 commit into
devfrom
fix/transient-account-closure
Sep 26, 2026
Merged

bmuddha merged 1 commit into
devfrom
fix/transient-account-closure

Conversation

@bmuddha

@bmuddha bmuddha commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

After undelegation, ER needs to close the local account so its next use can rematerialize it. Engine previously rejected Transient -> Closed, leaving that account resident. This change allows the transition at the same or a newer slot through the existing delete operation; slot regressions and other unsupported transitions remain rejected.

Closes #161

@bmuddha bmuddha added the enhancement New feature or request label Sep 26, 2026
@bmuddha bmuddha self-assigned this Sep 26, 2026
@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

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: da6e2b7d-ab56-4e56-9dd9-45379ab4a157

📥 Commits

Reviewing files that changed from the base of the PR and between 4027680 and 770132e.

📒 Files selected for processing (3)
  • solana/account/README.md
  • solana/account/src/cow/mod.rs
  • solana/account/src/tests/account.rs

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


📝 Walkthrough

Walkthrough

The account transition validator now allows a Transient account to transition to Closed at the same or a newer slot. The lifecycle table and matrix test document and check this transition.

Priority: ➖ Normal

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 77013

The change enables the intended transient-account deletion while preserving the existing transition safeguards. No concrete merge-blocking risk is evident.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes satisfy issue #161. AccountMode::validate_transition permits Transient to Closed when the destination slot is equal to or newer than the current slot. The lifecycle matrix test cover…
Out of Scope Changes check ✅ Passed The changed files are within issue #161 scope. The implementation changes the transition rule, the test updates the matching lifecycle case, and the README documents the same behavior. No unrelated ch…
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1 …
Title check ✅ Passed The title clearly and concisely identifies the main change: allowing transient account closure.
Description check ✅ Passed The description directly explains the Transient to Closed transition, the slot condition, the existing delete operation, and the retained rejection rules.
✨ 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 force-pushed the fix/transient-account-closure branch from 7fa0569 to 770132e Compare September 26, 2026 12:24
@bmuddha
bmuddha marked this pull request as ready for review September 26, 2026 13:00
@bmuddha
bmuddha merged commit 6993f9d into dev Sep 26, 2026
6 checks passed
@bmuddha
bmuddha deleted the fix/transient-account-closure branch September 26, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow transient accounts to close after undelegation

2 participants