Skip to content

fix(firehose): stop Executor::execute from re-emitting traced blocks - #38

Open
panos-xyz wants to merge 2 commits into
streamingfast:release/reth-2.xfrom
panos-xyz:fix/firehose-execute-untraced
Open

panos-xyz wants to merge 2 commits into
streamingfast:release/reth-2.xfrom
panos-xyz:fix/firehose-execute-untraced

Conversation

@panos-xyz

Copy link
Copy Markdown

FirehoseBlockExecutor overrode Executor::execute to trace whenever the tracer is initialized, on the assumption that the pipeline executes through it. The execution stage now calls execute_and_trace_one directly, so the override only affects callers that re-execute blocks for other purposes. In reth that is the single-block ExEx backfill job; chains add their own (Morph's proofs-history collector, for example). Those blocks were emitted a second time, out of order, and into_state flushed them before the caller validated anything.

  • execute now keeps the trait default and runs untraced, like every Executor method other than execute_and_trace_one. The module docs say so.
  • Includes a cherry-pick of release/bnb-0.x 521c219: execute_and_trace_one falls back to untraced execution instead of erroring when the tracer is not initialized, so an EVM config can return FirehoseBlockExecutor unconditionally.

Testing

  • New reth-firehose-tests integration binary batch_executor: with the tracer installed, execute emits nothing and execute_and_trace_one + into_state emits the block once. It fails without the fix (execute emitted the block).
  • cargo test -p reth-firehose-tests, cargo test -p reth-firehose --lib.

https://claude.ai/code/session_017NVMdn2RC1Nv5tfSTCkvro

sduchesneau and others added 2 commits September 17, 2026 09:53
Lets a FIREHOSE_DISABLED-style kill-switch run the pipeline through the
plain executor path instead of erroring.

(cherry picked from commit 521c219)
FirehoseBlockExecutor overrode execute() to trace whenever the tracer was
initialized, on the assumption that the pipeline executes through it. The
execution stage now calls execute_and_trace_one directly, so the override only
affected callers that re-execute blocks for other purposes, such as the
single-block ExEx backfill job: those blocks were emitted a second time, out
of order, and flushed by into_state before the caller validated anything.

execute() now keeps the trait default and runs untraced, like every Executor
method other than execute_and_trace_one.

Claude-Session: https://claude.ai/code/session_017NVMdn2RC1Nv5tfSTCkvro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants