bitcoin/doc
Ava Chow c33eb2360e
Merge bitcoin/bitcoin#30043: net: Replace libnatpmp with built-in PCP+NATPMP implementation
5c7cacf649 ci: Remove natpmp build option and libnatpmp dependency (laanwj)
7e7ec984da doc: Remove mention of natpmp build options (laanwj)
061c3e32a2 depends: Drop natpmp and associated option from depends (laanwj)
20a18bf6aa build: Drop libnatpmp from build system (laanwj)
7b04709862 qt: Changes for built-in PCP+NAT-PMP (laanwj)
52f8ef66c6 net: Replace libnatpmp with built-in NATPMP+PCP implementation in mapport (laanwj)
97c97177cd net: Add PCP and NATPMP implementation (laanwj)
d72df63d16 net: Use GetLocalAddresses in Discover (laanwj)
e02030432b net: Add netif utility (laanwj)
754e425438 crypto: Add missing WriteBE16 function (laanwj)

Pull request description:

  Continues #30005. Closes #17012..

  This PR adds PCP (Port Control Protocol) from [RFC6887](https://datatracker.ietf.org/doc/html/rfc6887).  This adds, in addition to the existing IPv4 port mapping (which now uses PCP, with fallback to NAT-PMP), support for IPv6 pinholing-that is, opening a port on the firewall to make it reachable.

  PCP, like NAT-PMP is a simple UDP-based protocol, and the implementation is self-contained, so this gets rid of lthe libnatpnp dependency without adding a new one. It should otherwise be a drop-in replacement. NAT-PMP fallback is implemented so this will not make router support worse.

  For now it is disabled by default, though in the future (not in this PR) we could consider enable it by default to increase the number of connectable nodes without adding significant attack surface.

  To test:
  ```bash
  bitcoind -regtest -natpmp=1 -debug=net
  ```

  (most of the changes in this PR are, ironically, removing the libnatpmp dependency and associated build system and build docs)

  ## TODO

  - [x] Default gateway discovery on Linux / FreeBSD
  - [x] Default gateway discovery on Windows
  - [x] Default gateway discovery on MacOS
  - [x] Either solve FreeBSD compile issue (probably upstream issue) or remove FreeBSD support

  ## Things to consider for follow-up PRs

  - https://github.com/bitcoin/bitcoin/pull/30043#discussion_r1658764974 avoid unreachable nets (not given to -onlynet=)

  - https://github.com/bitcoin/bitcoin/pull/30043#discussion_r1658949236 could announce an addr:port where we do not listen (no -bind)

  - https://github.com/bitcoin/bitcoin/pull/30043#discussion_r1684368824 could announce the wrong port because it uses GetListenPort()

  - https://github.com/bitcoin/bitcoin/pull/30043#discussion_r1679709347 if we requested one port but another was assigned, then which one to use in the renewal?

  - https://github.com/bitcoin/bitcoin/pull/30043#discussion_r1772017020 Use `GetAdapterAddresses` to discover local addresses for Windows

ACKs for top commit:
  Sjors:
    ACK 5c7cacf649
  achow101:
    ACK 5c7cacf649
  vasild:
    ACK 5c7cacf649

Tree-SHA512: e35b69e56d5f5449a3d48a799f9b7b65107c65eeb3e245c2c1e9d42221e469ca5ead90afae423160601cd664dd553a51c859e04f4492f335b064aae3bf23e3bc
2024-09-30 16:27:47 -04:00
..
design doc: multiprocess documentation improvements 2024-09-23 15:03:04 -05:00
man build: Remove Autotools-based build system 2024-08-30 21:31:39 +01:00
policy [doc] update documentation for new mempoolfullrbf default 2024-08-07 10:19:52 +01:00
release-notes docs: Remove release 28.0 release notes fragments 2024-08-27 11:14:25 -04:00
assets-attribution.md [doc] Merge doc/assets-attribution.md into contrib/debian/copyright 2015-09-18 18:14:42 +02:00
assumeutxo.md doc: fix assumeutxo design doc link 2024-09-04 22:53:34 +01:00
benchmarking.md doc: Update for CMake-based build system 2024-08-16 21:24:08 +01:00
bips.md docs: Add 379 and 387 to bips.md 2024-08-27 11:20:54 -04:00
bitcoin-conf.md system: use %LOCALAPPDATA% as default datadir on windows 2024-04-30 11:03:04 -04:00
bitcoin_logo_doxygen.png Lossless image optimization 2013-12-02 10:10:22 +01:00
build-freebsd.md doc: Remove mention of natpmp build options 2024-09-30 11:37:56 +02:00
build-netbsd.md doc: Update for CMake-based build system 2024-08-16 21:24:08 +01:00
build-openbsd.md doc: Remove mention of natpmp build options 2024-09-30 11:37:56 +02:00
build-osx.md doc: Remove mention of natpmp build options 2024-09-30 11:37:56 +02:00
build-unix.md doc: Remove mention of natpmp build options 2024-09-30 11:37:56 +02:00
build-windows-msvc.md docs: Fix minor typo 2024-09-08 20:25:53 +02:00
build-windows.md doc: Drop ctest command from Windows cross-compiling instructions 2024-09-06 21:59:52 +01:00
cjdns.md doc: update getnodeaddresses for CJDNS, I2P and Tor and rm link 2023-06-01 15:52:51 +02:00
CMakeLists.txt cmake: add USE_SOURCE_PERMISSIONS to all configure_file usage 2024-09-06 10:52:19 +01:00
dependencies.md doc: Remove mention of natpmp build options 2024-09-30 11:37:56 +02:00
descriptors.md Merge bitcoin/bitcoin#22838: descriptors: Be able to specify change and receiving in a single descriptor string 2024-08-28 15:56:15 +01:00
developer-notes.md doc: Updating docs from autotools to cmake 2024-09-18 11:04:52 -04:00
dnsseed-policy.md Update the developer mailing list address. 2024-04-02 15:38:40 -03:00
Doxyfile.in cmake: Add docs build target 2024-08-16 21:19:12 +01:00
external-signer.md wallet: compare address returned by displayaddress 2024-04-16 17:47:43 +02:00
files.md Merge bitcoin/bitcoin#29775: Testnet4 including PoW difficulty adjustment fix 2024-08-07 13:05:04 -04:00
fuzzing.md doc: Adjust links in OSS-Fuzz section 2024-09-24 22:09:17 +02:00
guix.md docs: Point to contrib/guix/README.md in doc/guix.md 2021-01-08 11:40:01 -05:00
i2p.md doc: i2p: improve -i2pacceptincoming mention 2024-04-04 18:32:39 -03:00
init.md Merge bitcoin/bitcoin#28167: init: Add option for rpccookie permissions (replace 26088) 2024-06-27 17:35:08 -04:00
JSON-RPC-interface.md minor: remove unnecessary semicolons from RPC content type examples 2024-06-07 10:47:24 -04:00
managing-wallets.md Merge bitcoin/bitcoin#27064: system: use %LOCALAPPDATA% as default datadir on windows 2024-05-23 12:11:55 -04:00
multiprocess.md doc: multiprocess documentation improvements 2024-09-23 15:03:04 -05:00
multisig-tutorial.md doc: Prepend 'build/' to binary paths under 'src/' in docs 2024-08-29 15:23:12 +02:00
offline-signing-tutorial.md doc: Prepend 'build/' to binary paths under 'src/' in docs 2024-08-29 15:23:12 +02:00
p2p-bad-ports.md init, doc: improve -onlynet help and tor/i2p documentation 2022-03-03 16:14:01 +01:00
productivity.md doc: Update for CMake-based build system 2024-08-16 21:24:08 +01:00
psbt.md doc: M-of-N multisig using descriptor wallets and PSBTs, as well as a signing flow 2021-08-16 10:43:07 +05:00
README.md doc: Update for CMake-based build system 2024-08-16 21:24:08 +01:00
README_doxygen.md doc: Improve doxygen readme navigation section 2019-09-23 19:22:06 -04:00
README_windows.txt doc: Remove version numbers from READMEs 2017-04-05 09:40:48 +02:00
reduce-memory.md doc: Be vague instead of wrong about MALLOC_ARENA_MAX 2023-09-20 17:12:24 +00:00
reduce-traffic.md doc: update/clarify max outbound connection count 2023-12-11 20:05:25 +01:00
release-notes-28358.md validation: drop maximum -dbcache 2024-05-28 08:36:28 +02:00
release-notes-empty-template.md doc: add minimum required Linux Kernel to release-notes 2023-12-07 13:53:41 +00:00
release-process.md doc: Update for CMake-based build system 2024-08-16 21:24:08 +01:00
REST-interface.md testnet: Introduce Testnet4 2024-08-06 01:38:10 +02:00
tor.md doc: tor.md: use -bind=127.0.0.1:8334=onion for the Tor bind 2024-08-02 09:45:16 +02:00
tracing.md doc: Prepend 'build/' to binary paths under 'src/' in docs 2024-08-29 15:23:12 +02:00
translation_process.md doc: Updating docs from autotools to cmake 2024-09-18 11:04:52 -04:00
translation_strings_policy.md doc: Updating docs from autotools to cmake 2024-09-18 11:04:52 -04:00
zmq.md doc: correct the zmq automatic build info 2024-09-25 07:07:04 -04: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.