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

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




  <entry>
    <id>https://yabu.me/nevent1qqsrdstsc6lusnrznapxhucqd0sxk7dpsntha7uext9j48y229d95zgzypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qssdxjy2</id>
    
      <title type="html">📅 Original date posted:2020-04-23 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsrdstsc6lusnrznapxhucqd0sxk7dpsntha7uext9j48y229d95zgzypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qssdxjy2" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsruhrxcwa86rs4asrmd82pe2t4n3u09hfj7ggsekqdxktstl9x3wsy3twsk&#39;&gt;nevent1q…twsk&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-04-23&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Laolu,&lt;br/&gt;&lt;br/&gt;Thanks for the response :)&lt;br/&gt;&lt;br/&gt;I agree that some more framing probably would have been good to have in my&lt;br/&gt;update.&lt;br/&gt;&lt;br/&gt;First, I want to clarify that my intention is not to implement a PTLC-based&lt;br/&gt;lightning network on top of ECDSA adaptor signatures, as I do believe that&lt;br/&gt;using Schnorr will be superior, but rather I wish to get some PoC sandbox&lt;br/&gt;with which to start implementing and testing out the long list of currently&lt;br/&gt;theoretical proposals surrounding PTLCs, most of which are implementation&lt;br/&gt;agnostic (to a degree anyway). I think it would be super beneficial to have&lt;br/&gt;more fleshed out with respect to what some challenges of a Payment Point LN&lt;br/&gt;are going to be than we understand now, before Schnorr is implemented and&lt;br/&gt;it is time to commit to some PTLC scheme for real.&lt;br/&gt;&lt;br/&gt;Second, I agree that I&amp;#39;ve probably understated somewhat the changes that&lt;br/&gt;will be needed in most implementations as I was mostly thinking about what&lt;br/&gt;would need to change in the BOLTs, which does actually seem relatively&lt;br/&gt;minimal (although as you mention, these minimal changes to the BOLTs do&lt;br/&gt;trigger large changes in many implementations). Also, good point on how&lt;br/&gt;BOLT 11 (invoicing) will have to be altered as well, must&amp;#39;ve slipped my&lt;br/&gt;mind.&lt;br/&gt;&lt;br/&gt;Best,&lt;br/&gt;Nadav&lt;br/&gt;&lt;br/&gt;On Wed, Apr 22, 2020 at 8:17 PM Olaoluwa Osuntokun &amp;lt;laolu32 at gmail.com&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi Nadav,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks for the updates! Super cool to see this concept continue to evolve&lt;br/&gt;&amp;gt; and integrate new technologies as they pop up.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I believe this would only require a few changes to existing nodes:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Rather than a &amp;#34;few changes&amp;#34;, this would to date be the largest&lt;br/&gt;&amp;gt; network-level&lt;br/&gt;&amp;gt; update undertaken to the Lightning Network thus far. In the past, we rolled&lt;br/&gt;&amp;gt; out the new onion blob format (which enables changes like this), but none&lt;br/&gt;&amp;gt; of&lt;br/&gt;&amp;gt; the intermediate nodes actually need to modify their behavior. New payment&lt;br/&gt;&amp;gt; types like MPP&#43;AMP only needed the _end points_ to update making this an&lt;br/&gt;&amp;gt; end-to-end update that has been rolled out so far in a de-synchronized&lt;br/&gt;&amp;gt; manner.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Re-phrasing deploying this requires changes to: the core channel state&lt;br/&gt;&amp;gt; machine (the protocol we use to make commitment updates), HTLC scripts,&lt;br/&gt;&amp;gt; on-chain HTLC handling and resolution, path finding algorithms (to only see&lt;br/&gt;&amp;gt; out the new PTLC-enabled nodes), invoice changes and onion blob processing.&lt;br/&gt;&amp;gt; I&amp;#39;d caution against underestimating how long all of this will take in&lt;br/&gt;&amp;gt; practice, and the degree of synchronization required to pull it all off&lt;br/&gt;&amp;gt; properly.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For a few years now the question we&amp;#39;ve all been pondering is: do we wait&lt;br/&gt;&amp;gt; for&lt;br/&gt;&amp;gt; scnhorr to roll out multi-hop locks, or just use the latest ECDSA based&lt;br/&gt;&amp;gt; technique? As dual deployment is compatible (we can make the onion blobs&lt;br/&gt;&amp;gt; for&lt;br/&gt;&amp;gt; both types the same), a path has always existed to first roll out with the&lt;br/&gt;&amp;gt; latest ECDSA based technique then follow up later to roll out the schnorr&lt;br/&gt;&amp;gt; version as well. However there&amp;#39;s also a risk here as depending on how&lt;br/&gt;&amp;gt; quickly things can be rolled out, schnorr may become available&lt;br/&gt;&amp;gt; mid-development, which would possibly cause us to reconsider the ECDSA path&lt;br/&gt;&amp;gt; and have the network purely use scnhorr to make things nice and uniform.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Zooming out for a bit, the solution space of &amp;#34;how channels can look post&lt;br/&gt;&amp;gt; scriptless-scripts &#43; taproot&amp;#34; is rather large [1], and the addition of this&lt;br/&gt;&amp;gt; new technique allows for an even larger set of deployment possibilities.&lt;br/&gt;&amp;gt; This latest ECDSA variant is much simpler than the prior ones (which had a&lt;br/&gt;&amp;gt; few rounds of more involved ZKPs), but since it still uses OP_CMS, it can&amp;#39;t&lt;br/&gt;&amp;gt; be used to modify the funding output.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1]:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002375.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002375.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; -- Laolu&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Wed, Apr 22, 2020 at 8:13 AM Nadav Kohen &amp;lt;nadav at suredbits.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Hello all,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I&amp;#39;d like to give an update on the current state of thinking and coding&lt;br/&gt;&amp;gt;&amp;gt; surrounding replacing Hash-TimeLock Contracts (HTLCs) with Point-TimeLock&lt;br/&gt;&amp;gt;&amp;gt; Contracts (PTLCs) (aka Payment Hashes -&amp;gt; Payment Points) in hopes of&lt;br/&gt;&amp;gt;&amp;gt; sparking interest, discussion, development, etc.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; We Want Payment Points!&lt;br/&gt;&amp;gt;&amp;gt; -----------------------&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Using point-locks (in PTLCs) instead of hash-locks (in HTLCs) for&lt;br/&gt;&amp;gt;&amp;gt; lightning payments is an all around improvement. HTLCs require the use of&lt;br/&gt;&amp;gt;&amp;gt; the same hash across payment routes (barring fancy ZKPs which are inferior&lt;br/&gt;&amp;gt;&amp;gt; to PTLCs) while PTLCs allow for payment de-correlation along routes. For an&lt;br/&gt;&amp;gt;&amp;gt; introduction to the topic, see&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/payment-points-part-1/&#34;&gt;https://suredbits.com/payment-points-part-1/&lt;/a&gt;.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; In addition to improving privacy in this way and protecting against&lt;br/&gt;&amp;gt;&amp;gt; wormhole attacks, PTLC-based lightning channels open the door to a large&lt;br/&gt;&amp;gt;&amp;gt; variety of interesting applications that cannot be accomplished with HTLCs:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Stuckless (retry-able) Payments with proof of payment (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/payment-points-part-2-stuckless-payments/&#34;&gt;https://suredbits.com/payment-points-part-2-stuckless-payments/&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Escrow contracts over Lightning (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/payment-points-part-3-escrow-contracts/&#34;&gt;https://suredbits.com/payment-points-part-3-escrow-contracts/&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; High/DLOG AMP (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://docs.google.com/presentation/d/15l4h2_zEY4zXC6n1NqsImcjgA0fovl_lkgkKu1O3QT0/edit#slide=id.g64c15419e7_0_40&#34;&gt;https://docs.google.com/presentation/d/15l4h2_zEY4zXC6n1NqsImcjgA0fovl_lkgkKu1O3QT0/edit#slide=id.g64c15419e7_0_40&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; )&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Stuckless &#43; AMP (an improvement on Boomerang) (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-October/002239.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-October/002239.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; )&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Pay-for-signature (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/payment-points-part-4-selling-signatures/&#34;&gt;https://suredbits.com/payment-points-part-4-selling-signatures/&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Pay-for-commitment (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-September/002166.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-September/002166.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; )&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Monotonic access structures on payment completion (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/payment-points-monotone-access-structures/&#34;&gt;https://suredbits.com/payment-points-monotone-access-structures/&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Ideal Barrier Escrow Implementation (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/payment-points-implementing-barrier-escrows/&#34;&gt;https://suredbits.com/payment-points-implementing-barrier-escrows/&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; And allowing for Barrier Escrows, we can even have&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Atomic multi-payment setup (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/payment-points-and-barrier-escrows/&#34;&gt;https://suredbits.com/payment-points-and-barrier-escrows/&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Lightning Discreet Log Contract (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/discreet-log-contracts-on-lightning-network/&#34;&gt;https://suredbits.com/discreet-log-contracts-on-lightning-network/&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Atomic multi-payment update (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/updating-and-transferring-lightning-payments/&#34;&gt;https://suredbits.com/updating-and-transferring-lightning-payments/&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Lightning Discreet Log Contract Novation/Transfer (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/transferring-lightning-dlcs/&#34;&gt;https://suredbits.com/transferring-lightning-dlcs/&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; There are likely even more things that can be done with Payment Points so&lt;br/&gt;&amp;gt;&amp;gt; make sure to respond if I&amp;#39;ve missed any known ones.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; How Do We Get Payment Points?&lt;br/&gt;&amp;gt;&amp;gt; -----------------------------&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Eventually, once we have Taproot, we can use 2p-Schnorr adaptor&lt;br/&gt;&amp;gt;&amp;gt; signatures in Lightning channels. For a detailed thread by ZmnSCPxj, see&lt;br/&gt;&amp;gt;&amp;gt; here&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002375.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002375.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; In the meantime, Lloyd has written about a way to do 1p-ECDSA adaptor&lt;br/&gt;&amp;gt;&amp;gt; sigs (&lt;a href=&#34;https://github.com/LLFourn/one-time-VES&#34;&gt;https://github.com/LLFourn/one-time-VES&lt;/a&gt;) which can be paired with&lt;br/&gt;&amp;gt;&amp;gt; OP_CHECKMULTISIG to allows us to execute PTLCs on Bitcoin today!&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Nickler has implemented this in a branch of secp256k1 (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://github.com/jonasnick/secp256k1/pull/14&#34;&gt;https://github.com/jonasnick/secp256k1/pull/14&lt;/a&gt;) and I have implemented&lt;br/&gt;&amp;gt;&amp;gt; it in Bouncy Castle in Bitcoin-S with some testing against this branch (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://github.com/nkohen/bitcoin-s-core/tree/bouncy-adaptor&#34;&gt;https://github.com/nkohen/bitcoin-s-core/tree/bouncy-adaptor&lt;/a&gt;). Do note&lt;br/&gt;&amp;gt;&amp;gt; that as nickler states on his PR, &amp;#34;IT IS EXTREMELY DANGEROUS AND RECKLESS&lt;br/&gt;&amp;gt;&amp;gt; TO USE THIS MODULE IN PRODUCTION. DON&amp;#39;T!&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; A demo of an on-chain PTLC I executed using nickler&amp;#39;s implementation on&lt;br/&gt;&amp;gt;&amp;gt; the backend &#43; bitcoin-s can be seen here &lt;a href=&#34;https://youtu.be/w9o4v7Idjno&#34;&gt;https://youtu.be/w9o4v7Idjno&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; And waxwing did a lovely write-up about the crypto itself&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://joinmarket.me/blog/blog/schnorrless-scriptless-scripts/&#34;&gt;https://joinmarket.me/blog/blog/schnorrless-scriptless-scripts/&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I would be very interested in having a fork of (at least) one lightning&lt;br/&gt;&amp;gt;&amp;gt; implementation (or Rust Lightning) to be a proof of concept ECDSA-PTLC node&lt;br/&gt;&amp;gt;&amp;gt; with which we can test and play with the plethora of PTLC-based proposals&lt;br/&gt;&amp;gt;&amp;gt; above.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I believe this would only require a few changes to existing nodes:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 1) update_add_ptlc will have a 32 byte x-coordinate (of a point) rather&lt;br/&gt;&amp;gt;&amp;gt; than a 32 byte hash. Additionally the onion&amp;#39;s hop_data will contain a 32&lt;br/&gt;&amp;gt;&amp;gt; byte scalar tweak for each hop. As per [link multi-hop locks]. The last&lt;br/&gt;&amp;gt;&amp;gt; hop_data will instead include a 32 byte scalar equal to the sum of all&lt;br/&gt;&amp;gt;&amp;gt; tweaks.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 2) commitment_signed will have 162 byte adaptor ptlc_signatures rather&lt;br/&gt;&amp;gt;&amp;gt; than valid (71/72 byte) ECDSA signatures on PTLC-success transactions.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 3) The in-flight outputs on the commitment transaction itself become a&lt;br/&gt;&amp;gt;&amp;gt; little simpler as we no longer need to explicitly check the payment&lt;br/&gt;&amp;gt;&amp;gt; pre-image against a hash. Instead, delete all instances of &amp;#34;OP_HASH160&lt;br/&gt;&amp;gt;&amp;gt; &amp;lt;RIPEMD160(payment_hash)&amp;gt; OP_EQUALVERIFY&amp;#34; in the scripts (leaving the rest&lt;br/&gt;&amp;gt;&amp;gt; the same) and require no pre-image in the witness, only a valid signature.&lt;br/&gt;&amp;gt;&amp;gt; The pre-image check is implicitly enforced by the &amp;lt;remoteptlc_sig&amp;gt; witness&lt;br/&gt;&amp;gt;&amp;gt; since only an adaptor signature was provided by remote so that the payment&lt;br/&gt;&amp;gt;&amp;gt; pre-image is required to create the valid signature (from which the&lt;br/&gt;&amp;gt;&amp;gt; pre-image can be then deduced by comparing adaptor and valid signatures).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; If I&amp;#39;ve missed any other changes that need to happen, do respond with&lt;br/&gt;&amp;gt;&amp;gt; them!&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I hope that as a community we can work towards having a PTLC-based&lt;br/&gt;&amp;gt;&amp;gt; Lightning Network that is safe and stable as soon as possible, and so I&lt;br/&gt;&amp;gt;&amp;gt; encourage further thinking, development and expirementation with PTLCs now&lt;br/&gt;&amp;gt;&amp;gt; so that when Taproot is finally at our disposal we can cleanly start moving&lt;br/&gt;&amp;gt;&amp;gt; towards a more ideal Lightning :)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Best,&lt;br/&gt;&amp;gt;&amp;gt; Nadav&lt;br/&gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&gt;&lt;br/&gt;&amp;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/lightning-dev/attachments/20200423/a75c29ad/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200423/a75c29ad/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T12:59:53Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsgs8y7phupmu0ntlpj0gcm6kgpj0n3an40w7end3v7lz2jrk4c74qzypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qstqr7pe</id>
    
      <title type="html">📅 Original date posted:2020-04-02 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsgs8y7phupmu0ntlpj0gcm6kgpj0n3an40w7end3v7lz2jrk4c74qzypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qstqr7pe" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswkh3v3fz7scv02agfr230u6wxp3jpjm0wqya0hv9nzmu4n2p27jgcyll4m&#39;&gt;nevent1q…ll4m&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-04-02&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning ZmnSCPxj,&lt;br/&gt;&lt;br/&gt;&amp;gt; The consideration is that much of the cost of a channel is with the setup&lt;br/&gt;and teardown --- E could always just reopen the CE channel again later.&lt;br/&gt;&amp;gt; Thus, the cost that E bears in setting up EE and tearing down EE would be&lt;br/&gt;still similar to the cost of losing CE and reestablishing it again.&lt;br/&gt;&amp;gt; Further, any amount it places in the EE channel would be an amount it&lt;br/&gt;could have been using as liquidity on Lightning, but which it cannot use&lt;br/&gt;for forwarding (because it is a channel to nowhere).&lt;br/&gt;&amp;gt; Ultimately, proof-of-closure is an economic mechanism, not an&lt;br/&gt;information-theoretic one.&lt;br/&gt;&lt;br/&gt;Okay, I see what you mean now but I&amp;#39;m still a bit worried due to the&lt;br/&gt;following: although it is true that the same nominal penalty is incurred,&lt;br/&gt;the real economic value for the attacker in channel E-E&amp;#39; is significantly&lt;br/&gt;less than that in A-E, which can be used for routing. As such, a rich&lt;br/&gt;attacker who wishes to crowd out their competition might occasionally open&lt;br/&gt;channels with themselves equal to the value needed to lock up a&lt;br/&gt;competitor&amp;#39;s channels, then do such a payment to themselves (with a high&lt;br/&gt;&amp;#34;hard&amp;#34; locktime) and close their temporary channel, but still hold their&lt;br/&gt;competitor&amp;#39;s funds hostage, and still have enough liquidity in the channels&lt;br/&gt;they didn&amp;#39;t have to close in order to facilitate all routing that was done&lt;br/&gt;by their competitor. Furthermore this route (for self-payment) could attack&lt;br/&gt;multiple competitors at the same time (likely leaving some funds to all but&lt;br/&gt;the least liquid competitor).&lt;br/&gt;&lt;br/&gt;I could be missing something, but it seems to me like the proposal to close&lt;br/&gt;channels after a soft timeout unless non-cooperation can be proven upstream&lt;br/&gt;adds a cost to the attacker of two on-chain transactions, which they can&lt;br/&gt;immediately revoke (as they know both pieces to the revocation priv key),&lt;br/&gt;but still allows very long lock-ups of other&amp;#39;s funds (with a 10x multiplier&lt;br/&gt;if they choose a long route). I do think that this is certainly an&lt;br/&gt;improvement on what we have now but I&amp;#39;m not sure it properly punishes the&lt;br/&gt;attacker in its current form.&lt;br/&gt;&lt;br/&gt;&amp;gt; Since this is a proof-of-***closure***, this is indeed an actual closing&lt;br/&gt;of the channel.&lt;br/&gt;&lt;br/&gt;Ah I see, I was misunderstanding a couple things, but I get it now, makes&lt;br/&gt;sense :)&lt;br/&gt;&lt;br/&gt;Best,&lt;br/&gt;Nadav&lt;br/&gt;&lt;br/&gt;On Wed, Apr 1, 2020 at 7:43 PM ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning Nadav,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Love the idea! I have a couple questions though:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I&amp;#39;m not convinced that &amp;#34;Purely Falsified Proof-Of-Closure&amp;#34; aren&amp;#39;t&lt;br/&gt;&amp;gt; effective. Consider a similar network to the one you described where we&lt;br/&gt;&amp;gt; have channels A - B - C and A - E - C but where we add a &amp;#34;fake&amp;#34; channel E -&lt;br/&gt;&amp;gt; E&amp;#39;. Now if the attacker sets up a payment from E to E&amp;#39; using the route E -&lt;br/&gt;&amp;gt; C - B - A - E - E&amp;#39;, then the attacker can successfully lock up all of B&amp;#39;s&lt;br/&gt;&amp;gt; channels (as is desirable to get rid of competition) and also generate a&lt;br/&gt;&amp;gt; false proof of closure for the E - E&amp;#39; channel. Even if this false proof&lt;br/&gt;&amp;gt; (which is a commitment tx) ends up being published on chain, E has lost no&lt;br/&gt;&amp;gt; ability to route and has successfully made B unable to route between A and&lt;br/&gt;&amp;gt; C. If my understanding of the proposal is correct, and it may not be, then&lt;br/&gt;&amp;gt; the punishment for grieving payments is the threat of closing channels that&lt;br/&gt;&amp;gt; would benefit from the grieving attack. But adding a new channel on the end&lt;br/&gt;&amp;gt; to be closed seems to invalidate this punishment?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The consideration is that much of the cost of a channel is with the setup&lt;br/&gt;&amp;gt; and teardown --- E could always just reopen the CE channel again later.&lt;br/&gt;&amp;gt; Thus, the cost that E bears in setting up EE and tearing down EE would be&lt;br/&gt;&amp;gt; still similar to the cost of losing CE and reestablishing it again.&lt;br/&gt;&amp;gt; Further, any amount it places in the EE channel would be an amount it&lt;br/&gt;&amp;gt; could have been using as liquidity on Lightning, but which it cannot use&lt;br/&gt;&amp;gt; for forwarding (because it is a channel to nowhere).&lt;br/&gt;&amp;gt; Ultimately, proof-of-closure is an economic mechanism, not an&lt;br/&gt;&amp;gt; information-theoretic one.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So the mere existence of EE, to be later sacrificed, is enough punishment&lt;br/&gt;&amp;gt; on E.&lt;br/&gt;&amp;gt; I think.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; A second question I have is if you think that it would be advisable to&lt;br/&gt;&amp;gt; use up-front payments (pay for attempt, not just success) on payments with&lt;br/&gt;&amp;gt; abnormally high soft timeouts? If all this works, this combination seems to&lt;br/&gt;&amp;gt; be a way to enable hodl invoices under the proof of closure proposal.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Possibly, though this increases the complexity of the proposal even more.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;I just thought of a potentially more serious problem, at least for&lt;br/&gt;&amp;gt; Poon-Dryja channels, isn&amp;#39;t it true that giving a proof of closure is&lt;br/&gt;&amp;gt; equivalent to actually closing the channel since once other parties have&lt;br/&gt;&amp;gt; copies of the fully signed commitment transaction, it cannot be safely&lt;br/&gt;&amp;gt; revoked since other parties now have the ability to publish an old state? I&lt;br/&gt;&amp;gt; might be missing something but this seems like a big problem.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Since this is a proof-of-***closure***, this is indeed an actual closing&lt;br/&gt;&amp;gt; of the channel.&lt;br/&gt;&amp;gt; It would not be proof-of-closure if the channel was not being closed, but&lt;br/&gt;&amp;gt; proof-of-something-else.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What is desired is simply that C can plausibly say &amp;#34;I punished somebody&lt;br/&gt;&amp;gt; else by closing on them, please do not punish me for punishing them&amp;#34;.&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;&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/lightning-dev/attachments/20200402/b6b6749a/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200402/b6b6749a/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T12:59:23Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqs2fzhzqugsuvnku5w2w47tz6ec0tsqjl8d6m07j267z78z0grz20szypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qs8gwxgs</id>
    
      <title type="html">📅 Original date posted:2020-04-01 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqs2fzhzqugsuvnku5w2w47tz6ec0tsqjl8d6m07j267z78z0grz20szypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qs8gwxgs" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqstv6wvypjrxxmnr6wx4vup8lcn4m62ruv7e3xh7q2u5arrfrtagks5wzgku&#39;&gt;nevent1q…zgku&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-04-01&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi ZmnSCPxj and list,&lt;br/&gt;&lt;br/&gt;Love the idea! I have a couple questions though:&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not convinced that &amp;#34;Purely Falsified Proof-Of-Closure&amp;#34; aren&amp;#39;t&lt;br/&gt;effective. Consider a similar network to the one you described where we&lt;br/&gt;have channels A - B - C and A - E - C but where we add a &amp;#34;fake&amp;#34; channel E -&lt;br/&gt;E&amp;#39;. Now if the attacker sets up a payment from E to E&amp;#39; using the route E -&lt;br/&gt;C - B - A - E - E&amp;#39;, then the attacker can successfully lock up all of B&amp;#39;s&lt;br/&gt;channels (as is desirable to get rid of competition) and also generate a&lt;br/&gt;false proof of closure for the E - E&amp;#39; channel. Even if this false proof&lt;br/&gt;(which is a commitment tx) ends up being published on chain, E has lost no&lt;br/&gt;ability to route and has successfully made B unable to route between A and&lt;br/&gt;C. If my understanding of the proposal is correct, and it may not be, then&lt;br/&gt;the punishment for grieving payments is the threat of closing channels that&lt;br/&gt;would benefit from the grieving attack. But adding a new channel on the end&lt;br/&gt;to be closed seems to invalidate this punishment?&lt;br/&gt;&lt;br/&gt;A second question I have is if you think that it would be advisable to use&lt;br/&gt;up-front payments (pay for attempt, not just success) on payments with&lt;br/&gt;abnormally high soft timeouts? If all this works, this combination seems to&lt;br/&gt;be a way to enable hodl invoices under the proof of closure proposal.&lt;br/&gt;&lt;br/&gt;Best,&lt;br/&gt;Nadav&lt;br/&gt;&lt;br/&gt;On Wed, Apr 1, 2020 at 1:19 AM ZmnSCPxj via Lightning-dev &amp;lt;&lt;br/&gt;lightning-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Introduction&lt;br/&gt;&amp;gt; ============&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Given the fact that contracts on offchain protocols need to be enforceable&lt;br/&gt;&amp;gt; onchain as well, timelocks involved in multi-hop payments are measured in&lt;br/&gt;&amp;gt; blocks.&lt;br/&gt;&amp;gt; This is because the blockchain can only (third-party-verifiably) enforce&lt;br/&gt;&amp;gt; timeouts in units of entire blocks.&lt;br/&gt;&amp;gt; This leads to very long timeouts for payment delivery, thus multi-hop&lt;br/&gt;&amp;gt; offchain payment attempts can be, deliberately or accidentally, be in a&lt;br/&gt;&amp;gt; &amp;#34;pending&amp;#34; state up to the very large timeouts involved.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Deliberately setting up a multi-hop payment such that it will be in a&lt;br/&gt;&amp;gt; &amp;#34;pending&amp;#34; state for long periods of time is colloquially known as a&lt;br/&gt;&amp;gt; &amp;#34;griefing attack&amp;#34;.&lt;br/&gt;&amp;gt; In this article, we assess various proposed solutions to mitigate the&lt;br/&gt;&amp;gt; effects of griefing attacks, and propose a particular solution,&lt;br/&gt;&amp;gt; proof-of-closure, as well, that requires significant changes to the update&lt;br/&gt;&amp;gt; state machine.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Digression: Why Grief?&lt;br/&gt;&amp;gt; ======================&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Before embarking on our investigation for solutions to the griefing&lt;br/&gt;&amp;gt; problem, we should first wonder if griefing is, in fact, a problem.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This brings up the question of: why would anybody grief at all?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Humans, like cats and other less-sapient pieces of walking meat, often&lt;br/&gt;&amp;gt; find enjoyment in causing the suffering of others for no immediate direct&lt;br/&gt;&amp;gt; gain to themselves, as a public demonstration of dominance over those they&lt;br/&gt;&amp;gt; make suffer (aka &amp;#34;shits and giggles&amp;#34;, which, if executed correctly, can&lt;br/&gt;&amp;gt; lead to eventual direct gains to themselves or their progeny or relatives&lt;br/&gt;&amp;gt; or allies, but such details are often outside the ken of the very beings&lt;br/&gt;&amp;gt; who execute such survival strategies: brains are pieces of meat that have&lt;br/&gt;&amp;gt; been hacked to act as action-reaction engines, but are not sophisticated&lt;br/&gt;&amp;gt; enough to execute as pure rationality engines at all times).&lt;br/&gt;&amp;gt; Fortunately, in the Bitcoin world, only purely rational beings of pure&lt;br/&gt;&amp;gt; selfishness can exist in the long run, thus we can neglect such motivations&lt;br/&gt;&amp;gt; as mere noise.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; First, let us investigate *how* griefing attacks can be performed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * An intermediate node in a multi-hop attempt can delay forwarding or&lt;br/&gt;&amp;gt; failing an incoming HTLC.&lt;br/&gt;&amp;gt; * A final node in a payment attempt can delay claiming an incoming HTLC.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Let us consider a purely rational intermediate node of pure selfishness:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * If it forwards as soon as possible, it can earn fees, and also speed up&lt;br/&gt;&amp;gt; the release of the HTLC-locked funds so that they can reuse those funds as&lt;br/&gt;&amp;gt; liquidity for further payment attempts.&lt;br/&gt;&amp;gt; * Thus, delaying an HTLC is not selfishly-rational for an intermediate&lt;br/&gt;&amp;gt; node.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus, for an intermediate node, it seems there is no selfishly-rational&lt;br/&gt;&amp;gt; motivation to execute a griefing attack on an arbitrary payment attempt.&lt;br/&gt;&amp;gt; We can then conclude that an intermediate that delays a payment would do&lt;br/&gt;&amp;gt; so, not of its own rational self-interest, but as an accident, such as an&lt;br/&gt;&amp;gt; unforeseen connectivity or power failure.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; However, things are different when we consider a non-arbitrary payment.&lt;br/&gt;&amp;gt; Suppose a node were to make a payment attempt to itself, and deliberately&lt;br/&gt;&amp;gt; delay claiming this self-payment.&lt;br/&gt;&amp;gt; This lets any single node, *who happens to own large liquidity*, to lock&lt;br/&gt;&amp;gt; up the liquidity of other nodes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The motivation to lock up the liquidity of other nodes is to *eliminate&lt;br/&gt;&amp;gt; competition*.&lt;br/&gt;&amp;gt; Suppose we have a network as below:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     A -- B -- C&lt;br/&gt;&amp;gt;       \     /&lt;br/&gt;&amp;gt;        \   /&lt;br/&gt;&amp;gt;         \ /&lt;br/&gt;&amp;gt;          E&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; When A and C want to transact with one another, they may choose to route&lt;br/&gt;&amp;gt; via either B or E.&lt;br/&gt;&amp;gt; B and E are therefore competitors in the business of forwarding payments.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; But suppose E has much larger channels AE and CE than the channels of AB&lt;br/&gt;&amp;gt; and CB.&lt;br/&gt;&amp;gt; For example, suppose E has 100mBTC perfectly-balanced channels while B has&lt;br/&gt;&amp;gt; only 10mBTC perfectly-balanced channels, as all things should be in&lt;br/&gt;&amp;gt; simplified models of reality.&lt;br/&gt;&amp;gt; E can then &amp;#34;take out the competition&amp;#34; by making a 5mBTC self-payment along&lt;br/&gt;&amp;gt; E-&amp;gt;A-&amp;gt;B-&amp;gt;C-&amp;gt;E and a 5mBTC self-payment along E-&amp;gt;C-&amp;gt;B-&amp;gt;A-&amp;gt;E, then refusing&lt;br/&gt;&amp;gt; to claim the payment, tying up all the liquidity of the channels of B.&lt;br/&gt;&amp;gt; By doing so, it can ensure that A and C will always fail to pay via B,&lt;br/&gt;&amp;gt; even if they wish to transact in amounts less than 5mBTC.&lt;br/&gt;&amp;gt; E thereby eliminates B as a competitor.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This demonstrates that griefing attacks will be motivated, such that such&lt;br/&gt;&amp;gt; attacks will be performed by payers and payees *against intermediate nodes*.&lt;br/&gt;&amp;gt; Intermediate nodes have no motivation to attack payers and payees (those&lt;br/&gt;&amp;gt; are their potential customers in the business of forwarding payments, and&lt;br/&gt;&amp;gt; attacking potential customers is bad business: such attacking intermediate&lt;br/&gt;&amp;gt; nodes will be removed economically in the long run).&lt;br/&gt;&amp;gt; However, payers and payees can become motivated to attack intermediate&lt;br/&gt;&amp;gt; nodes, if the &amp;#34;payer&amp;#34; and &amp;#34;payee&amp;#34; are actually competitor intermediate&lt;br/&gt;&amp;gt; nodes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (We can observe that this is always a possibility even outside of&lt;br/&gt;&amp;gt; Lightning: a service or product provider has no incentive to attack its&lt;br/&gt;&amp;gt; customers (&amp;#34;the customer is always right&amp;#34;), but have an incentive to&lt;br/&gt;&amp;gt; *pretend* to be a customer of a competitor and attack them.)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We will keep this fact in mind: active griefing attacks are attacks *on*&lt;br/&gt;&amp;gt; intermediate nodes, not *by* intermediate nodes, because there is no&lt;br/&gt;&amp;gt; economic incentive for intermediate nodes to attack their customers.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Previous Proposed Solutions&lt;br/&gt;&amp;gt; ===========================&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Time-Spent Reporting&lt;br/&gt;&amp;gt; --------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; At each channel along the route, the time spent by a node to handle its&lt;br/&gt;&amp;gt; forwarding is recorded, and reported upstream in the route.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Unfortunately, this solution protects payers from intermediate nodes and&lt;br/&gt;&amp;gt; payees: it does not protect intermediate nodes from colluding payers and&lt;br/&gt;&amp;gt; payees.&lt;br/&gt;&amp;gt; Even if an intermediate node knows that a particular node is consistently&lt;br/&gt;&amp;gt; slow via a previous time-spent report, it will not be able, with our&lt;br/&gt;&amp;gt; current onion routing, determine if an onion packet it just received will&lt;br/&gt;&amp;gt; or will not go through the known-slow node.&lt;br/&gt;&amp;gt; Thus, an intermediate node would not be able to defend against distant&lt;br/&gt;&amp;gt; payees that, with a colluding payer, will not claim a particular payment.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As we have established, an active griefing atttack will never be&lt;br/&gt;&amp;gt; deliberately performed by a selfishly-rational intermediate node.&lt;br/&gt;&amp;gt; Thus, this solution protects against the wrong thing: it protects payers&lt;br/&gt;&amp;gt; against slow/unreliable intermediate nodes, it does not protect&lt;br/&gt;&amp;gt; intermediate nodes against malicious payer/payee collusions.&lt;br/&gt;&amp;gt; It protects only against intermediate nodes that inadvertently go offline&lt;br/&gt;&amp;gt; during forwarding, but such nodes will inevitably lose out on the&lt;br/&gt;&amp;gt; forwarding market anyway, and will disappear in the long run.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Up-Front Payment&lt;br/&gt;&amp;gt; ----------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Payers pay for an attempt, not just the successful completion of an&lt;br/&gt;&amp;gt; attempt.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A variation on this is that the payer (or payee) continuously pays as long&lt;br/&gt;&amp;gt; as the payment is pending.&lt;br/&gt;&amp;gt; Further variations include paying by other means, such as just locking&lt;br/&gt;&amp;gt; funds or paying with proof-of-work.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; While it certainly erects economic barriers against payer/payee collusions&lt;br/&gt;&amp;gt; attacking intermediate nodes, it *also* erects economic barriers against&lt;br/&gt;&amp;gt; normal, non-malicious payments.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We can consider that economic barriers against non-malicious, low-value,&lt;br/&gt;&amp;gt; high-frequency payments (&amp;#34;micropayments&amp;#34;) may be enough that such payments&lt;br/&gt;&amp;gt; become infeasible if we impose up-front payment for mere attempts.&lt;br/&gt;&amp;gt; Thus, while this solution is certainly something we can consider, we must&lt;br/&gt;&amp;gt; be reluctant to use it due to its up-front, strict-evaluation behavior.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Proof-Of-Closure&lt;br/&gt;&amp;gt; ================&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Observing the above, we want the properties for a &amp;#34;good&amp;#34; solution to&lt;br/&gt;&amp;gt; griefing attacks to be:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * It should protect intermediate nodes against payer/payee collusions.&lt;br/&gt;&amp;gt; * It should only come into play upon detection of an attack.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We now present proof-of-closure, which (we hope) has the above properties.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We can consider instead a softer timeout, distinct from the HTLC&lt;br/&gt;&amp;gt; block-based timeout.&lt;br/&gt;&amp;gt; This softer timeout is measurable in fractions of a second, e.g. units of&lt;br/&gt;&amp;gt; 0.1 seconds.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Each node on the network advertises, in addition to a block-based&lt;br/&gt;&amp;gt; `cltv_delta`, a `timeout_delta` in units of 0.1 seconds.&lt;br/&gt;&amp;gt; Further, each invoice contains, in addition to a block-based `final_cltv`,&lt;br/&gt;&amp;gt; a `final_timeout` in units of 0.1 seconds.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus, there are two timeouts:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * The current &amp;#34;hard&amp;#34; block-based timeout that is enforceable onchain.&lt;br/&gt;&amp;gt; * A new &amp;#34;soft&amp;#34; sidereal-time-based timeout that is not onchain enforceable.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The soft timeout, as mentioned, is not enforceable onchain.&lt;br/&gt;&amp;gt; Instead, enforcement of the soft timeout *is* the act of putting the&lt;br/&gt;&amp;gt; channel state onchain.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Now, for the current &amp;#34;hard&amp;#34; block-based timeout, we already have a&lt;br/&gt;&amp;gt; reaction.&lt;br/&gt;&amp;gt; If the HTLC &amp;#34;hard&amp;#34; timeout is approaching:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Drop the channel onchain and enforce the hard timeout onchain to reclaim&lt;br/&gt;&amp;gt; the funds in the HTLCs.&lt;br/&gt;&amp;gt; * Wait for the onchain action to be deeply resolved (either timelock or&lt;br/&gt;&amp;gt; hashlock branch is confirmed deeply) and report the result (success or&lt;br/&gt;&amp;gt; fail) upstream.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What happens if the &amp;#34;soft&amp;#34; timeout is violated?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Drop the channel onchain.&lt;br/&gt;&amp;gt; * Report the channel closure upstream.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The &amp;#34;hard&amp;#34; timeout is cancelled in any of these two conditions:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * A success is reported via `update_fulfill_htlc`, OR,&lt;br/&gt;&amp;gt; * A failure is reported via `update_fail_htlc` AND the HTLC is irrevocably&lt;br/&gt;&amp;gt; removed from the latest commitments/state(s) of the channel.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The &amp;#34;soft&amp;#34; timeout is cancelled in any of these three conditions, the&lt;br/&gt;&amp;gt; first two of which are the same as above:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * A success is reported via `update_fulfill_htlc`, OR,&lt;br/&gt;&amp;gt; * A failure is reported via `update_fail_htlc` AND the HTLC is irrevocably&lt;br/&gt;&amp;gt; removed from the latest commitments/state(s) of the channel, OR&lt;br/&gt;&amp;gt; * A channel closure is reported.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Let us fill this in more detail.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Suppose we have a payment route A-&amp;gt;B-&amp;gt;C-&amp;gt;E.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Both the &amp;#34;hard&amp;#34; block timeouts and the &amp;#34;soft&amp;#34; second timeouts decrement&lt;br/&gt;&amp;gt; monotonically at each hop.&lt;br/&gt;&amp;gt; Thus, the payee E has the shortest &amp;#34;hard&amp;#34; and &amp;#34;soft&amp;#34; timeouts (as normal).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Suppose E then delays claiming the payment and violates the &amp;#34;soft&amp;#34;&lt;br/&gt;&amp;gt; timeout.&lt;br/&gt;&amp;gt; * C then drops the CE channel onchain.&lt;br/&gt;&amp;gt; * C reports, before its own timeout (slightly larger than the timeout&lt;br/&gt;&amp;gt; imposed on E), the closing of the channel CE, to B.&lt;br/&gt;&amp;gt; * B validates this report, and if valid, propagates the report to A.&lt;br/&gt;&amp;gt; * A validates this report, and if valid, accepts that the payment will be&lt;br/&gt;&amp;gt; &amp;#34;stuck&amp;#34; for up to the hard timeout it imposed on B.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; C has to report back to B in order to prevent B from closing the BC&lt;br/&gt;&amp;gt; channel, and B has to report back to A in order to prevent A from closing&lt;br/&gt;&amp;gt; the AB channel.&lt;br/&gt;&amp;gt; The decrementing seconds-unit timeouts are needed for each hop, for the&lt;br/&gt;&amp;gt; same reason that decrementing block-unit timeouts are needed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Since E is motivated to attack intermediate nodes because it wants to&lt;br/&gt;&amp;gt; redirect payment forwards through itself rather than its competitotrs,&lt;br/&gt;&amp;gt; having one of its channels closed (which prevents it from being used for&lt;br/&gt;&amp;gt; forwarding) is directly opposed to its end goal of getting more money,&lt;br/&gt;&amp;gt; thus, we can believe the action of closing a channel involved in a griefing&lt;br/&gt;&amp;gt; attack is sufficient disincentive.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The major drawback is that enforcement of the soft timeout *is* a channel&lt;br/&gt;&amp;gt; closure, which is generally a negative for the network.&lt;br/&gt;&amp;gt; This is not a remote attack vector, since a node can only trigger this&lt;br/&gt;&amp;gt; closure if it is able to stall the fulfillment or failure of an HTLC on a&lt;br/&gt;&amp;gt; channel, which generally means the node triggering this closure can only do&lt;br/&gt;&amp;gt; so for its own channels (or it is able to, via a separate mechanism,&lt;br/&gt;&amp;gt; remotely crash a different node).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Proving Channel Closes&lt;br/&gt;&amp;gt; ----------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What C *really* needs to prove is that:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * It is *willing* to close a channel due to a violation of the soft&lt;br/&gt;&amp;gt; timeout.&lt;br/&gt;&amp;gt; * The channel it is willing to close was, in fact, involved in the same&lt;br/&gt;&amp;gt; payment attempt.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; With the above, B can believe that C was innocent of wrongdoing, because:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * C would only be wiling to close a channel in case of a protocol&lt;br/&gt;&amp;gt; violation, in this case, a violation of the soft timeout.&lt;br/&gt;&amp;gt; * The channel it closed was closed because of this payment attempt, and&lt;br/&gt;&amp;gt; not because of another payment attempt, or some other unrelated channel&lt;br/&gt;&amp;gt; being unilaterally closed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; First, what C needs to prove is *NOT*, in fact, actual channel closure: it&lt;br/&gt;&amp;gt; needs to prove a *willingness* to close a channel.&lt;br/&gt;&amp;gt; Thus, it does not require the channel to actually be *closed* yet, i.e. it&lt;br/&gt;&amp;gt; does not have to wait for onchain activity that the channel closure is in a&lt;br/&gt;&amp;gt; mempool and is confirmed deeply onchain etc etc.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus, to prove a *willingness to close* rather than an actual close, C can&lt;br/&gt;&amp;gt; provide the unilateral close of the channel CE.&lt;br/&gt;&amp;gt; The act of unilaterally closing a channel is the publication of the&lt;br/&gt;&amp;gt; transaction(s) making up the unilateral close.&lt;br/&gt;&amp;gt; Thus, if C is *willing* to close the channel, it is willing to publish the&lt;br/&gt;&amp;gt; transaction(s) involved, and thus, providing the unilateral close to B and&lt;br/&gt;&amp;gt; further upstream, shows a willingness to close the channel.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; B then validates the provided proof-of-closure by checking that the&lt;br/&gt;&amp;gt; unilateral close transaction is either onchain, in the mempool, or that it&lt;br/&gt;&amp;gt; spends a TXO that is not currently spent by another transaction.&lt;br/&gt;&amp;gt; In the case the unilateral close transaction is not confirmed and in the&lt;br/&gt;&amp;gt; mempool, B can speed up its propagation on the Bitcoin layer by putting it&lt;br/&gt;&amp;gt; in its own mempool as well --- after all, C is willing to close the channel&lt;br/&gt;&amp;gt; to exonerate itself and punish the actual culprit, and B putting the&lt;br/&gt;&amp;gt; unilateral close in its own mempool can only help C in what it is willing&lt;br/&gt;&amp;gt; to do.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Secondly, C needs to prove that the channel it is willing to close&lt;br/&gt;&amp;gt; involves the payment attempt, and is not some other channel closure that it&lt;br/&gt;&amp;gt; is attempting to use to fulfill its own soft timeout.&lt;br/&gt;&amp;gt; Since the unilateral close transaction *is* the proof-of-closure, B (and&lt;br/&gt;&amp;gt; A) can inspect the transaction outputs and see (with some additional data&lt;br/&gt;&amp;gt; from C) that one of the outputs is to an HTLC that matches the payment hash.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus, B (and A) can believe that the proof-of-closure proves that whoever&lt;br/&gt;&amp;gt; is presenting it is free of wrongdoing, as whoever is actually causing the&lt;br/&gt;&amp;gt; delay has been punished (by someone being willing to close a channel with&lt;br/&gt;&amp;gt; the culprit), and that the proof-of-closure commits to this particular&lt;br/&gt;&amp;gt; payment attempt and no other (because it commits to a particular payment&lt;br/&gt;&amp;gt; hash).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Further, if CE is closed by E dropping it onchain rather than C, C will&lt;br/&gt;&amp;gt; still be able to fulfill its own soft timeout by taking the closing&lt;br/&gt;&amp;gt; transaction from E, which should still contain the HTLC.&lt;br/&gt;&amp;gt; Indeed, neither A nor B will particularly care (nor need to know) who&lt;br/&gt;&amp;gt; dropped the channel onchain, or (for A) that the channel participants are C&lt;br/&gt;&amp;gt; and E.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Update State Shenanigans&lt;br/&gt;&amp;gt; ------------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Bitcoin update mechanisms are complicated things, and it may be possible&lt;br/&gt;&amp;gt; for an attacking payee E to fool around with the update state machine to&lt;br/&gt;&amp;gt; make it difficult for C to report a willingness to close CE.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In particular, I quote here the relevant passages from `lightning-rfc`,&lt;br/&gt;&amp;gt; `02-peer-protocol.md`, which is an implementation of the Poon-Dryja update&lt;br/&gt;&amp;gt; mechanism:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Thus each update traverses through the following states:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; 1. pending on the receiver&lt;br/&gt;&amp;gt; &amp;gt; 2. in the receiver&amp;#39;s latest commitment transaction&lt;br/&gt;&amp;gt; &amp;gt; 3. ... and the receiver&amp;#39;s previous commitment transaction has been&lt;br/&gt;&amp;gt; revoked,&lt;br/&gt;&amp;gt; &amp;gt;    and the update is pending on the sender&lt;br/&gt;&amp;gt; &amp;gt; 4. ... and in the sender&amp;#39;s latest commitment transaction&lt;br/&gt;&amp;gt; &amp;gt; 5. ... and the sender&amp;#39;s previous commitment transaction has been revoked&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The payee E is the &amp;#34;receiver&amp;#34; in this context.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In this case, once the update has reached step 2, then E has a commitment&lt;br/&gt;&amp;gt; transaction that it can put onchain, that contains an HTLC it can claim.&lt;br/&gt;&amp;gt; From this step onward, C cannot send a failure (i.e. it cannot send back&lt;br/&gt;&amp;gt; an `update_fail_htlc`) back to B, because E could drop its latest&lt;br/&gt;&amp;gt; commitment onchain and claim the HTLC onchain.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; However, until step 4, C does not have a unilateral close containing the&lt;br/&gt;&amp;gt; HTLC, and thus cannot provide a proof-of-closure that contains an HTLC that&lt;br/&gt;&amp;gt; refers to the payment.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus, between steps 2 to 4, C cannot safely respond to its own soft&lt;br/&gt;&amp;gt; timeout.&lt;br/&gt;&amp;gt; C cannot respond with a failure, as E could then drop its latest&lt;br/&gt;&amp;gt; commitment transaction onchain and claim the payment from C, and extract&lt;br/&gt;&amp;gt; money from C that way.&lt;br/&gt;&amp;gt; C also cannot respond with a proof-of-closure, as it does not have a&lt;br/&gt;&amp;gt; transaction that it can use to provide this proof.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The best that C can do would be to impose an even shorter timeout between&lt;br/&gt;&amp;gt; steps 2 and 4 above, and to drop its current commitment transaction (which&lt;br/&gt;&amp;gt; does not contain the HTLC yet and thus does not constitute a valid&lt;br/&gt;&amp;gt; proof-of-closure) onchain.&lt;br/&gt;&amp;gt; In between the time it drops the commitment transaction and its own&lt;br/&gt;&amp;gt; incoming soft timeout, there is a chance, however small, that this&lt;br/&gt;&amp;gt; transaction will be confirmed, and the channel will (with high probability)&lt;br/&gt;&amp;gt; settle in a state where the HTLC is not instantiated, thus C can safely&lt;br/&gt;&amp;gt; fail its incoming HTLC (not show a proof-of-closure, since that is not&lt;br/&gt;&amp;gt; possible for C to do) without risk of loss, just prior to its own soft&lt;br/&gt;&amp;gt; timeout.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Of course, C is still at risk here: E could collude with miners via a&lt;br/&gt;&amp;gt; side-channel fee offer to confirm its commitment transaction with the HTLC&lt;br/&gt;&amp;gt; present, and ensure that C is liable for the HTLC value.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; With Decker-Russell-Osuntokun, we can remove this risk by requiring a&lt;br/&gt;&amp;gt; ritual as follows:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1.  C requests exclusive access to update their single shared state.&lt;br/&gt;&amp;gt;   * This can be done via a variety of sub-protocols, including a fair coin&lt;br/&gt;&amp;gt; toss in case of near-simultaneous requests for exclusive locks on both&lt;br/&gt;&amp;gt; sides.&lt;br/&gt;&amp;gt; 2.  C provides the details of the new HTLC to E.&lt;br/&gt;&amp;gt; 3.  C and E generate the new state transaction and exchange signatures for&lt;br/&gt;&amp;gt; it.&lt;br/&gt;&amp;gt; 4.  C and E generate (without signing) the new update transaction.&lt;br/&gt;&amp;gt; 5.  E provides the signature (or share of signature, if MuSig) for the new&lt;br/&gt;&amp;gt; update transaction to C.&lt;br/&gt;&amp;gt; 6.  C provides the signature for the new update transaction to E, which&lt;br/&gt;&amp;gt; releases the exclusive lock on the shared state atomically with the&lt;br/&gt;&amp;gt; finalization of the new update transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Prior to step 5, C can simply fail the incoming HTLC from B in case its&lt;br/&gt;&amp;gt; own soft timeout is near.&lt;br/&gt;&amp;gt; Even if E performs step 5 after C has already failed the incoming HTLC&lt;br/&gt;&amp;gt; from B, C can simply not perform step 6 and drop the channel onchain with&lt;br/&gt;&amp;gt; the previous update and state transactions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; With Poon-Dryja, we will have to rearrange the order in which we perform&lt;br/&gt;&amp;gt; things, effectively adding an extra communications turnaround between the&lt;br/&gt;&amp;gt; participants.&lt;br/&gt;&amp;gt; Specifically, the order would have to be revised to:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; 1. pending on the sender&lt;br/&gt;&amp;gt; &amp;gt; 2. in the sender&amp;#39;s latest commitment transaction&lt;br/&gt;&amp;gt; &amp;gt; 3. ... and the sender&amp;#39;s previous commitment transaction has been revoked,&lt;br/&gt;&amp;gt; &amp;gt;    and the update is pending on the receiver&lt;br/&gt;&amp;gt; &amp;gt; 4. ... and in the receiver&amp;#39;s latest commitment transaction&lt;br/&gt;&amp;gt; &amp;gt; 5. ... and the receiver&amp;#39;s previous commitment transaction has been&lt;br/&gt;&amp;gt; revoked&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This allows the sender (C in our context) to provide a proof-of-closure&lt;br/&gt;&amp;gt; after step 2, and before step 2, C can safely return a failure with&lt;br/&gt;&amp;gt; `update_fail_htlc` (and refuse to proceed beyond step 2, thus ensuring it&lt;br/&gt;&amp;gt; can still use the previous commitment that still has no HTLC).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Of course, this change will require redesigning the update state machine,&lt;br/&gt;&amp;gt; increasing the number of communication turnarounds, and creating a subtle&lt;br/&gt;&amp;gt; incompatbility when transitioning a payment from a hop that knows only the&lt;br/&gt;&amp;gt; old update state machine to a hop that knows the new update state machine.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Purely Falsified Proof-Of-Closure&lt;br/&gt;&amp;gt; ---------------------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Of course, the attacking node E might want to create a false&lt;br/&gt;&amp;gt; proof-of-closure.&lt;br/&gt;&amp;gt; E can do this by simulating a Lightning channel: lock an amount of funds&lt;br/&gt;&amp;gt; in a 2-of-2 (where E controls both keys), then spend it in a set of&lt;br/&gt;&amp;gt; transactions mimicking the unilateral close.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We observe, however, that the overhead of simulating a Lightning channel&lt;br/&gt;&amp;gt; is the same as the overhead of actually creating and closing a Lightning&lt;br/&gt;&amp;gt; channel.&lt;br/&gt;&amp;gt; Since the punishment of proof-of-closure is to force attackers to have&lt;br/&gt;&amp;gt; their channels closed, we can consider that this simulation of a channel&lt;br/&gt;&amp;gt; open and close is sufficient as well.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Future-Proofing&lt;br/&gt;&amp;gt; ---------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This sketch of proof-of-closure can be used for any update mechanism:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * With Poon-Dryja, C can use its own commitment transaction as the&lt;br/&gt;&amp;gt; proof-of-closure.&lt;br/&gt;&amp;gt; * With Decker-Wattenhofer, C can give all the offchain transactions up to&lt;br/&gt;&amp;gt; the last stage in the multi-stage decrementing-`nSequence` mechanism.&lt;br/&gt;&amp;gt; * With Deckker-Russell-Osuntokun, C can give the latest update and state&lt;br/&gt;&amp;gt; trnsaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Basically, we expect that for now, and in the future, any update mechanism&lt;br/&gt;&amp;gt; worth consideration will have a concept of &amp;#34;unilateral close&amp;#34; where a&lt;br/&gt;&amp;gt; channel can be dropped onchain, using data that only one of the channel&lt;br/&gt;&amp;gt; participants holds.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Such a unilateral close will be a sequence of one or more valid&lt;br/&gt;&amp;gt; transactions, terminating in a transaction containing an HTLC-like contract&lt;br/&gt;&amp;gt; in one of its outputs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus, to validate the unilateral close, it is only required to validate&lt;br/&gt;&amp;gt; all the transactions contained in the proof-of-closure, and see that the&lt;br/&gt;&amp;gt; last transaction has an HTLC output.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The limitations are thus:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * The acceptable forms of HTLC would need to be agreed-upon by the entire&lt;br/&gt;&amp;gt; network.&lt;br/&gt;&amp;gt; * Implementations would need to be able to assess, in a&lt;br/&gt;&amp;gt; Bitcoin-consensus-compatible way, whether a transaction is valid or not.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Payment Decorrelation and Payment Points&lt;br/&gt;&amp;gt; ----------------------------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Of course, having a single payment hash for the entire payment attempt is&lt;br/&gt;&amp;gt; a privacy loss, which we intend to fix in the near future by using payment&lt;br/&gt;&amp;gt; points, and adding a blinding scalar at each hop, aka. payment&lt;br/&gt;&amp;gt; decorrelation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus, in the future, there will not be any HTLC, but instead a PTLC.&lt;br/&gt;&amp;gt; Further, the payment point at each hop will be changed at each hop, in&lt;br/&gt;&amp;gt; order to prevent decorrelation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus, C needs to provide proofs:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * That an apparent singlesig on the unilateral close output is in fact a&lt;br/&gt;&amp;gt; PTLC.&lt;br/&gt;&amp;gt;   C needs to provide:&lt;br/&gt;&amp;gt;   * A target point P.&lt;br/&gt;&amp;gt;   * A partial signature that would spend that singlesig for a particular&lt;br/&gt;&amp;gt; sighash.&lt;br/&gt;&amp;gt;   * An adaptor signature which, with knowledge of the completed signature,&lt;br/&gt;&amp;gt; adaptor signature, and sighash message, would have revealed the scalar&lt;br/&gt;&amp;gt; behind P.&lt;br/&gt;&amp;gt; * That the PTLC belongs to the same payment attempt as what B offered to C.&lt;br/&gt;&amp;gt;   C needs to provide:&lt;br/&gt;&amp;gt;   * The C-only blinding factor that is the difference between the payment&lt;br/&gt;&amp;gt; point of the B-to-C PTLC and the C-to-E PTLC on the unilateral close.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Then, when B needs to propagate the proof-of-closure back to A, B simply&lt;br/&gt;&amp;gt; adds its own blinding factor to the reported blinding factor, in order to&lt;br/&gt;&amp;gt; convince A that this is the same payment attempt.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As we have brought up privacy, we observe that, when this mechanism&lt;br/&gt;&amp;gt; triggers, there is a mild privacy loss, in that intermediate nodes now know&lt;br/&gt;&amp;gt; some channel closure that is related to this payment, and can thus&lt;br/&gt;&amp;gt; determine the exact path that the payment attempt went through, at least&lt;br/&gt;&amp;gt; until the channel being closed.&lt;br/&gt;&amp;gt; However, proof-of-closure is only propagated in case of violation of the&lt;br/&gt;&amp;gt; soft timeout, so for normal non-malicious payments, proof-of-closure does&lt;br/&gt;&amp;gt; not cause any privacy loss.&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&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/lightning-dev/attachments/20200401/082a44f1/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200401/082a44f1/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T12:59:21Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsqffechytal9ma5573j0w3gdx056k4hx6zkcnjjh05rktrnrms83qzypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qspvc00m</id>
    
      <title type="html">📅 Original date posted:2020-04-01 📝 Original message: I ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsqffechytal9ma5573j0w3gdx056k4hx6zkcnjjh05rktrnrms83qzypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qspvc00m" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2fzhzqugsuvnku5w2w47tz6ec0tsqjl8d6m07j267z78z0grz20se3thst&#39;&gt;nevent1q…thst&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-04-01&lt;br/&gt;📝 Original message:&lt;br/&gt;I just thought of a potentially more serious problem, at least for&lt;br/&gt;Poon-Dryja channels, isn&amp;#39;t it true that giving a proof of closure is&lt;br/&gt;equivalent to actually closing the channel since once other parties have&lt;br/&gt;copies of the fully signed commitment transaction, it cannot be safely&lt;br/&gt;revoked since other parties now have the ability to publish an old state? I&lt;br/&gt;might be missing something but this seems like a big problem.&lt;br/&gt;&lt;br/&gt;Best,&lt;br/&gt;Nadav&lt;br/&gt;&lt;br/&gt;On Wed, Apr 1, 2020 at 1:07 PM Nadav Kohen &amp;lt;nadav at suredbits.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi ZmnSCPxj and list,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Love the idea! I have a couple questions though:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m not convinced that &amp;#34;Purely Falsified Proof-Of-Closure&amp;#34; aren&amp;#39;t&lt;br/&gt;&amp;gt; effective. Consider a similar network to the one you described where we&lt;br/&gt;&amp;gt; have channels A - B - C and A - E - C but where we add a &amp;#34;fake&amp;#34; channel E -&lt;br/&gt;&amp;gt; E&amp;#39;. Now if the attacker sets up a payment from E to E&amp;#39; using the route E -&lt;br/&gt;&amp;gt; C - B - A - E - E&amp;#39;, then the attacker can successfully lock up all of B&amp;#39;s&lt;br/&gt;&amp;gt; channels (as is desirable to get rid of competition) and also generate a&lt;br/&gt;&amp;gt; false proof of closure for the E - E&amp;#39; channel. Even if this false proof&lt;br/&gt;&amp;gt; (which is a commitment tx) ends up being published on chain, E has lost no&lt;br/&gt;&amp;gt; ability to route and has successfully made B unable to route between A and&lt;br/&gt;&amp;gt; C. If my understanding of the proposal is correct, and it may not be, then&lt;br/&gt;&amp;gt; the punishment for grieving payments is the threat of closing channels that&lt;br/&gt;&amp;gt; would benefit from the grieving attack. But adding a new channel on the end&lt;br/&gt;&amp;gt; to be closed seems to invalidate this punishment?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A second question I have is if you think that it would be advisable to use&lt;br/&gt;&amp;gt; up-front payments (pay for attempt, not just success) on payments with&lt;br/&gt;&amp;gt; abnormally high soft timeouts? If all this works, this combination seems to&lt;br/&gt;&amp;gt; be a way to enable hodl invoices under the proof of closure proposal.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Best,&lt;br/&gt;&amp;gt; Nadav&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Wed, Apr 1, 2020 at 1:19 AM ZmnSCPxj via Lightning-dev &amp;lt;&lt;br/&gt;&amp;gt; lightning-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Introduction&lt;br/&gt;&amp;gt;&amp;gt; ============&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Given the fact that contracts on offchain protocols need to be&lt;br/&gt;&amp;gt;&amp;gt; enforceable onchain as well, timelocks involved in multi-hop payments are&lt;br/&gt;&amp;gt;&amp;gt; measured in blocks.&lt;br/&gt;&amp;gt;&amp;gt; This is because the blockchain can only (third-party-verifiably) enforce&lt;br/&gt;&amp;gt;&amp;gt; timeouts in units of entire blocks.&lt;br/&gt;&amp;gt;&amp;gt; This leads to very long timeouts for payment delivery, thus multi-hop&lt;br/&gt;&amp;gt;&amp;gt; offchain payment attempts can be, deliberately or accidentally, be in a&lt;br/&gt;&amp;gt;&amp;gt; &amp;#34;pending&amp;#34; state up to the very large timeouts involved.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Deliberately setting up a multi-hop payment such that it will be in a&lt;br/&gt;&amp;gt;&amp;gt; &amp;#34;pending&amp;#34; state for long periods of time is colloquially known as a&lt;br/&gt;&amp;gt;&amp;gt; &amp;#34;griefing attack&amp;#34;.&lt;br/&gt;&amp;gt;&amp;gt; In this article, we assess various proposed solutions to mitigate the&lt;br/&gt;&amp;gt;&amp;gt; effects of griefing attacks, and propose a particular solution,&lt;br/&gt;&amp;gt;&amp;gt; proof-of-closure, as well, that requires significant changes to the update&lt;br/&gt;&amp;gt;&amp;gt; state machine.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Digression: Why Grief?&lt;br/&gt;&amp;gt;&amp;gt; ======================&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Before embarking on our investigation for solutions to the griefing&lt;br/&gt;&amp;gt;&amp;gt; problem, we should first wonder if griefing is, in fact, a problem.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; This brings up the question of: why would anybody grief at all?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Humans, like cats and other less-sapient pieces of walking meat, often&lt;br/&gt;&amp;gt;&amp;gt; find enjoyment in causing the suffering of others for no immediate direct&lt;br/&gt;&amp;gt;&amp;gt; gain to themselves, as a public demonstration of dominance over those they&lt;br/&gt;&amp;gt;&amp;gt; make suffer (aka &amp;#34;shits and giggles&amp;#34;, which, if executed correctly, can&lt;br/&gt;&amp;gt;&amp;gt; lead to eventual direct gains to themselves or their progeny or relatives&lt;br/&gt;&amp;gt;&amp;gt; or allies, but such details are often outside the ken of the very beings&lt;br/&gt;&amp;gt;&amp;gt; who execute such survival strategies: brains are pieces of meat that have&lt;br/&gt;&amp;gt;&amp;gt; been hacked to act as action-reaction engines, but are not sophisticated&lt;br/&gt;&amp;gt;&amp;gt; enough to execute as pure rationality engines at all times).&lt;br/&gt;&amp;gt;&amp;gt; Fortunately, in the Bitcoin world, only purely rational beings of pure&lt;br/&gt;&amp;gt;&amp;gt; selfishness can exist in the long run, thus we can neglect such motivations&lt;br/&gt;&amp;gt;&amp;gt; as mere noise.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; First, let us investigate *how* griefing attacks can be performed.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * An intermediate node in a multi-hop attempt can delay forwarding or&lt;br/&gt;&amp;gt;&amp;gt; failing an incoming HTLC.&lt;br/&gt;&amp;gt;&amp;gt; * A final node in a payment attempt can delay claiming an incoming HTLC.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Let us consider a purely rational intermediate node of pure selfishness:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * If it forwards as soon as possible, it can earn fees, and also speed up&lt;br/&gt;&amp;gt;&amp;gt; the release of the HTLC-locked funds so that they can reuse those funds as&lt;br/&gt;&amp;gt;&amp;gt; liquidity for further payment attempts.&lt;br/&gt;&amp;gt;&amp;gt; * Thus, delaying an HTLC is not selfishly-rational for an intermediate&lt;br/&gt;&amp;gt;&amp;gt; node.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thus, for an intermediate node, it seems there is no selfishly-rational&lt;br/&gt;&amp;gt;&amp;gt; motivation to execute a griefing attack on an arbitrary payment attempt.&lt;br/&gt;&amp;gt;&amp;gt; We can then conclude that an intermediate that delays a payment would do&lt;br/&gt;&amp;gt;&amp;gt; so, not of its own rational self-interest, but as an accident, such as an&lt;br/&gt;&amp;gt;&amp;gt; unforeseen connectivity or power failure.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; However, things are different when we consider a non-arbitrary payment.&lt;br/&gt;&amp;gt;&amp;gt; Suppose a node were to make a payment attempt to itself, and deliberately&lt;br/&gt;&amp;gt;&amp;gt; delay claiming this self-payment.&lt;br/&gt;&amp;gt;&amp;gt; This lets any single node, *who happens to own large liquidity*, to lock&lt;br/&gt;&amp;gt;&amp;gt; up the liquidity of other nodes.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The motivation to lock up the liquidity of other nodes is to *eliminate&lt;br/&gt;&amp;gt;&amp;gt; competition*.&lt;br/&gt;&amp;gt;&amp;gt; Suppose we have a network as below:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;     A -- B -- C&lt;br/&gt;&amp;gt;&amp;gt;       \     /&lt;br/&gt;&amp;gt;&amp;gt;        \   /&lt;br/&gt;&amp;gt;&amp;gt;         \ /&lt;br/&gt;&amp;gt;&amp;gt;          E&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; When A and C want to transact with one another, they may choose to route&lt;br/&gt;&amp;gt;&amp;gt; via either B or E.&lt;br/&gt;&amp;gt;&amp;gt; B and E are therefore competitors in the business of forwarding payments.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; But suppose E has much larger channels AE and CE than the channels of AB&lt;br/&gt;&amp;gt;&amp;gt; and CB.&lt;br/&gt;&amp;gt;&amp;gt; For example, suppose E has 100mBTC perfectly-balanced channels while B&lt;br/&gt;&amp;gt;&amp;gt; has only 10mBTC perfectly-balanced channels, as all things should be in&lt;br/&gt;&amp;gt;&amp;gt; simplified models of reality.&lt;br/&gt;&amp;gt;&amp;gt; E can then &amp;#34;take out the competition&amp;#34; by making a 5mBTC self-payment&lt;br/&gt;&amp;gt;&amp;gt; along E-&amp;gt;A-&amp;gt;B-&amp;gt;C-&amp;gt;E and a 5mBTC self-payment along E-&amp;gt;C-&amp;gt;B-&amp;gt;A-&amp;gt;E, then&lt;br/&gt;&amp;gt;&amp;gt; refusing to claim the payment, tying up all the liquidity of the channels&lt;br/&gt;&amp;gt;&amp;gt; of B.&lt;br/&gt;&amp;gt;&amp;gt; By doing so, it can ensure that A and C will always fail to pay via B,&lt;br/&gt;&amp;gt;&amp;gt; even if they wish to transact in amounts less than 5mBTC.&lt;br/&gt;&amp;gt;&amp;gt; E thereby eliminates B as a competitor.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; This demonstrates that griefing attacks will be motivated, such that such&lt;br/&gt;&amp;gt;&amp;gt; attacks will be performed by payers and payees *against intermediate nodes*.&lt;br/&gt;&amp;gt;&amp;gt; Intermediate nodes have no motivation to attack payers and payees (those&lt;br/&gt;&amp;gt;&amp;gt; are their potential customers in the business of forwarding payments, and&lt;br/&gt;&amp;gt;&amp;gt; attacking potential customers is bad business: such attacking intermediate&lt;br/&gt;&amp;gt;&amp;gt; nodes will be removed economically in the long run).&lt;br/&gt;&amp;gt;&amp;gt; However, payers and payees can become motivated to attack intermediate&lt;br/&gt;&amp;gt;&amp;gt; nodes, if the &amp;#34;payer&amp;#34; and &amp;#34;payee&amp;#34; are actually competitor intermediate&lt;br/&gt;&amp;gt;&amp;gt; nodes.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; (We can observe that this is always a possibility even outside of&lt;br/&gt;&amp;gt;&amp;gt; Lightning: a service or product provider has no incentive to attack its&lt;br/&gt;&amp;gt;&amp;gt; customers (&amp;#34;the customer is always right&amp;#34;), but have an incentive to&lt;br/&gt;&amp;gt;&amp;gt; *pretend* to be a customer of a competitor and attack them.)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; We will keep this fact in mind: active griefing attacks are attacks *on*&lt;br/&gt;&amp;gt;&amp;gt; intermediate nodes, not *by* intermediate nodes, because there is no&lt;br/&gt;&amp;gt;&amp;gt; economic incentive for intermediate nodes to attack their customers.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Previous Proposed Solutions&lt;br/&gt;&amp;gt;&amp;gt; ===========================&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Time-Spent Reporting&lt;br/&gt;&amp;gt;&amp;gt; --------------------&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; At each channel along the route, the time spent by a node to handle its&lt;br/&gt;&amp;gt;&amp;gt; forwarding is recorded, and reported upstream in the route.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Unfortunately, this solution protects payers from intermediate nodes and&lt;br/&gt;&amp;gt;&amp;gt; payees: it does not protect intermediate nodes from colluding payers and&lt;br/&gt;&amp;gt;&amp;gt; payees.&lt;br/&gt;&amp;gt;&amp;gt; Even if an intermediate node knows that a particular node is consistently&lt;br/&gt;&amp;gt;&amp;gt; slow via a previous time-spent report, it will not be able, with our&lt;br/&gt;&amp;gt;&amp;gt; current onion routing, determine if an onion packet it just received will&lt;br/&gt;&amp;gt;&amp;gt; or will not go through the known-slow node.&lt;br/&gt;&amp;gt;&amp;gt; Thus, an intermediate node would not be able to defend against distant&lt;br/&gt;&amp;gt;&amp;gt; payees that, with a colluding payer, will not claim a particular payment.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; As we have established, an active griefing atttack will never be&lt;br/&gt;&amp;gt;&amp;gt; deliberately performed by a selfishly-rational intermediate node.&lt;br/&gt;&amp;gt;&amp;gt; Thus, this solution protects against the wrong thing: it protects payers&lt;br/&gt;&amp;gt;&amp;gt; against slow/unreliable intermediate nodes, it does not protect&lt;br/&gt;&amp;gt;&amp;gt; intermediate nodes against malicious payer/payee collusions.&lt;br/&gt;&amp;gt;&amp;gt; It protects only against intermediate nodes that inadvertently go offline&lt;br/&gt;&amp;gt;&amp;gt; during forwarding, but such nodes will inevitably lose out on the&lt;br/&gt;&amp;gt;&amp;gt; forwarding market anyway, and will disappear in the long run.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Up-Front Payment&lt;br/&gt;&amp;gt;&amp;gt; ----------------&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Payers pay for an attempt, not just the successful completion of an&lt;br/&gt;&amp;gt;&amp;gt; attempt.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; A variation on this is that the payer (or payee) continuously pays as&lt;br/&gt;&amp;gt;&amp;gt; long as the payment is pending.&lt;br/&gt;&amp;gt;&amp;gt; Further variations include paying by other means, such as just locking&lt;br/&gt;&amp;gt;&amp;gt; funds or paying with proof-of-work.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; While it certainly erects economic barriers against payer/payee&lt;br/&gt;&amp;gt;&amp;gt; collusions attacking intermediate nodes, it *also* erects economic barriers&lt;br/&gt;&amp;gt;&amp;gt; against normal, non-malicious payments.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; We can consider that economic barriers against non-malicious, low-value,&lt;br/&gt;&amp;gt;&amp;gt; high-frequency payments (&amp;#34;micropayments&amp;#34;) may be enough that such payments&lt;br/&gt;&amp;gt;&amp;gt; become infeasible if we impose up-front payment for mere attempts.&lt;br/&gt;&amp;gt;&amp;gt; Thus, while this solution is certainly something we can consider, we must&lt;br/&gt;&amp;gt;&amp;gt; be reluctant to use it due to its up-front, strict-evaluation behavior.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Proof-Of-Closure&lt;br/&gt;&amp;gt;&amp;gt; ================&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Observing the above, we want the properties for a &amp;#34;good&amp;#34; solution to&lt;br/&gt;&amp;gt;&amp;gt; griefing attacks to be:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * It should protect intermediate nodes against payer/payee collusions.&lt;br/&gt;&amp;gt;&amp;gt; * It should only come into play upon detection of an attack.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; We now present proof-of-closure, which (we hope) has the above properties.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; We can consider instead a softer timeout, distinct from the HTLC&lt;br/&gt;&amp;gt;&amp;gt; block-based timeout.&lt;br/&gt;&amp;gt;&amp;gt; This softer timeout is measurable in fractions of a second, e.g. units of&lt;br/&gt;&amp;gt;&amp;gt; 0.1 seconds.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Each node on the network advertises, in addition to a block-based&lt;br/&gt;&amp;gt;&amp;gt; `cltv_delta`, a `timeout_delta` in units of 0.1 seconds.&lt;br/&gt;&amp;gt;&amp;gt; Further, each invoice contains, in addition to a block-based&lt;br/&gt;&amp;gt;&amp;gt; `final_cltv`, a `final_timeout` in units of 0.1 seconds.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thus, there are two timeouts:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * The current &amp;#34;hard&amp;#34; block-based timeout that is enforceable onchain.&lt;br/&gt;&amp;gt;&amp;gt; * A new &amp;#34;soft&amp;#34; sidereal-time-based timeout that is not onchain&lt;br/&gt;&amp;gt;&amp;gt; enforceable.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The soft timeout, as mentioned, is not enforceable onchain.&lt;br/&gt;&amp;gt;&amp;gt; Instead, enforcement of the soft timeout *is* the act of putting the&lt;br/&gt;&amp;gt;&amp;gt; channel state onchain.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Now, for the current &amp;#34;hard&amp;#34; block-based timeout, we already have a&lt;br/&gt;&amp;gt;&amp;gt; reaction.&lt;br/&gt;&amp;gt;&amp;gt; If the HTLC &amp;#34;hard&amp;#34; timeout is approaching:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * Drop the channel onchain and enforce the hard timeout onchain to&lt;br/&gt;&amp;gt;&amp;gt; reclaim the funds in the HTLCs.&lt;br/&gt;&amp;gt;&amp;gt; * Wait for the onchain action to be deeply resolved (either timelock or&lt;br/&gt;&amp;gt;&amp;gt; hashlock branch is confirmed deeply) and report the result (success or&lt;br/&gt;&amp;gt;&amp;gt; fail) upstream.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; What happens if the &amp;#34;soft&amp;#34; timeout is violated?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * Drop the channel onchain.&lt;br/&gt;&amp;gt;&amp;gt; * Report the channel closure upstream.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The &amp;#34;hard&amp;#34; timeout is cancelled in any of these two conditions:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * A success is reported via `update_fulfill_htlc`, OR,&lt;br/&gt;&amp;gt;&amp;gt; * A failure is reported via `update_fail_htlc` AND the HTLC is&lt;br/&gt;&amp;gt;&amp;gt; irrevocably removed from the latest commitments/state(s) of the channel.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The &amp;#34;soft&amp;#34; timeout is cancelled in any of these three conditions, the&lt;br/&gt;&amp;gt;&amp;gt; first two of which are the same as above:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * A success is reported via `update_fulfill_htlc`, OR,&lt;br/&gt;&amp;gt;&amp;gt; * A failure is reported via `update_fail_htlc` AND the HTLC is&lt;br/&gt;&amp;gt;&amp;gt; irrevocably removed from the latest commitments/state(s) of the channel, OR&lt;br/&gt;&amp;gt;&amp;gt; * A channel closure is reported.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Let us fill this in more detail.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Suppose we have a payment route A-&amp;gt;B-&amp;gt;C-&amp;gt;E.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Both the &amp;#34;hard&amp;#34; block timeouts and the &amp;#34;soft&amp;#34; second timeouts decrement&lt;br/&gt;&amp;gt;&amp;gt; monotonically at each hop.&lt;br/&gt;&amp;gt;&amp;gt; Thus, the payee E has the shortest &amp;#34;hard&amp;#34; and &amp;#34;soft&amp;#34; timeouts (as normal).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * Suppose E then delays claiming the payment and violates the &amp;#34;soft&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt; timeout.&lt;br/&gt;&amp;gt;&amp;gt; * C then drops the CE channel onchain.&lt;br/&gt;&amp;gt;&amp;gt; * C reports, before its own timeout (slightly larger than the timeout&lt;br/&gt;&amp;gt;&amp;gt; imposed on E), the closing of the channel CE, to B.&lt;br/&gt;&amp;gt;&amp;gt; * B validates this report, and if valid, propagates the report to A.&lt;br/&gt;&amp;gt;&amp;gt; * A validates this report, and if valid, accepts that the payment will be&lt;br/&gt;&amp;gt;&amp;gt; &amp;#34;stuck&amp;#34; for up to the hard timeout it imposed on B.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; C has to report back to B in order to prevent B from closing the BC&lt;br/&gt;&amp;gt;&amp;gt; channel, and B has to report back to A in order to prevent A from closing&lt;br/&gt;&amp;gt;&amp;gt; the AB channel.&lt;br/&gt;&amp;gt;&amp;gt; The decrementing seconds-unit timeouts are needed for each hop, for the&lt;br/&gt;&amp;gt;&amp;gt; same reason that decrementing block-unit timeouts are needed.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Since E is motivated to attack intermediate nodes because it wants to&lt;br/&gt;&amp;gt;&amp;gt; redirect payment forwards through itself rather than its competitotrs,&lt;br/&gt;&amp;gt;&amp;gt; having one of its channels closed (which prevents it from being used for&lt;br/&gt;&amp;gt;&amp;gt; forwarding) is directly opposed to its end goal of getting more money,&lt;br/&gt;&amp;gt;&amp;gt; thus, we can believe the action of closing a channel involved in a griefing&lt;br/&gt;&amp;gt;&amp;gt; attack is sufficient disincentive.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The major drawback is that enforcement of the soft timeout *is* a channel&lt;br/&gt;&amp;gt;&amp;gt; closure, which is generally a negative for the network.&lt;br/&gt;&amp;gt;&amp;gt; This is not a remote attack vector, since a node can only trigger this&lt;br/&gt;&amp;gt;&amp;gt; closure if it is able to stall the fulfillment or failure of an HTLC on a&lt;br/&gt;&amp;gt;&amp;gt; channel, which generally means the node triggering this closure can only do&lt;br/&gt;&amp;gt;&amp;gt; so for its own channels (or it is able to, via a separate mechanism,&lt;br/&gt;&amp;gt;&amp;gt; remotely crash a different node).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Proving Channel Closes&lt;br/&gt;&amp;gt;&amp;gt; ----------------------&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; What C *really* needs to prove is that:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * It is *willing* to close a channel due to a violation of the soft&lt;br/&gt;&amp;gt;&amp;gt; timeout.&lt;br/&gt;&amp;gt;&amp;gt; * The channel it is willing to close was, in fact, involved in the same&lt;br/&gt;&amp;gt;&amp;gt; payment attempt.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; With the above, B can believe that C was innocent of wrongdoing, because:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * C would only be wiling to close a channel in case of a protocol&lt;br/&gt;&amp;gt;&amp;gt; violation, in this case, a violation of the soft timeout.&lt;br/&gt;&amp;gt;&amp;gt; * The channel it closed was closed because of this payment attempt, and&lt;br/&gt;&amp;gt;&amp;gt; not because of another payment attempt, or some other unrelated channel&lt;br/&gt;&amp;gt;&amp;gt; being unilaterally closed.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; First, what C needs to prove is *NOT*, in fact, actual channel closure:&lt;br/&gt;&amp;gt;&amp;gt; it needs to prove a *willingness* to close a channel.&lt;br/&gt;&amp;gt;&amp;gt; Thus, it does not require the channel to actually be *closed* yet, i.e.&lt;br/&gt;&amp;gt;&amp;gt; it does not have to wait for onchain activity that the channel closure is&lt;br/&gt;&amp;gt;&amp;gt; in a mempool and is confirmed deeply onchain etc etc.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thus, to prove a *willingness to close* rather than an actual close, C&lt;br/&gt;&amp;gt;&amp;gt; can provide the unilateral close of the channel CE.&lt;br/&gt;&amp;gt;&amp;gt; The act of unilaterally closing a channel is the publication of the&lt;br/&gt;&amp;gt;&amp;gt; transaction(s) making up the unilateral close.&lt;br/&gt;&amp;gt;&amp;gt; Thus, if C is *willing* to close the channel, it is willing to publish&lt;br/&gt;&amp;gt;&amp;gt; the transaction(s) involved, and thus, providing the unilateral close to B&lt;br/&gt;&amp;gt;&amp;gt; and further upstream, shows a willingness to close the channel.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; B then validates the provided proof-of-closure by checking that the&lt;br/&gt;&amp;gt;&amp;gt; unilateral close transaction is either onchain, in the mempool, or that it&lt;br/&gt;&amp;gt;&amp;gt; spends a TXO that is not currently spent by another transaction.&lt;br/&gt;&amp;gt;&amp;gt; In the case the unilateral close transaction is not confirmed and in the&lt;br/&gt;&amp;gt;&amp;gt; mempool, B can speed up its propagation on the Bitcoin layer by putting it&lt;br/&gt;&amp;gt;&amp;gt; in its own mempool as well --- after all, C is willing to close the channel&lt;br/&gt;&amp;gt;&amp;gt; to exonerate itself and punish the actual culprit, and B putting the&lt;br/&gt;&amp;gt;&amp;gt; unilateral close in its own mempool can only help C in what it is willing&lt;br/&gt;&amp;gt;&amp;gt; to do.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Secondly, C needs to prove that the channel it is willing to close&lt;br/&gt;&amp;gt;&amp;gt; involves the payment attempt, and is not some other channel closure that it&lt;br/&gt;&amp;gt;&amp;gt; is attempting to use to fulfill its own soft timeout.&lt;br/&gt;&amp;gt;&amp;gt; Since the unilateral close transaction *is* the proof-of-closure, B (and&lt;br/&gt;&amp;gt;&amp;gt; A) can inspect the transaction outputs and see (with some additional data&lt;br/&gt;&amp;gt;&amp;gt; from C) that one of the outputs is to an HTLC that matches the payment hash.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thus, B (and A) can believe that the proof-of-closure proves that whoever&lt;br/&gt;&amp;gt;&amp;gt; is presenting it is free of wrongdoing, as whoever is actually causing the&lt;br/&gt;&amp;gt;&amp;gt; delay has been punished (by someone being willing to close a channel with&lt;br/&gt;&amp;gt;&amp;gt; the culprit), and that the proof-of-closure commits to this particular&lt;br/&gt;&amp;gt;&amp;gt; payment attempt and no other (because it commits to a particular payment&lt;br/&gt;&amp;gt;&amp;gt; hash).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Further, if CE is closed by E dropping it onchain rather than C, C will&lt;br/&gt;&amp;gt;&amp;gt; still be able to fulfill its own soft timeout by taking the closing&lt;br/&gt;&amp;gt;&amp;gt; transaction from E, which should still contain the HTLC.&lt;br/&gt;&amp;gt;&amp;gt; Indeed, neither A nor B will particularly care (nor need to know) who&lt;br/&gt;&amp;gt;&amp;gt; dropped the channel onchain, or (for A) that the channel participants are C&lt;br/&gt;&amp;gt;&amp;gt; and E.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Update State Shenanigans&lt;br/&gt;&amp;gt;&amp;gt; ------------------------&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Bitcoin update mechanisms are complicated things, and it may be possible&lt;br/&gt;&amp;gt;&amp;gt; for an attacking payee E to fool around with the update state machine to&lt;br/&gt;&amp;gt;&amp;gt; make it difficult for C to report a willingness to close CE.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; In particular, I quote here the relevant passages from `lightning-rfc`,&lt;br/&gt;&amp;gt;&amp;gt; `02-peer-protocol.md`, which is an implementation of the Poon-Dryja update&lt;br/&gt;&amp;gt;&amp;gt; mechanism:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Thus each update traverses through the following states:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; 1. pending on the receiver&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; 2. in the receiver&amp;#39;s latest commitment transaction&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; 3. ... and the receiver&amp;#39;s previous commitment transaction has been&lt;br/&gt;&amp;gt;&amp;gt; revoked,&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;    and the update is pending on the sender&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; 4. ... and in the sender&amp;#39;s latest commitment transaction&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; 5. ... and the sender&amp;#39;s previous commitment transaction has been revoked&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The payee E is the &amp;#34;receiver&amp;#34; in this context.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; In this case, once the update has reached step 2, then E has a commitment&lt;br/&gt;&amp;gt;&amp;gt; transaction that it can put onchain, that contains an HTLC it can claim.&lt;br/&gt;&amp;gt;&amp;gt; From this step onward, C cannot send a failure (i.e. it cannot send back&lt;br/&gt;&amp;gt;&amp;gt; an `update_fail_htlc`) back to B, because E could drop its latest&lt;br/&gt;&amp;gt;&amp;gt; commitment onchain and claim the HTLC onchain.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; However, until step 4, C does not have a unilateral close containing the&lt;br/&gt;&amp;gt;&amp;gt; HTLC, and thus cannot provide a proof-of-closure that contains an HTLC that&lt;br/&gt;&amp;gt;&amp;gt; refers to the payment.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thus, between steps 2 to 4, C cannot safely respond to its own soft&lt;br/&gt;&amp;gt;&amp;gt; timeout.&lt;br/&gt;&amp;gt;&amp;gt; C cannot respond with a failure, as E could then drop its latest&lt;br/&gt;&amp;gt;&amp;gt; commitment transaction onchain and claim the payment from C, and extract&lt;br/&gt;&amp;gt;&amp;gt; money from C that way.&lt;br/&gt;&amp;gt;&amp;gt; C also cannot respond with a proof-of-closure, as it does not have a&lt;br/&gt;&amp;gt;&amp;gt; transaction that it can use to provide this proof.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The best that C can do would be to impose an even shorter timeout between&lt;br/&gt;&amp;gt;&amp;gt; steps 2 and 4 above, and to drop its current commitment transaction (which&lt;br/&gt;&amp;gt;&amp;gt; does not contain the HTLC yet and thus does not constitute a valid&lt;br/&gt;&amp;gt;&amp;gt; proof-of-closure) onchain.&lt;br/&gt;&amp;gt;&amp;gt; In between the time it drops the commitment transaction and its own&lt;br/&gt;&amp;gt;&amp;gt; incoming soft timeout, there is a chance, however small, that this&lt;br/&gt;&amp;gt;&amp;gt; transaction will be confirmed, and the channel will (with high probability)&lt;br/&gt;&amp;gt;&amp;gt; settle in a state where the HTLC is not instantiated, thus C can safely&lt;br/&gt;&amp;gt;&amp;gt; fail its incoming HTLC (not show a proof-of-closure, since that is not&lt;br/&gt;&amp;gt;&amp;gt; possible for C to do) without risk of loss, just prior to its own soft&lt;br/&gt;&amp;gt;&amp;gt; timeout.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Of course, C is still at risk here: E could collude with miners via a&lt;br/&gt;&amp;gt;&amp;gt; side-channel fee offer to confirm its commitment transaction with the HTLC&lt;br/&gt;&amp;gt;&amp;gt; present, and ensure that C is liable for the HTLC value.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; With Decker-Russell-Osuntokun, we can remove this risk by requiring a&lt;br/&gt;&amp;gt;&amp;gt; ritual as follows:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 1.  C requests exclusive access to update their single shared state.&lt;br/&gt;&amp;gt;&amp;gt;   * This can be done via a variety of sub-protocols, including a fair&lt;br/&gt;&amp;gt;&amp;gt; coin toss in case of near-simultaneous requests for exclusive locks on both&lt;br/&gt;&amp;gt;&amp;gt; sides.&lt;br/&gt;&amp;gt;&amp;gt; 2.  C provides the details of the new HTLC to E.&lt;br/&gt;&amp;gt;&amp;gt; 3.  C and E generate the new state transaction and exchange signatures&lt;br/&gt;&amp;gt;&amp;gt; for it.&lt;br/&gt;&amp;gt;&amp;gt; 4.  C and E generate (without signing) the new update transaction.&lt;br/&gt;&amp;gt;&amp;gt; 5.  E provides the signature (or share of signature, if MuSig) for the&lt;br/&gt;&amp;gt;&amp;gt; new update transaction to C.&lt;br/&gt;&amp;gt;&amp;gt; 6.  C provides the signature for the new update transaction to E, which&lt;br/&gt;&amp;gt;&amp;gt; releases the exclusive lock on the shared state atomically with the&lt;br/&gt;&amp;gt;&amp;gt; finalization of the new update transaction.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Prior to step 5, C can simply fail the incoming HTLC from B in case its&lt;br/&gt;&amp;gt;&amp;gt; own soft timeout is near.&lt;br/&gt;&amp;gt;&amp;gt; Even if E performs step 5 after C has already failed the incoming HTLC&lt;br/&gt;&amp;gt;&amp;gt; from B, C can simply not perform step 6 and drop the channel onchain with&lt;br/&gt;&amp;gt;&amp;gt; the previous update and state transactions.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; With Poon-Dryja, we will have to rearrange the order in which we perform&lt;br/&gt;&amp;gt;&amp;gt; things, effectively adding an extra communications turnaround between the&lt;br/&gt;&amp;gt;&amp;gt; participants.&lt;br/&gt;&amp;gt;&amp;gt; Specifically, the order would have to be revised to:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; 1. pending on the sender&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; 2. in the sender&amp;#39;s latest commitment transaction&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; 3. ... and the sender&amp;#39;s previous commitment transaction has been&lt;br/&gt;&amp;gt;&amp;gt; revoked,&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;    and the update is pending on the receiver&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; 4. ... and in the receiver&amp;#39;s latest commitment transaction&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; 5. ... and the receiver&amp;#39;s previous commitment transaction has been&lt;br/&gt;&amp;gt;&amp;gt; revoked&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; This allows the sender (C in our context) to provide a proof-of-closure&lt;br/&gt;&amp;gt;&amp;gt; after step 2, and before step 2, C can safely return a failure with&lt;br/&gt;&amp;gt;&amp;gt; `update_fail_htlc` (and refuse to proceed beyond step 2, thus ensuring it&lt;br/&gt;&amp;gt;&amp;gt; can still use the previous commitment that still has no HTLC).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Of course, this change will require redesigning the update state machine,&lt;br/&gt;&amp;gt;&amp;gt; increasing the number of communication turnarounds, and creating a subtle&lt;br/&gt;&amp;gt;&amp;gt; incompatbility when transitioning a payment from a hop that knows only the&lt;br/&gt;&amp;gt;&amp;gt; old update state machine to a hop that knows the new update state machine.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Purely Falsified Proof-Of-Closure&lt;br/&gt;&amp;gt;&amp;gt; ---------------------------------&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Of course, the attacking node E might want to create a false&lt;br/&gt;&amp;gt;&amp;gt; proof-of-closure.&lt;br/&gt;&amp;gt;&amp;gt; E can do this by simulating a Lightning channel: lock an amount of funds&lt;br/&gt;&amp;gt;&amp;gt; in a 2-of-2 (where E controls both keys), then spend it in a set of&lt;br/&gt;&amp;gt;&amp;gt; transactions mimicking the unilateral close.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; We observe, however, that the overhead of simulating a Lightning channel&lt;br/&gt;&amp;gt;&amp;gt; is the same as the overhead of actually creating and closing a Lightning&lt;br/&gt;&amp;gt;&amp;gt; channel.&lt;br/&gt;&amp;gt;&amp;gt; Since the punishment of proof-of-closure is to force attackers to have&lt;br/&gt;&amp;gt;&amp;gt; their channels closed, we can consider that this simulation of a channel&lt;br/&gt;&amp;gt;&amp;gt; open and close is sufficient as well.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Future-Proofing&lt;br/&gt;&amp;gt;&amp;gt; ---------------&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; This sketch of proof-of-closure can be used for any update mechanism:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * With Poon-Dryja, C can use its own commitment transaction as the&lt;br/&gt;&amp;gt;&amp;gt; proof-of-closure.&lt;br/&gt;&amp;gt;&amp;gt; * With Decker-Wattenhofer, C can give all the offchain transactions up to&lt;br/&gt;&amp;gt;&amp;gt; the last stage in the multi-stage decrementing-`nSequence` mechanism.&lt;br/&gt;&amp;gt;&amp;gt; * With Deckker-Russell-Osuntokun, C can give the latest update and state&lt;br/&gt;&amp;gt;&amp;gt; trnsaction.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Basically, we expect that for now, and in the future, any update&lt;br/&gt;&amp;gt;&amp;gt; mechanism worth consideration will have a concept of &amp;#34;unilateral close&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt; where a channel can be dropped onchain, using data that only one of the&lt;br/&gt;&amp;gt;&amp;gt; channel participants holds.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Such a unilateral close will be a sequence of one or more valid&lt;br/&gt;&amp;gt;&amp;gt; transactions, terminating in a transaction containing an HTLC-like contract&lt;br/&gt;&amp;gt;&amp;gt; in one of its outputs.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thus, to validate the unilateral close, it is only required to validate&lt;br/&gt;&amp;gt;&amp;gt; all the transactions contained in the proof-of-closure, and see that the&lt;br/&gt;&amp;gt;&amp;gt; last transaction has an HTLC output.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The limitations are thus:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * The acceptable forms of HTLC would need to be agreed-upon by the entire&lt;br/&gt;&amp;gt;&amp;gt; network.&lt;br/&gt;&amp;gt;&amp;gt; * Implementations would need to be able to assess, in a&lt;br/&gt;&amp;gt;&amp;gt; Bitcoin-consensus-compatible way, whether a transaction is valid or not.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Payment Decorrelation and Payment Points&lt;br/&gt;&amp;gt;&amp;gt; ----------------------------------------&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Of course, having a single payment hash for the entire payment attempt is&lt;br/&gt;&amp;gt;&amp;gt; a privacy loss, which we intend to fix in the near future by using payment&lt;br/&gt;&amp;gt;&amp;gt; points, and adding a blinding scalar at each hop, aka. payment&lt;br/&gt;&amp;gt;&amp;gt; decorrelation.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thus, in the future, there will not be any HTLC, but instead a PTLC.&lt;br/&gt;&amp;gt;&amp;gt; Further, the payment point at each hop will be changed at each hop, in&lt;br/&gt;&amp;gt;&amp;gt; order to prevent decorrelation.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thus, C needs to provide proofs:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * That an apparent singlesig on the unilateral close output is in fact a&lt;br/&gt;&amp;gt;&amp;gt; PTLC.&lt;br/&gt;&amp;gt;&amp;gt;   C needs to provide:&lt;br/&gt;&amp;gt;&amp;gt;   * A target point P.&lt;br/&gt;&amp;gt;&amp;gt;   * A partial signature that would spend that singlesig for a particular&lt;br/&gt;&amp;gt;&amp;gt; sighash.&lt;br/&gt;&amp;gt;&amp;gt;   * An adaptor signature which, with knowledge of the completed&lt;br/&gt;&amp;gt;&amp;gt; signature, adaptor signature, and sighash message, would have revealed the&lt;br/&gt;&amp;gt;&amp;gt; scalar behind P.&lt;br/&gt;&amp;gt;&amp;gt; * That the PTLC belongs to the same payment attempt as what B offered to&lt;br/&gt;&amp;gt;&amp;gt; C.&lt;br/&gt;&amp;gt;&amp;gt;   C needs to provide:&lt;br/&gt;&amp;gt;&amp;gt;   * The C-only blinding factor that is the difference between the payment&lt;br/&gt;&amp;gt;&amp;gt; point of the B-to-C PTLC and the C-to-E PTLC on the unilateral close.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Then, when B needs to propagate the proof-of-closure back to A, B simply&lt;br/&gt;&amp;gt;&amp;gt; adds its own blinding factor to the reported blinding factor, in order to&lt;br/&gt;&amp;gt;&amp;gt; convince A that this is the same payment attempt.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; As we have brought up privacy, we observe that, when this mechanism&lt;br/&gt;&amp;gt;&amp;gt; triggers, there is a mild privacy loss, in that intermediate nodes now know&lt;br/&gt;&amp;gt;&amp;gt; some channel closure that is related to this payment, and can thus&lt;br/&gt;&amp;gt;&amp;gt; determine the exact path that the payment attempt went through, at least&lt;br/&gt;&amp;gt;&amp;gt; until the channel being closed.&lt;br/&gt;&amp;gt;&amp;gt; However, proof-of-closure is only propagated in case of violation of the&lt;br/&gt;&amp;gt;&amp;gt; soft timeout, so for normal non-malicious payments, proof-of-closure does&lt;br/&gt;&amp;gt;&amp;gt; not cause any privacy loss.&lt;br/&gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&gt;&lt;br/&gt;&amp;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/lightning-dev/attachments/20200401/068762fe/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200401/068762fe/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T12:59:21Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqszpmqj6hjedw4zj8a4372zhqhksaz6lev9mz33mrt5ymahvj0uy4czypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qsm4x5u2</id>
    
      <title type="html">📅 Original date posted:2019-07-17 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqszpmqj6hjedw4zj8a4372zhqhksaz6lev9mz33mrt5ymahvj0uy4czypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qsm4x5u2" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsv35d6vl36c6p7dmlyue326nsqepdgxtqhtn4r3f4ccuts4ya2zdgp2pcrk&#39;&gt;nevent1q…pcrk&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-07-17&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Lloyd,&lt;br/&gt;&lt;br/&gt;Glad you like it :) And to address your concern, I think that although&lt;br/&gt;certainly it is possible for oracles to sell options contracts, it is also&lt;br/&gt;possible to have a more decentralized setup with normal DLC oracles (that&lt;br/&gt;can be used for all kinds of things as all they do is schnorr sign messages&lt;br/&gt;with pre-commited R values), and then have the CETs be 3-of-3 multisig&lt;br/&gt;outputs. In this way the oracle is still not learning about the contract,&lt;br/&gt;just like normal DLCs.&lt;br/&gt;&lt;br/&gt;Best,&lt;br/&gt;Nadav&lt;br/&gt;&lt;br/&gt;On Wed, Jul 17, 2019 at 11:23 AM Lloyd Fournier &amp;lt;lloyd.fourn at gmail.com&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi Nadav,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is cool idea. I always imagined oracles would either give their DLC&lt;br/&gt;&amp;gt; signatures away for free or work via a subscription model.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The downside to this proposal is that the seller of the signature knows&lt;br/&gt;&amp;gt; which signature they&amp;#39;re selling and therefore learns what kind of contract&lt;br/&gt;&amp;gt; the buyer must be involved in.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; LL&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Thu, Jul 18, 2019 at 1:37 AM Nadav Kohen &amp;lt;nadav at suredbits.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Hi All,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I recently posted a proposal here for a scheme through which a trusted&lt;br/&gt;&amp;gt;&amp;gt; data provider can utilize the Lightning Network to privately sell data&lt;br/&gt;&amp;gt;&amp;gt; where data is received atomically with purchase.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I&amp;#39;ve more recently been thinking about situations where a party, that is&lt;br/&gt;&amp;gt;&amp;gt; *not* trusted, is attempting to sell its signature to a known message. One&lt;br/&gt;&amp;gt;&amp;gt; example of a situation where this would be useful is if someone is trying&lt;br/&gt;&amp;gt;&amp;gt; to offer a DLC-like Option contract where they are essentially&lt;br/&gt;&amp;gt;&amp;gt; collateralizing themselves in a funding transaction and then selling their&lt;br/&gt;&amp;gt;&amp;gt; signatures to Contract Execution Transactions (CETs). In this example, we&lt;br/&gt;&amp;gt;&amp;gt; must ensure that the buyer of the signatures pays if and only if they&lt;br/&gt;&amp;gt;&amp;gt; receive valid signatures for the CETs which are known.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I believe that this is achievable in a relatively straightforward way if&lt;br/&gt;&amp;gt;&amp;gt; we were to use ZmnSCPxj&amp;#39;s proposed payment points with scalars (as opposed&lt;br/&gt;&amp;gt;&amp;gt; to payment hashes with pre-images). The (Schnorr) signature seller could&lt;br/&gt;&amp;gt;&amp;gt; give the buyer their one-time public key, `R = k*G`, through which the&lt;br/&gt;&amp;gt;&amp;gt; buyer could compute the payment point whose scalar is the seller&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt; signature: `sig*G = R &#43; h(m, R)*A` where `A` is the seller&amp;#39;s public key.&lt;br/&gt;&amp;gt;&amp;gt; Using this value as the payment point, the buyer could be assured that they&lt;br/&gt;&amp;gt;&amp;gt; pay if and only if they receive `sig` from the seller, where `sig` is the&lt;br/&gt;&amp;gt;&amp;gt; desired valid signature of `m`!&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Best,&lt;br/&gt;&amp;gt;&amp;gt; Nadav&lt;br/&gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&gt;&lt;br/&gt;&amp;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/lightning-dev/attachments/20190717/3c637967/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20190717/3c637967/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T12:55:38Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqstzwrxuw004t7s3wn5xzytuxyf5ztf50wrwvs24y6spfhsv954h2szypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qsjauzgs</id>
    
      <title type="html">📅 Original date posted:2019-07-17 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqstzwrxuw004t7s3wn5xzytuxyf5ztf50wrwvs24y6spfhsv954h2szypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qsjauzgs" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9ehd0sthlee7une9xhgnu57mml0ym9e398cjctydjxdh8udtgp0crs0zuu&#39;&gt;nevent1q…0zuu&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-07-17&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi All,&lt;br/&gt;&lt;br/&gt;I recently posted a proposal here for a scheme through which a trusted data&lt;br/&gt;provider can utilize the Lightning Network to privately sell data where&lt;br/&gt;data is received atomically with purchase.&lt;br/&gt;&lt;br/&gt;I&amp;#39;ve more recently been thinking about situations where a party, that is&lt;br/&gt;*not* trusted, is attempting to sell its signature to a known message. One&lt;br/&gt;example of a situation where this would be useful is if someone is trying&lt;br/&gt;to offer a DLC-like Option contract where they are essentially&lt;br/&gt;collateralizing themselves in a funding transaction and then selling their&lt;br/&gt;signatures to Contract Execution Transactions (CETs). In this example, we&lt;br/&gt;must ensure that the buyer of the signatures pays if and only if they&lt;br/&gt;receive valid signatures for the CETs which are known.&lt;br/&gt;&lt;br/&gt;I believe that this is achievable in a relatively straightforward way if we&lt;br/&gt;were to use ZmnSCPxj&amp;#39;s proposed payment points with scalars (as opposed to&lt;br/&gt;payment hashes with pre-images). The (Schnorr) signature seller could give&lt;br/&gt;the buyer their one-time public key, `R = k*G`, through which the buyer&lt;br/&gt;could compute the payment point whose scalar is the seller&amp;#39;s signature:&lt;br/&gt;`sig*G = R &#43; h(m, R)*A` where `A` is the seller&amp;#39;s public key. Using this&lt;br/&gt;value as the payment point, the buyer could be assured that they pay if and&lt;br/&gt;only if they receive `sig` from the seller, where `sig` is the desired&lt;br/&gt;valid signature of `m`!&lt;br/&gt;&lt;br/&gt;Best,&lt;br/&gt;Nadav&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/lightning-dev/attachments/20190717/95c848fb/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20190717/95c848fb/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T12:55:37Z</updated>
  </entry>

</feed>