Snap sync on Amoy cannot progress past block 34,546,977: receipts exceed the 10 MiB eth maxMessageSize, every peer is disconnected
Maintainers usually reply within 2 days
@Samyra312007 is already working on this.
Since Oct 8, 2026.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go
- Domain
- blockchain, networking
Research direction
The issue is in the eth protocol handler where maxMessageSize is enforced. Look at eth/protocols/eth/handler.go lines 211-212 and the ServiceGetReceiptsQuery69 function in handlers.go. The receipts for blocks 34,546,977 and 34,546,978 exceed the 10 MiB limit. A newcomer would need to understand the sync mechanism, the eth protocol, and the codebase to propose a fix, such as adjusting the limit or implementing pagination. Testing would involve syncing an Amoy node and reproducing the disconnect.
Written by the indexing model from the issue text.
Description
Summary
On Amoy, a node in snap sync cannot get past block 34,546,976. Every peer, whether our own upstream bor v2.10.1 nodes or public peers, is disconnected by the syncing node with message too long: N > 10485760 on the eth protocol. When no peers remain, the sync cycle fails with no peers to keep download active, and this repeats indefinitely.
Blocks 34,546,977 and 34,546,978 carry 75,415 and 60,336 logs respectively. The oversized messages we observe (11.4–14.7 MB) track the receipt volume of these two blocks. The eth protocol caps any single message at 10 MiB, and a single block's receipts are always sent whole.
Environment
- Syncing node: bor v2.10.1 (
bor/.../v2.10.1/linux-amd64/go1.26.8),--chain=amoy --syncmode=snap --state.scheme=path --db.engine=pebble.- It's a Firehose-instrumented build (
streamingfast/go-ethereumtagpolygon-v2.10.1-fh3.0, commit860ed9b). - These files are byte-identical to
0xPolygon/bortagv2.10.1(commit7938b8a), checked withdiff:eth/protocols/eth/protocol.go,eth/protocols/eth/handler.go,eth/protocols/eth/handlers.go,eth/downloader/bor_downloader.go,eth/downloader/queue.go,eth/downloader/bor_fetchers_concurrent_receipts.go.
- It's a Firehose-instrumented build (
- Serving peers:
- Two of our archive nodes running unpatched
0xPolygon/borv2.10.1 (bor/.../v2.10.1/linux-amd64/go1.26.7). - Two of our full nodes on the same Firehose build as the syncing node.
- Public Amoy peers found through discovery.
- Two of our archive nodes running unpatched
- Local state at startup, from the node's own log:
INFO [09-23|22:09:40.118] Loaded most recent local snap block number=34,546,976 hash=fed685..1cdefb td=176,306,250 age=6mo4w2h INFO [09-23|22:09:40.118] Loaded last snap-sync pivot marker number=48,379,041
Evidence
1. The syncing node disconnects each peer for an oversized eth message
Captured with --vmodule=eth/downloader/*=5,eth/protocols/eth/*=5,p2p/*=4, verbatim:
TRACE[09-23|23:04:52.192] Delivered new batch of bodies peer=9f028ca9 count=71 accepted=71
DEBUG[09-23|23:04:52.192] Message handling failed in `eth` id=6dac915a38c282d9 conn=trusted-staticdial err="message too long: 14728447 > 10485760"
TRACE[09-23|23:04:52.192] Unregistering sync peer peer=6dac915a
DEBUG[09-23|23:04:52.193] Peer disconnected id=6dac915a38c282d9 conn=trusted-staticdial remoteRequested=false reason="subprotocol error" err="message too long: 14728447 > 10485760"
The rejection happens in the eth handler (Message handling failed in eth), and remoteRequested=false shows the syncing node initiated the disconnect. The check that fires is eth/protocols/eth/handler.go:211-212:
if msg.Size > maxMessageSize {
return fmt.Errorf("%w: %v > %v", errMsgTooLarge, msg.Size, maxMessageSize)
}
maxMessageSize is 10 * 1024 * 1024 (eth/protocols/eth/protocol.go:50).
The sync runs over eth/69, from the same capture:
DEBUG Synchronising with the network peer=8035e527… eth=69 head=af9e9c..590240 td=190,136,526 mode=snap
2. It happens with every peer, and ends every sync cycle
Over a 10-minute capture, 486 disconnects with err="message too long". They're spread across all peers: the four trusted-staticdial peers are ours, and the dyndial peers are public.
18 id=8035e527826b0c1e conn=trusted-staticdial
18 id=6dac915a38c282d9 conn=trusted-staticdial
17 id=e848f076870fc4de conn=trusted-staticdial
17 id=8d3022cf72c8c9e3 conn=trusted-staticdial
16 id=adb7d0be92a91776 conn=dyndial
16 id=9f028ca94d5712ee conn=dyndial
14 id=1ebfdafc69e02f48 conn=dyndial
14 id=0993d231f21df3fd conn=dyndial
Message sizes in that capture: 486 samples, min 11,464,271, median 14,328,926, max 14,732,582 bytes.
Sync outcome in the same capture (Synchronisation failed, evaluating peer response … err=):
49 err="no peers to keep download active"
1 err="action from bad peer ignored: multiple headers (0) for single request"
1 err="action from bad peer ignored: header request failed: disconnected"
3. Block bodies are not the oversized message
The line immediately before the first disconnect above is a successful delivery of 71 bodies (count=71 accepted=71, the last being block 34,547,410). Using eth_getBlockByNumber on an upstream v2.10.1 archive node, the largest block RLP size across all 53,023 blocks from 34,546,977 to 34,599,999 is 0.77 MB (block 34,586,950).
4. Two blocks right after the local snap block carry very large receipt sets
Measured with eth_getBlockReceipts and eth_getBlockByNumber on an upstream v2.10.1 archive node:
| block | txs | gasUsed | logs | log data | receipts (JSON-RPC response size) |
|---|---|---|---|---|---|
| 34,546,977 | 5 | 164,665,455 | 75,415 (15,083 per tx) | 2.41 MB | 53.2 MB |
| 34,546,978 | 5 | 131,856,128 | 60,336 | 1.93 MB | 42.5 MB |
| 34,546,979 | 2 | 130,297 | 4 | 0.00 MB | <0.1 MB |
| 34,546,980 | 5 | 164,819,090 | 10 | 0.00 MB | <0.1 MB |
The transactions in 34,546,977 and 34,546,978 target 0x9dfd20c9b4c90cd77b4b17a1b475b2a8a581fe9b. The ratio of the two blocks' log counts (60,336 / 75,415 = 0.80) equals the ratio of the smallest observed message to the median (11,464,271 / 14,328,926 = 0.80).
5. The server-side soft limit cannot split a single block
ServiceGetReceiptsQuery69 (eth/protocols/eth/handlers.go:357) checks bytes >= softResponseLimit (2 MiB, eth/protocols/eth/handler.go:37) before appending the next block's receipts. A block's receipts are appended whole. Nothing in eth/68 or eth/69 lets one block's receipts span several messages, so a block whose encoded receipts exceed maxMessageSize can't be received from any peer.
6. Full-sync nodes are unaffected
Our full-sync Amoy nodes run the same bor v2.10.1 and are at chain head (48.3M+), past these blocks. They execute blocks rather than downloading receipts.
Possible fixes
- Raise the receive limit for
Receiptsmessages. RLPx already rejects anything abovemaxUint24(about 16 MiB;p2p/rlpx/rlpx.go:160,:227,:250). Raising the eth limit to that value would admit the messages observed here (at most 14,732,582 bytes). It doesn't solve the general case: a block whose receipts encode above 16 MiB would still be unreachable. - Adopt paginated receipts: EIP-7975, "eth/70 - partial block receipt lists".
- Surface the cause at default verbosity. At INFO and WARN the node only logs the lines below. The size violation only appears at DEBUG:
WARN Synchronisation stalled, no peer action taken … reason=peers-unavailable err="no peers available or all tried for download" ERROR Expired request does not exist WARN deliver: Zero results received
Related observations
A. Panic in processSnapSyncContent
The node has panicked 33 times between 2026-09-07 and 2026-09-24, from the service journal:
panic: runtime error: index out of range [-1]
eth/downloader/bor_downloader.go:2033 +0x1451
eth/downloader/bor_downloader.go:816 +0x1c
eth/downloader/bor_downloader.go:856 +0x62
created by github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).spawnSync
Line 2033 is latest := results[len(results)-1].Header. The len(results) == 0 branch just above only returns when d.committed is set or d.cancelCh is closed; otherwise execution falls through to line 2033 with an empty slice.
B. "Multiple headers for single request" is logged when zero headers were returned
1,866 occurrences over 40 days, for example:
WARN [09-06|15:28:30.395] Multiple headers for single request peer=57be28e2 headers=0
The condition is if len(headers) != 1 (eth/downloader/bor_downloader.go:1316), so the message is also emitted for an empty response.
C. "delivery stalling" is logged when a peer leaves, not only on a stall
In eth/downloader/bor_fetchers_concurrent.go:401, the peer-departure branch calls queue.unreserve(peerid). For headers, unreserve logs Header delivery stalling when fails <= 2 (eth/downloader/bor_fetchers_concurrent_headers.go:66-73); bodies and receipts behave the same way. In our capture these lines appear within the same millisecond as the oversized-message disconnect:
DEBUG[09-23|22:09:46.274] Message handling failed in `eth` id=6dac915a38c282d9 conn=trusted-staticdial err="message too long: 14726451 > 10485760"
ERROR[09-23|22:09:46.274] Expired request does not exist peer=6dac915a…
DEBUG[09-23|22:09:46.274] Body delivery stalling peer=6dac915a…
DEBUG[09-23|22:09:46.275] Header delivery stalling peer=6dac915a…
DEBUG[09-23|22:09:46.275] Receipt delivery stalling peer=6dac915a…
DEBUG[09-23|22:09:46.275] Removing p2p peer peercount=5 id=6dac915a38c282d9 inbound=false duration=5.132s req=false err="message too long: 14726451 > 10485760"
- Dominant language
- Go
- Stars
- 1.1k
- Forks
- 623
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 34
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from 0xPolygon/bor
-
Difficulty 4/5 3-5 days Newbie friendliness 22/100
0xPolygon/bor#2568 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
0xPolygon/bor#2539 · 1 comment ·
Maintainers usually reply within 2 days
-
Stale
Difficulty 4/5 3-5 days Newbie friendliness 35/100
0xPolygon/bor#2528 · 2 comments ·
Maintainers usually reply within 2 days
-
Backport go-ethereum#34898 so bor no longer deadlocks in p2p/discover waitForNodes and hangs on shutdownMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
0xPolygon/bor#2506 · 4 comments · 1 reaction ·
Maintainers usually reply within 2 days
Similar issues
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gke-labs/kube-agents#7441 ·
Maintainers usually reply within 1 day
-
triage/pending-triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
external-secrets/external-secrets#7361 ·
Maintainers usually reply within 2 days
-
Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
thunder-id/thunderid#7092 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
jdx/jactionlint#360 ·
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day