Skip to content

fix: make superblock checkpoints atomic - #82

Merged
bmuddha merged 1 commit into
devfrom
fix/atomic-superblock-checkpoints
Aug 24, 2026
Merged

fix: make superblock checkpoints atomic#82
bmuddha merged 1 commit into
devfrom
fix/atomic-superblock-checkpoints

Conversation

@bmuddha

@bmuddha bmuddha commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Finalize a superblock boundary and enter its snapshot pause as one sequencer message.
  • Keep transactions queued after the checkpoint out of the sealed snapshot until the pacemaker releases execution.
  • Preserve ordinary block handling, standalone barriers, and simulation pacing.

Closes #81

Impact

Prevents concurrent transaction submission from producing leader and follower seals over different state prefixes. Adds an internal SequencerMessage::Checkpoint variant without changing replication, ledger, or persistence formats.

Reviewer notes

The execution-channel position of Checkpoint is the cutoff: earlier transactions are finalized into the block and snapshot, while later transactions remain queued until snapshot creation and seal append complete.

@bmuddha bmuddha added the bug Something isn't working label Aug 21, 2026
@bmuddha bmuddha self-assigned this Aug 21, 2026
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 429587fc-060e-4480-bd35-be95003cf482

📥 Commits

Reviewing files that changed from the base of the PR and between 22d9e8d and c761005.

📒 Files selected for processing (5)
  • engine/src/pacemaker.rs
  • nucleus/README.md
  • nucleus/src/runtime.rs
  • processor/README.md
  • processor/src/sequencer/mod.rs

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


📝 Walkthrough

Walkthrough

The pacemaker now sends simulation messages before sequencer messages. Non-superblock slots use the existing block message. Superblock slots use a guarded checkpoint message. The runtime message contract carries the block and barrier guard. The sequencer finalizes the block, pauses scheduling, acknowledges the barrier, and resumes after release. Documentation describes the atomic checkpoint behavior.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes address issue #81 by combining block finalization and snapshot pause while preserving ordinary pacing and formats.
Out of Scope Changes check ✅ Passed The code and documentation changes support the linked issue and do not show unrelated scope.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
Title check ✅ Passed The title clearly and concisely describes the main change: making superblock checkpoints atomic.
Description check ✅ Passed The description directly explains the atomic checkpoint change, transaction cutoff, preserved behavior, and impact.
✨ 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 fix/atomic-superblock-checkpoints

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 commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator Author

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@bmuddha
bmuddha marked this pull request as ready for review August 24, 2026 10:30
@bmuddha
bmuddha merged commit ed7a648 into dev Aug 24, 2026
4 checks passed
@bmuddha
bmuddha deleted the fix/atomic-superblock-checkpoints branch August 24, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Superblock checkpoint race terminates replication under concurrent load

1 participant