Repository navigation
Remove the Firehose ExEx - #67
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Firehose ExEx (
reth_firehose::run_exex) no longer traced blocks: itstrace_blockcall 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/rethnow calls the newreth_firehose::init_blockchain(&provider)fromon_component_initialized.Why that hook and not
on_node_startedTracer::on_block_startpanics ifon_blockchain_inithas not run. InEngineNodeLauncher:with_genesis()writes the genesis blockwith_components()builds the components and callson_component_initializedsynchronouslyon_node_startedis calledThe ExEx ran
on_blockchain_initin 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-firehoserun_exex,emit_genesis_block_if_empty(took anExExContext), the ExEx-onlyrunner::trace_block, and thereth-exex,reth-ethereum-forksandfuturesdependencies. Therunnermodule is nowinit.init_blockchain(&provider), which emitsFIRE INITand then the genesis block on an empty chain.emit_genesis_block_on_empty_chain, for embedders that report their own name or version inFIRE INIT.FIRE INIToutput 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-bsccallsreth_firehose::run_exex(src/main.rs) and must switch toinit_blockchain.emit_genesis_block_on_empty_chain, which stays.Testing
cargo test -p reth-firehose -p reth-firehose-testspasses.reth-dev(Amsterdam, battlefieldmainat0e0c41f): 93 passing, 0 failing.fireethreadsFIRE INIT 3.1 reth 2.7.0.cargo clippy -D warningsandcargo doc -D warningsonreth-firehosefail on lines inexecutor.rsthat this PR does not touch.