Skip to content

feat: persist caller-managed chain slot in accountsdb - #170

Merged
bmuddha merged 1 commit into
devfrom
feat/accountsdb-chain-slot
Oct 1, 2026
Merged

bmuddha merged 1 commit into
devfrom
feat/accountsdb-chain-slot

Conversation

@bmuddha

@bmuddha bmuddha commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

What changed

Callers can now retain an external chain slot in AccountsDB through accounts().chain_slot() and accounts().set_chain_slot(slot), independently of local execution progress.

Closes #169

Impact

The slot starts at zero and accepts rewinds. Updates don't flush on their own; existing sync and snapshot operations persist the metadata. The slot is excluded from execution checksums.

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

coderabbitai Bot commented Oct 1, 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: 45f4d11d-070a-40f2-92db-6ef645d3bad7

📥 Commits

Reviewing files that changed from the base of the PR and between cd08685 and e78dff9.

📒 Files selected for processing (3)
  • accountsdb/README.md
  • accountsdb/src/lib.rs
  • accountsdb/src/store/mmap.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

DatabaseMeta adds an atomic for the caller-managed chain slot. AccountsDB adds methods to read and set that value. The setter accepts values lower than the current slot. The README adds the chain slot to the checksum exclusions.

Priority: ⬇️ Low

Change: Feature

Merge Risk: ⚪ Minimal · up to e78df

The caller-managed chain slot is independent of execution progress and checksums and persists through existing flush and snapshot operations. No actionable merge-blocking risk was identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Issue #169 requires a caller-managed slot through Keeper's accounts accessor, rewind support, metadata persistence, and checksum independence. AccountsAccessor dereferences to AccountsDB, so `acco…
Out of Scope Changes check ✅ Passed The changes add the requested AccountsDB metadata and accessor methods and update checksum documentation for issue #169. No unrelated product behavior or unrelated files are shown in the supplied chan…
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 4 functions across 2 files. (1 skipped: 1 …
Title check ✅ Passed The title clearly and concisely describes the primary change: persisting a caller-managed chain slot in AccountsDB.
Description check ✅ Passed The description directly explains the new AccountsDB APIs, persistence behavior, rewind support, and checksum exclusion.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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 October 1, 2026 10:24
@bmuddha
bmuddha merged commit f65dfd0 into dev Oct 1, 2026
13 checks passed
@bmuddha
bmuddha deleted the feat/accountsdb-chain-slot branch October 1, 2026 10:29
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.

Persist a caller-managed chain slot in AccountsDB

2 participants