fix: prevent discovery eviction from disconnecting active sync peer#12097
fix: prevent discovery eviction from disconnecting active sync peer#12097DarkLord017 wants to merge 17 commits into
Conversation
|
Claude finished @DarkLord017's task in 4m 23s —— View job Code Review
The fix is logically sound and the root cause analysis in the PR description is accurate. Three issues need addressing before merge. Summary
🟠 High — Existing tests broken by
|
|
@claude re-review |
|
Claude finished @DarkLord017's task in 5m 25s —— View job Re-Review
Previous findings — all resolved ✅
New findings
🟡 Medium — Remaining narrow TOCTOU (
|
|
@claude re-review |
|
Claude finished @DarkLord017's task in 3m 11s —— View job Re-Review (Round 3)
Previous findings
Open finding🟡 Medium —
|
|
review @claude |
|
Claude finished @DarkLord017's task in 4m 36s —— View job Re-Review (Round 4)
Status of Prior Findings
Remaining Finding🟡 Medium (carried from Round 2) — Comment documenting residual race still absentThis has been requested in every round. The critical code fix is now in place (Round 3's core concern resolved). However, the Without this comment a future reader could plausibly:
The residual TOCTOU ( Suggested addition at Correctness Notes (no action needed)
|
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
|
Claude finished @DarkLord017's task in 2m 17s —— View job Re-Review (Round 5)
All Prior Findings Resolved ✅
No New FindingsThe implementation is now correct and well-documented:
Known acknowledged risks (not new, no action needed):
The fix is logically sound, all review findings have been addressed, and the code is ready to merge. |
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
|
@claude review |
|
Claude encountered an error after 3m 12s —— View job I'll analyze this and get back to you. |
|
@claude try again also pls check if i have added all the correct code as per the comments or requested changes |
|
Claude finished @DarkLord017's task in 7m 9s —— View job Re-Review (Round 6)
All reviewer feedback addressed ✅
Correctness notes (no action needed)
The implementation is correct and all feedback from all reviewers has been addressed. Ready to merge. |
|
@claude final review made some changes |
|
Claude encountered an error after 3m 17s —— View job I'll analyze this and get back to you. |
|
@claude try again |
|
Claude finished @DarkLord017's task in 2m 36s —— View job Re-Review (Round 7)
All Previous Findings Resolved ✅
No New FindingsThe implementation is correct, well-structured, and ready to merge. Verification of key correctness properties:
Acknowledged risks (no action needed):
The fix is logically sound, all reviewer feedback has been addressed, and the implementation is clean and well-tested. Ready to merge. |
Fixes
Engine Withdrawals
✖ Sync after 128 blocks - Withdrawals on Block 2 - Multiple Withdrawal Accounts (Paris) (nethermind)
✖ Sync after 2 blocks - Withdrawals on Block 1 - Single Withdrawal Account (Paris) (nethermind)
✖ Sync after 2 blocks - Withdrawals on Block 1 - Single Withdrawal Account - No Transactions (Paris) (nethermind)
✖ Sync after 2 blocks - Withdrawals on Block 2 - Multiple Withdrawal Accounts (Paris) (nethermind)
✖ Sync after 2 blocks - Withdrawals on Genesis - Single Withdrawal Account (Paris) (nethermind)
Sync
✖ snapsync/sync nethermind from nethermind
✖ sync/sync nethermind from nethermind
Changes
PeerPool: Do not remove a peer from the pool when the Kademlia discovery layer evicts it if an active P2P session (inbound or outbound) is still open.Explanation
discv4 periodically pings known nodes to keep the Kademlia routing table healthy. The ping times out (ping timing out is confirmed but unable to debug the reason) and
NodeHealthTracker.OnRequestFailedremoves the node from the K-bucket, which firesINodeSource.NodeRemoved. Also as there is a 5 minute timeout set and hive has a timeout of 60 seconds the test failsTypes of changes
Testing
Requires testing
If yes, did you write tests?
Notes on testing
Verified against Hive sync test suite. The peer disconnect during sync no longer occurs
Documentation
Requires documentation update
Requires explanation in Release Notes