|
3 | 3 | Assumeutxo is a feature that allows fast bootstrapping of a validating bitcoind
|
4 | 4 | instance.
|
5 | 5 |
|
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 |
8 | 44 | `./contrib/devtools/utxo_snapshot.sh` may be of use.
|
9 | 45 |
|
10 | 46 | ## General background
|
|
0 commit comments