From d6deecb8925b09e62b46ec0c042033b8fb06ddc1 Mon Sep 17 00:00:00 2001 From: Joshua Gutow Date: Wed, 14 Feb 2024 16:42:10 -0800 Subject: [PATCH] op-node: Still EL sync if the transition block is finalized (#9501) --- op-node/rollup/derive/engine_controller.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/op-node/rollup/derive/engine_controller.go b/op-node/rollup/derive/engine_controller.go index 2205b20b3f16..e6a61b36e068 100644 --- a/op-node/rollup/derive/engine_controller.go +++ b/op-node/rollup/derive/engine_controller.go @@ -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()