-
Notifications
You must be signed in to change notification settings - Fork 37.7k
log: print unexpected version warning in validation log category #19898
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
Conversation
cbfa32e
to
0c02dcb
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.
Concept ACK.
It seems out of scope of this PR, but I think the name nUpgraded
is a bit misleading now.
0c02dcb
to
7edc068
Compare
A blessed change! Tested on Ubuntu by observing logs with default logging:
And with
|
Concept ACK Thanks a lot for addressing this: this is causing a lot of unnecessary confusion for our users. Our users are not helped by permanent warnings that are not actionable. |
Tested ACK 7edc068 |
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.
ACK 7edc068, tested on Linux Mint 20 (x86_64) with and without -debug=validation
command line option.
I think it is ok to do not translate log messages. bitcoinstrings.cpp
will be updated automaGically.
I've tried to make this point about this log message, but from what I remember I got a lot of pushback last time.
Yes, this was a pointless translation, good to see it go. It looks like the other one is translated because it can also end up in the GUI warnings, but this one couldn't anyway. |
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.
ACK 7edc068
If a softfork is deployed without a BIP9 versionbits compatible warning, it is impossible to write code in advance to detect that scenario with full accuracy. A softfork deployment without a versionbits compatible warning (and especially one that would require most users to upgrade on a short notice) is reckless at best. Putting code into Bitcoin Core to encourage short notice "forced" upgrades seems counter-productive.
Also, the warning is disabled for users that sync up their nodes intermittently (e.g. once a day or once a week).
Finally, for the remaining well prepared users that:
- Run a node 24/7
- Have -debug or -debug=validation enabled
- Read the debug.log
I'd be surprised if this warning had any more impact on their decision to upgrade to a newer version or look out for new versions than the already existing release announcements and our well-known (?) EOL policy.
So I'd say to simply remove this warning.
Instead of printing "<n> of the last 100 blocks have unexpected version" as a warning appended to UpdateTip, it is now printed in the validation log category.
7edc068
to
62dba96
Compare
ACK 62dba96 -- only change since last ACK is |
re-ACK 62dba96 though I'd still prefer to remove the warning #19898 (review) |
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.
re-ACK 62dba96, #19898 (review) is resolved now.
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.
ACK 62dba96
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. |
Is this one ready for merge? :) I'm counting 4 ACKs (practicalswift, MarcoFalke, hebasto, theStack) and one stale ACK (laanwj). |
…ion log category 62dba96 log: print unexpected version warning in validation log category (nthumann) Pull request description: Fixes bitcoin#19603: As suggested by practicalswift, instead of always printing `<n> of the last 100 blocks have unexpected version` as a warning appended to UpdateTip, it is now printed in the validation log category and therefore only visible with `-debug=validation` enabled. Before: `2020-09-06T15:56:00Z UpdateTip: new best=00000000000000000001b2872e107a98b57913120e5c6c87ce2715a34c40adf8 height=646969 version=0x20400000 log2_work=92.261571 tx=565651941 date='2020-09-06T10:35:36Z' progress=0.999888 cache=32.2MiB(237417txo) warning='72 of last 100 blocks have unexpected version'` After: `2020-09-06T16:31:26Z UpdateTip: new best=0000000000000000000b3bd786dc42745dd7be4a8c695500a04518cb9e2f4dc1 height=646971 version=0x20000000 log2_work=92.261607 tx=565655901 date='2020-09-06T10:57:19Z' progress=0.999883 cache=3.8MiB(27550txo)` `2020-09-06T16:31:26Z 71 of last 100 blocks have unexpected version` Ran unit & functional tests, confirmed that the warning is now only printed when validation category is enabled. ACKs for top commit: theStack: ACK 62dba96 MarcoFalke: re-ACK 62dba96 practicalswift: ACK 62dba96 -- only change since last ACK is `s/nUpgraded/num_unexpected_version/` hebasto: re-ACK 62dba96, bitcoin#19898 (review) is resolved now. Tree-SHA512: 2100ca7d6d3fd67c92e81d75162d2506d6f1ecf1761d5180d76663fac06771b35e5c4235ebe1a00731b5f7db82db3cd19328627929c8f22912df592686ba51d3
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.
Posthumous ACK 62dba96
Thanks for this change! That message is really annoying. |
Line 2476 is a good one. |
Fixes #19603: As suggested by practicalswift, instead of always printing
<n> of the last 100 blocks have unexpected version
as a warning appended to UpdateTip, it is now printed in the validation log category and therefore only visible with-debug=validation
enabled.Before:
2020-09-06T15:56:00Z UpdateTip: new best=00000000000000000001b2872e107a98b57913120e5c6c87ce2715a34c40adf8 height=646969 version=0x20400000 log2_work=92.261571 tx=565651941 date='2020-09-06T10:35:36Z' progress=0.999888 cache=32.2MiB(237417txo) warning='72 of last 100 blocks have unexpected version'
After:
2020-09-06T16:31:26Z UpdateTip: new best=0000000000000000000b3bd786dc42745dd7be4a8c695500a04518cb9e2f4dc1 height=646971 version=0x20000000 log2_work=92.261607 tx=565655901 date='2020-09-06T10:57:19Z' progress=0.999883 cache=3.8MiB(27550txo)
2020-09-06T16:31:26Z 71 of last 100 blocks have unexpected version
Ran unit & functional tests, confirmed that the warning is now only printed when validation category is enabled.