Skip to content

Commit 03f8208

Browse files
committed
doc: assumeutxo prune and index notes
1 parent c976657 commit 03f8208

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

doc/design/assumeutxo.md

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,44 @@
33
Assumeutxo is a feature that allows fast bootstrapping of a validating bitcoind
44
instance.
55

6-
The RPC commands `dumptxoutset` and `loadtxoutset` are used to
7-
respectively generate and load UTXO snapshots. The utility script
6+
## Loading a snapshot
7+
8+
There is currently no canonical source for snapshots, but any downloaded snapshot
9+
will be checked against a hash that's been hardcoded in source code.
10+
11+
Once you've obtained the snapshot, you can use the RPC command `loadtxoutset` to
12+
load it.
13+
14+
### Pruning
15+
16+
A pruned node can load a snapshot. To save space, it's possible to delete the
17+
snapshot file as soon as `loadtxoutset` finishes.
18+
19+
The minimum `-dbcache` setting is 550 MiB, but this functionality ignores that
20+
minimum and uses at least 1100 MiB.
21+
22+
As the background sync continues there will be temporarily two chainstate
23+
directories, each multiple gigabytes in size (likely growing larger than the
24+
the downloaded snapshot).
25+
26+
### Indexes
27+
28+
Indexes work but don't take advantage of this feature. They always start building
29+
from the genesis block. Once the background validation reaches the snapshot block,
30+
indexes will continue to build all the way to the tip.
31+
32+
For indexes that support pruning, note that no pruning will take place between
33+
the snapshot and the tip, until the background sync has completed - after which
34+
everything is pruned. Depending on how old the snapshot is, this may temporarily
35+
use a significant amount of disk space.
36+
37+
## Generating a snapshot
38+
39+
The RPC command `dumptxoutset` can be used to generate a snapshot. This can be used
40+
to create a snapshot on one node that you wish to load on another node.
41+
It can also be used to verify the hardcoded snapshot hash in the source code.
42+
43+
The utility script
844
`./contrib/devtools/utxo_snapshot.sh` may be of use.
945

1046
## General background

0 commit comments

Comments
 (0)