diff options
author | Ryan Ofsky <ryan@ofsky.org> | 2023-10-23 12:40:29 -0400 |
---|---|---|
committer | Ryan Ofsky <ryan@ofsky.org> | 2023-10-23 12:41:15 -0400 |
commit | 5c32c5971c28c12f8e97a422d7b1da15f7c82e7b (patch) | |
tree | f46258b2cf95febf00b9aae9cfb45aecd2d49d9d /doc | |
parent | d90eea989aa9c4ea17dba94bb2d89eae49b3bf69 (diff) | |
parent | 03f82087f6ce1c29327f34d12945200494e6956d (diff) |
Merge bitcoin/bitcoin#28618: doc: assumeutxo prune and index notes
03f82087f6ce1c29327f34d12945200494e6956d doc: assumeutxo prune and index notes (Sjors Provoost)
Pull request description:
Based on recent comments on #27596.
ACKs for top commit:
pablomartin4btc:
re ACK 03f82087f6ce1c29327f34d12945200494e6956d
ryanofsky:
ACK 03f82087f6ce1c29327f34d12945200494e6956d. Nice changes, these seem like very helpful notes
Tree-SHA512: fe651b49f4d667400a3655899f27a96dd1eaf67cf9215fb35db5f44fb8c0313e7d541518be6791fec93392df24b909793f3886adb808e53228ed2a291165639d
Diffstat (limited to 'doc')
-rw-r--r-- | doc/design/assumeutxo.md | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/doc/design/assumeutxo.md b/doc/design/assumeutxo.md index 75a7b6c866..66962a629d 100644 --- a/doc/design/assumeutxo.md +++ b/doc/design/assumeutxo.md @@ -3,8 +3,44 @@ Assumeutxo is a feature that allows fast bootstrapping of a validating bitcoind instance. -The RPC commands `dumptxoutset` and `loadtxoutset` are used to -respectively generate and load UTXO snapshots. The utility script +## Loading a snapshot + +There is currently no canonical source for snapshots, but any downloaded snapshot +will be checked against a hash that's been hardcoded in source code. + +Once you've obtained the snapshot, you can use the RPC command `loadtxoutset` to +load it. + +### Pruning + +A pruned node can load a snapshot. To save space, it's possible to delete the +snapshot file as soon as `loadtxoutset` finishes. + +The minimum `-dbcache` setting is 550 MiB, but this functionality ignores that +minimum and uses at least 1100 MiB. + +As the background sync continues there will be temporarily two chainstate +directories, each multiple gigabytes in size (likely growing larger than the +the downloaded snapshot). + +### Indexes + +Indexes work but don't take advantage of this feature. They always start building +from the genesis block. Once the background validation reaches the snapshot block, +indexes will continue to build all the way to the tip. + +For indexes that support pruning, note that no pruning will take place between +the snapshot and the tip, until the background sync has completed - after which +everything is pruned. Depending on how old the snapshot is, this may temporarily +use a significant amount of disk space. + +## Generating a snapshot + +The RPC command `dumptxoutset` can be used to generate a snapshot. This can be used +to create a snapshot on one node that you wish to load on another node. +It can also be used to verify the hardcoded snapshot hash in the source code. + +The utility script `./contrib/devtools/utxo_snapshot.sh` may be of use. ## General background |