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