Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
22bd38d
Merge bitcoin/bitcoin#29370: assumeutxo: Get rid of faked nTx and nCh…
achow101 Jul 11, 2026
c91f3ed
backport: adapt Dash for bitcoin#29370
PastaPastaPasta Jul 11, 2026
592ea1d
test: fix Dash assumeutxo transaction count coverage
PastaPastaPasta Jul 11, 2026
a48ecc1
Merge bitcoin/bitcoin#29215: test: assumeutxo: spend coin from snapsh…
glozow Jan 10, 2024
1da6624
Merge bitcoin/bitcoin#29354: test: Assumeutxo with more than just coi…
glozow Feb 5, 2024
124641e
Merge bitcoin/bitcoin#29394: test, assumeutxo: Add test to ensure fai…
fanquake Feb 13, 2024
5e9bfb0
Merge bitcoin/bitcoin#29428: test: Assumeutxo: snapshots with less wo…
achow101 Jun 4, 2024
bb8aca2
Merge bitcoin/bitcoin#29519: p2p: For assumeutxo, download snapshot c…
achow101 Aug 9, 2024
d82bbe5
Merge bitcoin/bitcoin#29553: assumeutxo: Add dumptxoutset height para…
achow101 Sep 3, 2024
7ce6ee3
Merge bitcoin/bitcoin#29726: assumeutxo: Fix -reindex before snapshot…
ryanofsky Apr 16, 2024
0cc27ec
Merge bitcoin/bitcoin#29973: test: Assumeutxo: ensure failure when im…
achow101 May 9, 2024
f6371c0
Merge bitcoin/bitcoin#29996: Assumeutxo: bugfix on loadtxoutset with …
achow101 Jul 10, 2024
ffb41fc
Merge bitcoin/bitcoin#30267: assumeutxo: Check snapshot base block is…
achow101 Jul 2, 2024
2bcd198
Merge bitcoin/bitcoin#30320: assumeutxo: Don't load a snapshot if it'…
achow101 Jul 18, 2024
612d760
Merge bitcoin/bitcoin#30403: test, assumeutxo: Remove resolved todo c…
achow101 Jul 23, 2024
7e68400
backport: adapt assumeutxo hardening tests for Dash
PastaPastaPasta Jul 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
203 changes: 0 additions & 203 deletions contrib/devtools/test_utxo_snapshots.sh

This file was deleted.

104 changes: 0 additions & 104 deletions contrib/devtools/utxo_snapshot.sh

This file was deleted.

85 changes: 85 additions & 0 deletions doc/assumeutxo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Assumeutxo Usage

Assumeutxo is a feature that allows fast bootstrapping of a validating dashd
instance.

For notes on the design of Assumeutxo, please refer to [the design doc](/doc/design/assumeutxo.md).

## 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. If there is
no source for the snapshot you need, you can generate it yourself using
`dumptxoutset` on another node that is already synced (see
[Generating a snapshot](#generating-a-snapshot)).

Once you've obtained the snapshot, you can use the RPC command `loadtxoutset` to
load it.

```
$ dash-cli loadtxoutset /path/to/input
```

After the snapshot has loaded, the syncing process of both the snapshot chain
and the background IBD chain can be monitored with the `getchainstates` RPC.

### 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 `-prune` 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
downloaded snapshot).

### Indexes

Indexes work but don't take advantage of this feature. They always start building
from the genesis block and can only apply blocks in order. 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 these indexes only allow blocks that
were already indexed to be pruned. Blocks that are not indexed yet will also
not be pruned.

This means that, if the snapshot is old, then a lot of blocks after the snapshot
block will need to be downloaded, and these blocks can't be pruned until they
are indexed, so they could consume a lot of disk space until indexing catches up
to the snapshot block.

## Generating a snapshot

The RPC command `dumptxoutset` can be used to generate a snapshot for the current
tip (using type "latest") or a recent height (using type "rollback"). A generated
snapshot from one node can then be loaded
on any other node. However, keep in mind that the snapshot hash needs to be
listed in the chainparams to make it usable. If there is no snapshot hash for
the height you have chosen already, you will need to change the code there and
re-compile.

Using the type parameter "rollback", `dumptxoutset` can also be used to verify the
hardcoded snapshot hash in the source code by regenerating the snapshot and
comparing the hash.

Example usage:

```
$ dash-cli -rpcclienttimeout=0 dumptxoutset /path/to/output rollback
```

For most of the duration of `dumptxoutset` running the node is in a temporary
state that does not actually reflect reality, i.e. blocks are marked invalid
although we know they are not invalid. Because of this it is discouraged to
interact with the node in any other way during this time to avoid inconsistent
results and race conditions, particularly RPCs that interact with blockstorage.
This inconsistent state is also why network activity is temporarily disabled,
causing us to disconnect from all peers.

`dumptxoutset` takes some time to complete, independent of hardware and
what parameter is chosen. Because of that it is recommended to increase the RPC
client timeout value (use `-rpcclienttimeout=0` for no timeout).
Loading
Loading