[bitcoin-dev] assumeutxo and UTXO snapshots
james.obeirne at gmail.com
Tue Apr 2 20:43:11 UTC 2019
I'd like to discuss assumeutxo, which is an appealing and simple
optimization in the spirit of assumevalid.
To start a fully validating bitcoin client from scratch, that client
needs to perform an initial block download. To the surprise of no one, IBD
takes a linear amount time based on the length of the chain's history. For
clients running on modest hardware under limited bandwidth constraints,
say a mobile device, completing IBD takes a considerable amount of time
and thus poses serious usability challenges.
As a result, having fully validating clients run on such hardware is rare
basically unrealistic. Clients with even moderate resource constraints
are encouraged to rely on the SPV trust model. Though we have promising
improvements to existing SPV modes pending deployment, it's worth
thinking about a mechanism that would allow such clients to use trust
models closer to full validation.
The subject of this mail is a proposal for a complementary alternative to
modes, and which is in the spirit of an existing default, `assumevalid`. It
help modest clients transact under a security model that closely resembles
full validation within minutes instead of hours or days.
The basic idea is to allow nodes to initialize using a serialized version
UTXO set rendered by another node at some predetermined height. The
initializing node syncs the headers chain from the network, then obtains and
loads one of these UTXO snapshots (i.e. a serialized version of the UTXO set
bundled with the block header indicating its "base" and some other
Based upon the snapshot, the node is able to quickly reconstruct its
and compares a hash of the resulting UTXO set to a preordained hash
in the software a la assumevalid. This all takes ~23 minutes, not
download of the 3.2GB snapshot.
The node then syncs to the network tip and afterwards begins a simultaneous
background validation (i.e., a conventional IBD) up to the base height of
snapshot in order to achieve full validation. Crucially, even while the
background validation is happening the node can validate incoming blocks and
transact with the benefit of the full (assumed-valid) UTXO set.
Snapshots could be obtained from multiple separate peers in the same manner
block download, but I haven't put much thought into this. In concept it
matter too much where the snapshots come from since their validity is
determined via content hash.
Obviously there are some security implications due consideration. While this
proposal is in the spirit of assumevalid, practical attacks may become
Under assumevalid, a user can be tricked into transacting under a false
if an attacker convinces them to start bitcoind with a malicious
parameter, sybils their node, and then feeds them a bogus chain encompassing
all of the hard-coded checkpoints.
The same attack is made easier in assumeutxo because, unlike in assumevalid,
the attacker need not construct a valid PoW chain to get the victim's node
a false state; they simply need to get the user to accept a bad
parameter and then supply them an easily made UTXO snapshot containing,
false coin assignment.
For this reason, I recommend that if we were to implement assumeutxo, we not
allow its specification via commandline argument.
Beyond this risk, I can't think of material differences in security
assumevalid, though I appeal to the list for help with this.
# More fully validating clients
A particularly exciting use-case for assumeutxo is the possibility of mobile
devices functioning as fully validating nodes with access to the complete
set (as an alternative to SPV models). The total resource burden needed to
start a node
from scratch based on a snapshot is, at time of writing, a ~(3.2GB
+ blocks_to_tip * 4MB) download and a few minutes of processing time, which
manageable for many mobile devices currently in use.
A mobile user could initialize an assumed-valid bitcoin node within an hour,
transact immediately, and complete a pruned full validation of their
assumed-valid chain over the next few days, perhaps only doing the
IBD when their device has access to suitable high-bandwidth connections.
If we end up implementing an accumulator-based UTXO scaling design
the road, it's easy to imagine an analogous process that would allow very
startup using an accumulator of a few kilobytes in lieu of a multi-GB
I've created a related issue at our Github repository here:
and have submitted a draft implementation of snapshot usage via RPC here:
I'd like to discuss here whether this is a good fit for Bitcoin
plans for deployment steps should be discussed in the Github issue, and
that my implementation may be reviewed as a sketch of the specific software
: as tested at height 569895, on a 12 core Intel Xeon Silver 4116 CPU @
: Marco Falke is due credit for this point
: utreexo: https://www.youtube.com/watch?v=edRun-6ubCc
: Boneh, Bunz, Fisch on accumulators: https://eprint.iacr.org/2018/1188
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the bitcoin-dev