{"type":"rich","version":"1.0","author_name":"npub1r3san9v5njl6798hvauyu9ntm6r9c7u8s0t65wls58gpfdcvqp5sa48d0u","author_url":"https://nostr.ae/npub1r3san9v5njl6798hvauyu9ntm6r9c7u8s0t65wls58gpfdcvqp5sa48d0u","provider_name":"njump","provider_url":"https://nostr.ae","html":"📅 Original date posted:2017-09-22\n📝 Original message:\u003e On Sep 22, 2017, at 1:32 PM, Sergio Demian Lerner \u003csergio.d.lerner at gmail.com\u003e wrote:\n\u003e \n\u003e \n\u003e \n\u003e There are other solutions to this problem that could have been taken\n\u003e instead, such as committing to the number of items or maximum size of\n\u003e the stack as part of the sighash data, but cleanstack was the approach\n\u003e taken. \n\u003e \n\u003e The lack of signed maximum segwit stack size was one of the objections to segwit I presented last year. This together with the unlimited segwit stack size.\n\u003e \n\u003e However, committing to the maximum stack size (in bytes) for an input is tricky. The only place where this could be packed is in sequence_no, with a soft-fork. E.g. when transaction version is 2 and and only when lock_time is zero.\n\u003e \n\u003e For transactions with locktime \u003e0, we could soft-fork so transactions add a last zero-satoshi output whose scriptPub contains OP_RETURN and followed 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 a 2.5% overhead.\n\nThere’s no need to put it in the transaction itself. You put it in the witness and it is either committed to as part of the witness (in which case it has to hold for all possible spend paths), or at spend time by including it in the data signed by CHECKSIG.\n\n-------------- next part --------------\nAn HTML attachment was scrubbed...\nURL: \u003chttp://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170922/9800edc4/attachment.html\u003e"}
