bitcoin/doc
W. J. van der Laan 0180453471
Merge #21595: cli: create -addrinfo
06c43201a7 cli: use C++17 std::array class template argument deduction (CTAD) (Jon Atack)
edf3167151 addrinfo: raise helpfully on server error or incompatible server version (Jon Atack)
bb85cbc4f7 doc: add cli -addrinfo release note (Jon Atack)
5056a37624 cli: add -addrinfo command (Jon Atack)
db4d2c282a cli: create AddrinfoRequestHandler class (Jon Atack)

Pull request description:

  While looking at issue #21351, it turned out that the problem was a lack of tor v3 addresses known to the node. It became clear (e.g. https://github.com/bitcoin/bitcoin/issues/21351#issuecomment-811004779) that a CLI command returning the number of addresses the node knows per network (with a tor v2 / v3 breakdown) would be very helpful. This patch adds that.

  `-addrinfo` is useful to see if your node knows enough addresses in a network to use options like `-onlynet=<network>`, or to upgrade to the upcoming tor release that no longer supports tor v2, for which you'll need to be sure your node knows enough tor v3 peers.

  ```
  $ bitcoin-cli --help | grep -A1 addrinfo
    -addrinfo
         Get the number of addresses known to the node, per network and total.

  $ bitcoin-cli -addrinfo
  {
    "addresses_known": {
      "ipv4": 14406,
      "ipv6": 2511,
      "torv2": 5563,
      "torv3": 2842,
      "i2p": 8,
      "total": 25330
    }
  }

  $ bitcoin-cli -addrinfo 1
  error: -addrinfo takes no arguments
  ```

  This can be manually tested, for example, with commands like this:
  ```
  $ bitcoin-cli getnodeaddresses 0 | jq '.[] | (select(.address | contains(".onion")) | select(.address | length <= 22)) | .address' | wc -l
  5563
  $ bitcoin-cli getnodeaddresses 0 | jq '.[] | (select(.address | contains(".onion")) | select(.address | length > 22)) | .address' | wc -l
  2842
  $ bitcoin-cli getnodeaddresses 0 | jq '.[] | .address' | wc -l
  25330
  ```

ACKs for top commit:
  laanwj:
    Tested ACK 06c43201a7

Tree-SHA512: b668b47718a4ce052aff218789f3da629bca730592c18fcce9a51034d95a0a65f8e6da33dd47443cdd8f60c056c02696db175b0fe09a688e4385a76c1d8b7aeb
2021-04-20 14:36:36 +02:00
..
man scripted-diff: Fix typo in stub manual pages 2021-01-12 16:46:55 +01:00
release-notes Fix 0.21.0 release note to specify correct option BIP 157 support 2021-01-15 14:05:59 -06:00
.gitignore
assets-attribution.md
benchmarking.md Replace current benchmarking framework with nanobench 2020-06-13 12:24:18 +02:00
bips.md Use Bech32m encoding for v1+ segwit addresses 2021-03-16 10:48:36 -07:00
bitcoin_logo_doxygen.png
bitcoin-conf.md doc: add signet to doc/bitcoin-conf.md 2021-03-08 00:44:54 +01:00
build-android.md Qt: add Android packaging support 2021-03-21 22:33:27 +01:00
build-freebsd.md doc: Update for FreeBSD 12.2, add GUI Build Instructions 2020-12-10 15:38:20 -05:00
build-netbsd.md doc: mention MAKE=gmake workaround when building on a BSD 2020-03-18 07:55:07 +08:00
build-openbsd.md doc: Add bash as an OpenBSD dependency 2020-11-26 21:34:25 +01:00
build-osx.md doc: revamp macOS build doc 2021-03-03 16:09:52 -05:00
build-unix.md doc: Use CONFIG_SITE instead of --prefix 2021-04-09 12:25:18 +03:00
build-windows.md doc: Remove outdated comment 2021-03-02 22:14:18 +02:00
dependencies.md build: miniupnpc 2.2.2 2021-03-23 08:39:16 +08:00
descriptors.md docs: correctly identify script type 2021-02-07 12:20:01 -06:00
developer-notes.md refactor: Remove negative lock annotations from globals 2021-04-05 08:42:15 +02:00
dnsseed-policy.md
Doxyfile.in configure: add --enable-external-signer 2021-02-21 16:27:10 +01:00
external-signer.md Move external signer out of wallet module 2021-04-08 17:56:00 +02:00
files.md init: introduce I2P connectivity options 2021-03-01 18:19:46 +01:00
fuzzing.md doc: Update fuzzing docs for afl-clang-lto 2021-03-09 19:00:10 +01:00
gitian-building.md
guix.md docs: Point to contrib/guix/README.md in doc/guix.md 2021-01-08 11:40:01 -05:00
init.md doc: Replace tabs for spaces 2021-02-04 12:06:13 +00:00
JSON-RPC-interface.md Update 'Secure string handling' 2020-12-29 01:49:30 +05:30
multiprocess.md doc: Use CONFIG_SITE instead of --prefix 2021-04-09 12:25:18 +03:00
productivity.md doc: Add libnatpmp stuff 2021-01-07 18:07:10 +02:00
psbt.md doc: fix/improve analyzepsbt in doc/psbt.md 2019-05-19 17:31:37 +02:00
README_doxygen.md doc: Improve doxygen readme navigation section 2019-09-23 19:22:06 -04:00
README_windows.txt
README.md Qt: add Android packaging support 2021-03-21 22:33:27 +01:00
reduce-memory.md doc: block-relay-only is not blocksonly 2020-03-30 09:09:12 -04:00
reduce-traffic.md doc: Use precise permission flags where possible 2020-07-10 15:37:42 +02:00
release-notes.md Merge #21595: cli: create -addrinfo 2021-04-20 14:36:36 +02:00
release-process.md doc: Document use of make-tag script to make tags 2021-01-29 08:46:11 +01:00
REST-interface.md rpc: deprecate addresses and reqSigs from rpc outputs 2021-03-23 10:51:43 -04:00
shared-libraries.md doc: libbitcoinconsensus: add missing error code description, fix NBitcoin link 2020-12-05 13:37:00 +01:00
tor.md doc: Replace tabs for spaces 2021-02-04 12:06:13 +00:00
translation_process.md Remove no longer used contrib/bitcoin-qt.pro from the repo 2021-04-15 15:39:42 +03:00
translation_strings_policy.md doc: Do not translate technical or extremely rare errors 2020-05-05 04:46:08 +03:00
zmq.md doc: Adjust ZMQ usage to support multiple interfaces 2020-09-23 23:14:28 +02:00

Bitcoin Core

Setup

Bitcoin Core is the original Bitcoin client and it builds the backbone of the network. It downloads and, by default, stores the entire history of Bitcoin transactions, which requires a few hundred gigabytes of disk space. Depending on the speed of your computer and network connection, the synchronization process can take anywhere from a few hours to a day or more.

To download Bitcoin Core, visit bitcoincore.org.

Running

The following are some helpful notes on how to run Bitcoin Core on your native platform.

Unix

Unpack the files into a directory and run:

  • bin/bitcoin-qt (GUI) or
  • bin/bitcoind (headless)

Windows

Unpack the files into a directory, and then run bitcoin-qt.exe.

macOS

Drag Bitcoin Core to your applications folder, and then run Bitcoin Core.

Need Help?

Building

The following are developer notes on how to build Bitcoin Core on your native platform. They are not complete guides, but include notes on the necessary libraries, compile flags, etc.

Development

The Bitcoin repo's root README contains relevant information on the development process and automated testing.

Resources

Miscellaneous

License

Distributed under the MIT software license.