Amoy: bad block 51978200, state receiver swap not in any public release
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go
- Domain
- backend, blockchain
Research direction
Start by checking the Amoy genesis configuration in genesis-amoy.json, especially config.bor.blockAlloc, and trace how Bor applies system-contract code updates at block activations. Compare the configured code for 0x…1001 with the 6332-byte version reported at block 51978200, then identify the intended Bor release and corresponding mainnet activation. Done means confirming the activation details and explaining how operators can sync past the block.
Written by the indexing model from the issue text.
Description
System information
Bor client version: v2.10.3 (also reproduced on v2.10.0)
Heimdall client version: v0.13.2 (also reproduced on v0.12.1)
OS & Version: Ubuntu 24.04, Linux
Environment: Polygon Amoy
Type of node: Sentry, full node (path-based state scheme on PebbleDB)
Additional Information: No modifications to the client. Default config; [parallelevm] left at defaults.
Overview of the problem
Bor cannot import Amoy block 51978200 and has been stalled there since 2026-11-04. It reports a bad block with a state root mismatch, re-fetches the block from a peer, fails again, drops the peer, and loops indefinitely.
########## BAD BLOCK #########
Block: 51978200 (0xc45be4e3feff69f81b3258f6e1b3cd8d0584b34cf8f2cd78b116fee6157d8335)
Error: invalid merkle root (remote: cda5a9f5ff14c810179f05b09d4e0907848a035ce03490ef4e6748c33c59cc79 local: e17b3ce1e4b2dee4673d344492b35776f69347136d48b74b6383d3a44013d643)
The node's own chain is canonical right up to the failing block. Parent 51978199 matches the public chain exactly:
| our node | public chain | |
|---|---|---|
| hash | 0x9a481805e7248bfb6f272e2ef4fa37654255592e158c90da260be3542b1bde06 |
identical |
| stateRoot | 0x63b4de282997f6177c209dee7c804800746389fcc8b962726e72410c84891806 |
identical |
Block 51978200 is empty — gasUsed: 0x0, miner: 0x0000000000000000000000000000000000000000, and both transactionsRoot and receiptsRoot are the empty-trie root 0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421. Bor's own logs confirm no state-sync records were applied around it (StateSyncData ... "total records"=0). So no transaction or bridge event accounts for the state change, yet the canonical state root moves.
What appears to be happening: the code of the state receiver contract 0x0000000000000000000000000000000000001001 is replaced on-chain at exactly block 51978200. Queried against a public archive node:
| Block | eth_getCode(0x…1001) size |
sha256 of the hex string |
|---|---|---|
| 51978199 | 5052 bytes | 691ef6aae6cf56c994165871851821b993b32cb27b0f7912b158d78c0fd80fe0 |
| 51978200 | 6332 bytes | a22046b4b438c7252f6abce4147a138f073c68624c4acc1d45e0c3833b8c0999 |
| 51978300 | 6332 bytes | a22046b4b438c7252f6abce4147a138f073c68624c4acc1d45e0c3833b8c0999 |
Our node holds the 5052-byte version, which is exactly what config.bor.blockAlloc at height 11865856 in the published genesis-amoy.json prescribes. The 6332-byte version does not appear anywhere in that file.
In v2.10.3's genesis-amoy.json, config.bor.blockAlloc contains only two heights, 11865856 and 12121856, and there is no fork key for any activation at or near 51978200 — the latest is austinBlock = 44120000. The file is byte-identical between v2.10.0 and v2.10.3 (sha256 d217770204f9dc3efca613bbd77eaffbb0b04909b0fc3143407f01345901f970).
So as far as we can tell, the network performs a system-contract code replacement at Amoy block 51978200 that no publicly released bor implements. Public RPC providers follow the chain past this block, so a build containing it clearly exists. We could not find it: there is no karwar reference anywhere in bor's source, no release after v2.10.3 (2026-10-15), and no announcement describing this activation. Heimdall's Karwar release (v0.13.2, 2026-11-03) documents heimdall activation heights but says nothing about a bor-side change.
Questions
- Is there a bor release or candidate that implements this activation? If it is currently a private build, when is the public one expected?
- What is the equivalent mainnet activation height? Mainnet's
0x…1001still holds the 5052-byte code thatblockAllocheight62278656prescribes, so the swap has not happened there yet, and operators on public releases will stall identically when it does.
Reproduction Steps
- Run a bor Amoy sentry on v2.10.3 with heimdall v0.13.2, synced to block 51978199.
- Let it attempt block 51978200.
- Bor logs
BAD BLOCKwith the state roots above and does not advance.
A fresh node syncing from a snapshot taken before 51978200 should reach the same wall.
Logs / Traces / Output / Error Messages
WARN Parallel state processor failed number=51,978,200 hash=c45be4..7d8335
err="invalid merkle root (remote: cda5a9f5ff14c810179f05b09d4e0907848a035ce03490ef4e6748c33c59cc79 local: e17b3ce1e4b2dee4673d344492b35776f69347136d48b74b6383d3a44013d643) dberr: %!w(<nil>)"
pipelineMode=disabled parent=51,978,199 parentHash=9a4818..1bde06 parentRoot=63b4de..891806
INFO Skip duplicated bad block number=51,978,200 hash=c45be4..7d8335
########## BAD BLOCK #########
Block: 51978200 (0xc45be4e3feff69f81b3258f6e1b3cd8d0584b34cf8f2cd78b116fee6157d8335)
Error: invalid merkle root (remote: cda5a9f5ff14c810179f05b09d4e0907848a035ce03490ef4e6748c33c59cc79 local: e17b3ce1e4b2dee4673d344492b35776f69347136d48b74b6383d3a44013d643) dberr: %!w(<nil>)
WARN Synchronisation failed, dropping peer reason=invalid-chain
err="retrieved hash chain is invalid: invalid merkle root (remote: cda5a9f5... local: e17b3ce1...)" mode=full
INFO Whitelisting milestone deferred err="chain out of sync"
The same local: root is produced by the parallel processor and reported in the final BAD BLOCK, so the serial path reaches the same result.
Additional Information
Chain configuration printed at startup:
ChainConfig{ChainID:80002, HomesteadBlock:0, DAOForkBlock:<nil>, DAOForkSupport:true,
EIP150Block:0, EIP155Block:0, EIP158Block:0, ByzantiumBlock:0, ConstantinopleBlock:0,
PetersburgBlock:0, IstanbulBlock:0, MuirGlacierBlock:0, BerlinBlock:0, LondonBlock:73100,
ArrowGlacierBlock:<nil>, GrayGlacierBlock:<nil>, MergeNetsplitBlock:<nil>, ShanghaiBlock:73100,
CancunBlock:5423600, PragueBlock:22765056, VerkleBlock:<nil>, OsakaBlock:<nil>,
EnableVerkleAtGenesis:false, Engine: bor}
eth_syncing while stalled:
{"currentBlock":"0x3191fd7","highestBlock":"0x31a369a","startingBlock":"0x318ce08",
"healedBytecodes":"0x0","healedTrienodes":"0x0","syncedAccounts":"0x0"}
Peers: 27. Disk: 35% used. Heimdall is healthy and at tip throughout (catching_up: false, advancing in real time), so this is not a bor/heimdall communication problem.
What we already ruled out
- bor v2.10.0 and v2.10.3 — identical local root
- heimdall v0.12.1 and v0.13.2 — identical local root
- parallel and serial execution — identical local root
- corrupt local state — the parent's state root matches canonical, and the validator-set contract
0x…1000and the EIP-2935 history contract both match the public chain byte for byte; only0x…1001differs - a bad snapshot (as in #1683) — ruled out by the parent state matching
- 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
-
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
-
Snap sync on Amoy cannot progress past block 34,546,977: receipts exceed the 10 MiB eth maxMessageSize, every peer is disconnectedMay be free again @Samyra312007 claimed this 49 days ago, and no pull request is open. OpenStale
Difficulty 4/5 3-5 days Newbie friendliness 30/100
0xPolygon/bor#2441 · 5 comments ·
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