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