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