-
Notifications
You must be signed in to change notification settings - Fork 38.7k
netinfo: user help and argument parsing improvements #20877
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
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
theStack
left a comment
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
Verified that the help shows now without bitcoind running and that bitcoin-cli -netinfo 5 throws an error. 🆗
Being still a git noob, but can anyone guide me on why the move detection with ignoring whitespace in the second commit doesn't work? I tried git show --color-moved-ws=ignore-all-space HEAD^ but no luck, still the whole diff of the helptext is shown. I ask as this could maybe also helpful for other reviewers.
|
@theStack thanks for having a look. Here is what I used to diff the second commit.
command line result |
theStack
left a comment
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.
@jonatack: Thanks, that gave me the missing clue: --color-moved-ws alone doesn't do much, it has to be combined with --color-moved (I should have RTFM(anpage) 😬). Applying that permanently by putting into .gitconfig is of course an interesting approach, will try.
ACK d05b4d57fde74eea71d033f1d0e5435380ad4708 🦘
|
This has one ACK by @theStack a month ago (thanks!) Anyone else feel like reviewing? Edit: added step-by-step manual testing info in the PR description. |
|
@jonatack: Maybe restarting the CI also helps (the AppVeyor build seems to hang since the beginning)? I could imagine some reviewers only put PRs on their candidate list after they see the green check marks. |
|
@theStack thanks, good idea 🌻 |
|
Oh, stopping/restarting doesn't seem to work. I guess I have to rebase. |
|
Rebased for appveyor. |
d05b4d5 to
1c40378
Compare
michaelfolkson
left a comment
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 d05b4d57fde74eea71d033f1d0e5435380ad4708
Followed instructions to test in PR description. Those instructions could maybe be improved by instructing the restart of the Signet chain before the "test that an invalid integer argument raises" step. But very easy to follow, thanks
Thanks! -- updated the instructions. |
1c40378 to
d05b4d5
Compare
|
Re-pushed at d05b4d57fde74ee to not invalidate the 2 ACKs (thanks!) |
d05b4d5 to
965d9fc
Compare
|
Rebased following the merge of #20764 🍰 |
|
Re-ACK 965d9fc09872887314df34e1309604bcc79ff0fc Followed testing instructions and skimmed over code. |
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.
Besides one take-it-or-leave it nit, this is great.
Built branch, tested help with and without bitcoind running. Attempted to call -netinfo with values from 0 through 5 and got expected results including the error. Read the help message and I will definitely not rely on this dashboard's output for any kind of stable application!
Tested on both signet and mainnet, including adding onion peers. Love the dsiplay!
Bitcoin Core v21.99.0-965d9fc09872 - 70016/Satoshi:21.99.0/
<-> type net mping ping send recv txn blk hb age id address version
out manual onion 30 29 0 19 kpgvmscirrdqpekbqjsvw5teanhatztpp2gl6eee4zkowvwfxwenqaid.onion
out full ipv4 43 43 0 18 188.37.24.190:8333
out full ipv4 60 35648 52 48 0 4 3 73.0.216.24:8333 70016/Satoshi:0.21.0/
out block ipv4 92 92 63 2 0 2 15 52.214.5.250:8333 70015/Satoshi:0.20.1/
out full ipv4 142 9772 53 50 0 4 0 87.206.227.194:8333 70016/Satoshi:0.21.0/
out full ipv4 191 191 63 20 0 2 12 54.168.144.78:8333 70015/Satoshi:0.18.1(Omni:0.8.0)/
out full ipv4 275 275 131 4 4 1 180.181.159.200:8333 70015/Satoshi:0.19.0.1/
out full ipv4 321 6821 63 56 0 3 8 103.29.69.57:8333 70015/Satoshi:0.18.0(bitcore)/
out manual onion 618 618 65 26 1 3 4 rp7k2go3s5lyj3fnj6zn62ktarlrsft2ohlsxkyd7v3e3idqyptvread.onion 70016/Satoshi:21.99.0(Medea)/
out full onion 618 618 60 26 0 2 13 d5uy3u2hkczvmzis.onion:8333 70015/Satoshi:0.20.1/
ms ms sec sec min min min
ipv4 ipv6 onion total block manual
in 0 0 0 0
out 7 0 3 10 1 2
total 7 0 3 10
Local addresses: n/a
ACK 965d9fc09872887314df34e1309604bcc79ff0fc
Show Signature
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
ACK 965d9fc09872887314df34e1309604bcc79ff0fc
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEE5hdzzW4BBA4vG9eM5+KYS2KJyToFAmAlnvoACgkQ5+KYS2KJ
yTp6kw//afOJ89VzlHAafYMlwR58qHYiyziMnIeJQnIJULMibA7EEQg480dNyNUu
LiZFb6sPSnFaw8nlbEy08XxcTfmwJ4CvqP/DOp29N8iNIXKarPLrHfonOaOTmbAY
snTp/UC6frdB0U532CBeY3UgNEjXdQg6XmKMFDevkVm0Gv8eehskEeMPnsDh7+L4
7I3gs88ROZRuK5iDv08R3UD8U90JKpHFnJ4oVaI1xZGekvuG0rJYF1TzhqiTdGVH
NwCUfy1jqTQvTEAAabeh5oMGVSxxGlVj8Vfd9wPyHuk6nFUZ7J/rgeIajitD7rhQ
JX3xvW5rLcky+lFXcEZm9tRh2/znZGg286ImP+E1TWACmbePV1pX5kH5x9Uy0rMP
qguCksUh1xAnuXxt265nOaX9KiK1CW70hVynxvAc0UDWph+k5hElZpq8S5vLgqFF
qFz22B3GhaQAJ3k8oi1pEIVRJOaWyhhf1Keq+tvwbIuxf7SIOP+lWIctNQ4LkaCK
85P78/EIraEgBRtDuFxV6ljBa0xk1xaX+CbxFLsdT4fZew8kWnXlzoBMx0uhk4Dx
7Z6fY7XJuwr83O8gPER22LP0DRw+GFIyvSeGJTx2lPkKuHsgumxOSlUGa3WWgNiE
C2FBqoGD8ya5Ty2Aio5cH/h/W0aMWFDToPvk/+8lrHzfDh7wclw=
=LaQW
-----END PGP SIGNATURE-----
pinheadmz's public key is on keybase
965d9fc to
41a5ca6
Compare
|
Thank you @theStack, @michaelfolkson, and @pinheadmz for the ACKs. Only change in latest push is to improve the error message per suggestion by @pinheadmz:
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 43d3dc7da5..1c21856457 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -376,7 +376,7 @@ public:
if (ParseUInt8(args.at(0), &n) && n < 5) {
m_details_level = n;
} else {
- throw std::runtime_error(strprintf("invalid -netinfo argument: %s", args.at(0)));
+ throw std::runtime_error(strprintf("invalid -netinfo argument: %s\nFor more information, run: bitcoin-cli -netinfo help", args.at(0)));
}
}
UniValue result(UniValue::VARR); |
|
Confirmed diff is minimal, LGTM ACK 41a5ca6a0341d132456408aa6271667e0a74e289 Show Signaturepinheadmz's public key is on keybase |
that removes code and particularly this code from the loop of all peers: `m_is_i2p_on |= (network_id == NET_I2P);`
41a5ca6 to
7d3343f
Compare
|
Rebased and updated following the merge of #21192. This had tested ACK by @theStack, @michaelfolkson, and @pinheadmz (thanks!) |
|
Re-ACK 7d3343f |
|
Built and tested locally, ran RE-ACK 7d3343f Show Signaturepinheadmz's public key is on keybase |


A few updates, some per IRC discussion today at http://www.erisian.com.au/bitcoin-core-dev/log-2021-01-07.html#l-87 with respect to -netinfo:
-netinfo helpto run without a remote server-netinfo helpthat -netinfo is not intended to be a stable APIHow to test manually: 🔬 🧪 📈
./src/bitcoin-cli -signet stop./src/bitcoin-cli -signet -netinfo help./src/bitcoind -signet./src/bitcoin-cli -signet -netinfo 256or./src/bitcoin-cli -signet -netinfo a(valid values are from 0 to 255)ACK <commit hash>-- done 🍻