bitcoin/doc
Ryan Ofsky d9c7c2fd3e
Merge bitcoin/bitcoin#24914: wallet: Load database records in a particular order
3c83b1d884 doc: Add release note for wallet loading changes (Andrew Chow)
2636844f53 walletdb: Remove loading code where the database is iterated (Andrew Chow)
cd211b3b99 walletdb: refactor decryption key loading (Andrew Chow)
31c033e5ca walletdb: refactor defaultkey and wkey loading (Andrew Chow)
c978c6d39c walletdb: refactor active spkm loading (Andrew Chow)
6fabb7fc99 walletdb: refactor tx loading (Andrew Chow)
abcc13dd24 walletdb: refactor address book loading (Andrew Chow)
405b4d9147 walletdb: Refactor descriptor wallet records loading (Andrew Chow)
30ab11c497 walletdb: Refactor legacy wallet record loading into its own function (Andrew Chow)
9e077d9b42 salvage: Remove use of ReadKeyValue in salvage (Andrew Chow)
ad779e9ece walletdb: Refactor hd chain loading to its own function (Andrew Chow)
72c2a54ebb walletdb: Refactor encryption key loading to its own function (Andrew Chow)
3ccde4599b walletdb: Refactor crypted key loading to its own function (Andrew Chow)
7be10adff3 walletdb: Refactor key reading and loading to its own function (Andrew Chow)
52932c5adb walletdb: Refactor wallet flags loading (Andrew Chow)
01b35b55a1 walletdb: Refactor minversion loading (Andrew Chow)

Pull request description:

  Currently when we load a wallet, we just iterate through all of the records in the database and add them completely statelessly. However we have some records which do rely on other records being loaded before they are. To deal with this, we use `CWalletScanState` to hold things temporarily until all of the records have been read and then we load the stateful things.

  However this can be slow, and with some future improvements, can cause some pretty drastic slowdowns to retain this pattern. So this PR changes the way we load records by choosing to load the records in a particular order. This lets us do things such as loading a descriptor record, then finding and loading that descriptor's cache and key records. In the future, this will also let us use `IsMine` when loading transactions as then `IsMine` will actually be working as we now always load keys and descriptors before transactions.

  In order to get records of a specific type, this PR includes some refactors to how we do database cursors. Functionality is also added to retrieve a cursor that will give us records beginning with a specified prefix.

  Lastly, one thing that iterating the entire database let us do was to find unknown records. However even if unknown records were found, we would not do anything with this information except output a number in a log line. With this PR, we would no longer be aware of any unknown records. This does not change functionality as we don't do anything with unknown records, and having unknown records is not an error. Now we would just not be aware that unknown records even exist.

ACKs for top commit:
  MarcoFalke:
    re-ACK 3c83b1d884 🍤
  furszy:
    reACK 3c83b1d8
  ryanofsky:
    Code review ACK 3c83b1d884. Just Marco's suggested error handling fixes since last review

Tree-SHA512: 15fa56332fb2ce4371db468a0c674ee7a3a8889c8cee9f428d06a7d1385d17a9bf54bcb0ba885c87736841fe6a5c934594bcf4476a473616510ee47862ef30b4
2023-06-27 19:03:15 -04:00
..
design docs: update assumeutxo.md 2023-03-07 16:06:20 -05:00
man
policy [policy] disallow transactions under min relay fee, even in packages 2023-04-17 09:53:59 +01:00
release-notes doc: Fix broken link in release notes 2023-05-26 09:47:15 +02:00
.gitignore
assets-attribution.md
benchmarking.md
bips.md doc: remove version number from bips.md 2023-05-11 17:49:16 +01:00
bitcoin_logo_doxygen.png
bitcoin-conf.md Security config warning 2022-08-19 23:18:13 -04: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 doc: update OpenBSD build docs for 7.3 (external signer support available) 2023-04-11 22:59:08 +02: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 doc: remove Security section from build-unix.md 2023-05-18 12:09:02 +01:00
build-windows.md doc: Correct linked Microsoft URLs 2022-12-31 16:54:13 +01:00
cjdns.md doc: update getnodeaddresses for CJDNS, I2P and Tor and rm link 2023-06-01 15:52:51 +02:00
dependencies.md random: switch to using getrandom() directly 2023-05-20 17:20:01 +01:00
descriptors.md doc: correct deriveaddresses RPC name 2022-10-30 18:11:45 +00:00
developer-notes.md build: suppress external warnings by default 2023-06-15 14:12:10 +01:00
dnsseed-policy.md
Doxyfile.in
external-signer.md
files.md
fuzzing.md doc: use arch agnostic clang path in fuzzing doc (macOS) 2023-02-08 09:45:04 +00:00
guix.md
i2p.md Merge bitcoin/bitcoin#27719: doc: remove Tor link & generalize onion getnodeaddresses RPC 2023-06-01 15:24:23 +01:00
init.md Remove -sysperms option 2023-02-05 08:09:16 +00:00
JSON-RPC-interface.md doc: document json rpc endpoints 2023-03-09 08:41:59 +00: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_doxygen.md
README_windows.txt
README.md doc: consolidate & remove release-note fragments 2022-09-15 16:02:17 +01:00
reduce-memory.md doc: remove mention of glibc 2.10+ 2023-05-17 15:02:51 +01:00
reduce-traffic.md
release-notes-24914.md doc: Add release note for wallet loading changes 2023-06-27 11:08:06 -04:00
release-notes-25158.md doc: add release notes for abandoned field in gettransaction and listtransactions 2023-01-13 10:29:05 -03:00
release-notes-26076.md doc: clarify PR 26076 release note 2023-05-08 16:07:15 +02:00
release-notes-26094.md rpc: return block hash & height in getbalances, gettransaction & getwalletinfo JSONs 2023-04-26 16:07:47 +02:00
release-notes-26485.md RPC: Allow RPC methods accepting options to take named parameters 2023-05-03 11:27:51 -05:00
release-notes-27302.md init: Error if ignored bitcoin.conf file is found 2023-04-21 06:53:23 -04:00
release-notes-27501.md [rpc] add getprioritisedtransactions 2023-05-10 21:10:44 +01:00
release-notes-27632.md doc: release note re raising on invalid -debug/debugexclude/loglevel 2023-06-15 10:27:56 -06:00
release-notes-27757.md doc: add release note about removal of deprecatedrpc=walletwarningfield flag 2023-06-04 23:53:26 +02:00
release-notes-empty-template.md depends: Bump MacOS minimum runtime requirement to 11.0 2023-06-22 15:28:47 +00:00
release-process.md doc: Fix typo in doc/release-process.md URL 2023-05-25 13:17:17 +02:00
REST-interface.md Merge bitcoin/bitcoin#26207: rest: add verbose and mempool_sequence query params for mempool/contents 2023-03-15 19:39:30 -04:00
shared-libraries.md
tor.md Merge bitcoin/bitcoin#27719: doc: remove Tor link & generalize onion getnodeaddresses RPC 2023-06-01 15:24:23 +01:00
tracing.md Use int32_t type for most transaction size/weight values 2023-06-12 19:47:19 +01:00
translation_process.md
translation_strings_policy.md
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.