Skip to content

eth/protocols/eth: stop serving on unavailable responses - #34787

Merged
fjl merged 2 commits into
ethereum:masterfrom
healthykim:fix/skip-receipt-v2
May 6, 2026
Merged

fjl merged 2 commits into
ethereum:masterfrom
healthykim:fix/skip-receipt-v2

Conversation

@healthykim

@healthykim healthykim commented Apr 21, 2026 •

Copy link
Copy Markdown
Contributor

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.

@fjl fjl changed the title eth/protocols: stop serving on unavailable responses eth/protocols/eth: stop serving on unavailable responses May 6, 2026
@fjl fjl added this to the 1.17.3 milestone May 6, 2026
@fjl
fjl merged commit ea1cf7b into ethereum:master May 6, 2026
9 of 10 checks passed
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>
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.

2 participants