0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-05 14:06:27 -05:00
bitcoin-core/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
release-notes
.gitignore
assets-attribution.md
benchmarking.md
bips.md Use Bech32m encoding for v1+ segwit addresses 2021-03-16 10:48:36 -07:00
bitcoin-conf.md doc: add signet to doc/bitcoin-conf.md 2021-03-08 00:44:54 +01:00
bitcoin_logo_doxygen.png
build-android.md Qt: add Android packaging support 2021-03-21 22:33:27 +01:00
build-freebsd.md
build-netbsd.md
build-openbsd.md
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
developer-notes.md refactor: Remove negative lock annotations from globals 2021-04-05 08:42:15 +02:00
dnsseed-policy.md
Doxyfile.in
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
init.md
JSON-RPC-interface.md
multiprocess.md doc: Use CONFIG_SITE instead of --prefix 2021-04-09 12:25:18 +03:00
productivity.md
psbt.md
README.md Qt: add Android packaging support 2021-03-21 22:33:27 +01:00
README_doxygen.md
README_windows.txt
reduce-memory.md
reduce-traffic.md
release-notes.md Merge #21595: cli: create -addrinfo 2021-04-20 14:36:36 +02:00
release-process.md
REST-interface.md rpc: deprecate addresses and reqSigs from rpc outputs 2021-03-23 10:51:43 -04:00
shared-libraries.md
tor.md
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
zmq.md

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.