ethereum-optimism / optimism

Optimism is Ethereum, scaled.
https://optimism.io
MIT License
5.21k stars 2.99k forks source link

op-node: EL sync mode prevents active sequencer start-up #11016

Open sebastianst opened 4 days ago

sebastianst commented 4 days ago

Currently, if an active sequencer restarts with --syncmode=execution-layer, it doesn't start sequencing again.

Investigation by @trianglesphere:

The codepath which triggered this is as follows:

  • If syncmode=EL on startup, the engine controller’s internal state is set to syncStatus = syncStatusWillStartEL
  • The engine controller relies on unsafe blocks to trigger the move to syncStatus = syncStatusFinishedEL . While syncStatus == syncStatusWillStartEL , IsEngineSyncing is always true
  • At startup, the derivation pipeline is also reset therefore derivation.EngineReady() always returns false until the pipeline can be stepped through enough
  • Therefore if the active sequencer restarts, it stalls because it needs unsafe blocks to go through the startup phase, but cannot produce unsafe blocks until it goes through the startup phase