[bal-devnet-3] p2p/protocols/eth, p2p/sentry: EIP-8159 eth/71 handler + sentry dispatch (#20794)#20881
Merged
Merged
Conversation
…tch (PR 2/3) (#20794) Second of three stacked PRs implementing [EIP-8159](https://eips.ethereum.org/EIPS/eip-8159). Adds the server-side answer handler and wires eth/71 message dispatch into the sentry. **Depends on #20793** — review/merge that one first. - `AnswerGetBlockAccessListsQuery` in [p2p/protocols/eth/handlers.go](p2p/protocols/eth/handlers.go): - Iterates request hashes, resolves block number via `HeaderReader.HeaderNumber`. - Calls `rawdb.ReadBlockAccessListBytes` and appends RLP to response. - Returns empty RLP list (`0xc0`) for any hash not in local rawdb — EIP-8159's "not available" signal. - Enforces a soft-size limit (default 2 MiB per EIP recommendation) by truncating the response rather than padding. - Sentry dispatch in `sentry_grpc_server.go` for the two new message codes. - `libsentry/protocol.go` — `ETH71` added to `ethProtocolsByVersion`, `ProtoIds` whitelist extended; `MinProtocol(GET_BLOCK_ACCESS_LISTS_71)` returns `ETH71` so only eth/71 peers are queried. - Tests in [p2p/protocols/eth/handlers_test.go](p2p/protocols/eth/handlers_test.go): - `TestAnswerGetBlockAccessListsQuery_OrderedResponseWithMissing` — asserts positional ordering, plus unknown-block and known-block-no-BAL both return `0xc0` in the correct slot. - `TestAnswerGetBlockAccessListsQuery_SoftSizeLimit` — seeds 5 oversized BALs, asserts truncation (no partial payloads in the response). No consumer-side fetcher yet — peers that speak eth/71 can answer our queries, but we don't send any. That's PR 3. 1. #20793 — wire protocol constants + packet types. 2. **This PR** — handler + sentry dispatch. 3. #TBD (fetcher + downloader + devnet skill) — depends on this one. - [x] `go test -short ./p2p/protocols/eth/... ./p2p/sentry/...` - [x] `make lint` (0 issues) - [x] `make erigon integration` - [ ] PR 3 builds and tests cleanly on top. --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
mh0lt
added a commit
that referenced
this pull request
May 5, 2026
…atch bug (#20893) (#21003) Cherry-pick of the BAL diagnostic tooling (bal-scan / bal-test / debug_getRawBlockAccessList RPC) from #20893. Useful for the eth/71 BAL exchange testing on bal-devnet-3 (dump/delete/refetch/compare workflow). The server-dispatch wire-up half of #20893 is intentionally NOT cherry-picked — it's already on bal-devnet-3 via #20881.
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.
Cherry-pick of #20794 onto bal-devnet-3. Stacked on top of #20880 (eth/71 PR1) and #20879 (devp2p fixes).