rpc, net: remove startingheight field of getpeerinfo RPC and from node state#34796
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste 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. |
9646082 to
e042592
Compare
|
tACK e042592 .
Also did a quick manual check on regtest with two connected nodes. build/bin/bitcoind -regtest -datadir=/tmp/btc1 -daemon
> Bitcoin Core starting
build/bin/bitcoind -regtest -datadir=/tmp/btc2 -port=18445 -rpcport=18443 -daemon
> Bitcoin Core starting
build/bin/bitcoin-cli -regtest -datadir=/tmp/btc1 addnode "127.0.0.1:18445" onetry
build/bin/bitcoin-cli -regtest -datadir=/tmp/btc1 getpeerinfo | jq 'all(.[]; has("startingheight") | not)'
> true |
stickies-v
left a comment
There was a problem hiding this comment.
ACK e042592
I agree with the deprecation rationale in the predecessor PR, and thus also with this removal.
The start_height field is now only still used to produce a Debug log message. We also still advertise our own m_best_height to peers, which is fine because it's free and we continue to adhere to the network protocol, even if the field seems to offer little benefit.
|
review ACK e042592 🚍 Show signatureSignature: |
e042592 to
745ad94
Compare
|
Rebased on master (due to conflict after #34389). Thanks for the quick reviews! |
|
re-ACK 745ad94, no changes except for addressing minor merge conflict |
This PR completely removes the
startingheightfield in thegetpeerinfoRPC, previously deprecated in v31.0 (see #34197). The second commit goes one step further: the only remaining usage for aPeersm_starting_heightfield is for printing P2P debug messages. Considering that the information is untrusted and not deemed useful (see discussion #33990), remove the field and only print the starting height information once at reception of theVERSIONmessage (suggested by ajtowns in #33990 (comment)), without saving it.