Skip to content

Commit

Permalink
op-node: Still EL sync if the transition block is finalized (ethereum…
Browse files Browse the repository at this point in the history
  • Loading branch information
trianglesphere authored Feb 15, 2024
1 parent 1078f86 commit d6deecb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion op-node/rollup/derive/engine_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@ func (e *EngineController) InsertUnsafePayload(ctx context.Context, envelope *et
// Check if there is a finalized head once when doing EL sync. If so, transition to CL sync
if e.syncStatus == syncStatusWillStartEL {
b, err := e.engine.L2BlockRefByLabel(ctx, eth.Finalized)
if errors.Is(err, ethereum.NotFound) {
isTransitionBlock := e.rollupCfg.Genesis.L2.Number != 0 && b.Hash == e.rollupCfg.Genesis.L2.Hash
if errors.Is(err, ethereum.NotFound) || isTransitionBlock {
e.syncStatus = syncStatusStartedEL
e.log.Info("Starting EL sync")
e.elStart = e.clock.Now()
Expand Down

0 comments on commit d6deecb

Please sign in to comment.