-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Overview
We must consider the case of the finalized head in the derivation pipeline reconciliation function. It appears that it's possible that it's possible that safe_block_info.number < finalized_block_info.number.
rollup-node/crates/chain-orchestrator/src/consolidation.rs
Lines 34 to 53 in 655baa7
| // Check if the block matches the derived attributes. | |
| if block_matches_attributes(&attributes.attributes, ¤t_block) { | |
| // 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. | |
| if attributes.block_number <= fcs.safe_block_info().number { | |
| Ok::<_, ChainOrchestratorError>(BlockConsolidationAction::Skip(block_info)) | |
| } else { | |
| // The block matches the derived attributes, no action is needed. | |
| Ok::<_, ChainOrchestratorError>(BlockConsolidationAction::UpdateSafeHead( | |
| block_info, | |
| )) | |
| } | |
| } else { | |
| // The block does not match the derived attributes, a reorg is needed. | |
| Ok::<_, ChainOrchestratorError>(BlockConsolidationAction::Reorg(attributes)) | |
| } | |
| }; |
Metadata
Metadata
Assignees
Labels
No labels