bitcoin/doc
Andrew Chow d5e4f9a439
Merge bitcoin/bitcoin#25740: assumeutxo: background validation completion
2b373fe49d docs: update assumeutxo.md (James O'Beirne)
87a1108c81 test: add snapshot completion unittests (James O'Beirne)
d70919a88f refactor: make MempoolMutex() public (James O'Beirne)
7300ced9de log: add LoadBlockIndex() message for assumedvalid blocks (James O'Beirne)
d96c59cc5c validation: add ChainMan logic for completing UTXO snapshot validation (James O'Beirne)
f2a4f3376f move-only-ish: init: factor out chainstate initialization (James O'Beirne)
637a90b973 add Chainstate::HasCoinsViews() (James O'Beirne)
c29f26b47b validation: add CChainState::m_disabled and ChainMan::isUsable (James O'Beirne)
5ee22cdafd add ChainstateManager.GetSnapshot{BaseHeight,BaseBlock}() (James O'Beirne)

Pull request description:

  This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11) (parent PR: https://github.com/bitcoin/bitcoin/pull/15606)

  Part two of replacing https://github.com/bitcoin/bitcoin/pull/24232.

  ---

  When a user activates a snapshot, the serialized UTXO set data is used to create an "assumed-valid" chainstate, which becomes active in an attempt to get the node to network tip as quickly as possible. Simultaneously in the background, the already-existing chainstate continues "conventional" IBD to both accumulate full block data and serve as a belt-and-suspenders to validate the assumed-valid chainstate.

  Once the background chainstate's tip reaches the base block of the snapshot used, we set `m_stop_use` on that chainstate and immediately take the hash of its UTXO set; we verify that this matches the assumeutxo value in the source code. Note that while we ultimately want to remove this background chainstate, we don't do so until the following initialization process, when we again check the UTXO set hash of the background chainstate, and if it continues to match, we remove the (now unnecessary) background chainstate, and move the (previously) assumed-valid chainstate into its place. We then reinitialize the chainstate in the normal way.

  As noted in previous comments, we could do the filesystem operations "inline" immediately when the background validation completes, but that's basically just an optimization that saves disk space until the next restart. It didn't strike me as worth the risk of moving chainstate data around on disk during runtime of the node, though maybe my concerns are overblown.

  The final result of this completion process is a fully-validated chain, where the only evidence that the user synced using assumeutxo is the existence of a `base_blockhash` file in the `chainstate` directory.

ACKs for top commit:
  achow101:
    ACK 2b373fe49d

Tree-SHA512: a204e1d6e6932dd83c799af3606b01a9faf893f04e9ee1a36d63f2f1ccfa9118bdc1c107d86976aa0312814267e6a42074bf3e2bf1dead4b2513efc6d955e13d
2023-03-07 18:54:59 -05:00
..
design docs: update assumeutxo.md 2023-03-07 16:06:20 -05:00
man scripted-diff: Fix typo in stub manual pages 2021-01-12 16:46:55 +01:00
policy [doc] remove non-signaling mentions of BIP125 2022-08-04 16:56:33 +01:00
release-notes doc: add 23.1 release notes 2022-12-16 09:43:56 +00:00
.gitignore Ignore Doxyfile generated from Doxyfile.in template. 2017-04-07 16:28:12 +02:00
assets-attribution.md [doc] Merge doc/assets-attribution.md into contrib/debian/copyright 2015-09-18 18:14:42 +02:00
benchmarking.md doc: update doc/benchmarking.md 2021-06-24 11:15:29 +02:00
bips.md doc: mention BIP86 in doc/bips.md 2022-11-01 20:50:51 +01:00
bitcoin-conf.md Security config warning 2022-08-19 23:18:13 -04:00
bitcoin_logo_doxygen.png Lossless image optimization 2013-12-02 10:10:22 +01:00
build-android.md build, qt: Use Android NDK r23 LTS 2021-12-05 03:00:02 +02:00
build-freebsd.md Merge bitcoin/bitcoin#26773: doc: FreeBSD build doc updates to reflect removal of install_db4.sh 2023-02-16 14:50:00 +00:00
build-netbsd.md doc: update for NetBSD 9.2, add GUI Build Instructions 2022-07-06 21:27:05 -04:00
build-openbsd.md contrib: remove install_db4.sh 2023-01-18 16:59:02 +00:00
build-osx.md Revert "doc: note that brew installed qt is not supported" 2022-09-14 13:51:17 +01:00
build-unix.md build: remove --enable-upnp-default from configure 2023-01-28 15:27:23 +00:00
build-windows.md doc: Correct linked Microsoft URLs 2022-12-31 16:54:13 +01:00
cjdns.md Add and improve informational links in doc/cjdns.md 2022-04-01 16:11:14 +02:00
dependencies.md Merge bitcoin/bitcoin#27029: guix: consolidate to glibc 2.27 for Linux builds 2023-02-17 10:40:57 +00:00
descriptors.md doc: correct deriveaddresses RPC name 2022-10-30 18:11:45 +00:00
developer-notes.md doc: mention sanitizer suppressions in developer docs 2023-02-24 12:16:37 +00:00
dnsseed-policy.md Correct spelling mistakes in doc folder 2015-10-18 06:25:43 +10:00
Doxyfile.in Generate doxygen documentation for test sources 2021-05-19 22:08:18 -07:00
external-signer.md Move external signer out of wallet module 2021-04-08 17:56:00 +02:00
files.md Ignore banlist.dat 2021-07-30 11:21:51 +02:00
fuzzing.md doc: use arch agnostic clang path in fuzzing doc (macOS) 2023-02-08 09:45:04 +00: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: remove recommended I2P router versions 2023-01-09 08:18:58 -08:00
init.md Remove -sysperms option 2023-02-05 08:09:16 +00:00
JSON-RPC-interface.md rpc: Allow named and positional arguments to be used together 2022-11-05 05:32:39 -04:00
managing-wallets.md Change dots to an ellipsis and fix capitalization 2023-01-12 11:15:02 -05:00
multisig-tutorial.md doc: update multisig-tutorial.md to default wallet type 2022-03-10 12:50:34 +01: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: add distcc to productivity notes 2022-06-13 16:13:11 +02: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: consolidate & remove release-note fragments 2022-09-15 16:02:17 +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: NetPermissionFlags for tx relay in blocksonly 2023-01-30 11:21:49 +00:00
reduce-traffic.md doc: Use precise permission flags where possible 2020-07-10 15:37:42 +02:00
release-notes-19762.md rpc: Allow named and positional arguments to be used together 2022-11-05 05:32:39 -04:00
release-notes-22087.md Validate port options 2022-10-05 19:30:15 +02:00
release-notes-23395.md doc: Add release note for shutdownnotify. 2022-10-13 21:22:52 +08:00
release-notes-25375.md rpc: add minconf and maxconf options to sendall 2023-01-11 17:08:35 -05:00
release-notes-25412.md doc: add release note about /rest/deploymentinfo 2022-08-16 19:21:51 -03:00
release-notes-25574.md doc: add release note for #25574 2023-02-16 17:58:52 -05:00
release-notes-25730.md RPC: listunspent, add "include immature coinbase" flag 2022-10-29 08:45:12 -03:00
release-notes-25934.md doc: add release note for 25934 2022-12-06 15:27:50 -03:00
release-notes-25943.md Add release note for PR#25943 2023-02-20 11:47:20 -07:00
release-notes-25957.md doc: add release note for #25957 (fast wallet rescan) 2023-01-19 13:40:26 +01:00
release-notes-26213.md bugfix: Strict type checking for RPC boolean parameters 2022-12-07 17:55:58 +01:00
release-notes-26265.md Add release note for MIN_STANDARD_TX_NONWITNESS_SIZE relaxation 2022-12-19 10:03:51 -05:00
release-notes-26471.md doc: release note on mempool size in -blocksonly 2023-01-20 13:54:05 +00:00
release-notes-26618.md doc: Add release notes for #26618 2022-12-08 16:45:38 +01:00
release-notes-26628.md rpc: Make it an error server-side to specify same named parameter multiple times 2022-12-02 17:53:16 -05:00
release-notes-26646.md doc: move errant release note to doc/ 2023-01-12 09:28:34 +00:00
release-notes-26896.md doc: add release notes for 26896 2023-01-28 15:27:27 +00:00
release-notes-27037.md doc: release notes for #27037 2023-02-03 18:18:39 +01:00
release-notes-27068.md doc: Release notes for 27068 2023-02-21 14:40:59 -05:00
release-notes-empty-template.md doc: Mac -> macOS in release notes template 2022-11-17 14:43:56 +00:00
release-process.md doc: Update Transifex links and slug format in Release Process 2023-03-01 15:01:16 +00:00
REST-interface.md Merge bitcoin/bitcoin#25412: rest: add /deploymentinfo endpoint 2022-10-13 13:30:55 -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: update tor.md with cjdns and getnodeaddresses, fix tor grep, 2022-03-22 12:54:21 +01:00
tracing.md Fix: typos 2022-10-28 09:39:36 +02:00
translation_process.md doc: Remove unnecessary steps from translations update process 2021-07-03 21:31:29 +02:00
translation_strings_policy.md doc: Do not translate technical or extremely rare errors 2020-05-05 04:46:08 +03:00
zmq.md Update zmq.md: Fix parameter in hwm example block 2022-05-25 23:49:15 +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.