Advertise finalized head as LIB on engine-API path#5
Open
sduchesneau wants to merge 2 commits into
Open
Conversation
The cloned OpFirehoseEngineValidator started the Firehose block tracer with `finalized = None`, so live engine-API blocks carried no finalized reference and downstream LIB (last irreversible block) never advanced. Read the finalized head from the node provider via `finalized_block_num_hash()` (adding a `BlockIdReader` bound) and pass it as the block's `FinalizedBlockRef`, mirroring the reth fork's `runner.rs` ExEx path.
Cold builds took ~32m (no layer cache; maxperf LTO). Cache the cargo-chef dependency layer across runs (type=gha) and use the fast-build profile for PR builds, keeping maxperf for branch/tag releases. Mirrors build-images.yaml.
Author
|
DO NOT MERGE YET: it does not fix the LIB. I should make PR-builds faster though |
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.
Bug
LIB (last irreversible / finalized block) was never advanced for the Firehose-instrumented op-reth running the live engine-API flow.
The cloned
OpFirehoseEngineValidator(op-reth's own engine-validator clone, incrates/firehose/src/engine_validator.rs) started the block tracer withfinalized = None:so every emitted block carried no finalized reference and downstream LIB never moved.
Fix
Read the finalized head from the node provider and pass it as the block's
FinalizedBlockRef:This mirrors the reth fork's
runner.rs(ExEx path), which already doesto_finalized_ref(ctx.provider().finalized_block_num_hash()). The op-reth engine-API clone was the one place still passingNone. Requires aBlockIdReaderbound on the provider; the concreteNode::Provider(BlockchainProvider, with the live forkchoice-tracked finalized) satisfies it.Validation
cargo check -p reth-optimism-firehose/-p reth-optimism-node✅cargo build -p op-reth --bin op-reth✅🤖 Generated with Claude Code