Skip to content

p2p: add debug logs around peer disconnect#2169

Merged
kamuikatsurgi merged 4 commits into
developfrom
kamui/add-p2p-debug-logs
Mar 31, 2026
Merged

p2p: add debug logs around peer disconnect#2169
kamuikatsurgi merged 4 commits into
developfrom
kamui/add-p2p-debug-logs

Conversation

@kamuikatsurgi

Copy link
Copy Markdown
Member

Description

Adds more debug logs around peer disconnection.

Copilot AI review requested due to automatic review settings March 30, 2026 11:11

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@claude

claude Bot commented Mar 30, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread eth/downloader/bor_fetchers_concurrent.go
Comment thread eth/downloader/bor_fetchers_concurrent.go
Comment thread eth/downloader/skeleton.go Outdated
Comment thread eth/downloader/bor_fetchers_concurrent.go Outdated
Comment thread eth/protocols/eth/handshake.go Outdated
Comment thread p2p/server.go Outdated
Comment thread p2p/peer.go Outdated
Comment thread eth/protocols/eth/broadcast.go
Comment thread eth/downloader/bor_fetchers_concurrent.go Outdated
Comment thread eth/downloader/bor_fetchers_concurrent.go Outdated
Copilot AI review requested due to automatic review settings March 30, 2026 11:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread p2p/peer.go Outdated
Comment thread p2p/server.go Outdated
Comment thread eth/protocols/eth/broadcast.go Outdated
@sonarqubecloud

Copy link
Copy Markdown

@kamuikatsurgi kamuikatsurgi merged commit 30d7a01 into develop Mar 31, 2026
3 checks passed
@kamuikatsurgi kamuikatsurgi deleted the kamui/add-p2p-debug-logs branch March 31, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants