<oembed><type>rich</type><version>1.0</version><author_name>npub1nfrrurat393mqymf3s26pujyn5vujlem3pzcukr5p9d4qpklngxq43dtxs</author_name><author_url>https://nostr.ae/npub1nfrrurat393mqymf3s26pujyn5vujlem3pzcukr5p9d4qpklngxq43dtxs</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2019-04-03&#xA;📝 Original message:Thanks James for the post.&#xA;&#xA;I proposed a similar idea [1] back in 2016 with the difference of signing the UTXO-set hash in a gitian-ish way.&#xA;&#xA;While the idea of UTXO-set-syncs are attractive, there are probably still significant downsides in usability (compared to models with less security), mainly:&#xA;* Assume the UTXO set is 6 weeks old (which seems a reasonable age for providing enough security) a peer using that snapshot would still require to download and verify ~6048 blocks (~7.9GB at 1.3MB blocks,… probably CPU-days on a phone)&#xA;* Do we semi-trust the peer that servers the UTXO set (compared to a block or tx which we can validate)? What channel to we use to serve the snapshot?&#xA;&#xA;If the goal is to run a full node on a consumer device that is also been used for other CPU intense operations (like a phone, etc.), I’m not sure if this proposal will lead to a satisfactory user experience.&#xA;&#xA;The longer I think around this problem, the more I lean towards accepting the fact that one need to use dedicated hardware in his own environment to perform a painless full validation.&#xA;&#xA;/jonas&#xA;&#xA;[1] https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016-February/012478.html&#xA;&#xA;&gt; Am 02.04.2019 um 22:43 schrieb James O&#39;Beirne via bitcoin-dev &lt;bitcoin-dev at lists.linuxfoundation.org&gt;:&#xA;&gt; &#xA;&gt; Hi,&#xA;&gt; &#xA;&gt; I&#39;d like to discuss assumeutxo, which is an appealing and simple&#xA;&gt; optimization in the spirit of assumevalid[0].&#xA;&gt; &#xA;&gt; # Motivation&#xA;&gt; &#xA;&gt; To start a fully validating bitcoin client from scratch, that client currently&#xA;&gt; needs to perform an initial block download. To the surprise of no one, IBD&#xA;&gt; takes a linear amount time based on the length of the chain&#39;s history. For&#xA;&gt; clients running on modest hardware under limited bandwidth constraints,&#xA;&gt; say a mobile device, completing IBD takes a considerable amount of time&#xA;&gt; and thus poses serious usability challenges.&#xA;&gt; &#xA;&gt; As a result, having fully validating clients run on such hardware is rare and&#xA;&gt; basically unrealistic. Clients with even moderate resource constraints&#xA;&gt; are encouraged to rely on the SPV trust model. Though we have promising&#xA;&gt; improvements to existing SPV modes pending deployment[1], it&#39;s worth&#xA;&gt; thinking about a mechanism that would allow such clients to use trust&#xA;&gt; models closer to full validation.&#xA;&gt; &#xA;&gt; The subject of this mail is a proposal for a complementary alternative to SPV&#xA;&gt; modes, and which is in the spirit of an existing default, `assumevalid`. It may&#xA;&gt; help modest clients transact under a security model that closely resembles&#xA;&gt; full validation within minutes instead of hours or days.&#xA;&gt; &#xA;&gt; # assumeutxo&#xA;&gt; &#xA;&gt; The basic idea is to allow nodes to initialize using a serialized version of the&#xA;&gt; UTXO set rendered by another node at some predetermined height. The&#xA;&gt; initializing node syncs the headers chain from the network, then obtains and&#xA;&gt; loads one of these UTXO snapshots (i.e. a serialized version of the UTXO set&#xA;&gt; bundled with the block header indicating its &#34;base&#34; and some other metadata).&#xA;&gt; &#xA;&gt; Based upon the snapshot, the node is able to quickly reconstruct its chainstate,&#xA;&gt; and compares a hash of the resulting UTXO set to a preordained hash hard-coded&#xA;&gt; in the software a la assumevalid. This all takes ~23 minutes, not accounting for&#xA;&gt; download of the 3.2GB snapshot[2].&#xA;&gt; &#xA;&gt; The node then syncs to the network tip and afterwards begins a simultaneous&#xA;&gt; background validation (i.e., a conventional IBD) up to the base height of the&#xA;&gt; snapshot in order to achieve full validation. Crucially, even while the&#xA;&gt; background validation is happening the node can validate incoming blocks and&#xA;&gt; transact with the benefit of the full (assumed-valid) UTXO set.&#xA;&gt; &#xA;&gt; Snapshots could be obtained from multiple separate peers in the same manner as&#xA;&gt; block download, but I haven&#39;t put much thought into this. In concept it doesn&#39;t&#xA;&gt; matter too much where the snapshots come from since their validity is&#xA;&gt; determined via content hash.&#xA;&gt; &#xA;&gt; # Security&#xA;&gt; &#xA;&gt; Obviously there are some security implications due consideration. While this&#xA;&gt; proposal is in the spirit of assumevalid, practical attacks may become easier.&#xA;&gt; Under assumevalid, a user can be tricked into transacting under a false history&#xA;&gt; if an attacker convinces them to start bitcoind with a malicious `-assumevalid`&#xA;&gt; parameter, sybils their node, and then feeds them a bogus chain encompassing&#xA;&gt; all of the hard-coded checkpoints[3].&#xA;&gt; &#xA;&gt; The same attack is made easier in assumeutxo because, unlike in assumevalid,&#xA;&gt; the attacker need not construct a valid PoW chain to get the victim&#39;s node into&#xA;&gt; a false state; they simply need to get the user to accept a bad `-assumeutxo`&#xA;&gt; parameter and then supply them an easily made UTXO snapshot containing, say, a&#xA;&gt; false coin assignment.&#xA;&gt; &#xA;&gt; For this reason, I recommend that if we were to implement assumeutxo, we not&#xA;&gt; allow its specification via commandline argument[4].&#xA;&gt; &#xA;&gt; Beyond this risk, I can&#39;t think of material differences in security relative to&#xA;&gt; assumevalid, though I appeal to the list for help with this.&#xA;&gt; &#xA;&gt; # More fully validating clients&#xA;&gt; &#xA;&gt; A particularly exciting use-case for assumeutxo is the possibility of mobile&#xA;&gt; devices functioning as fully validating nodes with access to the complete UTXO&#xA;&gt; set (as an alternative to SPV models). The total resource burden needed to start a node&#xA;&gt; from scratch based on a snapshot is, at time of writing, a ~(3.2GB&#xA;&gt; + blocks_to_tip * 4MB) download and a few minutes of processing time, which sounds&#xA;&gt; manageable for many mobile devices currently in use.&#xA;&gt; &#xA;&gt; A mobile user could initialize an assumed-valid bitcoin node within an hour,&#xA;&gt; transact immediately, and complete a pruned full validation of their&#xA;&gt; assumed-valid chain over the next few days, perhaps only doing the background&#xA;&gt; IBD when their device has access to suitable high-bandwidth connections.&#xA;&gt; &#xA;&gt; If we end up implementing an accumulator-based UTXO scaling design[5][6] down&#xA;&gt; the road, it&#39;s easy to imagine an analogous process that would allow very fast&#xA;&gt; startup using an accumulator of a few kilobytes in lieu of a multi-GB snapshot.&#xA;&gt; &#xA;&gt; ---&#xA;&gt; &#xA;&gt; I&#39;ve created a related issue at our Github repository here:&#xA;&gt;   https://github.com/bitcoin/bitcoin/issues/15605&#xA;&gt; &#xA;&gt; and have submitted a draft implementation of snapshot usage via RPC here:&#xA;&gt;   https://github.com/bitcoin/bitcoin/pull/15606&#xA;&gt; &#xA;&gt; I&#39;d like to discuss here whether this is a good fit for Bitcoin conceptually. Concrete&#xA;&gt; plans for deployment steps should be discussed in the Github issue, and after all&#xA;&gt; that my implementation may be reviewed as a sketch of the specific software&#xA;&gt; changes necessary.&#xA;&gt; &#xA;&gt; Regards,&#xA;&gt; James&#xA;&gt; &#xA;&gt; &#xA;&gt; [0]: https://bitcoincore.org/en/2017/03/08/release-0.14.0/#assumed-valid-blocks&#xA;&gt; [1]: https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki&#xA;&gt; [2]: as tested at height 569895, on a 12 core Intel Xeon Silver 4116 CPU @ 2.10GHz&#xA;&gt; [3]: https://github.com/bitcoin/bitcoin/blob/84d0fdc/src/chainparams.cpp#L145-L161&#xA;&gt; [4]: Marco Falke is due credit for this point&#xA;&gt; [5]: utreexo: https://www.youtube.com/watch?v=edRun-6ubCc&#xA;&gt; [6]: Boneh, Bunz, Fisch on accumulators: https://eprint.iacr.org/2018/1188&#xA;&gt; &#xA;&gt; _______________________________________________&#xA;&gt; bitcoin-dev mailing list&#xA;&gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#xA;&#xA;-------------- next part --------------&#xA;A non-text attachment was scrubbed...&#xA;Name: signature.asc&#xA;Type: application/pgp-signature&#xA;Size: 833 bytes&#xA;Desc: Message signed with OpenPGP&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20190403/0005961e/attachment.sig&gt;</html></oembed>