Skip to content

[Engine] Event for L1 consolidation reorg #94

Open
@frisitano

Description

@frisitano

Overview

If we reorg during L1 Consolidation, we should update the RNM so that we can make other components consistent with the EngineDriver. We should introduce a new event type EngineDriverEvent::L1BlockReorg and emit it.

EngineDriverFutureResult::L1Consolidation(result) => {
tracing::info!(target: "scroll::engine", ?result, "handling L1 consolidation result");
match result {
Ok((block_info, reorg, batch_info)) => {
// Update the safe block info and return the block info
tracing::trace!(target: "scroll::engine", ?block_info, "updating safe block info from block derived from L1");
self.fcs.update_safe_block_info(block_info);
// If we reorged, update the head block info
if reorg {
tracing::warn!(target: "scroll::engine", ?block_info, "reorging head to l1 derived block");
self.fcs.update_head_block_info(block_info);
}
return Some(EngineDriverEvent::L1BlockConsolidated((
block_info, batch_info,
)))
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdatabaseenginemilestone 5This issue is part to Milestone 5 of the Rollup Node plan

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions