From dc3ce49b62b5f1baa87fdc6487e0344ea887a8ce Mon Sep 17 00:00:00 2001 From: frisitano Date: Mon, 24 Nov 2025 07:45:39 +0400 Subject: [PATCH 1/2] always update safe head --- crates/chain-orchestrator/src/consolidation.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/crates/chain-orchestrator/src/consolidation.rs b/crates/chain-orchestrator/src/consolidation.rs index d5bd70cc..6cd36cdb 100644 --- a/crates/chain-orchestrator/src/consolidation.rs +++ b/crates/chain-orchestrator/src/consolidation.rs @@ -38,10 +38,7 @@ pub(crate) async fn reconcile_batch>( // The block matches the derived attributes and the block is below or equal to the // safe current safe head. - if attributes.block_number <= fcs.finalized_block_info().number || - ((attributes.block_number <= fcs.safe_block_info().number) && - batch.target_status.is_consolidated()) - { + if attributes.block_number <= fcs.finalized_block_info().number { Ok::<_, ChainOrchestratorError>(BlockConsolidationAction::Skip(block_info)) } else { // The block matches the derived attributes, no action is needed. From 40cf2114480dfb973eeb39381ab480ed30442a50 Mon Sep 17 00:00:00 2001 From: frisitano Date: Mon, 24 Nov 2025 07:51:58 +0400 Subject: [PATCH 2/2] update comments --- crates/chain-orchestrator/src/consolidation.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/chain-orchestrator/src/consolidation.rs b/crates/chain-orchestrator/src/consolidation.rs index 6cd36cdb..89e92819 100644 --- a/crates/chain-orchestrator/src/consolidation.rs +++ b/crates/chain-orchestrator/src/consolidation.rs @@ -36,12 +36,13 @@ pub(crate) async fn reconcile_batch>( // Extract the block info with L1 messages. let block_info: L2BlockInfoWithL1Messages = (¤t_block).into(); - // The block matches the derived attributes and the block is below or equal to the - // safe current safe head. + // The derived attributes match the L2 chain but are associated with a block + // number less than or equal to the finalized block, so skip. if attributes.block_number <= fcs.finalized_block_info().number { Ok::<_, ChainOrchestratorError>(BlockConsolidationAction::Skip(block_info)) } else { - // The block matches the derived attributes, no action is needed. + // The block matches the derived attributes but is above the finalized block, + // so we need to update the fcs. Ok::<_, ChainOrchestratorError>(BlockConsolidationAction::UpdateFcs(block_info)) } } else {