Skip to content

feat: Replay Mechanism #2750

@tac0turtle

Description

@tac0turtle

Summary

Implement a replay mechanism that allows the execution environment and the node to synchronize when they fall out of block alignment. Specifically, if the execution client is ahead of the node in block height, the system should replay historical blocks against the execution environment to restore consistency.

Motivation

Currently, if the execution client advances faster than the node (e.g., due to restarts), the node lacks a mechanism to reconcile the state gap. This can cause inconsistencies in execution results, missed state transitions, or invalid block application.

Introducing a replay mechanism would ensure deterministic and consistent state progression across both layers, improving fault recovery and synchronization reliability.

Proposal

  1. State Detection
  • Detect when the execution environment’s head block number is behind the node’s current block.
  • Trigger a replay mode once a gap is detected.
  1. Replay Logic
  • The node re-sends (or streams) historical blocks from its local chain data.
  • The execution environment re-applies these blocks sequentially until it reaches parity.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions