Conversation
|
Claude finished @batrr's task in 3m 48s —— View job PR Review: XDC Discovery
SummaryThe approach is sound: XDC forked disc-v4 and remapped the ping type byte from Three issues to address before merge:
The High and both Medium issues above mean this is not yet mergeable as-is. The DI ordering fragility in particular could silently re-introduce the exact bug being fixed. |
|
@claude re review |
|
Claude finished @batrr's task in 5m 35s —— View job PR Re-Review: XDC Discovery
What changed since the previous reviewAll four prior findings were addressed:
Additionally, Remaining issueMedium — Missing regression test
Without these, the exact bug this PR fixes (wrong type byte sent to XDC nodes) has no automated guard and can regress silently. Correctness confirmationThe fix is technically correct end-to-end:
One Medium finding (missing regression test) blocks merge per repo policy. |
|
@claude re review |
|
Claude finished @batrr's task in 3m 19s —— View job PR Re-Review: XDC Discovery
What changed since the last reviewThe last remaining finding was a Medium — missing regression tests. Tests have now been added in
Test analysis
Correct and sufficient as a regression guard. Constructs a full serializer with a real ECDSA + key generator, serializes a
Covers the two XDC-critical cases: Full correctness check (all prior findings)
Remaining minor note (Low, non-blocking)The VerdictThis PR is ready to merge. All prior Critical/High/Medium findings are resolved. The regression test for the core bug (wrong type byte sent to XDC nodes) is in place. The fix is technically correct end-to-end. |
|
Claude finished @batrr's task in 2m 37s —— View job PR Review: XDC Discovery
SummaryThis is the third re-review. All prior Critical/High/Medium findings have been addressed. The PR is in good shape. What the PR does (end-to-end correctness confirmed):
Previous findings — all resolved:
New findingsLow —
Low —
VerdictReady to merge. All prior High and Medium findings are resolved. The regression test directly guards against the original bug (wrong type byte sent to XDC nodes). No new High or Medium issues found. |
Problem
Nethermind was failing to discover peers on the XDC network. XDC forked go-ethereum's discovery v4 protocol and changed the ping type byte from
1(standard gethpingPacket) to5(pingXDC). XDC nodes only handle wire bytes{2, 3, 4, 5}, type1is rejected as unknown and dropped.Nethermind was serializing pings with type byte
1, which XDC nodes silently drop. No pong was ever received, bonding never completed, and no peers were discovered.https://github.com/XinFinOrg/XDPoSChain/blob/4ef1d4fdf597a15c3d2b28ae14763fe1b3bd2208/p2p/discover/udp.go#L61