-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Reduce unnecessary default logging #23235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce unnecessary default logging #23235
Conversation
Inspired by an irc complaint the other day about a ContextualCheckBlockHeader log message about a bad-diffbits failure for block 000000000000000000639be19a0123a1c99d9fef89f0b8ac055a77f4ef86ae3b which is BCH block at height 478577 from Aug 2017. This might resolve issue #17421 |
Very Strong Concept ACK We still do too much unconditional logging IMO: it is spammy (low signal-to-noise) and potentially dangerous (see disk fill attack scenarios described in #21559). Thanks a lot for improving the situation! :) I'm willing to review any PR that improves the logging situation by thoughtfully moving unconditional logging ( FWIW:
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
8af3c18
to
b5950dd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review ACK b5950dd.
@@ -3205,7 +3205,7 @@ bool BlockManager::AcceptBlockHeader(const CBlockHeader& block, BlockValidationS | |||
if (ppindex) | |||
*ppindex = pindex; | |||
if (pindex->nStatus & BLOCK_FAILED_MASK) { | |||
LogPrintf("ERROR: %s: block %s is marked invalid\n", __func__, hash.ToString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, not sure if this change (commit) merits a release note.
cr ACK b5950dd |
Code review ACK b5950dd |
Code review ACK b5950dd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review ACK b5950dd
…rors Summary: This is a backport of [[bitcoin/bitcoin#23235 | core#23235]] [1/4] bitcoin/bitcoin@1d7d835 Test Plan: `ninja all check-all` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D12038
…category Summary: This is a backport of [[bitcoin/bitcoin#23235 | core#23235]] [2/4] bitcoin/bitcoin@da94ebc Depends on D12038 Test Plan: `ninja all check-all` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D12039
Summary: This is a backport of [[bitcoin/bitcoin#23235 | core#23235]] [3/4] bitcoin/bitcoin@31b2b80 Depends on D12039, D12040 and D12041 Test Plan: `ninja all check-all` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D12042
Summary: This is a backport of [[bitcoin/bitcoin#23235 | core#23235]] [4/4] bitcoin/bitcoin@b5950dd Depends on D12042 Test Plan: `ninja all check-all` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D12043
Moves the following log messages into debug log categories:
Also adds the hash of the block to the log message when AcceptBlockHeader is rejecting because of problems with the prev block.