<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <updated></updated>
  <generator>https://nostr.ae</generator>

  <title>Nostr notes by </title>
  <author>
    <name></name>
  </author>
  <link rel="self" type="application/atom+xml" href="https://nostr.ae/npub10dtvayys2r7qj8vkzer6nlqm250e7hnmzk5mdkdwdrmfavm72ypqvt2fnk.rss" />
  <link href="https://nostr.ae/npub10dtvayys2r7qj8vkzer6nlqm250e7hnmzk5mdkdwdrmfavm72ypqvt2fnk" />
  <id>https://nostr.ae/npub10dtvayys2r7qj8vkzer6nlqm250e7hnmzk5mdkdwdrmfavm72ypqvt2fnk</id>
  <icon></icon>
  <logo></logo>




  <entry>
    <id>https://nostr.ae/nevent1qqs08w9tcpcwdw6hy4lpp4xg3ettvrk4ae8qr9suneqy3snf5948qzczypa4dn5sjpg0czgajcty020urd23l8670v26ndke4e50d84n0egsy872xx5</id>
    
      <title type="html">📅 Original date posted:2017-11-13 📝 Original ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs08w9tcpcwdw6hy4lpp4xg3ettvrk4ae8qr9suneqy3snf5948qzczypa4dn5sjpg0czgajcty020urd23l8670v26ndke4e50d84n0egsy872xx5" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsx40d6drus7sdcg0chh2u6dn58xs64d8usyyqhv8y7fkvywucavygyjyavw&#39;&gt;nevent1q…yavw&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2017-11-13&lt;br/&gt;📝 Original message:Totally agree something like this required..&lt;br/&gt;&lt;br/&gt;I&amp;#39;ve been burned.&lt;br/&gt;&lt;br/&gt;But I like the &amp;#39;old&amp;#39; idea of putting the hash of a block that MUST be on&lt;br/&gt;the chain that this txn can eventually be added to. If the hash is not a&lt;br/&gt;valid block on the chain, the txn can&amp;#39;t be added.&lt;br/&gt;&lt;br/&gt;It means you can choose exactly which forks you want to allow your txn on,&lt;br/&gt;pre-fork for both, post-fork for only one, and gets round the issue of who&lt;br/&gt;gets to decide the nForkid value.. since you don&amp;#39;t need one. Also, all the&lt;br/&gt;old outputs work fine, and LN not an issue.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m missing why this scheme would be better ?&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Nov 13, 2017 15:35, &amp;#34;Jacob Eliosoff via bitcoin-dev&amp;#34; &amp;lt;&lt;br/&gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; This is actually incorrect. There are two transactions involved in LN. The&lt;br/&gt;&amp;gt;&amp;gt; funding transaction, which opens a payment channel, and a commitment&lt;br/&gt;&amp;gt;&amp;gt; transaction, which closes the channel when broadcasted to the network (the&lt;br/&gt;&amp;gt;&amp;gt; cooperative closing transaction can be considered a commitment transaction&lt;br/&gt;&amp;gt;&amp;gt; in a loose sense).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Now you want to protect the funding transaction, as otherwise you would&lt;br/&gt;&amp;gt;&amp;gt; be subject to a replay-attack on all *past* forks. So you will set&lt;br/&gt;&amp;gt;&amp;gt; `nForkId&amp;gt;=1` for the funding transaction, making this payment channel&lt;br/&gt;&amp;gt;&amp;gt; non-existent on any *past* forks. However, if during the lifetime of the&lt;br/&gt;&amp;gt;&amp;gt; payment channel another fork happens, the payment channel exists for both&lt;br/&gt;&amp;gt;&amp;gt; tokens. So for the commitment transaction, you will have `nForkId=0`,&lt;br/&gt;&amp;gt;&amp;gt; making it valid on both of these chains. While this `nForkId` is valid on&lt;br/&gt;&amp;gt;&amp;gt; all chains, the parent transaction it tries to spend (the funding&lt;br/&gt;&amp;gt;&amp;gt; transaction) does only exist on two chains, the original one you created&lt;br/&gt;&amp;gt;&amp;gt; the channel for and the one that forked away.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks for the clarification.  How would a tx specify a constraint like&lt;br/&gt;&amp;gt; &amp;#34;nForkId&amp;gt;=1&amp;#34;?  I was thinking of it just as a number set on the tx.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Also note that since forks form a partial order, but IDs (numbers) form a&lt;br/&gt;&amp;gt; total order, &amp;#34;&amp;gt;=&amp;#34; will miss some cases.  Eg, suppose BCH had forked with&lt;br/&gt;&amp;gt; nForkId 2, and then you set up a LN funding tx on BCH with nForkId&amp;gt;=2, and&lt;br/&gt;&amp;gt; then Segwit2x forked (from BTC!) with nForkId 3.  The BCH funding tx would&lt;br/&gt;&amp;gt; be valid on Segwit2x.  This is more of a fundamental problem than a bug -&lt;br/&gt;&amp;gt; to avoid it you&amp;#39;d have to get into stuff like making each fork reference&lt;br/&gt;&amp;gt; its parent-fork&amp;#39;s first block or something, someone has written about&lt;br/&gt;&amp;gt; this...&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Mon, Nov 13, 2017 at 5:03 AM, Mats Jerratsch &amp;lt;mats at blockchain.com&amp;gt;&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; OK, so nForkId 0 is exactly the &amp;#34;valid on all chains&amp;#34; specifier I was&lt;br/&gt;&amp;gt;&amp;gt; asking about, cool.  And your LN example (and nLockTime txs in general)&lt;br/&gt;&amp;gt;&amp;gt; illustrate why it&amp;#39;s preferable to implement a generic replay protection&lt;br/&gt;&amp;gt;&amp;gt; scheme like yours *in advance*, rather than before each fork: all ad hoc&lt;br/&gt;&amp;gt;&amp;gt; RP schemes I know of break old txs on one of the chains, even when that&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt; not desirable - ie, they offer no wildcard like nForkId 0.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Exactly!&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; One comment on your LN example: users would have to take note that&lt;br/&gt;&amp;gt;&amp;gt; nForkId 0 txs would be valid not only on future forks, but on *past*&lt;br/&gt;&amp;gt;&amp;gt; forks too.  Eg, if BCH had been deployed with nForkId 2, then a user&lt;br/&gt;&amp;gt;&amp;gt; setting up BTC LN txs now with nForkId 0 would have to be aware that those&lt;br/&gt;&amp;gt;&amp;gt; txs would be valid for BCH too.  Of course the user could avoid this by&lt;br/&gt;&amp;gt;&amp;gt; funding from a BTC-only address, but it is a potential minor pitfall of&lt;br/&gt;&amp;gt;&amp;gt; nForkId 0.  (Which I don&amp;#39;t see any clean way around.)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; This is actually incorrect. There are two transactions involved in LN.&lt;br/&gt;&amp;gt;&amp;gt; The funding transaction, which opens a payment channel, and a commitment&lt;br/&gt;&amp;gt;&amp;gt; transaction, which closes the channel when broadcasted to the network (the&lt;br/&gt;&amp;gt;&amp;gt; cooperative closing transaction can be considered a commitment transaction&lt;br/&gt;&amp;gt;&amp;gt; in a loose sense).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Now you want to protect the funding transaction, as otherwise you would&lt;br/&gt;&amp;gt;&amp;gt; be subject to a replay-attack on all *past* forks. So you will set&lt;br/&gt;&amp;gt;&amp;gt; `nForkId&amp;gt;=1` for the funding transaction, making this payment channel&lt;br/&gt;&amp;gt;&amp;gt; non-existent on any *past* forks. However, if during the lifetime of the&lt;br/&gt;&amp;gt;&amp;gt; payment channel another fork happens, the payment channel exists for both&lt;br/&gt;&amp;gt;&amp;gt; tokens. So for the commitment transaction, you will have `nForkId=0`,&lt;br/&gt;&amp;gt;&amp;gt; making it valid on both of these chains. While this `nForkId` is valid on&lt;br/&gt;&amp;gt;&amp;gt; all chains, the parent transaction it tries to spend (the funding&lt;br/&gt;&amp;gt;&amp;gt; transaction) does only exist on two chains, the original one you created&lt;br/&gt;&amp;gt;&amp;gt; the channel for and the one that forked away.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&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;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20171113/452ebe4c/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20171113/452ebe4c/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T18:07:37Z</updated>
  </entry>

</feed>