<oembed><type>rich</type><version>1.0</version><author_name>npub1ldcq03p2qe58u0xnlwa35wchjuhz49y6ueu5ghmtjetez9xstnvsmt8ur6</author_name><author_url>https://nostr.ae/npub1ldcq03p2qe58u0xnlwa35wchjuhz49y6ueu5ghmtjetez9xstnvsmt8ur6</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2017-02-23&#xA;📝 Original message:On Wed, Feb 22, 2017 at 5:15 PM, Peter Todd via bitcoin-dev &lt;&#xA;bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&#xA;&gt;&#xA;&gt; With that, notice how proving the soundness of the proofs becomes trivial:&#xA;&gt; if&#xA;&gt; validation is deterministic, it is obviously impossible to construct two&#xA;&gt; different proofs that prove contradictory statements, because a proof is&#xA;&gt; simply&#xA;&gt; part of the data structure itself. Contradiction would imply that the two&#xA;&gt; proofs are different, but that&#39;s easily rejected by simply checking the&#xA;&gt; hash of&#xA;&gt; the data.&#xA;&gt;&#xA;&#xA;My code works this way. Proofs are serialization of a subset of the tree,&#xA;and to validate a proof you ask a single function whether a particular&#xA;value is included in that tree subset, and it answers yes or no, so&#xA;obviously it&#39;s impossible for a single value to both validate and not&#xA;validate. The proof code was quite terrifying before I made this change&#xA;(which I did on your suggestion), and it&#39;s much cleaner and simpler now. It&#xA;also in principle supports compact proofs of multiple inclusions and&#xA;exclusions in the same serialization of a subset of the tree because the&#xA;upper branches won&#39;t have to be repeated. I haven&#39;t written code for&#xA;generating those, but the validation code will happily accept them.&#xA;&#xA;I&#39;m not sure what you mean by MMRs though. Are you talking about MMRs where&#xA;each mountain is a set of diffs to the old things and are periodically&#xA;consolidated? Or do later mountains refer to internals of earlier ones? Or&#xA;do they have &#39;maybe&#39; values which mean that the earlier mountain should be&#xA;referred to? Are these patricia tries or something flatter and more fixed&#xA;depth?&#xA;&#xA;My code doesn&#39;t keep track of tree size, by the way. It would be trivial to&#xA;add that functionality to the library, and including it in the hashing&#xA;creates complexity and doesn&#39;t seem to have any benefit over sending that&#xA;data in a side channel.&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170222/4a48d1ae/attachment-0001.html&gt;</html></oembed>