Skip to content

Remove the Firehose ExEx - #67

Merged
sduchesneau merged 1 commit into
release/reth-2.xfrom
firehose-remove-exex/reth-2.x
Oct 5, 2026
Merged

sduchesneau merged 1 commit into
release/reth-2.xfrom
firehose-remove-exex/reth-2.x

Conversation

@sduchesneau

Copy link
Copy Markdown

The Firehose ExEx (reth_firehose::run_exex) no longer traced blocks: its trace_block call is commented out and the engine's payload validator does the tracing. It was only kept alive for two startup calls, on_blockchain_init (FIRE INIT) and the genesis block emit, while paying for an ExEx write-ahead log and a notification loop.

This removes it. bin/reth now calls the new reth_firehose::init_blockchain(&provider) from on_component_initialized.

Why that hook and not on_node_started

Tracer::on_block_start panics if on_blockchain_init has not run. In EngineNodeLauncher:

  1. with_genesis() writes the genesis block
  2. with_components() builds the components and calls on_component_initialized synchronously
  3. the engine is built, the engine API server starts, the consensus engine task is spawned (and may start backfill sync right away)
  4. on_node_started is called

The ExEx ran on_blockchain_init in a spawned task, with no ordering guarantee against step 3. A node-started hook would be worse. The component-initialized hook runs before the engine exists, and the genesis block is already in the database by then.

API changes in reth-firehose

  • Removed: run_exex, emit_genesis_block_if_empty (took an ExExContext), the ExEx-only runner::trace_block, and the reth-exex, reth-ethereum-forks and futures dependencies. The runner module is now init.
  • Added: init_blockchain(&provider), which emits FIRE INIT and then the genesis block on an empty chain.
  • Kept: emit_genesis_block_on_empty_chain, for embedders that report their own name or version in FIRE INIT.

FIRE INIT output is unchanged (reth <reth-firehose crate version>).

Downstream

Nothing breaks until this is merged into the other release branches, since each consumer pins a tag from its own branch. When it is:

  • reth-bsc calls reth_firehose::run_exex (src/main.rs) and must switch to init_blockchain.
  • Base stops using it in Get rid of all ExEx hooks for firehose base#32.
  • op-reth and world-chain only use emit_genesis_block_on_empty_chain, which stays.

Testing

  • cargo test -p reth-firehose -p reth-firehose-tests passes.
  • Battlefield reth-dev (Amsterdam, battlefield main at 0e0c41f): 93 passing, 0 failing. fireeth reads FIRE INIT 3.1 reth 2.7.0.
  • cargo clippy -D warnings and cargo doc -D warnings on reth-firehose fail on lines in executor.rs that this PR does not touch.

The Firehose ExEx only emitted FIRE INIT and the genesis block; its block
tracing was disabled. Emit both from the component-initialized hook, which
runs before the consensus engine exists, so no block is traced first.
@sduchesneau
sduchesneau marked this pull request as ready for review October 3, 2026 01:35
@dfuse-bot
dfuse-bot requested a review from billettc October 3, 2026 01:36
@sduchesneau
sduchesneau merged commit 9ad1217 into release/reth-2.x Oct 5, 2026
4 checks passed
@sduchesneau
sduchesneau deleted the firehose-remove-exex/reth-2.x branch October 5, 2026 15:36
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.

1 participant