Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

op-node: Fix stop sequencer deadlock in op-conductor deployments #13806

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

0xVasconcelos
Copy link

Fix deadlock introduced by PR #11769 in *Sequencer.Stop method.

PR #11769 added a safety mechanism in *Sequencer.Stop to wait for latestHead to match latestSealed before stopping, preventing single-block reorgs. However, this introduced a deadlock when a sequencer lost leadership during the stop process:

  1. A non-leader sequencer cannot commit unsafe payloads
  2. Without committing payloads, blocks cannot be sealed
  3. Without sealed blocks, latestSealed never updates
  4. This caused the Stop method to hang indefinitely

The deadlock prevented proper sequencer shutdown, which could lead to multiple sequencers actively producing blocks.

This PR adds leadership checks during the stop process. If the sequencer is no longer the leader or cannot determine leadership status, it will skip waiting for head synchronization and proceed with the shutdown.

@0xVasconcelos 0xVasconcelos requested review from a team as code owners January 16, 2025 09:35
@protolambda
Copy link
Contributor

/ci authorize 6863b9b

@protolambda protolambda requested a review from zhwrd January 16, 2025 16:15
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