Skip to content

[bal-devnet-3] p2p, txpool: fix Hive eth devp2p test failures (#20733)#20879

Open
mh0lt wants to merge 1 commit intobal-devnet-3from
cp/p2p-devp2p-fixes-bal-devnet-3
Open

[bal-devnet-3] p2p, txpool: fix Hive eth devp2p test failures (#20733)#20879
mh0lt wants to merge 1 commit intobal-devnet-3from
cp/p2p-devp2p-fixes-bal-devnet-3

Conversation

@mh0lt
Copy link
Copy Markdown
Contributor

@mh0lt mh0lt commented Apr 28, 2026

Cherry-pick of #20733 onto bal-devnet-3. Required by the eth/71 cherry-pick stack: PR #20794 includes a regression test (TestAnswerGetBlockHeadersQuery_HashModeSkip) that depends on the one-line forward-traversal fix in this PR.

## Summary

Addresses 6 failures in the Hive `eth` devp2p simulator suite against
erigon 3.5.0-dev
([run
link](https://hive.ethpandaops.io/#/test/generic/1776841357-2075acc44b3e6ba92211e38c25fcc59c)).

| Test | Root cause | Fix |
|---|---|---|
| `GetBlockHeaders` / `SimultaneousRequests` | Hash-mode forward
traversal read the header at `query.Origin.Number` (the *current* block)
instead of `next`, so the ancestor check always failed and responses
were truncated to a single header. | `p2p/protocols/eth/handlers.go` —
one-character change (`query.Origin.Number` → `next`), matches
go-ethereum. |
| `BlockRangeUpdateInvalid` | `blockRange69` returned a `Validate()`
error, but `HandleInboundMessage` only kicks for RLP errors. |
`sentry_multi_client.go` — explicit `PenalizePeer(Kick)` when `Earliest
> Latest` or `LatestHash` is zero. |
| `TestBlobTxWithMismatchedSidecar` | Blob-wrapper parser checked counts
but not `KZGToVersionedHash(commitment[i]) == versioned_hash[i]`. The
async pool `validateTx` catches it later, but the peer association is
gone by then. | `fetch.go` — new `checkBlobSidecar` invoked on both
`TRANSACTIONS_66` and `POOLED_TRANSACTIONS_66` while the peer is still
known. |
| `TestBlobViolations` | eth/68 `NewPooledTransactionHashes` carries
per-hash (type, size), but the fetcher discarded both. Additionally, a
same-bytes cross-peer dedup in the fetch loop prevented the tx-fetcher
from falling back to a second announcer after the first was kicked. |
`fetch.go` — a 64k-entry peer-stamped LRU records announcements for
hashes that survive `FilterKnownIdHashes`; a one-shot check on
`POOLED_TRANSACTIONS_66` kicks a peer whose delivered tx contradicts its
own earlier announcement (type strict; size tolerates an 8-byte slack
matching go-ethereum's inline `txSizeSlack` threshold in
`eth/fetcher/tx_fetcher.go`). The pre-existing `seenLRU` dedup is now
scoped to `TRANSACTIONS_66`/`POOLED_TRANSACTIONS_66` only, so
announcements from alternative peers are no longer dropped. |
| `client launch` | Suite-level rollup. | Passes once the above do. |

CI wiring (`.github/workflows/test-hive.yml`):

- Adds `devp2p/eth` as a matrix entry with `max-allowed-failures: 0` —
the regression guard for the wire-protocol fixes above. The sibling
devp2p suites (snap, discv4, discv5) are intentionally excluded; they
have unrelated pre-existing failures.
- Merges `engine-exchange-capabilities` and `engine-auth` into a single
shard to free a queue slot on the capacity-limited `hive` runner group.
- Passes the full sim path (`ethereum/engine`, `devp2p`, …) instead of
hard-coding an `ethereum/` prefix, so non-`ethereum/` simulators resolve
correctly.

---------

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