Skip to content

fix(ethexe-consensus): synced/prepared events lost when consensus state is not Initial #5343

@ukint-vs

Description

@ukint-vs

Problem

receive_synced_block and receive_prepared_block events are delivered once per block by the observer/compute services. When the consensus state machine is in Producer, Coordinator, Subordinate, or Participant, DefaultProcessing logs a warning and drops these events.

If a block's synced/prepared events arrive while the validator is busy (e.g. in AggregateBatchCommitment or Coordinator waiting for signatures), and the block is later replayed via next_block, Initial::process_new_head enters WaitingFor::Synced but the events already fired. The node stalls until a newer block arrives.

Context

Pre-existing architecture issue. Mini-announces (#5321) widen the window by keeping the producer in non-Initial states longer (poll timer + batch commitment + Coordinator). Flagged by Codex review.

Impact

Low in practice with 12s ETH block intervals — the batch commitment + Coordinator flow typically completes in <1s. Higher risk with continuous_block_generation in tests (1s blocks).

Fix options

  • Buffer synced/prepared events alongside next_block in Producer and Coordinator, replay them after transitioning to Initial
  • Or: have the observer/service re-emit synced/prepared for the replayed block (requires observer changes)

Related

PR #5321 (mini-announces), #5342

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions