<oembed><type>rich</type><version>1.0</version><author_name>npub1mlpmsc5sm93tw2fp2dhhuwmxcqm59wz6hjg5g3afq5rucfll3f9sh4yf8d</author_name><author_url>https://nostr.ae/npub1mlpmsc5sm93tw2fp2dhhuwmxcqm59wz6hjg5g3afq5rucfll3f9sh4yf8d</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2017-11-11&#xA;📝 Original message:OK, so nForkId 0 is exactly the &#34;valid on all chains&#34; specifier I was&#xA;asking about, cool.  And your LN example (and nLockTime txs in general)&#xA;illustrate why it&#39;s preferable to implement a generic replay protection&#xA;scheme like yours *in advance*, rather than before each fork: all ad hoc RP&#xA;schemes I know of break old txs on one of the chains, even when that&#39;s not&#xA;desirable - ie, they offer no wildcard like nForkId 0.&#xA;&#xA;One comment on your LN example: users would have to take note that nForkId&#xA;0 txs would be valid not only on future forks, but on *past* forks too.&#xA;Eg, if BCH had been deployed with nForkId 2, then a user setting up BTC LN&#xA;txs now with nForkId 0 would have to be aware that those txs would be valid&#xA;for BCH too.  Of course the user could avoid this by funding from a&#xA;BTC-only address, but it is a potential minor pitfall of nForkId 0.  (Which&#xA;I don&#39;t see any clean way around.)&#xA;&#xA;&#xA;On Fri, Nov 10, 2017 at 6:28 AM, Mats Jerratsch &lt;mats at blockchain.com&gt; wrote:&#xA;&#xA;&gt; I guess I wasn&#39;t clear on the wildcard, `nForkId=0`&#xA;&gt;&#xA;&gt; This proposal puts Bitcoin at `nForkId=1`, with the purpose of having&#xA;&gt; `nForkId=0` valid on *all* future forks. This means you can create a&#xA;&gt; `nLockTime` transaction, delete the private key and still be assured to not&#xA;&gt; lose potential future tokens.&#xA;&gt;&#xA;&gt; In theory `nForkId=0` could be used for an address too, the sending wallet&#xA;&gt; should display a warning message about unknown side effects though. This&#xA;&gt; address would be future-safe, and you can put it into a safe-deposit box&#xA;&gt; (even though I see little reason to back up an _address_. You would always&#xA;&gt; back up a _private key_, which translates into funds on any fork.)&#xA;&gt;&#xA;&gt; Furthermore, `nForkId=0` can be used for L2 applications. Let&#39;s say Alice&#xA;&gt; and Bob open a payment channel. One week later, project X decides to fork&#xA;&gt; the network into a new token, implementing a custom way of providing strong&#xA;&gt; two-way replay protection. The protocol Alice and Bob use for the payment&#xA;&gt; channel has not implemented this new form of replay protection. Alice and&#xA;&gt; Bob now have to make a choice:&#xA;&gt;&#xA;&gt; (1) Ignore this new token. This comes with an evaluation of how much this&#xA;&gt; new token could be worth in the future. They will continue normal channel&#xA;&gt; operation, knowing that their funds on the other branch will be locked up&#xA;&gt; until eternity. When they close their payment channel, the closing&#xA;&gt; transaction will get rejected from the other network, because it&#39;s not&#xA;&gt; following the format for replay protected transactions.&#xA;&gt;&#xA;&gt; (2) Close the payment channel before the fork. The transaction, which&#xA;&gt; closes the payment channel has to be mined before the fork, potentially&#xA;&gt; paying a higher-than-normal fee.&#xA;&gt;&#xA;&gt; With this proposal implemented, there are two additional choices&#xA;&gt;&#xA;&gt; (3) Create the commitment transactions with `nForkId=0`. This ensures that&#xA;&gt; when the channel gets closed, funds on other chains are released&#xA;&gt; accordingly. This also means that after the fork, payments on the channel&#xA;&gt; move both, the original token and the new token. Potentially, Alice and Bob&#xA;&gt; want to wait before further transacting on the channel, to see if the token&#xA;&gt; has substantial value. If it has, they can *then* close the channel and&#xA;&gt; open a new channel again. (Note: The funding transaction can use a specific&#xA;&gt; `nForkId`, preventing you from locking up multiple coins when funding the&#xA;&gt; channel, but you can choose to settle with `nForkId=0` to not lock up&#xA;&gt; future coins)&#xA;&gt;&#xA;&gt; (4) Make the protocol aware of different `nForkId`. After the fork, the&#xA;&gt; participants can chose to *only* close the payment channel on the new&#xA;&gt; token, making the payment channel Bitcoin-only again. This is the preferred&#xA;&gt; option, as it means no disruption to the original network.&#xA;&gt;&#xA;&gt; &gt; I like the idea of specifying the fork in bech32 [0]. On the other hand,&#xA;&gt; the standard already has a human readable part. Perhaps the human readable&#xA;&gt; part can be used as the fork id?&#xA;&gt;&#xA;&gt; I was considering this too. On the other hand, it&#39;s only _human readable_&#xA;&gt; because thy bytes used currently encode &#39;bc&#39;. For future forks, this would&#xA;&gt; just be two random letters than, but potentially acceptable.&#xA;&gt;&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20171111/9fb7d5ba/attachment-0001.html&gt;</html></oembed>