Skip to content

Conversation

@MartinOndejka
Copy link
Collaborator

@MartinOndejka MartinOndejka commented Sep 21, 2025

Until we have decentralized sequencing, we need some kind of mechanism to do emergency commit in case the sequencer goes offline. This PR implements the simple commit in case there has been no commits for some period of time.

The original commit rule stays the same.

The new emergency commit rule reuses the original rule, and checks that there has been no commit for max_sequencer_inactivity slots.

The main drawback of this approach is that the outer action state precondition can be set to the last 5 values, therefore the sequencer has to maintain commits in 5 distinct slots in the max_sequencer_inactivity window.

More detailed explanation is in the spec and rollup explanation doc.

Follwing is left to do:

  • tests
  • tooling to execute the emergency commit

@MartinOndejka MartinOndejka self-assigned this Sep 21, 2025
@MartinOndejka MartinOndejka requested a review from L-as as a code owner September 21, 2025 19:15
@MartinOndejka MartinOndejka force-pushed the emergency-commit branch 3 times, most recently from d60163f to 86a0934 Compare September 21, 2025 19:25
@MartinOndejka
Copy link
Collaborator Author

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces an important emergency commit mechanism to handle sequencer downtime, which is a crucial feature for the network's liveness. The implementation is well-structured, especially the refactoring in rule_commit.ml to accommodate the new emergency logic while reusing existing components. The addition of the count_commits folder and the Verify_emergency_folders wrapper to handle multiple recursive proofs is a good use of the existing patterns. The documentation and spec have also been updated to reflect these changes.

I've found a few minor issues, mostly in the specification document regarding pseudocode correctness and clarity, and a suggestion to improve configuration readability by avoiding a magic number. Overall, this is a solid contribution.

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.

2 participants