Skip to content

Conversation

@fedacking
Copy link
Contributor

@fedacking fedacking commented Oct 24, 2025

Motivation

Currently the P2P logs are verbose, and don't use the structured format we want for logs in some cases. As such, we aim in this PR to review and change the format of the logs.

Description

  • Removed Macros for peer logging, changed to be inline.
  • Modified Node Display format to include the client name.
  • Lowered "Broken pipe with peer, disconnected" from error to debug
  • Added comments explaining why we might want debug logs.

Example of output in this PR:
2025-10-24T17:59:52.294734Z DEBUG ethrex_p2p::rlpx::connection::server: connection failure peer=Nethermind:0xb7b2…10fb(70.105.250.99:30303) error_text=Failed to initialize RLPx connection error=Peer disconnected due to: Too Many Peers

@github-actions github-actions bot added the L1 Ethereum client label Oct 24, 2025
@github-actions
Copy link

github-actions bot commented Oct 24, 2025

Lines of code report

Total lines added: 46
Total lines removed: 24
Total lines changed: 70

Detailed view
+--------------------------------------------------------+-------+------+
| File                                                   | Lines | Diff |
+--------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/connection/server.rs | 1018  | +30  |
+--------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/eth/transactions.rs  | 329   | +8   |
+--------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/l2/l2_connection.rs  | 460   | +7   |
+--------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/utils.rs             | 86    | -24  |
+--------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/types.rs                  | 506   | +1   |
+--------------------------------------------------------+-------+------+

Copy link
Contributor

@ElFantasma ElFantasma left a comment

Choose a reason for hiding this comment

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

Looks good!
Left some minor suggestions

@fedacking fedacking marked this pull request as ready for review October 24, 2025 19:27
@fedacking fedacking requested a review from a team as a code owner October 24, 2025 19:27
@ethrex-project-sync ethrex-project-sync bot moved this to In Review in ethrex_l1 Oct 24, 2025
@jrchatruc jrchatruc enabled auto-merge October 28, 2025 14:03
@jrchatruc jrchatruc added this pull request to the merge queue Oct 28, 2025
Merged via the queue into main with commit 4c29824 Oct 28, 2025
28 checks passed
@jrchatruc jrchatruc deleted the review-p2p-logs branch October 28, 2025 14:47
@github-project-automation github-project-automation bot moved this from In Review to Done in ethrex_l1 Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L1 Ethereum client

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants