-
Notifications
You must be signed in to change notification settings - Fork 35.6k
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
net: remove -banscore configuration option #19464
Conversation
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. |
c0ba1e8
to
f926882
Compare
41d55d3 doc: getpeerinfo banscore deprecation release note (Jon Atack) dd54e37 test: getpeerinfo banscore deprecation test (Jon Atack) 8c7647b rpc: deprecate banscore field in rpc getpeerinfo (Jon Atack) Pull request description: Per #19219 (comment) and #19219 (comment), this PR deprecates returning the `banscore` field in the `getpeerinfo` RPC, updates the help, adds a test, and updates the release notes. Related to #19464. ACKs for top commit: fanquake: ACK 41d55d3 Tree-SHA512: 8eca08332581e2fe191a2aafff6ba89ce39413f0491ed0de8b86577739f0ec430b1a8fbff2914b0f3138a229563dfcc1981c0cf5b7dd6061b5c48680a28423bc
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
41d55d3 doc: getpeerinfo banscore deprecation release note (Jon Atack) dd54e37 test: getpeerinfo banscore deprecation test (Jon Atack) 8c7647b rpc: deprecate banscore field in rpc getpeerinfo (Jon Atack) Pull request description: Per bitcoin#19219 (comment) and bitcoin#19219 (comment), this PR deprecates returning the `banscore` field in the `getpeerinfo` RPC, updates the help, adds a test, and updates the release notes. Related to bitcoin#19464. ACKs for top commit: fanquake: ACK 41d55d3 Tree-SHA512: 8eca08332581e2fe191a2aafff6ba89ce39413f0491ed0de8b86577739f0ec430b1a8fbff2914b0f3138a229563dfcc1981c0cf5b7dd6061b5c48680a28423bc
Concept ACK but the commits are cluttered up with quite a bit of edits that produce unnecessary noise. |
f926882
to
b71eac1
Compare
Thanks @MarcoFalke and @fjahr for reviewing! Updated with your feedback per |
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.
Do the unit and functional tests pass on ff43c0c
If not, the following two commits should be squashed into it. Or maybe just squash all commit? 🤷♂️
Review-only ACK
The tests had to be updated for the config removal. |
Thanks for ACKing. I took the time to made atomic commits for different actions, step by step, as seen in other contributors' changesets and as described in In general, [commits should be atomic](https://en.wikipedia.org/wiki/Atomic_commit#Atomic_commit_convention)
and diffs should be easy to read. For this reason, do not mix any formatting
fixes or code moves with actual code changes. |
Please see the second section of https://www.codewithjason.com/atomic-commits-testing/ |
b71eac1
to
de15350
Compare
Yes, I agree with this and it has been my standard practice. But AFAIK it's not what is requested in this project's documentation, and maybe not the most-observed practice in this project -- I had to unlearn my practices to adapt to it. |
Ok, then our documentation is wrong and should be fixed. |
I'll make the commits hygienic. |
78395cd
to
3cdb66d
Compare
and move it from validation to net processing.
3cdb66d
to
06059b0
Compare
Noticed this new component label when it was added to bitcoin/bitcoin#19464
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.
Should doc/man/bitcoin-qt.1
and doc/man/bitcoind.1
be updated in this PR (they contain references to -banscore
)?
If this PR gets merged now, it means that Bitcoin Core 0.21 will not recognize the -banscore
command line option, is this the intention?
Thanks for reviewing, @vasild!
AFAIK the manpages are auto-generated; we don't edit them in PRs.
Correct. See the links in the PR description for intention and reasoning behind the removal. AFAIK there isn't a deprecation process here like for the RPC API, so either it's removed as proposed here, or we add a deprecation warning in the help (which everyone will ignore until the option is removed) for a release or two. Presumably this discouragement scoring will disappear anyway by 0.21 or 0.22 which means the -banscore option won't do anything. |
Ideally everything would go in one swish (including state->nMisbehavior), but that can't happen because it is still needed for RPC. This is a necessary first step. review ACK 06059b0 📙 Show signature and timestampSignature:
Timestamp of file with hash |
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 06059b0
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: giving users knobs without a recommendation about how/when to use them is not friendly :)
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.
Oh, I see this section won't end up in the 0.21 release notes, so might want to clarify at some point
post-merge ACK. The test |
06059b0 net: rename DEFAULT_BANSCORE_THRESHOLD to DISCOURAGEMENT_THRESHOLD (Jon Atack) 1d4024b net: remove -banscore configuration option (Jon Atack) Pull request description: per bitcoin#19219 (comment), bitcoin#19219 (comment) and bitcoin#19219 (comment). Edit: now split into 3 straightforward PRs: - net: remove -banscore configuration option (this PR) - rpc: deprecate banscore field in getpeerinfo (bitcoin#19469, *merged*) - gui: no longer display banscores (TBA in the gui repo) ACKs for top commit: MarcoFalke: review ACK 06059b0 📙 vasild: ACK 06059b0 Tree-SHA512: 03fad249986e0896697033fbb8ba2cbfaae7d7603b1fb2a38b3d41db697630d238623f4d732b9098c82af249ce5a1767dd432b7ca0fec10544e23d24fbd57c50
fa108d6 test: update tests for peer discouragement (Jon Atack) 1a9f462 gui, doc: rm Ban Score in GUI Peers window/release notes updates (Jon Atack) Pull request description: This is the third `-banscore` PR in the mini-series described in #19464. See that PR for the intention and reasoning. - no longer display "Ban Score" in the GUI peers window and add a release note, plus release note fixups per #19464 (review) - update tests (`src/test/denialofservice_tests.cpp` and `test/functional/p2p_leak.py`) from banning to discouragement and per #19464 (comment) ACKs for top commit: jnewbery: ACK fa108d6 laanwj: ACK fa108d6 Tree-SHA512: 58a449b3f47b8cb5490b34e4442ee8675bfad1ce48af4e4fd5c67715b0c1a596fb8e731d42e576b4c3b64627f76e0a68cbb1da9ea9f588a5932fe119baf40d50
fa108d6 test: update tests for peer discouragement (Jon Atack) 1a9f462 gui, doc: rm Ban Score in GUI Peers window/release notes updates (Jon Atack) Pull request description: This is the third `-banscore` PR in the mini-series described in bitcoin#19464. See that PR for the intention and reasoning. - no longer display "Ban Score" in the GUI peers window and add a release note, plus release note fixups per bitcoin#19464 (review) - update tests (`src/test/denialofservice_tests.cpp` and `test/functional/p2p_leak.py`) from banning to discouragement and per bitcoin#19464 (comment) ACKs for top commit: jnewbery: ACK fa108d6 laanwj: ACK fa108d6 Tree-SHA512: 58a449b3f47b8cb5490b34e4442ee8675bfad1ce48af4e4fd5c67715b0c1a596fb8e731d42e576b4c3b64627f76e0a68cbb1da9ea9f588a5932fe119baf40d50
Summary: 06059b0c2a6c2db70c87a7715f8a344a13400fa1 net: rename DEFAULT_BANSCORE_THRESHOLD to DISCOURAGEMENT_THRESHOLD (Jon Atack) 1d4024bca8086cceff7539dd8c15e0b7fe1cc5ea net: remove -banscore configuration option (Jon Atack) Pull request description: per bitcoin/bitcoin#19219 (comment), bitcoin/bitcoin#19219 (comment) and bitcoin/bitcoin#19219 (comment). Edit: now split into 3 straightforward PRs: - net: remove -banscore configuration option (this PR) - rpc: deprecate banscore field in getpeerinfo (#19469, *merged*) - gui: no longer display banscores (TBA in the gui repo) --- Backport of Core [[bitcoin/bitcoin#19464 | PR19464]] Depends on D8798 Test Plan: ninja all check check-functional Reviewers: #bitcoin_abc, PiRK Reviewed By: #bitcoin_abc, PiRK Differential Revision: https://reviews.bitcoinabc.org/D8799
Summary: fa108d6a757838225179a8df942cfb6d99c98c90 test: update tests for peer discouragement (Jon Atack) 1a9f462caa63fa16d7b4415312d2032a42b3fe0b gui, doc: rm Ban Score in GUI Peers window/release notes updates (Jon Atack) Pull request description: This is the third `-banscore` PR in the mini-series described in #19464. See that PR for the intention and reasoning. - no longer display "Ban Score" in the GUI peers window and add a release note, plus release note fixups per bitcoin/bitcoin#19464 (review) - update tests (`src/test/denialofservice_tests.cpp` and `test/functional/p2p_leak.py`) from banning to discouragement and per bitcoin/bitcoin#19464 (comment) --- Backport of Core [[bitcoin/bitcoin#19512 | PR19512]] Depends on D8799 Test Plan: ninja all check check-functional run bitcoin-qt on testnet mode, open Peers window, click a peer and see that Banscore is no longer reported Reviewers: #bitcoin_abc, PiRK, Fabien Reviewed By: #bitcoin_abc, PiRK, Fabien Subscribers: Fabien, PiRK Differential Revision: https://reviews.bitcoinabc.org/D8800
per #19219 (comment), #19219 (comment) and #19219 (comment). Edit: now split into 3 PRs: