Repository navigation
eth/protocols/eth: stop serving on unavailable responses - #34787
Merged
Merged
Conversation
fjl
approved these changes
May 6, 2026
maoueh
pushed a commit
to streamingfast/go-ethereum
that referenced
this pull request
Jul 21, 2026
) (ethereum#3705) Cherry-pick of go-ethereum ea1cf7b (PR ethereum#34787) β alternative to PR ethereum#34746 implementing the simpler approach: when serving GetBlockBodies / GetReceipts and a requested item is unavailable, stop serving instead of silently dropping it. Requests for unavailable items are typically a sign that the peer is following a different fork; replying with a sparse list is misleading because the dropped slots are silently elided. Halting at the first gap gives the requester a clearer signal and saves work. Adapted to BSC's two receipts handlers (68 and 69) which retain the empty-receipts-root branch β that branch continues to serve. Test adjusted to match the new "stop at gap" semantics. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
This is an alternative PR for #34746.
This PR implements the second approach among the two possible solutions mentioned in the above PR.
Requests for unavailable items are possible when the peer is following a different fork from us. However this is not expected to happen frequently. Considering the amount of complexity added to the codebase, the simpler approach (this PR) can be preferred.