aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-cli.cpp
AgeCommit message (Collapse)Author
2021-08-03cli: Add progress bar for -getinfoklementtan
Co-authored-by: jonatack <jon@atack.com>
2021-07-21cli: Implement human readable -getinfo.Klement Tan
2021-06-23cli: Avoid truncating -rpcwaittimeoutMarcoFalke
2021-06-03rpc: Prefix rpcwaittimeout error with details on its natureChristian Decker
As proposed by @laanwj the error message is now prefixed with the "timeout on transient error:" prefix, to explain why the error is suddenly considered terminal.
2021-06-03rpc: Add a `-rpcwaittimeout` parameter to limit time spent waitingChristian Decker
Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away.
2021-05-31scripted-diff: rename GetSystemTimeInSeconds to GetTimeSecondsfanquake
-BEGIN VERIFY SCRIPT- sed -i -e 's/GetSystemTimeInSeconds/GetTimeSeconds/g' $(git grep -l GetSystemTimeInSeconds src) -END VERIFY SCRIPT-
2021-04-20cli: use C++17 std::array class template argument deduction (CTAD)Jon Atack
Credit to João Barbosa (promag) for the suggestions. Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
2021-04-12addrinfo: raise helpfully on server error or incompatible server versionJon Atack
2021-04-09cli: add -addrinfo commandJon Atack
2021-04-09cli: create AddrinfoRequestHandler classJon Atack
2021-03-19Merge #18335: bitcoin-cli: print useful error if bitcoind rpc work queue ↵MarcoFalke
exceeded 8dd5946c0b7aa8f3976b14a5de4ce84b80a9c32a add functional test (Larry Ruane) b5a80fa7e487c37b7ac0e3874a2fabade41b9ca8 util: Handle HTTP_SERVICE_UNAVAILABLE in bitcoin-cli (Hennadii Stepanov) Pull request description: If `bitcoind` is processing 16 RPC requests, attempting to submit another request using `bitcoin-cli` produces this less-than-helpful error message: `error: couldn't parse reply from server`. This PR changes the error to: `error: server response: Work queue depth exceeded`. ACKs for top commit: fjahr: tACK 8dd5946c0b7aa8f3976b14a5de4ce84b80a9c32a luke-jr: utACK 8dd5946c0b7aa8f3976b14a5de4ce84b80a9c32a (no changes since previous utACK) hebasto: re-ACK 8dd5946c0b7aa8f3976b14a5de4ce84b80a9c32a, only suggested changes since my [previous](https://github.com/bitcoin/bitcoin/pull/18335#pullrequestreview-460621350) review. darosior: ACK 8dd5946c0b7aa8f3976b14a5de4ce84b80a9c32a Tree-SHA512: 33e25f6ff05d9b56fae2bdb68b132557bb8e995f5438ac4fbbc53c304c5152a98aa43c43600c31d8a6a2830cbd48bf8ec7d89dce50190b29ec00a43830126913
2021-03-19Merge #21328: net, refactor: pass uint16 CService::port as uint16MarcoFalke
52dd40a9febec1f4e70d777821b6764830bdec61 test: add missing netaddress include headers (Jon Atack) 6f09c0f6b57ac01a473c587a3e51e9d477866bb0 util: add missing braces and apply clang format to SplitHostPort() (Jon Atack) 2875a764f7d8b1503c7bdb2f262964f7a0cb5fc3 util: add ParseUInt16(), use it in SplitHostPort() (Jon Atack) 6423c8175fad3163c10ffdb49e0df48e4e4931f1 p2p, refactor: pass and use uint16_t CService::port as uint16_t (Jon Atack) Pull request description: As noticed during review today in https://github.com/bitcoin/bitcoin/pull/20685#discussion_r584873708 of the upcoming I2P network support, `CService::port` is `uint16_t` but is passed around the codebase and into the ctors as `int`, which causes uneeded conversions and casts. We can avoid these (including in the incoming I2P code without further changes to it) by using ports with the correct type. The remaining conversions are pushed out to the user input boundaries where they can be range-checked and raise with user feedback in the next patch. ACKs for top commit: practicalswift: cr ACK 52dd40a9febec1f4e70d777821b6764830bdec61: patch looks correct MarcoFalke: cr ACK 52dd40a9febec1f4e70d777821b6764830bdec61 vasild: ACK 52dd40a9febec1f4e70d777821b6764830bdec61 Tree-SHA512: 203c1cab3189a206c55ecada77b9548b810281cdc533252b8e3330ae0606b467731c75f730ce9deb07cbaab66facf97e1ffd2051084ff9077cba6750366b0432
2021-03-16p2p, refactor: pass and use uint16_t CService::port as uint16_tJon Atack
2021-03-17refactor: post Optional<> removal cleanupsfanquake
2021-03-15scripted-diff: remove Optional & nulloptfanquake
-BEGIN VERIFY SCRIPT- git rm src/optional.h sed -i -e 's/Optional</std::optional</g' $(git grep -l 'Optional<' src) sed -i -e 's/{nullopt}/{std::nullopt}/g' $(git grep -l 'nullopt' src) sed -i -e 's/ nullopt;/ std::nullopt;/g' $(git grep -l 'nullopt' src) sed -i -e 's/ nullopt)/ std::nullopt)/g' $(git grep -l 'nullopt' src) sed -i -e 's/(nullopt)/(std::nullopt)/g' $(git grep -l 'nullopt' src) sed -i -e 's/ nullopt,/ std::nullopt,/g' $(git grep -l 'nullopt' src) sed -i -e 's/? nullopt :/? std::nullopt :/g' $(git grep -l 'nullopt' src) sed -i -e 's/: nullopt}/: std::nullopt}/g' $(git grep -l 'nullopt' src) sed -i -e '/optional.h \\/d' src/Makefile.am sed -i -e '/#include <optional.h>/d' src/test/fuzz/autofile.cpp src/test/fuzz/buffered_file.cpp src/test/fuzz/node_eviction.cpp sed -i -e 's/#include <optional.h>/#include <optional>/g' $(git grep -l '#include <optional.h>' src) -END VERIFY SCRIPT-
2021-02-17cli: update -netinfo help doc following the merge of 882ce251Jon Atack
2021-02-17cli: small -netinfo simplification and performance improvementJon Atack
that removes code and particularly this code from the loop of all peers: `m_is_i2p_on |= (network_id == NET_I2P);`
2021-02-17cli: improve -netinfo invalid argument error messageJon Atack
2021-02-17cli: warn in help that -netinfo is not intended to be a stable APIJon Atack
2021-02-17cli: enable -netinfo help to run without a remote serverJon Atack
2021-02-15cli: Treat high detail levels as the maximum in -netinfoWladimir J. van der Laan
I somehow often type `-netinfo 5` which gets treated as `-netinfo 0`, after this change it's `-netinfo 4` which seems more convenient behavior.
2021-02-03netinfo: display only outbound block relay countsJon Atack
2021-02-03netinfo: add i2p networkJon Atack
the i2p peer counts column is displayed iff the node is connected to at least one i2p peer, so this doesn't add clutter for users who are not running an i2p service
2021-02-03netinfo: add bip152 high-bandwidth to/from fieldsJon Atack
2021-02-03netinfo: display manual peers countJon Atack
2021-02-03netinfo: update to use peer connection typesJon Atack
2021-02-02netinfo: add ConnectionTypeForNetinfo member helper functionJon Atack
2021-01-29refactor: remove boost::thread_group usagefanquake
2021-01-29Merge #21029: bitcoin-cli: Correct docs (no "generatenewaddress" exists)fanquake
71430aec4304f71f8a11e6f0fea486e41fe3a9e3 bitcoin-cli: Correct docs (no "generatenewaddress" exists) (Luke Dashjr) Pull request description: ACKs for top commit: jonatack: ACK 71430aec4304f71f8a11e6f0fea486e41fe3a9e3 Tree-SHA512: 45ee7a51080598141fac4446563bdf99a59bfaa0ee00d9e092511087a968e8535d9208683ed589be1c975531be6d0319d33720f1f0dc1c3635c7d5ea6d726a41
2021-01-29bitcoin-cli: Correct docs (no "generatenewaddress" exists)Luke Dashjr
2021-01-05netinfo: add user help documentationJon Atack
and drop no longer needed sort description header to save screen space
2020-10-25cli -netinfo: print oversized/extreme ping times as "-"Jon Atack
2020-10-25cli -netinfo: handle longer tor v3 local addressesJon Atack
2020-10-25cli -netinfo: make age column variable-widthJon Atack
as it has a wide possible range and the new name ("age" instead of "uptime") is much shorter.
2020-10-25cli -netinfo: various quick updates and fixesJon Atack
- add new signet chain - update change "uptime" column name to "age" per suggestion by 0xB10C (Timo) - add an additional digit to mping field width - change m_networks_size from size_t to uint8_t, as size_t was a holdover from m_networks_size being defined as size_t m_networks.size() in a draft - order Peer struct members by decreasing memory size
2020-10-14refactor: enable -netinfo to add future networks (i2p, cjdns)Jon Atack
After this commit, a new network may be added by changing 4 lines: - increment the value of `m_networks_size` - add the network name to `m_networks` - add the network name to this line: `result += " ipv4 ipv6 onion total block-relay\n";` - add "counts.at(i).at(<m_networks pos>)" to this line: `result += strprintf("%-5s %5i %5i %5i %5i %5i\n...`
2020-10-14refactor: promote some -netinfo localvars to class membersJon Atack
2020-10-14cli: simplify -netinfo using getpeerinfo network fieldJon Atack
2020-10-01rpc: Set HTTP Content-Type in bitcoin-cliWladimir J. van der Laan
We don't set any `Content-Type` in the client. It is more consistent with our other JSON-RPC use to set it to `application/json`. Note that our server doesn't enforce content types, so it doesn't make a difference in practice. But it is fairly strange HTTP behavior to not set it. This came up in #18950.
2020-09-25doc: Mention signet in -help outputHennadii Stepanov
2020-09-22doc: Update comments for new chain settings (-signet and -chain=signet)MarcoFalke
2020-09-15Merge #19643: Add -netinfo peer connections dashboardfanquake
bf1f913c4405cba35c8f99ec07b407940eb955b6 cli -netinfo: display multiple levels of details (Jon Atack) 077b3ac9284a90f33e31c64c49062ceaf815af60 cli: change -netinfo optional arg from bool to int (Jon Atack) 4e2f2ddd6444d93dd7e60ec67cc393dfc2a29b9d cli: add getpeerinfo last_{block,transaction} to -netinfo (Jon Atack) 644be659abfcf7c638e17795bafedad73bc55b27 cli: add -netinfo server version check and error message (Jon Atack) ce57bf6cc0cdaf8233fd8a20e0d1c5b69d17d2a3 cli: create peer connections report sorted by dir, minping (Jon Atack) f5edd66e5d136b229c805af9e6ea73218f6cedde cli: create vector of Peer structs for peers data (Jon Atack) 3a0ab93e1ce8d91235a6d46a57c6cb110fc5bf03 cli: add NetType enum struct and NetTypeEnumToString() (Jon Atack) c227100919dd2422b29eb3bca9c0f1a7983cc3a8 cli: create local addresses, ports, and scores report (Jon Atack) d3f77b736e43b187771b901a6a3452f83c116918 cli: create inbound/outbound peer connections report (Jon Atack) 19377b2fd24704bff6c805946575b116f07d5e0d cli: start dashboard report with chain and version header (Jon Atack) a3653c159e4f5c887eec9ea608e474eaa299fc07 cli: tally peer connections by type (Jon Atack) 54799b66b466c0d015e6fe2f820663cc5d8e7998 cli: add ipv6 and onion address type detection helpers (Jon Atack) 12242b17a52c9833e6504f3f0a5b247a6e2fc5f9 cli: create initial -netinfo option, NetinfoRequestHandler class (Jon Atack) Pull request description: This PR is inspired by laanwj's python script mentioned in #19405, which it turns out I ended up using every day and extending because I got hooked on using it to monitor Bitcoin peer connections. For the full experience, run `./src/bitcoin-cli -netinfo 4` On Linux, try it with watch `watch ./src/bitcoin-cli -netinfo 4` Help doc ``` $ ./src/bitcoin-cli -help | grep -A3 netinfo -netinfo Get network peer connection information from the remote server. An optional integer argument from 0 to 4 can be passed for different peers listings (default: 0). ``` ACKs for top commit: vasild: ACK bf1f913 0xB10C: ACK bf1f913c4405cba35c8f99ec07b407940eb955b6 practicalswift: ACK bf1f913c4405cba35c8f99ec07b407940eb955b6 -- patch looks correct and is limited to `src/bitcoin-cli.cpp` Tree-SHA512: b9d18e5cc2ffd2bb9f0295b5ac7609da8a9bbecaf823a26dfa706b5f07d5d1a8343081dad98b16aa9dc8efd8f41bc1a4acdc40259727de622dc7195ccf59c572
2020-09-02cli -netinfo: display multiple levels of detailsJon Atack
2020-08-31cli: change -netinfo optional arg from bool to intJon Atack
2020-08-31cli: add getpeerinfo last_{block,transaction} to -netinfoJon Atack
2020-08-31cli: add -netinfo server version check and error messageJon Atack
2020-08-31cli: create peer connections report sorted by dir, minpingJon Atack
2020-08-31cli: create vector of Peer structs for peers dataJon Atack
2020-08-31cli: add NetType enum struct and NetTypeEnumToString()Jon Atack
2020-08-31cli: create local addresses, ports, and scores reportJon Atack