<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <updated>2023-06-09T12:21:05Z</updated>
  <generator>https://yabu.me</generator>

  <title>Nostr notes by Ethan Heilman [ARCHIVE]</title>
  <author>
    <name>Ethan Heilman [ARCHIVE]</name>
  </author>
  <link rel="self" type="application/atom+xml" href="https://yabu.me/npub1gaszwl7qd0tjmnwcaamgzzgsmzzjlvle6kz0td66pwa8z69vsxsqxgac47.rss" />
  <link href="https://yabu.me/npub1gaszwl7qd0tjmnwcaamgzzgsmzzjlvle6kz0td66pwa8z69vsxsqxgac47" />
  <id>https://yabu.me/npub1gaszwl7qd0tjmnwcaamgzzgsmzzjlvle6kz0td66pwa8z69vsxsqxgac47</id>
  <icon></icon>
  <logo></logo>




  <entry>
    <id>https://yabu.me/nevent1qqsgdkyjfmd7mlc6laju4ne3f7wtkgepmga9kn0y968jzs56pk8sgsszyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qsjuppc</id>
    
      <title type="html">📅 Original date posted:2019-10-03 📝 Original message: To ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsgdkyjfmd7mlc6laju4ne3f7wtkgepmga9kn0y968jzs56pk8sgsszyprkqfmlcp4awtwdmrhhdqgfzrvg2tanl82cfadhtg9m5utg4jq6qsjuppc" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs06257vu28ssuxhs03kdfyvfu57306tx0za2v0amjhj09u0qjn96sg648ft&#39;&gt;nevent1q…48ft&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-10-03&lt;br/&gt;📝 Original message:&lt;br/&gt;To avoid derailing the NO_INPUT conversation, I have changed the&lt;br/&gt;subject to OP_CAT.&lt;br/&gt;&lt;br/&gt;Responding to:&lt;br/&gt;&amp;#34;&amp;#34;&amp;#34;&lt;br/&gt;* `SIGHASH` flags attached to signatures are a misdesign, sadly&lt;br/&gt;retained from the original BitCoin 0.1.0 Alpha for Windows design, on&lt;br/&gt;par with:&lt;br/&gt;[..]&lt;br/&gt;* `OP_CAT` and `OP_MULT` and `OP_ADD` and friends&lt;br/&gt;[..]&lt;br/&gt;&amp;#34;&amp;#34;&amp;#34;&lt;br/&gt;&lt;br/&gt;OP_CAT is an extremely valuable op code. I understand why it was&lt;br/&gt;removed as the situation at the time with scripts was dire. However&lt;br/&gt;most of the protocols I&amp;#39;ve wanted to build on Bitcoin run into the&lt;br/&gt;limitation that stack values can not be concatenated. For instance&lt;br/&gt;TumbleBit would have far smaller transaction sizes if OP_CAT was&lt;br/&gt;supported in Bitcoin. If it happens to me as a researcher it is&lt;br/&gt;probably holding other people back as well. If I could wave a magic&lt;br/&gt;wand and turn on one of the disabled op codes it would be OP_CAT.  Of&lt;br/&gt;course with the change that size of each concatenated value must be 64&lt;br/&gt;Bytes or less.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Tue, Oct 1, 2019 at 10:04 PM ZmnSCPxj via bitcoin-dev&lt;br/&gt;&amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Good morning lists,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Let me propose the below radical idea:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * `SIGHASH` flags attached to signatures are a misdesign, sadly retained from the original BitCoin 0.1.0 Alpha for Windows design, on par with:&lt;br/&gt;&amp;gt;   * 1 RETURN&lt;br/&gt;&amp;gt;   * higher-`nSequence` replacement&lt;br/&gt;&amp;gt;   * DER-encoded pubkeys&lt;br/&gt;&amp;gt;   * unrestricted `scriptPubKey`&lt;br/&gt;&amp;gt;   * Payee-security-paid-by-payer (i.e. lack of P2SH)&lt;br/&gt;&amp;gt;   * `OP_CAT` and `OP_MULT` and `OP_ADD` and friends&lt;br/&gt;&amp;gt;   * transaction malleability&lt;br/&gt;&amp;gt;   * probably many more&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So let me propose the more radical excision, starting with SegWit v1:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Remove `SIGHASH` from signatures.&lt;br/&gt;&amp;gt; * Put `SIGHASH` on public keys.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Public keys are now encoded as either 33-bytes (implicit `SIGHASH_ALL`) or 34-bytes (`SIGHASH` byte, followed by pubkey type, followed by pubkey coordinate).&lt;br/&gt;&amp;gt; `OP_CHECKSIG` and friends then look at the *public key* to determine sighash algorithm rather than the signature.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As we expect public keys to be indirectly committed to on every output `scriptPubKey`, this is automatically output tagging to allow particular `SIGHASH`.&lt;br/&gt;&amp;gt; However, we can then utilize the many many ways to hide public keys away until they are needed, exemplified in MAST-inside-Taproot.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I propose also the addition of the opcode:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     &amp;lt;sighash&amp;gt; &amp;lt;pubkey&amp;gt; OP_SETPUBKEYSIGHASH&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * `sighash` must be one byte.&lt;br/&gt;&amp;gt; * `pubkey` may be the special byte `0x1`, meaning &amp;#34;just use the Taproot internal pubkey&amp;#34;.&lt;br/&gt;&amp;gt; * `pubkey` may be 33-byte public key, in which case the `sighash` byte is just prepended to it.&lt;br/&gt;&amp;gt; * `pubkey` may be 34-byte public key with sighash, in which case the first byte is replaced with `sighash` byte.&lt;br/&gt;&amp;gt; * If `sighash` is `0x00` then the result is a 33-byte public key (the sighash byte is removed) i.e. `SIGHASH_ALL` implicit.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This retains the old feature where the sighash is selected at time-of-spending rather than time-of-payment.&lt;br/&gt;&amp;gt; This is done by using the script:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     &amp;lt;pubkey&amp;gt; OP_SETPUBKEYSIGHASH OP_CHECKSIG&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Then the sighash can be put in the witness stack after the signature, letting the `SIGHASH` flag be selected at time-of-signing, but only if the SCRIPT specifically is formed to do so.&lt;br/&gt;&amp;gt; This is malleability-safe as the signature still commits to the `SIGHASH` it was created for.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; However, by default, public keys will not have an attached `SIGHASH` byte, implying `SIGHASH_ALL` (and disallowing-by-default non-`SIGHASH_ALL`).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This removes the problems with `SIGHASH_NONE` `SIGHASH_SINGLE`, as they are allowed only if the output specifically says they are allowed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Would this not be a superior solution?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; ZmnSCPxj&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;
    </content>
    <updated>2023-06-09T12:56:25Z</updated>
  </entry>

</feed>