Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1# Assumeutxo Usage3Assumeutxo is a feature that allows fast bootstrapping of a validating bitcoind4instance.6For notes on the design of Assumeutxo, please refer to [the design doc](/doc/design/assumeutxo.md).8## Loading a snapshot10There is currently no canonical source for snapshots, but any downloaded snapshot11will be checked against a hash that's been hardcoded in source code. If there is12no source for the snapshot you need, you can generate it yourself using13`dumptxoutset` on another node that is already synced (see14[Generating a snapshot](#generating-a-snapshot)).16Once you've obtained the snapshot, you can use the RPC command `loadtxoutset` to17load it.19```20$ bitcoin-cli -rpcclienttimeout=0 loadtxoutset /path/to/input21```23After the snapshot has loaded, the syncing process of both the snapshot chain24and the background IBD chain can be monitored with the `getchainstates` RPC.26### Pruning28A pruned node can load a snapshot. To save space, it's possible to delete the29snapshot file as soon as `loadtxoutset` finishes.31The minimum `-prune` setting is 550 MiB, but this functionality ignores that32minimum and uses at least 1100 MiB.34As the background sync continues there will be temporarily two chainstate35directories, each multiple gigabytes in size (likely growing larger than the36downloaded snapshot).38### Indexes40Indexes work but don't take advantage of this feature. They always start building41from the genesis block and can only apply blocks in order. Once the background42validation reaches the snapshot block, indexes will continue to build all the43way to the tip.46For indexes that support pruning, note that these indexes only allow blocks that47were already indexed to be pruned. Blocks that are not indexed yet will also48not be pruned.50This means that, if the snapshot is old, then a lot of blocks after the snapshot51block will need to be downloaded, and these blocks can't be pruned until they52are indexed, so they could consume a lot of disk space until indexing catches up53to the snapshot block.55## Generating a snapshot57The RPC command `dumptxoutset` can be used to generate a snapshot for the current58tip (using type "latest") or a recent height (using type "rollback"). A generated59snapshot from one node can then be loaded60on any other node. However, keep in mind that the snapshot hash needs to be61listed in the chainparams to make it usable. If there is no snapshot hash for62the height you have chosen already, you will need to change the code there and63re-compile.65Using the type parameter "rollback", `dumptxoutset` can also be used to verify the66hardcoded snapshot hash in the source code by regenerating the snapshot and67comparing the hash.69Example usage:71```72$ bitcoin-cli -rpcclienttimeout=0 dumptxoutset /path/to/output rollback73```75For most of the duration of `dumptxoutset` running the node is in a temporary76state that does not actually reflect reality, i.e. blocks are marked invalid77although we know they are not invalid. Because of this it is discouraged to78interact with the node in any other way during this time to avoid inconsistent79results and race conditions, particularly RPCs that interact with blockstorage.80This inconsistent state is also why network activity is temporarily disabled,81causing us to disconnect from all peers.83`dumptxoutset` takes some time to complete, independent of hardware and84what parameter is chosen. Because of that it is recommended to increase the RPC85client timeout value (use `-rpcclienttimeout=0` for no timeout).
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.