p2p: add debug logs around peer disconnect#2169
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.
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
There was a problem hiding this comment.
Pull request overview
Adds additional debug logging across the P2P stack to make peer disconnects, timeouts, and queue backpressure easier to diagnose.
Changes:
- Add debug logs on RLPx transport read/write errors and peer disconnect paths.
- Add/adjust logs for peer rejection/removal and various ETH downloader/fetcher timeout-driven peer drops.
- Add debug logs for transaction broadcast/announce queue overflow and send failures.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| p2p/transport.go | Adds debug logs on transport read/write errors. |
| p2p/server.go | Expands peer removal logging and adds debug logs for post-handshake rejection. |
| p2p/peer.go | Logs whether disconnect was remote-requested vs local. |
| eth/protocols/eth/handshake.go | Logs ETH handshake timeout. |
| eth/protocols/eth/broadcast.go | Adds debug logs for tx broadcast/announce queue overflow and send failure. |
| eth/handler.go | Enriches timeout warn log and adds debug log when handler removes a peer. |
| eth/fetcher/block_fetcher.go | Makes timeout/drop logs more explicit and includes timeout duration. |
| eth/dropper.go | Adjusts random-peer-drop debug log fields/message. |
| eth/downloader/skeleton.go | Enriches header request timeout log. |
| eth/downloader/bor_fetchers_concurrent.go | Adds multiple debug logs around request timeouts / fail thresholds / drops. |
| eth/downloader/bor_downloader.go | Adds sync mode to drop-on-failure warning; adds debug before dropping master peer on header fetch failure. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|



Description
Adds more debug logs around peer disconnection.