Revert #2237 — forkid wire-format change is a breaking p2p change#2248
Open
lucca30 wants to merge 1 commit into
Open
Revert #2237 — forkid wire-format change is a breaking p2p change#2248lucca30 wants to merge 1 commit into
lucca30 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
cffls
approved these changes
May 27, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2248 +/- ##
===========================================
- Coverage 52.86% 52.85% -0.02%
===========================================
Files 886 886
Lines 156811 156811
===========================================
- Hits 82900 82883 -17
- Misses 68663 68677 +14
- Partials 5248 5251 +3
... and 22 files with indirect coverage changes
🚀 New features to boost your workflow:
|
marcello33
approved these changes
May 28, 2026
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.



Summary
Reverts #2237 ("core/forkid: include polygon-specific forks in wire forkid").
This is a breaking p2p change that was not flagged as such when #2237 merged.
What went wrong
#2237 swapped
gatherForks(lowercase, reflection-based, outer ChainConfig only) forGatherForks(uppercase, polygon-aware — also walksconfig.Bor.{Jaipur,Delhi,Indore,Ahmedabad,Bhilai,Rio,Madhugiri,MadhugiriPro,Dandeli,Lisovo,LisovoPro,Giugliano,Chicago}Block) in the wire-forkid path (core/forkid/forkid.go::NewID,NewStaticFilter).This is correct in intent — bor's old forkid was lying about which forks were active and erigon ≥3.6.0 already includes these blocks — but changing what gets hashed in the wire forkid is, by definition, a coordinated-upgrade event. Any node running the new code computes a different forkid than nodes running the old code on the same chain, and the eth handshake fails with
fork ID rejected: local incompatible or needs update.Live evidence
Deployed v2.8.3-beta3 (which contains #2237) to an Amoy observation node (
posdevnodes-amoy-2) on 2026-05-27. Symptoms within 5 minutes:Looking for peers peercount=0 tried=10–35 static=13every 10 s — static peers being dialed continuously, all dropped immediately.Rolling the same node back to v2.8.0-beta2 (which does not contain #2237) restored peers to ~18 within seconds. Confirms the diagnosis: it's the forkid hash mismatch, not anything else in the beta3 delta.
This will affect mainnet identically the moment a v2.8.3 (with #2237) bor talks to any v2.8.2-or-older bor, because every Polygon-specific fork above is also activated on mainnet at non-zero blocks.
Why a plain revert, not a fix-forward
There is no algorithmic trick that makes a forkid hash change non-breaking on a chain where the affected forks have already activated. The only valid rollout strategies are:
GatherForksbehavior on a future fork block. Introduce a newBorConfig.ForkidFixBlock(or piggyback on the next planned consensus fork). Before that block: use legacygatherForksfor wire forkid computation. At and after: useGatherForks. Everyone deploys the binary well in advance; the protocol-level switchover is atomic at the block boundary. This is the canonical Ethereum pattern.Either approach should be a follow-up PR, designed and reviewed as a network upgrade. This PR just unblocks the existing release line.
What needs to follow
ForkidFixBlock(or equivalent) — must include chain-config entries for mainnet and amoy, an explicit announcement to operators, and a soak period on devnet first.Test plan
go build ./...passes after revertv2.8.3-candidateand shipped asv2.8.3-beta4— node recovered peers + chain progression on Amoycore/forkid/forkid.gomatches pre-core/forkid: include polygon-specific forks in wire forkid #2237 state (only the twoGatherForks→gatherForkscall sites)