-
Notifications
You must be signed in to change notification settings - Fork 35.7k
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
rpc: deprecate banscore field in getpeerinfo #19469
rpc: deprecate banscore field in getpeerinfo #19469
Conversation
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.
reviewed on GitHub ACK 454a873
454a873
to
41d55d3
Compare
Code review ACK 8c7647b |
ACK 8c7647b |
@laanwj & @amitiuttarwar: it would seem you've both ACK'd the wrong commit hash here? Locally I'm seeing: bitcoin git:(master) git fetch upstream pull/19469/head:19469
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Total 15 (delta 8), reused 8 (delta 8), pack-reused 7
Unpacking objects: 100% (15/15), 5.72 KiB | 234.00 KiB/s, done.
From https://github.com/bitcoin/bitcoin
* [new ref] refs/pull/19469/head -> 19469
bitcoin git:(master) git checkout 19469
Switched to branch '19469'
bitcoin git:(19469) git log
...
commit 41d55d30579358c805036201664ad6a1c1d48681 (HEAD -> 19469)
Author: Jon Atack <jon@atack.com>
Date: Wed Jul 8 12:54:28 2020 +0200
doc: getpeerinfo banscore deprecation release note
commit dd54e3796e633cfdf6954af306afd26eadc25116
Author: Jon Atack <jon@atack.com>
Date: Wed Jul 8 12:33:14 2020 +0200
test: getpeerinfo banscore deprecation test
commit 8c7647b3fbbab03ea84071cf3cd2d0d2bf8be255
Author: Jon Atack <jon@atack.com>
Date: Wed Jul 8 13:00:58 2020 +0200
rpc: deprecate banscore field in rpc getpeerinfo Regardless, these changes are straightforward and I'm happy to go ahead and merge this. Also cc @jnewbery & @sipa. I know you both expressed a desire for the removal of |
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 41d55d3
This feels a little premature. I think it's not helped by a confusing collision in terminology:
Until we've actually removed the nMisbehavior functionality, it seems useful to be able to check a peer's nMisbehavior score. |
Indeed, the first PR in this series, #19464, is a very small change that does just that. Presumably that PR, or another version, will be merged before the next release. I'm happy to work on internal peer prioritisation changes after that first step if people aren't already doing it. The confusion around the naming of the banscore field in getpeerinfo was not addressed because it should be removed. In #19219 (comment), I suggested it be renamed. This PR gives users until at least v0.22 to no longer depend on it (if any were). I reckon it will no longer be used internally before that, but in the worst case if this PR does turn out to be premature, it can be reverted before the next release. |
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
06059b0 net: rename DEFAULT_BANSCORE_THRESHOLD to DISCOURAGEMENT_THRESHOLD (Jon Atack) 1d4024b net: remove -banscore configuration option (Jon Atack) Pull request description: per #19219 (comment), #19219 (comment) and #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) ACKs for top commit: MarcoFalke: review ACK 06059b0 📙 vasild: ACK 06059b0 Tree-SHA512: 03fad249986e0896697033fbb8ba2cbfaae7d7603b1fb2a38b3d41db697630d238623f4d732b9098c82af249ce5a1767dd432b7ca0fec10544e23d24fbd57c50
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
Just realised I never responded to @jonatack's last comment. I don't think this should be reverted. |
Thanks @jnewbery. At the next p2p meeting, one topic to discuss could be if someone is working on replacing nMisbehavior with prioritizing/scheduling peer work based on how much resource the peer is using. |
Sure. @troygiorshev is soon to open a PR that adds tracking for some peer metrics, which would be the start of that work. |
Summary: 41d55d30579358c805036201664ad6a1c1d48681 doc: getpeerinfo banscore deprecation release note (Jon Atack) dd54e3796e633cfdf6954af306afd26eadc25116 test: getpeerinfo banscore deprecation test (Jon Atack) 8c7647b3fbbab03ea84071cf3cd2d0d2bf8be255 rpc: deprecate banscore field in rpc getpeerinfo (Jon Atack) Pull request description: Per bitcoin/bitcoin#19219 (comment) and bitcoin/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 #19464. --- Backport of Core [[bitcoin/bitcoin#19469 | PR19469]] Test Plan: ninja all check test_runner rpc_getpeerinfo_banscore_deprecation Reviewers: #bitcoin_abc, PiRK Reviewed By: #bitcoin_abc, PiRK Subscribers: PiRK Differential Revision: https://reviews.bitcoinabc.org/D8798
Per #19219 (comment) and #19219 (comment), this PR deprecates returning the
banscore
field in thegetpeerinfo
RPC, updates the help, adds a test, and updates the release notes. Related to #19464.