<oembed><type>rich</type><version>1.0</version><author_name>npub1fvuxqdqg7klqqgy3yy8gdxjv4phu92sll5y8zqm2qe5qdrhxymhqf3vq7f</author_name><author_url>https://nostr.ae/npub1fvuxqdqg7klqqgy3yy8gdxjv4phu92sll5y8zqm2qe5qdrhxymhqf3vq7f</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2017-09-22&#xA;📝 Original message:But generally before one signs a transaction one does not know the&#xA;signature size (which may be variable). One can only estimate the maximum&#xA;size.&#xA;&#xA;On Fri, Sep 22, 2017 at 6:11 PM, Mark Friedenbach &lt;mark at friedenbach.org&gt;&#xA;wrote:&#xA;&#xA;&gt;&#xA;&gt; On Sep 22, 2017, at 1:32 PM, Sergio Demian Lerner &lt;&#xA;&gt; sergio.d.lerner at gmail.com&gt; wrote:&#xA;&gt;&#xA;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; There are other solutions to this problem that could have been taken&#xA;&gt;&gt; instead, such as committing to the number of items or maximum size of&#xA;&gt;&gt; the stack as part of the sighash data, but cleanstack was the approach&#xA;&gt;&gt; taken.&#xA;&gt;&#xA;&gt;&#xA;&gt; The lack of signed maximum segwit stack size was one of the objections to&#xA;&gt; segwit I presented last year. This together with the unlimited segwit stack&#xA;&gt; size.&#xA;&gt;&#xA;&gt; However, committing to the maximum stack size (in bytes) for an input is&#xA;&gt; tricky. The only place where this could be packed is in sequence_no, with a&#xA;&gt; soft-fork. E.g. when transaction version is 2 and and only when lock_time&#xA;&gt; is zero.&#xA;&gt;&#xA;&gt; For transactions with locktime &gt;0, we could soft-fork so transactions add&#xA;&gt; a last zero-satoshi output whose scriptPub contains OP_RETURN and followed&#xA;&gt; by N VarInts, containing the maximum stack size of each input.&#xA;&gt; Normally, for a 400 byte, 2-input transaction, this will add 11 bytes, or&#xA;&gt; a 2.5% overhead.&#xA;&gt;&#xA;&gt;&#xA;&gt; There’s no need to put it in the transaction itself. You put it in the&#xA;&gt; witness and it is either committed to as part of the witness (in which case&#xA;&gt; it has to hold for all possible spend paths), or at spend time by including&#xA;&gt; it in the data signed by CHECKSIG.&#xA;&gt;&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170922/87c83dee/attachment.html&gt;</html></oembed>