<oembed><type>rich</type><version>1.0</version><author_name>npub1tfk373zg9dnmtvxnpnq7s2dkdgj37rwfj3yrwld7830qltmv8qps8rfq0n</author_name><author_url>https://nostr.ae/npub1tfk373zg9dnmtvxnpnq7s2dkdgj37rwfj3yrwld7830qltmv8qps8rfq0n</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2017-09-30&#xA;📝 Original message:I&#39;ve put together a first draft for what I hope to be a good next step for &#xA;Segwit and Bitcoin scripting:&#xA;    https://github.com/luke-jr/bips/blob/witnessv1/bip-witnessv1.mediawiki&#xA;&#xA;This introduces 5 key changes:&#xA;&#xA;1. Minor versions for witnesses, inside the witness itself. Essentially the &#xA;witness [major] version 1 simply indicates the witness commitment is SHA256d, &#xA;and nothing more.&#xA;&#xA;The remaining two are witness version 1.0 (major 1, minor 0):&#xA;&#xA;2. As previously discussed, undefined opcodes immediately cause the script to &#xA;exit with success, making future opcode softforks a lot more flexible.&#xA;&#xA;3. If the final stack element is not exactly true or false, it is interpreted &#xA;as a tail-call Script and executed. (Credit to Mark Friedenbach)&#xA;&#xA;4. A new shorter fixed-length signature format, eliminating the need to guess &#xA;the signature size in advance. All signatures are 65 bytes, unless a condition &#xA;script is included (see #5).&#xA;&#xA;5. The ability for signatures to commit to additional conditions, expressed in &#xA;the form of a serialized Script in the signature itself. This would be useful &#xA;in combination with OP_CHECKBLOCKATHEIGHT (BIP 115), hopefully ending the &#xA;whole replay protection argument by introducing it early to Bitcoin before any &#xA;further splits.&#xA;&#xA;This last part is a big ugly right now: the signature must commit to the &#xA;script interpreter flags and internal &#34;sigversion&#34;, which basically serve the &#xA;same purpose. The reason for this, is that otherwise someone could move the &#xA;signature to a different context in an attempt to exploit differences in the &#xA;various Script interpretation modes. I don&#39;t consider the BIP deployable &#xA;without this getting resolved, but I&#39;m not sure what the best approach would &#xA;be. Maybe it should be replaced with a witness [major] version and witness &#xA;stack?&#xA;&#xA;There is also draft code implementing [the consensus side of] this:&#xA;    https://github.com/bitcoin/bitcoin/compare/master...luke-jr:witnessv1&#xA;&#xA;Thoughts? Anything I&#39;ve overlooked / left missing that would be &#xA;uncontroversial and desirable? (Is any of this unexpectedly controversial for &#xA;some reason?)&#xA;&#xA;Luke</html></oembed>