Repository navigation
Conversation
reth #26946 made `matching_block_logs_with_tx_hashes` return early when the filter does not match the header's logs bloom. The synthetic header that `flashblock_receipts_stream` builds left the bloom zeroed, so every filter with an address or topic yielded no logs. Set the bloom to all ones so the prefilter never rejects the flashblock. Its receipts are scanned right after, so a bloom computed from them would save no work and only cost hashing every log for every subscriber. Also extract the per-flashblock matching into a function so it can be unit tested. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
joshklop
force-pushed
the
joshklop/flashblock-logs-bloom
branch
from
October 11, 2026 21:27
69c7ecd to
e617a0a
Compare
Contributor
Author
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.
Stacked on #23046. Fixes finding 4 in this review: since paradigmxyz/reth#26946 added a logs-bloom prefilter to
matching_block_logs_with_tx_hashes,OpEthApi::flashblock_receipts_streamreturned no logs for any filter with an address or topic, because its synthetic header has a zero bloom. Only the empty filter still worked. Only downstream users of this public API are affected; nothing in-tree calls it.The header's bloom is now all ones. The receipts are scanned right after the bloom check, so a bloom computed from them (the fix suggested in the review) would cost a hash per log per subscriber and save nothing.
rust-code-reviewerfound no issues with this change. Separately, it found that the stream reportstransactionIndex/logIndexin tx-hash order. That predates this PR and is tracked in ethereum-optimism/protocol-team#453.🤖 Generated with Claude Code