<oembed><type>rich</type><version>1.0</version><author_name>npub1dw88wd5gqsqn6ufxhf9h03uk8087l7gfzdtez5csjlt6pupu4pwsj8plrw</author_name><author_url>https://nostr.ae/npub1dw88wd5gqsqn6ufxhf9h03uk8087l7gfzdtez5csjlt6pupu4pwsj8plrw</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2017-10-01&#xA;📝 Original message:Given the proposed fixed signature size, It seems better to me that we&#xA;create a SIGHASH_WITNESS_WEIGHT flag as opposed to SIGHASH_WITNESS_DEPTH.&#xA;&#xA;Mark, you seem to be arguing that in general we still want weight&#xA;malleability even with witness depth fixed, but I don&#39;t understand in what&#xA;scenario we would want that.&#xA;&#xA;It strikes me that is most scenarios all parties signing an input would do&#xA;so after an execution path through the script has been agreed upon by all&#xA;parties, in which case the witness weight can be fixed.&#xA;In rare cases where the smart contract requires that some parties sign in&#xA;advance of the decision about the execution path (for example, I&#39;m thinking&#xA;about delegation here, but I want to keep my remarks general), we wouldn&#39;t&#xA;want to fix the witness depth either.&#xA;&#xA;A SIGHASH_WITNESS_WEIGHT would prevent all possible malleability that would&#xA;modify the transaction&#39;s fee/weight priority (at least for that one input),&#xA;and greatly reduce the overall attack surface of witness malleability&#xA;issues.&#xA;&#xA;On Sun, Oct 1, 2017 at 1:04 AM, Mark Friedenbach via bitcoin-dev &lt;&#xA;bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&#xA;&gt; Clean stack should be eliminated for other possible future uses, the most&#xA;&gt; obvious of which is recursive tail-call for general computation capability.&#xA;&gt; I’m not arguing for that at this time, just arguing that we shouldn’t&#xA;&gt; prematurely cut off an easy implementation of such should we want to. Clean&#xA;&gt; stack must still exist as policy for future soft-fork safety, but being a&#xA;&gt; consensus requirement was only to avoid witness malleability, which&#xA;&gt; committing to the size of the witness also accomplishes.&#xA;&gt;&#xA;&gt; Committing to the number of witness elements is fully sufficient, and&#xA;&gt; using the number of elements avoids problems of not knowing the actual size&#xA;&gt; in bytes at the time of signing, e.g. because the witness contains a merkle&#xA;&gt; proof generated by another party from an unbalanced tree, and unbalanced&#xA;&gt; trees are expected to be common (so that elements can be placed higher in&#xA;&gt; the tree in accordance with their higher expected probability of usage).&#xA;&gt; Other future extensions might also have variable-length proofs.&#xA;&gt;&#xA;&gt; &gt; On Sep 30, 2017, at 7:47 PM, Luke Dashjr &lt;luke at dashjr.org&gt; wrote:&#xA;&gt; &gt;&#xA;&gt; &gt; Should it perhaps commit to the length of the serialised witness data&#xA;&gt; instead&#xA;&gt; &gt; or additionally? Now that signatures are no longer variable-length,&#xA;&gt; that&#39;d be&#xA;&gt; &gt; possible...&#xA;&gt; &gt;&#xA;&gt; &gt; As far as tail-call needs are concerned, CLEANSTACK wouldn&#39;t have been&#xA;&gt; checked&#xA;&gt; &gt; until AFTER the tail-call in the first draft. But I suppose eliminating&#xA;&gt; it for&#xA;&gt; &gt; other possible future purposes is still useful.&#xA;&gt; &gt;&#xA;&gt; &gt; Luke&#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/20171001/61186661/attachment.html&gt;</html></oembed>