Skip to content

Downgrade routine peer-interaction logs from DEBUG to TRACE#215

Open
parthdagia05 wants to merge 2 commits intoConsensys:masterfrom
parthdagia05:fix/downgrade-verbose-debug-to-trace
Open

Downgrade routine peer-interaction logs from DEBUG to TRACE#215
parthdagia05 wants to merge 2 commits intoConsensys:masterfrom
parthdagia05:fix/downgrade-verbose-debug-to-trace

Conversation

@parthdagia05
Copy link
Copy Markdown

@parthdagia05 parthdagia05 commented Apr 16, 2026

Demotes 16 LOG.debug() calls to LOG.trace() across 9 Discovery v5 handler
classes. All 16 describe peer-caused events our node already handled correctly
(bad packets, failed handshakes, policy rejections, session timeouts) and were
producing ~114 messages/minute on mainnet, swamping --logging=DEBUG output.

Messages remain fully visible at --logging=TRACE. No LOG.warn/error/info
calls are touched.

Full rationale, measurements, and file-by-file breakdown: #<ISSUE_NUMBER>
Downstream: besu-eth/besu#9691

Deliberately left at DEBUG

Two LOG.debug calls in NodeSession#cancelAllRequests they signal possible
local-code issues (unexpected cleanup exception, race on requestIdStatuses),
not peer behavior.

Closed #214


Note

Low Risk
Log-level-only changes in discovery handlers; no functional behavior, state transitions, or error handling paths are modified.

Overview
Reduces noise in Discovery v5 by demoting routine peer-driven events from DEBUG to TRACE across several packet/session handlers.

This primarily affects logs for bad packets/decrypt failures, handshake validation failures, disallowed sources/destinations, and rejected FINDNODE results, keeping WARN/ERROR behavior unchanged while making --logging=DEBUG output less chatty.

Reviewed by Cursor Bugbot for commit 62fc1ea. Bugbot is set up for automated code reviews on this repo. Configure here.

* add renovate

* updates
@parthdagia05 parthdagia05 requested a review from a team as a code owner April 16, 2026 19:11
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 16, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@parthdagia05 parthdagia05 force-pushed the fix/downgrade-verbose-debug-to-trace branch from ad551b3 to ea86775 Compare April 16, 2026 19:15
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

Reviewed by Cursor Bugbot for commit ea86775. Configure here.

@parthdagia05
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@parthdagia05
Copy link
Copy Markdown
Author

recheck

Discovery v5 handlers log expected peer-interaction failures (bad
packets, failed handshakes, policy-rejected peers, session timeouts)
at DEBUG level, producing ~114 messages/minute on mainnet and making
--logging=DEBUG output hard to read.

Demote 16 such LOG.debug() calls across 9 files to LOG.trace(). The
messages remain available at TRACE for protocol debugging; no
LOG.warn/error/info calls are touched. Two additional debug calls in
NodeSession#cancelAllRequests are intentionally left at DEBUG because
they signal potential local-code issues (unexpected cleanup
exception, possible race on requestIdStatuses) rather than routine
peer behavior.

Refs: besu-eth/besu#9691
@parthdagia05 parthdagia05 force-pushed the fix/downgrade-verbose-debug-to-trace branch from ea86775 to 62fc1ea Compare April 16, 2026 19:49
github-actions Bot added a commit that referenced this pull request Apr 16, 2026
@joshuafernandes joshuafernandes force-pushed the master branch 2 times, most recently from a8ea6c3 to ccb2731 Compare April 17, 2026 02:47
Copy link
Copy Markdown
Member

@lucassaldanha lucassaldanha left a comment

Choose a reason for hiding this comment

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

PR looks good. Only thing that needs to happen is a rebase due to the recent changes.

@usmansaleem
Copy link
Copy Markdown
Contributor

@parthdagia05 Please rebase/merge upstream.

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.

Downgrade routine peer interaction DEBUG logs to TRACE in Discovery v5 handlers

4 participants