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

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




  <entry>
    <id>https://njump.me/nevent1qqsg6v5vdruttk484v63hp64w5eum83cgcwg9p9zsw4u5m6jqwhpzygzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gz3atyv0</id>
    
      <title type="html">📅 Original date posted:2023-10-06 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsg6v5vdruttk484v63hp64w5eum83cgcwg9p9zsw4u5m6jqwhpzygzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gz3atyv0" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfr9mjn92je3u8yyr2cgtqnng27p56h3vc5dv2tq6vcvn59anxkqgjxasvc&#39;&gt;nevent1q…asvc&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-10-06&lt;br/&gt;🗒️ Summary of this message: Hierarchical channels allow for off-chain channel resizing and transactional scaling of Lightning. Timeout-trees can address liquidity imbalances, but fault-tolerance is a concern. A new version of the paper proposes a solution using fee-penalty outputs. Passive rollovers can eliminate the need for active rollovers.&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Antoine,&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;lt;i&amp;gt; &amp;#34;I also think resizing channels can be done fairly effectively off-chain&lt;br/&gt;&amp;gt;&amp;lt;/i&amp;gt;with hierarchical channels [1] (and even better with hierarchical channels&lt;br/&gt;&amp;gt;within timeout-trees)&amp;#34;.&lt;br/&gt;&lt;br/&gt;&amp;gt;Yes, transactional scaling of Lightning (i.e how many transfers can be&lt;br/&gt;&amp;gt;performed off-chain per on-chain transaction) sounds good at first sight,&lt;br/&gt;&amp;gt;though in practice liquidity unbalance due to asymmetries in liquidity&lt;br/&gt;&amp;gt;flows among counterparties is a bottleneck. Note, how the on-chain&lt;br/&gt;&amp;gt;splicing for LSP spec upgrade improves on this dimension and where&lt;br/&gt;&amp;gt;&amp;#34;resizing&amp;#34; or &amp;#34;pool rebalancing&amp;#34; aims to keep this off-chain.&lt;br/&gt;&lt;br/&gt;Yes, and note that with hierarchical channels you can use HTLCs to send Lightning channel capacity over the Lightning network [1], thus performing channel resizing off-chain between channels that aren&amp;#39;t in the same pool.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;lt;i&amp;gt; &amp;#34;With these proposals, it&amp;#39;s possible to dramatically limit the&lt;br/&gt;&amp;gt;&amp;lt;/i&amp;gt;interactivity&amp;#34;.&lt;br/&gt;&lt;br/&gt;&amp;gt;Yes, from my rough understanding of timeout-trees and channel resizing, it&lt;br/&gt;&amp;gt;sounds to suffer from the same issue as Jeremy radix-tree&amp;#39;s proposal or&lt;br/&gt;&amp;gt;Christian OG channel factory, namely the lack of fault-tolerance when one&lt;br/&gt;&amp;gt;of the casual user or end of tree balance owner aims to go on-chain. The&lt;br/&gt;&amp;gt;fragmentation cost sounds to be borne by all the users located in the tree&lt;br/&gt;&amp;gt;branch. Note fault-tolerance is one of the key payment pool design goals to&lt;br/&gt;&amp;gt;advance over factories.&lt;br/&gt;&lt;br/&gt;Actually, in the case of a timeout-tree, the fragmentation costs imposed by a casual user going on-chain are borne exclusively by the dedicated user who funded the timeout-tree.&lt;br/&gt;This makes it easier to address the problem by making the casual user pay the funder for the fragmentation costs.&lt;br/&gt;&lt;br/&gt;I think this is an important issue, so I created a new version of the paper that includes a description of how this can be done [2].&lt;br/&gt;The idea is to require casual users to reveal secrets (hash preimages) that only they know in order to put timeout-tree transactions on-chain.&lt;br/&gt;Then, a fee-penalty output is added to each leaf transaction that pays from the casual user to the funding user an amount that depends on which timeout-tree transactions the casual user put on-chain.&lt;br/&gt;The details are given in the new version of the paper ([2], Section 4.10, pp. 25-28).&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;lt;i&amp;gt; &amp;#34;I propose that if the active drain fails, the casual user should put&lt;br/&gt;&amp;gt;&amp;lt;/i&amp;gt;their channel in the old timeout-tree on-chain (so that it won&amp;#39;t timeout on&lt;br/&gt;&amp;gt;them). &amp;#34;&lt;br/&gt;&lt;br/&gt;&amp;gt;I think there is still some issue there where you need to handle the&lt;br/&gt;&amp;gt;malicious HTLC-withholding case along your multi-hop payment paths and wait&lt;br/&gt;&amp;gt;for the expiration. Then go on-chain to expire the old timeout-tree, which&lt;br/&gt;&amp;gt;might come with a high timevalue cost by default. Not saying keeping&lt;br/&gt;&amp;gt;timevalue cost low is solved for today&amp;#39;s Lightning.&lt;br/&gt;&lt;br/&gt;This is an excellent point that I hadn&amp;#39;t considered.&lt;br/&gt;I think the solution is to perform passive, rather than active, rollovers.&lt;br/&gt;Passive rollovers don&amp;#39;t require use of the Lightning network, so they completely eliminate the risk of HTLC-withholding attacks.&lt;br/&gt;I&amp;#39;ve added this advantage of passive rollovers in the latest version of the paper ([2], Section 4.4, p. 19).&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;lt;i&amp;gt; &amp;#34;These costs could be large, but hopefully they&amp;#39;re rare as they are&lt;br/&gt;&amp;gt;&amp;lt;/i&amp;gt;failures by dedicated users that can afford to have highly-available&lt;br/&gt;&amp;gt;hardware and who want to maintain a good reputation&amp;#34;.&lt;br/&gt;&lt;br/&gt;&amp;gt;Yes, though note as soon as a dedicated user starts to have a lot of&lt;br/&gt;&amp;gt;off-chain tree in the hand, and this is observable by adversaries the&lt;br/&gt;&amp;gt;dedicated user becomes an attack target (e.g for channel jamming or&lt;br/&gt;&amp;gt;time-dilation) which substantially alter the trade-offs.&lt;br/&gt;&lt;br/&gt;I believe channel jamming and HTLC-withholding attacks can be eliminated by using passive rollovers, as mentioned above.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;lt;i&amp;gt; &amp;#34;However, the paper has a proposal for the use of &amp;#34;short-cut&amp;#34;&lt;br/&gt;&amp;gt;&amp;lt;/i&amp;gt;transactions that may be able to eliminate this logarithmic blow-up&amp;#34;.&lt;br/&gt;&lt;br/&gt;&amp;gt;Yes &amp;#34;cut-through&amp;#34; to reduce on-chain footprint in mass exit cases has been&lt;br/&gt;&amp;gt;discussed since the early days of off-chain constructions and Taproot /&lt;br/&gt;&amp;gt;Grafroot introduction to the best of my knowledge, see:&lt;br/&gt;&amp;gt;&amp;lt;a href=&amp;#34;&lt;a href=&#34;https://tokyo2018.scalingbitcoin.org/transcript/tokyo2018/multi-party-channels-in-the-utxo-model-challenges-and-opportunities&amp;#34;&amp;gt;https://tokyo2018.scalingbitcoin.org/transcript/tokyo2018/multi-party-channels-in-the-utxo-model-challenges-and-opportunities&amp;lt;/a&amp;gt&#34;&gt;https://tokyo2018.scalingbitcoin.org/transcript/tokyo2018/multi-party-channels-in-the-utxo-model-challenges-and-opportunities&amp;#34;&amp;gt;https://tokyo2018.scalingbitcoin.org/transcript/tokyo2018/multi-party-channels-in-the-utxo-model-challenges-and-opportunities&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&lt;br/&gt;While I see &amp;#34;how do we cut-through to reduce the on-chain footprint in mass exit cases?&amp;#34; listed as an open problem in the above reference, I don&amp;#39;t see any specific solutions to that problem in that reference.&lt;br/&gt;&lt;br/&gt;The &amp;#34;short-cut&amp;#34; transactions I was referring to are defined in Section 5.4 and pictured in Figure 14 on p. 32 of the revised version of the paper [2].&lt;br/&gt;They are a specific proposal for addressing the logarithmic blow-up of putting a control transaction defined by a covenant tree on-chain.&lt;br/&gt;I agree that this has some similarities to the Graftroot proposal, but I believe it is distinct from proposals for addressing mass exit cases (and in fact it would not work well in those cases).&lt;br/&gt;&lt;br/&gt;&amp;gt;Few questions from reading Dave&amp;#39;s description of TP protocol here:&lt;br/&gt;&amp;gt;&amp;lt;a href=&amp;#34;&lt;a href=&#34;https://bitcoinops.org/en/newsletters/2023/03/29/#preventing-stranded-capital-with-multiparty-channels-and-channel-factories&amp;#34;&amp;gt;https://bitcoinops.org/en/newsletters/2023/03/29/#preventing-stranded-capital-with-multiparty-channels-and-channel-factories&amp;lt;/a&amp;gt&#34;&gt;https://bitcoinops.org/en/newsletters/2023/03/29/#preventing-stranded-capital-with-multiparty-channels-and-channel-factories&amp;#34;&amp;gt;https://bitcoinops.org/en/newsletters/2023/03/29/#preventing-stranded-capital-with-multiparty-channels-and-channel-factories&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt;.&lt;br/&gt;&lt;br/&gt;&amp;gt;In the scenario of multiple parties (e.g Alice, Bob, Caroll) owning a state&lt;br/&gt;&amp;gt;transaction &#43; control output, what prevents Caroll to double-spend Bob&amp;#39;s&lt;br/&gt;&amp;gt;revoked state transaction to a destination controlled by her in collusion&lt;br/&gt;&amp;gt;with Bob, at the harm of Alice ?&lt;br/&gt;&lt;br/&gt;Nothing prevents Bob from putting a revoked State transaction on-chain, and nothing prevents Carol from spending the first control output of that revoked State transaction in any manner she wishes.&lt;br/&gt;Doing so would allow Carol to obtain a tunable penalty (namely, the value of the first control output of Bob&amp;#39;s revoked State transaction), but it would not harm Alice in any way.&lt;br/&gt;Spending that output keeps Bob from being able to put his Commitment transaction on-chain.&lt;br/&gt;On the other hand, Alice can still put her Commitment transaction on-chain, and her payment from that Commitment transaction is unchanged, so she has not been harmed in any way.&lt;br/&gt;&lt;br/&gt;For example, see Figure 18 on p. 29 of [1].&lt;br/&gt;If Bob puts a revoked ST_Bh on-chain (where h &amp;lt; i and i is the current state number) and Carol spends the first control output of ST_Bh, Bob cannot put COM_Bi on-chain, but Alice can still put ST_Ai and COM_Ai on-chain.&lt;br/&gt;&lt;br/&gt;&amp;gt;In the scenario of multiple commitment transactions spending the same state&lt;br/&gt;&amp;gt;transaction of an offliner user, what prevents Caroll to fake offliness and&lt;br/&gt;&amp;gt;equivocate at the harm of Alice or another party ?&lt;br/&gt;&lt;br/&gt;There is never a case where multiple commitment transactions can spend an output from the same state transaction.&lt;br/&gt;For example, see Figure 18 on p. 29 of [1].&lt;br/&gt;Each user&amp;#39;s State transaction can only be spent by the same user&amp;#39;s Commitment transaction (e.g., COM_Ai spends an output from ST_Ai, COM_Bi spends an output from ST_Bi, and COM_Ci spends an output fromn ST_Ci).&lt;br/&gt;Furthermore, each Commitment transaction (at the 3-user hierarchical channel level) requires signatures from all 3 users in order to spend the value output from the Funding transaction F, so only the correct Commitment transaction can spend that output.&lt;br/&gt;&lt;br/&gt;&amp;gt;Still building my understanding of the TP protocol security model and&lt;br/&gt;&amp;gt;seeing where it converges / diverges w.r.t other off-chain constructions&lt;br/&gt;&amp;gt;trade-offs.&lt;br/&gt;&lt;br/&gt;Thanks for doing the deep-dive on these protocols!&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John&lt;br/&gt;&lt;br/&gt;[1] Law, &amp;#34;Resizing Lightning Channels Off-Chain With Hierarchical Channels&amp;#34;, &lt;a href=&#34;https://github.com/JohnLaw2/ln-hierarchical-channels&#34;&gt;https://github.com/JohnLaw2/ln-hierarchical-channels&lt;/a&gt;&lt;br/&gt;[2] Law, &amp;#34;Scaling Lightning With Simple Covenants, version 1.2&amp;#34;, &lt;a href=&#34;https://github.com/JohnLaw2/ln-scaling-covenants&#34;&gt;https://github.com/JohnLaw2/ln-scaling-covenants&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Sent with [Proton Mail](&lt;a href=&#34;https://proton.me/&#34;&gt;https://proton.me/&lt;/a&gt;) secure email.&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/20231006/7fda378a/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20231006/7fda378a/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-10-18T13:02:07Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsgh7dqqanzlzkse5uh9chuslypmmh7m2nu73pvhvhes0herqf8n9gzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzyu8u2h</id>
    
      <title type="html">📅 Original date posted:2023-09-16 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsgh7dqqanzlzkse5uh9chuslypmmh7m2nu73pvhvhes0herqf8n9gzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzyu8u2h" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswg7mpgnwk2hz6dej9wtjxwneu04r4jsmf67l9js0ph08hf97y0xqrst3ze&#39;&gt;nevent1q…t3ze&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-09-16&lt;br/&gt;🗒️ Summary of this message: The author agrees with the tradeoff between trust/safety and capital efficiency and suggests using hierarchical channels to improve efficiency. They also propose a change to Bitcoin consensus rules to address the &amp;#34;thundering herd&amp;#34; problem.&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi aj,&lt;br/&gt;&lt;br/&gt;I completely agree with your observation that there&amp;#39;s an important trust/safety vs. capital-efficiency tradeoff, and I almost completely agree with your analysis.&lt;br/&gt;&lt;br/&gt;&amp;gt; (There are probably ways around this with additional complexity: eg,&lt;br/&gt;&amp;gt; you could peer with a dedicated node, and have the timeout path be&lt;br/&gt;&amp;gt; &amp;#34;you&#43;them&#43;timeout&amp;#34;, so that while you could steal from casual users who&lt;br/&gt;&amp;gt; don&amp;#39;t rollover, you can&amp;#39;t steal from your dedicated peer, so that $4.5B&lt;br/&gt;&amp;gt; could be rolled into a channel with them, and used for routing)&lt;br/&gt;&lt;br/&gt;Yes, that would work, but I think it&amp;#39;s better to have dedicated user B pair with another dedicated user C such that each leaf of the timeout-tree funds a hierarchical channel [1] of the&lt;br/&gt;form (A_i, (B, C)), where A_i is a casual user.&lt;br/&gt;If A_i performs an active rollover, all funds not owned by A_i can *always* be used by B and C to route payments that are unrelated to the casual users in the timeout-tree (including both before and after A_i&amp;#39;s funds are drained).&lt;br/&gt;This idea was described in the &amp;#34;Improving Capital Efficiency&amp;#34; section of the post.&lt;br/&gt;&lt;br/&gt;Passive rollovers complicate this, as A_i&amp;#39;s funds are neither definitely in the old timeout-tree or in the new timeout-tree during the rollover.&lt;br/&gt;However, if one is willing to take on the complexity, it&amp;#39;s possible to use *your* (very cool!) idea of funding an HTLC from one of two possible sources, where one of those sources is guaranteed to eventually be available (but the offerer and offeree of the HTLC don&amp;#39;t know which one will be available to them) [2][3].&lt;br/&gt;In this case, B and C could use the funds from the old and the new timeout-trees that are not owned by A_i to route payments.&lt;br/&gt;If A_i puts the leaf in the old timeout-tree on-chain, B and C use funds from the new timeout-tree to fund their HTLC (and vice-versa).&lt;br/&gt;&lt;br/&gt;Even if hierarchical channels are used to improve the capital efficiency, I think the &amp;#34;thundering herd&amp;#34; problem is a big concern.&lt;br/&gt;This could play out very poorly in practice, as casual users would gain experience with ever larger timeout-trees and not have any problems.&lt;br/&gt;Then, suddenly, a large number of dedicated users collude by failing to roll-over timeout-trees at the same time, and they create enough congestion on the blockchain that they&amp;#39;re able to steal a large fraction of the casual users&amp;#39; funds.&lt;br/&gt;&lt;br/&gt;I have a proposed change to the Bitcoin consensus rules that I think could address this problem.&lt;br/&gt;Basically, rather than have timeout-trees expire at a given block height, they should expire only after a sufficient number of low-fee blocks have been added to the blockchain after some given block height.&lt;br/&gt;As a result, if dedicated users colluded and tried to steal funds by not rolling-over a group of timeout-trees, the thundering herd of transactions from casual users would push up the fees enough to prevent the timeout-trees from expiring, thus safeguarding the casual user&amp;#39;s funds.&lt;br/&gt;In fact, the impact to the dedicated users (in addition to their loss of reputation) would be that their capital would be unavailable to them for a longer period of time.&lt;br/&gt;Thus, this should be effective in deterring dedicated users from attempting such a theft.&lt;br/&gt;On the other hand, when the dedicated users do roll-over funds correctly, there is no delay in the old timeout-trees&amp;#39; expiries, and thus better capital efficiency.&lt;br/&gt;&lt;br/&gt;There are lots of details to the idea and I&amp;#39;m currently in the process of writing a paper and post describing it.&lt;br/&gt;A couple more quick details:&lt;br/&gt;* rather than counting low-fee blocks, time is measured in low-fee windows, where the size of the window is programmable (this makes it much harder for dishonest miners to collude with the dedicated users by creating enough fake low-fee blocks, not containing the casual users&amp;#39; higher-fee timeout-tree transactions, to enabe the theft; it also reduces the compute cost for counting the low-fee windows),&lt;br/&gt;* the threshold for a &amp;#34;low-fee&amp;#34; block is programmable,&lt;br/&gt;* there is a bound on how long one keeps waiting for low-fee windows (in order to bound the storage and compute overheads), and&lt;br/&gt;* a similar technique supports relative, rather than absolute, delays.&lt;br/&gt;&lt;br/&gt;I think such a mechanism is likely to be useful in many areas, including HTLCs, but that timeout-trees really highlight the need for something like this.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John&lt;br/&gt;&lt;br/&gt;[1] Law, &amp;#34;Resizing Lightning Channels Off-Chain With Hierarchical Channels&amp;#34;, &lt;a href=&#34;https://github.com/JohnLaw2/ln-hierarchical-channels&#34;&gt;https://github.com/JohnLaw2/ln-hierarchical-channels&lt;/a&gt;&lt;br/&gt;[2] Towns, &amp;#34;Re: Resizing Lightning Channels Off-Chain With Hierarchical Channels&amp;#34;, &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-April/003913.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-April/003913.html&lt;/a&gt;&lt;br/&gt;[3] Law, &amp;#34;Re: Resizing Lightning Channels Off-Chain With Hierarchical Channels&amp;#34;, &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-April/003917.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-April/003917.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Sent with Proton Mail secure email.
    </content>
    <updated>2023-09-19T10:29:42Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsxa8zqf5y52fmg9dadr08xlv0ffm6acqft5w5t495c4lt837lq9jgzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzl2yz94</id>
    
      <title type="html">📅 Original date posted:2023-09-16 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsxa8zqf5y52fmg9dadr08xlv0ffm6acqft5w5t495c4lt837lq9jgzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzl2yz94" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0g9gvtat9m792684u7njzxkf8r5mmzr6hgsu90huzqruaynps9cg32ajrx&#39;&gt;nevent1q…ajrx&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-09-16&lt;br/&gt;🗒️ Summary of this message: The paper presents some interesting ideas, but there are concerns about the increased cost of enforcement. Short-cut transactions could help address this issue. In worst case scenarios, there may be a 2x penalty on the number of on-chain transactions. In cases where the user fails to rollover, relying on legal and custody policies may be preferable.&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Rusty,&lt;br/&gt;&lt;br/&gt;&amp;gt;         I&amp;#39;ve read the start of the paper on my vacation, and am still&lt;br/&gt;&amp;gt; digesting it.  But even so far, it presents some delightful&lt;br/&gt;&amp;gt; possibilities.&lt;br/&gt;&lt;br/&gt;Great!&lt;br/&gt;&lt;br/&gt;&amp;gt; As with some other proposals, it&amp;#39;s worth noting that the cost of&lt;br/&gt;&amp;gt; enforcement is dramatically increased.  It&amp;#39;s no longer one or two txs,&lt;br/&gt;&amp;gt; it&amp;#39;s 10&#43;.  If the &amp;#34;dedicated user&amp;#34; contributes some part of the expected&lt;br/&gt;&amp;gt; fee, the capital efficiency is reduced (and we&amp;#39;re back to &amp;#34;how much is&lt;br/&gt;&amp;gt; enough?&amp;#34;).&lt;br/&gt;&lt;br/&gt;Yes, this is certainly an issue, and it affects both settling the channel on-chain and resolving HTLCS on-chain.&lt;br/&gt;The paper has a few ideas about how &amp;#34;short-cut&amp;#34; transactions could be used to address the cost of enforcing HTLCs on-chain.&lt;br/&gt;It may be possible to do something similar for the channel itself, but that&amp;#39;s more complex because of the value included in the channel and the potential for channels with different capacities in a single timeout-tree.&lt;br/&gt;&lt;br/&gt;&amp;gt; But worst case (dramatic dedicated user failure) it&amp;#39;s only a 2x penalty&lt;br/&gt;&amp;gt; on number of onchain txs, which seems acceptable if the network is&lt;br/&gt;&amp;gt; sufficiently mature that these failure events are rare.&lt;br/&gt;&lt;br/&gt;&amp;gt; Note also that the (surprisingly common!) &amp;#34;user goes away&amp;#34; case where&lt;br/&gt;&amp;gt; the casual user fails to rollover only returns funds to the dedicated&lt;br/&gt;&amp;gt; user; relying on legal and normal custody policies in this case may be&lt;br/&gt;&amp;gt; preferable to an eternal burden on the UTXO set with the current&lt;br/&gt;&amp;gt; approach!&lt;br/&gt;&lt;br/&gt;Agreed.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;John&lt;br/&gt;&lt;br/&gt;&amp;gt; Thankyou!&lt;br/&gt;&amp;gt; Rusty.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Sent with Proton Mail secure email.
    </content>
    <updated>2023-09-19T10:29:42Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsd7k7ftpk4w24j3j3dew0899rqwsmmyth2frgcd3th4qs2dzzrhaqzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gz30ck3w</id>
    
      <title type="html">📅 Original date posted:2023-09-16 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsd7k7ftpk4w24j3j3dew0899rqwsmmyth2frgcd3th4qs2dzzrhaqzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gz30ck3w" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2up27p2m4tpt4jsuvequrt80ar5vfsxa9ypelp8wflwugst8sjwgh66rr4&#39;&gt;nevent1q…6rr4&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-09-16&lt;br/&gt;🗒️ Summary of this message: The paper presents some interesting ideas, but there are concerns about the increased cost of enforcement and the complexity of implementing them.&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Rusty,&lt;br/&gt;&lt;br/&gt;&amp;gt;         I&amp;#39;ve read the start of the paper on my vacation, and am still&lt;br/&gt;&amp;gt; digesting it.  But even so far, it presents some delightful&lt;br/&gt;&amp;gt; possibilities.&lt;br/&gt;&lt;br/&gt;Great!&lt;br/&gt;&lt;br/&gt;&amp;gt; As with some other proposals, it&amp;#39;s worth noting that the cost of&lt;br/&gt;&amp;gt; enforcement is dramatically increased.  It&amp;#39;s no longer one or two txs,&lt;br/&gt;&amp;gt; it&amp;#39;s 10&#43;.  If the &amp;#34;dedicated user&amp;#34; contributes some part of the expected&lt;br/&gt;&amp;gt; fee, the capital efficiency is reduced (and we&amp;#39;re back to &amp;#34;how much is&lt;br/&gt;&amp;gt; enough?&amp;#34;).&lt;br/&gt;&lt;br/&gt;Yes, this is certainly an issue, and it affects both settling the channel on-chain and resolving HTLCS on-chain.&lt;br/&gt;The paper has a few ideas about how &amp;#34;short-cut&amp;#34; transactions could be used to address the cost of enforcing HTLCs on-chain.&lt;br/&gt;It may be possible to do something similar for the channel itself, but that&amp;#39;s more complex because of the value included in the channel and the potential for channels with different capacities in a single timeout-tree.&lt;br/&gt;&lt;br/&gt;&amp;gt; But worst case (dramatic dedicated user failure) it&amp;#39;s only a 2x penalty&lt;br/&gt;&amp;gt; on number of onchain txs, which seems acceptable if the network is&lt;br/&gt;&amp;gt; sufficiently mature that these failure events are rare.&lt;br/&gt;&lt;br/&gt;&amp;gt; Note also that the (surprisingly common!) &amp;#34;user goes away&amp;#34; case where&lt;br/&gt;&amp;gt; the casual user fails to rollover only returns funds to the dedicated&lt;br/&gt;&amp;gt; user; relying on legal and normal custody policies in this case may be&lt;br/&gt;&amp;gt; preferable to an eternal burden on the UTXO set with the current&lt;br/&gt;&amp;gt; approach!&lt;br/&gt;&lt;br/&gt;Agreed.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;John&lt;br/&gt;&lt;br/&gt;&amp;gt; Thankyou!&lt;br/&gt;&amp;gt; Rusty.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Sent with Proton Mail secure email.
    </content>
    <updated>2023-09-19T10:19:29Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsx7n85lprn2y9jrq82zjvxnjj7dxx9emn2jn8y786c0r6ylhl5wnszyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzqv9hke</id>
    
      <title type="html">📅 Original date posted:2023-09-16 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsx7n85lprn2y9jrq82zjvxnjj7dxx9emn2jn8y786c0r6ylhl5wnszyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzqv9hke" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsd7k7ftpk4w24j3j3dew0899rqwsmmyth2frgcd3th4qs2dzzrhaqcwfclv&#39;&gt;nevent1q…fclv&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-09-16&lt;br/&gt;🗒️ Summary of this message: The main point of the conversation is that in order for Bitcoin and Lightning to be widely adopted, they need to cater to casual users who want easy payments. The focus is on onboarding scalability and providing multiple channels to as many users as possible.&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Antoine,&lt;br/&gt;&lt;br/&gt;Thanks for your note. Responses are in-line below:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi John,&lt;br/&gt;&lt;br/&gt;&amp;gt; Thanks for the proposal, few feedback after a first look.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;lt;i&amp;gt; If Bitcoin and Lightning are to become widely-used, they will have to be adopted by casual users who want to send and receive bitcoin, but &amp;gt; who do not want to go to any effort in order to provide the infrastructure for making payments.&lt;br/&gt;&amp;gt; &amp;lt;/i&amp;gt;&amp;gt;&amp;lt;i&amp;gt; Instead, it&amp;#39;s reasonable to expect that the Lightning infrastructure will be provided by dedicated users who are far less numerous than&lt;br/&gt;&amp;gt; &amp;lt;/i&amp;gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t know if it is that simple to classify expected users in&lt;br/&gt;&amp;gt; &amp;#34;casual&amp;#34;-vs&amp;#34;dedicated&amp;#34; and then design protocols accordingly. In&lt;br/&gt;&amp;gt; practice, if you take today Lightning as an example the trust&lt;br/&gt;&amp;gt; assumptions is more a matrix than a dichotomie, e.g you have the&lt;br/&gt;&amp;gt; choice between full-node vs light client to get block-relay,&lt;br/&gt;&amp;gt; large-sized mempool vs small mempool or no mempool at all for fee&lt;br/&gt;&amp;gt; estimations, routing HTLCs or not, running local watchtower or not...&lt;br/&gt;&amp;gt; without all those choices being necessarily interdependent. Generally,&lt;br/&gt;&amp;gt; I would say &amp;#34;tell me your IO disk/bandwidth/CPU performance/fees&lt;br/&gt;&amp;gt; ressources and level of technical knowledge and I&amp;#39;ll tell you what&lt;br/&gt;&amp;gt; level of trust-minimization you can afford&amp;#34;.&lt;br/&gt;&lt;br/&gt;Fair enough.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m sure there are users with a wide range of expertise, resources, and interest in supporting Bitcoin.&lt;br/&gt;My main point is that there&amp;#39;s a huge pool of potential users that just want payments to work, and they don&amp;#39;t want to devote time or hardware resources to making them work (if they can get away with that).&lt;br/&gt;I also think we should do whatever we can to meet their needs.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;lt;i&amp;gt; This difference in numbers implies that the key challenge in scaling Bitcoin and Lightning is providing bitcoin and Lightning to casual&lt;br/&gt;&amp;gt; &amp;lt;/i&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;lt;i&amp;gt; users.&lt;br/&gt;&amp;gt; &amp;lt;/i&amp;gt;&amp;gt;&amp;lt;i&amp;gt; As a result, the rest of this post will focus on this challenge.&lt;br/&gt;&amp;gt; &amp;lt;/i&amp;gt;&lt;br/&gt;&amp;gt; I think few different scaling notions can be introduced to measure the&lt;br/&gt;&amp;gt; performance of an off-chain construction. Onboarding scaling defining&lt;br/&gt;&amp;gt; how many users can co-exist off-chain, considering throughput limits&lt;br/&gt;&amp;gt; (e.g blocksize, average block interval). Transactional scaling&lt;br/&gt;&amp;gt; defining how many transfers can be performed off-chain per on-chain&lt;br/&gt;&amp;gt; transaction, considering the properties of the off-chain system. Users&lt;br/&gt;&amp;gt; resource scaling defining how much resource a user should mobilize /&lt;br/&gt;&amp;gt; consume (e.g average weight cost for cooperative /  non-cooperative&lt;br/&gt;&amp;gt; close) to make a trust-minimized usage of the off-chain construction.&lt;br/&gt;&amp;gt; I think the proposal is mainly considering onboarding scalability, i.e&lt;br/&gt;&amp;gt; maxing out the number of channels that can be owned by a user though&lt;br/&gt;&amp;gt; it is unclear if other scalability dimensions are weighted in.&lt;br/&gt;&lt;br/&gt;Yes, exactly.&lt;br/&gt;I&amp;#39;ve focused on providing multiple channels to as many casual users as possible.&lt;br/&gt;&lt;br/&gt;In terms of other scalability dimensions, I think Lightning does a great job of providing a nearly unbounded number of payments per channel, without requiring on-chain transactions (once the channel is created).&lt;br/&gt;I also think resizing channels can be done fairly effectively off-chain with hierarchical channels [1] (and even better with hierarchical channels within timeout-trees).&lt;br/&gt;&lt;br/&gt;&amp;gt; In particular, no known protocol that uses the current Bitcoin&lt;br/&gt;&amp;gt; consensus rules allows a large number (e.g., tens-of-thousands to&lt;br/&gt;&amp;gt; millions) of Lightning channels, each co-owned by a casual user, to be&lt;br/&gt;&amp;gt; created from a single on-chain unspent transaction output (UTXO).&lt;br/&gt;&lt;br/&gt;&amp;gt; I’m not sure if this statement is 100% accurate. One could create a&lt;br/&gt;&amp;gt; radixpool with replacing CTV usage with Musig2 where the end&lt;br/&gt;&amp;gt; transactions outputs bear Lightning channel:&lt;br/&gt;&amp;gt; &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-June/017968.html.&amp;#34;&amp;gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-June/017968.html.&amp;lt;/a&amp;gt&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-June/017968.html.&amp;#34;&amp;gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-June/017968.html.&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&lt;br/&gt;&amp;gt; Of course there is no N-party update mechanism to rebalance the&lt;br/&gt;&amp;gt; channel internally and it’s a nightmare if a subranch of transactions&lt;br/&gt;&amp;gt; with some depth hit the chain, though I think it works with today&lt;br/&gt;&amp;gt; Bitcoin consensus rules.&lt;br/&gt;&lt;br/&gt;I agree that it&amp;#39;s theoretically possible to use signatures to create Lightning channels for a million casual users that are funded by a single UTXO.&lt;br/&gt;I just don&amp;#39;t believe that that is possible in practice, due to the need to get a million casual users to sign a transaction where the transaction specifies the casual users that need to sign it.&lt;br/&gt;&lt;br/&gt;&amp;gt; The requirement for casual users to sign transactions that specify the&lt;br/&gt;&amp;gt; exact set of casual users whose signatures are required creates a very&lt;br/&gt;&amp;gt; difficult group coordination problem that&amp;#39;s not well-suited to the&lt;br/&gt;&amp;gt; behavior of casual users [9, Section 2.2].&lt;br/&gt;&lt;br/&gt;&amp;gt; I think you have two more precise problems designated under this group&lt;br/&gt;&amp;gt; coordination problem. One is the dynamic novation of this group, i.e&lt;br/&gt;&amp;gt; how you add / remove user, if possible in a compact fashion. The&lt;br/&gt;&amp;gt; second the dynamic update of the “account” / channels owned by the&lt;br/&gt;&amp;gt; users of this group, if possible with minimal interactivity.&lt;br/&gt;&lt;br/&gt;Yes, changing who pairs with whom and resizing channels are both important problems.&lt;br/&gt;&lt;br/&gt;I propose that changing pairings be done only via the creation and expiry of timeout-trees (with users that want to keep pairing with the same dedicated user(s) doing so via passive rollovers).&lt;br/&gt;I propose that channel resizing is mainly done via hierarchical channels, with any resizing that&amp;#39;s not possible to do off-chain in that manner being done via creation and expiry of timeout-trees.&lt;br/&gt;&lt;br/&gt;With these proposals, it&amp;#39;s possible to dramatically limit the interactivity.&lt;br/&gt;&lt;br/&gt;For example, if every channel created by a timeout-tree is a hierarchical channel of the form:&lt;br/&gt;* (casual user, (dedicated user, dedicated user)), or&lt;br/&gt;* (dedicated user, (dedicated user, dedicated user)), or&lt;br/&gt;* ((dedicated user, dedicated user), (dedicated user, dedicated user)),&lt;br/&gt;then at most four users ever have to coordinate to update any channel, and at most one of those users is ever a casual user.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;lt;i&amp;gt; On the other hand, sometime shortly before E, casual user A_i can use the Lightning Network to send all of their balance in the channel &amp;gt; &amp;gt; (A_i, B) to themselves in some other Lightning channel that is the leaf of some other timeout-tree.&lt;br/&gt;&amp;gt; &amp;lt;/i&amp;gt;&lt;br/&gt;&amp;gt; I think there is an uncertainty in this model as there is no guarantee&lt;br/&gt;&amp;gt; that you have a dedicated user ready to be the gateway to route the&lt;br/&gt;&amp;gt; balance, neither the dedicated user have adequate channel topology&lt;br/&gt;&amp;gt; allowing to send the funds in the part of the network you wish to do&lt;br/&gt;&amp;gt; so. And this is unclear what the casual user is left to do if an&lt;br/&gt;&amp;gt; intermediate hop withhold the HTLC in-flight until the timeout-tree&lt;br/&gt;&amp;gt; mature in favor of the dedicated user, iiuc.&lt;br/&gt;&lt;br/&gt;&amp;gt; So I think draining is uncertain in a world where jamming is possible,&lt;br/&gt;&amp;gt; even assuming economic mitigation as one might earn more to jam a&lt;br/&gt;&amp;gt; casual user draining than loosing in jamming upfront fees.&lt;br/&gt;&lt;br/&gt;I agree that active draining by the casual user is uncertain.&lt;br/&gt;I propose that if the active drain fails, the casual user should put their channel in the old timeout-tree on-chain (so that it won&amp;#39;t timeout on them).&lt;br/&gt;Sorry that wasn&amp;#39;t clear.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;lt;i&amp;gt; Of course, sometime between E - to_self_delay_i and E, A_i should verify that B has created such a new timeout-tree.&lt;br/&gt;&amp;gt; &amp;lt;/i&amp;gt;&lt;br/&gt;&amp;gt; I think this requirement is altering the design goal introduced at&lt;br/&gt;&amp;gt; first on casual users “performing actions at specific times in the&lt;br/&gt;&amp;gt; future” as from my understanding there is no guarantee B broadcast an&lt;br/&gt;&amp;gt; on-chain transaction triggering the move of A funds to the new&lt;br/&gt;&amp;gt; timeout-tree. This becomes unclear when A should take correction&lt;br/&gt;&amp;gt; actions like broadcasting its own control transaction (?) when B fails&lt;br/&gt;&amp;gt; to dos, especially in a world where you have mempool congestion, and&lt;br/&gt;&amp;gt; earlier you’re better it might in term of fee risk.&lt;br/&gt;&lt;br/&gt;Ideally, I&amp;#39;d like casual users to only perform actions when they want to send or receive a payment.&lt;br/&gt;Unfortunately, I don&amp;#39;t know how to do that.&lt;br/&gt;As a result, I&amp;#39;ve been forced to add a requirement that each casual user turns on their wallet software for a few minutes (but at a time of their choosing!) every few months (with the exact number of months being selected by the user) [2].&lt;br/&gt;I agree this isn&amp;#39;t ideal, but I think it&amp;#39;s much better than having them have to perform some action at a specific time or within a very limited time window (such as a day or a week).&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;lt;i&amp;gt; Fortunately, timeout-trees can be used to provide casual users with immediately-accessible off-chain bitcoin in addition to bitcoin in&lt;br/&gt;&amp;gt; &amp;lt;/i&amp;gt;&lt;br/&gt;&amp;gt; I think this is unclear what is meant by “immediately-accessible”&lt;br/&gt;&amp;gt; here, if they’re confirmed or not. Pre-signed / pre-committed&lt;br/&gt;&amp;gt; transactions at a fixed feerate might still not propagate on the&lt;br/&gt;&amp;gt; network, due to mempool min fee, and the user might have to take&lt;br/&gt;&amp;gt; actions in consequence like access hot wallet and sign a CPFP.&lt;br/&gt;&lt;br/&gt;I agree that the bitcoin may not be obtained if the user hasn&amp;#39;t signed and submitted a transaction with sufficient fees.&lt;br/&gt;I tried to address this issue in the &amp;#34;Limitations&amp;#34; section of the post (specifically, Limitationss 2 and 3).&lt;br/&gt;&lt;br/&gt;I think that getting a reliable transport mechanism for packages is critical.&lt;br/&gt;&lt;br/&gt;Getting fees right could be particularly challenging due to the &amp;#34;thundering herd&amp;#34; problem, as _aj_ pointed out.&lt;br/&gt;As I noted in my response to him, I think an additional change to Bitcoin that allows timing based on fee levels could be very helpful.&lt;br/&gt;I&amp;#39;ll try to write up the details and get that out as soon as possible.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;lt;i&amp;gt; In reality, their on-chain footprint would be dominated by users who don&amp;#39;t follow the protocol due to errors, unavailability, or malicious &amp;gt; intent.&lt;br/&gt;&amp;gt; &amp;lt;/i&amp;gt;&lt;br/&gt;&amp;gt; The fault-tolerance of such off-chain construction is very unclear i.e&lt;br/&gt;&amp;gt; if for any unavailable or erring user the whole off-chain construction&lt;br/&gt;&amp;gt; ends up on-chain. This is one significant defect in my opinion of the&lt;br/&gt;&amp;gt; radixpool or old school apo channel factory (or even coinpool if no&lt;br/&gt;&amp;gt; time-locked kick-out transaction is used), if one user becomes&lt;br/&gt;&amp;gt; unresponsive after a while.&lt;br/&gt;&lt;br/&gt;With a timeout-tree, if the dedicated user(s) funding the tree is unavailable (or makes an error) and fails to rollover a given casual user, that casual user should put their channel in the old timeout-tree on-chain.&lt;br/&gt;If the failure applies to all channels in the timeout-tree, the entire timeout-tree will be forced to go on-chain (thus doubling the number of on-chain transactions as compared to just putting the channels on-chain directly, without a timeout-tree).&lt;br/&gt;Sorry this wasn&amp;#39;t made clear.&lt;br/&gt;&lt;br/&gt;These costs could be large, but hopefully they&amp;#39;re rare as they are failures by dedicated users that can afford to have highly-available hardware and who want to maintain a good reputation.&lt;br/&gt;&lt;br/&gt;Separately, HTLCs that are not resolved off-chain have to be put on-chain, but doing so does not force the timeout-tree itself to go on-chain.&lt;br/&gt;If the HTLC control transactions are funded via zero-valued covenant trees (as proposed in the post and paper), putting an HTLC transaction on-chain can also require putting its ancestors in the covenant tree on-chain (thus creating a blow-up that is logarithmic in the number of leaves in the covenant tree).&lt;br/&gt;However, the paper has a proposal for the use of &amp;#34;short-cut&amp;#34; transactions that may be able to eliminate this logarithmic blow-up.&lt;br/&gt;&lt;br/&gt;Thanks for your thoughtful comments and please let me know if there&amp;#39;s anything else that wasn&amp;#39;t clear.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John&lt;br/&gt;&lt;br/&gt;&amp;gt; Best,&lt;br/&gt;&lt;br/&gt;&amp;gt; Antoine&lt;br/&gt;&lt;br/&gt;[1] Law, &amp;#34;Resizing Lightning Channels Off-Chain With Hierarchical Channels&amp;#34;, &lt;a href=&#34;https://github.com/JohnLaw2/ln-hierarchical-channels&#34;&gt;https://github.com/JohnLaw2/ln-hierarchical-channels&lt;/a&gt;&lt;br/&gt;[2] Law, &amp;#34;Watchtower-Free Lightning Channels For Casual Users&amp;#34;, &lt;a href=&#34;https://github.com/JohnLaw2/ln-watchtower-free&#34;&gt;https://github.com/JohnLaw2/ln-watchtower-free&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Sent with [Proton Mail](&lt;a href=&#34;https://proton.me/&#34;&gt;https://proton.me/&lt;/a&gt;) secure email.&lt;br/&gt;&lt;br/&gt;&amp;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/20230917/556e2033/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20230917/556e2033/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-09-19T10:19:29Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqs009ydpmrs4gvpe6ze5u2ymmr44p2ftfqxx9dgenke80fqcaym9uszyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzwqj9ra</id>
    
      <title type="html">📅 Original date posted:2023-09-16 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqs009ydpmrs4gvpe6ze5u2ymmr44p2ftfqxx9dgenke80fqcaym9uszyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzwqj9ra" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8ga0whvcljfjd7x4u2mqkg9xm2ua9c354uezn0s7vglycmd4w5eq7g7ce8&#39;&gt;nevent1q…7ce8&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-09-16&lt;br/&gt;🗒️ Summary of this message: The author agrees with the tradeoff between trust/safety and capital efficiency and suggests using hierarchical channels to improve efficiency. They also propose a change to Bitcoin consensus rules to address the &amp;#34;thundering herd&amp;#34; problem.&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi aj,&lt;br/&gt;&lt;br/&gt;I completely agree with your observation that there&amp;#39;s an important trust/safety vs. capital-efficiency tradeoff, and I almost completely agree with your analysis.&lt;br/&gt;&lt;br/&gt;&amp;gt; (There are probably ways around this with additional complexity: eg,&lt;br/&gt;&amp;gt; you could peer with a dedicated node, and have the timeout path be&lt;br/&gt;&amp;gt; &amp;#34;you&#43;them&#43;timeout&amp;#34;, so that while you could steal from casual users who&lt;br/&gt;&amp;gt; don&amp;#39;t rollover, you can&amp;#39;t steal from your dedicated peer, so that $4.5B&lt;br/&gt;&amp;gt; could be rolled into a channel with them, and used for routing)&lt;br/&gt;&lt;br/&gt;Yes, that would work, but I think it&amp;#39;s better to have dedicated user B pair with another dedicated user C such that each leaf of the timeout-tree funds a hierarchical channel [1] of the&lt;br/&gt;form (A_i, (B, C)), where A_i is a casual user.&lt;br/&gt;If A_i performs an active rollover, all funds not owned by A_i can *always* be used by B and C to route payments that are unrelated to the casual users in the timeout-tree (including both before and after A_i&amp;#39;s funds are drained).&lt;br/&gt;This idea was described in the &amp;#34;Improving Capital Efficiency&amp;#34; section of the post.&lt;br/&gt;&lt;br/&gt;Passive rollovers complicate this, as A_i&amp;#39;s funds are neither definitely in the old timeout-tree or in the new timeout-tree during the rollover.&lt;br/&gt;However, if one is willing to take on the complexity, it&amp;#39;s possible to use *your* (very cool!) idea of funding an HTLC from one of two possible sources, where one of those sources is guaranteed to eventually be available (but the offerer and offeree of the HTLC don&amp;#39;t know which one will be available to them) [2][3].&lt;br/&gt;In this case, B and C could use the funds from the old and the new timeout-trees that are not owned by A_i to route payments.&lt;br/&gt;If A_i puts the leaf in the old timeout-tree on-chain, B and C use funds from the new timeout-tree to fund their HTLC (and vice-versa).&lt;br/&gt;&lt;br/&gt;Even if hierarchical channels are used to improve the capital efficiency, I think the &amp;#34;thundering herd&amp;#34; problem is a big concern.&lt;br/&gt;This could play out very poorly in practice, as casual users would gain experience with ever larger timeout-trees and not have any problems.&lt;br/&gt;Then, suddenly, a large number of dedicated users collude by failing to roll-over timeout-trees at the same time, and they create enough congestion on the blockchain that they&amp;#39;re able to steal a large fraction of the casual users&amp;#39; funds.&lt;br/&gt;&lt;br/&gt;I have a proposed change to the Bitcoin consensus rules that I think could address this problem.&lt;br/&gt;Basically, rather than have timeout-trees expire at a given block height, they should expire only after a sufficient number of low-fee blocks have been added to the blockchain after some given block height.&lt;br/&gt;As a result, if dedicated users colluded and tried to steal funds by not rolling-over a group of timeout-trees, the thundering herd of transactions from casual users would push up the fees enough to prevent the timeout-trees from expiring, thus safeguarding the casual user&amp;#39;s funds.&lt;br/&gt;In fact, the impact to the dedicated users (in addition to their loss of reputation) would be that their capital would be unavailable to them for a longer period of time.&lt;br/&gt;Thus, this should be effective in deterring dedicated users from attempting such a theft.&lt;br/&gt;On the other hand, when the dedicated users do roll-over funds correctly, there is no delay in the old timeout-trees&amp;#39; expiries, and thus better capital efficiency.&lt;br/&gt;&lt;br/&gt;There are lots of details to the idea and I&amp;#39;m currently in the process of writing a paper and post describing it.&lt;br/&gt;A couple more quick details:&lt;br/&gt;* rather than counting low-fee blocks, time is measured in low-fee windows, where the size of the window is programmable (this makes it much harder for dishonest miners to collude with the dedicated users by creating enough fake low-fee blocks, not containing the casual users&amp;#39; higher-fee timeout-tree transactions, to enabe the theft; it also reduces the compute cost for counting the low-fee windows),&lt;br/&gt;* the threshold for a &amp;#34;low-fee&amp;#34; block is programmable,&lt;br/&gt;* there is a bound on how long one keeps waiting for low-fee windows (in order to bound the storage and compute overheads), and&lt;br/&gt;* a similar technique supports relative, rather than absolute, delays.&lt;br/&gt;&lt;br/&gt;I think such a mechanism is likely to be useful in many areas, including HTLCs, but that timeout-trees really highlight the need for something like this.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John&lt;br/&gt;&lt;br/&gt;[1] Law, &amp;#34;Resizing Lightning Channels Off-Chain With Hierarchical Channels&amp;#34;, &lt;a href=&#34;https://github.com/JohnLaw2/ln-hierarchical-channels&#34;&gt;https://github.com/JohnLaw2/ln-hierarchical-channels&lt;/a&gt;&lt;br/&gt;[2] Towns, &amp;#34;Re: Resizing Lightning Channels Off-Chain With Hierarchical Channels&amp;#34;, &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-April/003913.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-April/003913.html&lt;/a&gt;&lt;br/&gt;[3] Law, &amp;#34;Re: Resizing Lightning Channels Off-Chain With Hierarchical Channels&amp;#34;, &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-April/003917.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-April/003917.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Sent with Proton Mail secure email.
    </content>
    <updated>2023-09-19T10:19:28Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsddykxvk4g7ne6ca9qhst8qp0ns5vzep3w7xwv9vh25k74ph5ny7qzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzraywcg</id>
    
      <title type="html">📅 Original date posted:2023-09-08 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsddykxvk4g7ne6ca9qhst8qp0ns5vzep3w7xwv9vh25k74ph5ny7qzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzraywcg" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfcnlzyzdeqy7nr9z40lyw5dnyks0jgv0r9ecaxapq6nt38dtznjqn2f0a0&#39;&gt;nevent1q…f0a0&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-09-08&lt;br/&gt;🗒️ Summary of this message: Adding covenants to Bitcoin&amp;#39;s consensus rules, such as CheckTemplateVerify (CTV) and AnyPrevOut (APO), would greatly improve the scalability of Lightning for casual users. These changes would allow for the creation of millions of Lightning channels using a single UTXO, support resizing channels off-chain, provide liquidity to casual users, charge penalties for attempting to put an old state on-chain, and allow casual users to monitor the blockchain without a watchtower service. Implementing these changes would make Lightning a widely-used means of payment.&lt;br/&gt;📝 Original message:&lt;br/&gt;TL;DR&lt;br/&gt;=====&lt;br/&gt;* The key challenge in scaling Lightning in a trust-free manner is the creation of Lightning channels for casual users.&lt;br/&gt;  - It appears that signature-based factories are inherently limited to creating at most tens or hundreds of Lightning channels per UTXO.&lt;br/&gt;  - In contrast, simple covenants (including those enabled by CTV [1] or APO [2]) would allow a single UTXO to create Lightning channels for millions of casual users.&lt;br/&gt;* The resulting covenant-based protocols also:&lt;br/&gt;  - support resizing channels off-chain,&lt;br/&gt;  - use the same capital to simultaneously provide in-bound liquidity to casual users and route unrelated payments for other users,&lt;br/&gt;  - charge casual users tunable penalties for attempting to put an old state on-chain, and&lt;br/&gt;  - allow casual users to monitor the blockchain for just a few minutes every few months without employing a watchtower service.&lt;br/&gt;* As a result, adding CTV and/or APO to Bitcoin&amp;#39;s consensus rules would go a long way toward making Lightning a widely-used means of payment.&lt;br/&gt;&lt;br/&gt;Overview&lt;br/&gt;========&lt;br/&gt;&lt;br/&gt;Many proposed changes to the Bitcoin consensus rules, including CheckTemplateVerify (CTV) [1] and AnyPrevOut (APO) [2], would support covenants.&lt;br/&gt;While covenants have been shown to improve Bitcoin in a number of ways, scalability of Lightning is not typically listed as one of them.&lt;br/&gt;This post argues that any change (including CTV and/or APO) that enables even simple covenants greatly improves Lightning&amp;#39;s scalability, while meeting the usability requirements of casual users.&lt;br/&gt;A more complete description, including figures, is given in a paper [3].&lt;br/&gt;&lt;br/&gt;The Scalability Problem&lt;br/&gt;=======================&lt;br/&gt;&lt;br/&gt;If Bitcoin and Lightning are to become widely-used, they will have to be adopted by casual users who want to send and receive bitcoin, but who do not want to go to any effort in order to provide the infrastructure for making payments.&lt;br/&gt;Instead, it&amp;#39;s reasonable to expect that the Lightning infrastructure will be provided by dedicated users who are far less numerous than the casual users.&lt;br/&gt;In fact, there are likely to be tens-of-thousands to millions of casual users per dedicated user.&lt;br/&gt;This difference in numbers implies that the key challenge in scaling Bitcoin and Lightning is providing bitcoin and Lightning to casual users.&lt;br/&gt;As a result, the rest of this post will focus on this challenge.&lt;br/&gt;&lt;br/&gt;Known Lightning protocols allow casual users to perform Lightning payments without:&lt;br/&gt; * maintaining high-availability,&lt;br/&gt; * performing actions at specific times in the future, or&lt;br/&gt; * having to trust a third-party (such as a watchtower service) [5][6].&lt;br/&gt;&lt;br/&gt;In addition, they support tunable penalties for casual users who attempt to put an old channel state on-chain (for example, due to a crash that causes a loss of state).&lt;br/&gt;As a result, these protocols meet casual users&amp;#39; needs and could become widely-used for payments if they were sufficiently scalable.&lt;br/&gt;&lt;br/&gt;The Lightning Network lets users send and receive bitcoin off-chain in a trust-free manner [4].&lt;br/&gt;Furthermore, there are Lightning protocols that allow Lightning channels to be resized off-chain [7].&lt;br/&gt;Therefore, making Lightning payments and resizing Lightning channels are highly scalable operations.&lt;br/&gt;&lt;br/&gt;However, providing Lightning channels to casual users is not scalable.&lt;br/&gt;In particular, no known protocol that uses the current Bitcoin consensus rules allows a large number (e.g., tens-of-thousands to millions) of Lightning channels, each co-owned by a casual user, to be created from a single on-chain unspent transaction output (UTXO).&lt;br/&gt;As a result, being able to create (and close) casual users&amp;#39; Lightning channels remains the key bottleneck in scaling Lightning.&lt;br/&gt;&lt;br/&gt;Casual Users And Signatures&lt;br/&gt;===========================&lt;br/&gt;&lt;br/&gt;Unfortunately, there are good reasons to believe this bottleneck is unavoidable given the current Bitcoin consensus rules.&lt;br/&gt;The problem is that in order for a casual user to co-own a Lightning channel, they must co-own an on-chain UTXO [8].&lt;br/&gt;Therefore, if a large number of casual users are to each co-own a Lightning channel, all of which are funded by a single UTXO, that UTXO must require signatures from all of those casual users.&lt;br/&gt;&lt;br/&gt;In practice, the problem is much harder than just getting signatures from a large number of casual users, as the signatures themselves depend on the exact set of casual users whose signatures are required.&lt;br/&gt;For example, if a UTXO requires signatures from a set of 1,000 casual users and if 999 of them sign but one does not, the 999 signatures that were obtained can&amp;#39;t be used.&lt;br/&gt;Instead, one has to start all over again, say with a new UTXO that requires signatures from the 999 users that signed the previous time.&lt;br/&gt;However, if not all of those 999 sign, the signatures that were obtained in the second try are also unusable.&lt;br/&gt;&lt;br/&gt;The requirement for casual users to sign transactions that specify the exact set of casual users whose signatures are required creates a very difficult group coordination problem that&amp;#39;s not well-suited to the behavior of casual users [9, Section 2.2].&lt;br/&gt;As a result, while a channel factory could be used to fund channels for perhaps 10 or even 100 casual users, it&amp;#39;s very unlikely that any protocol using the current Bitcoin consensus rules can fund tens-of-thousands to millions of channels from a single UTXO.&lt;br/&gt;&lt;br/&gt;Simple Covenants And Timeout-Trees&lt;br/&gt;==================================&lt;br/&gt;&lt;br/&gt;On the other hand, if the consensus rules are changed to allow even simple covenants, this scaling bottleneck is eliminated.&lt;br/&gt;The key observation is that with covenants, a casual user can co-own an off-chain Lightning channel without having to sign all (or any) of the transactions on which it depends.&lt;br/&gt;Instead, a UTXO can have a covenant that guarantees the creation of the casual user&amp;#39;s channel.&lt;br/&gt;The simplest way to have a single UTXO create channels for a large number of casual users is to put a covenant on the UTXO that forces the creation of a tree of transactions, the leaves of which are the casual users&amp;#39; channels.&lt;br/&gt;&lt;br/&gt;While such a covenant tree can create channels for millions of casual users without requiring signatures or solving a difficult group coordination problem, it&amp;#39;s not sufficient for scaling.&lt;br/&gt;The problem is that each channel created by a covenant tree has a fixed set of owners, and changing the ownership of a channel created by a covenant tree requires putting the channel on-chain.&lt;br/&gt;Therefore, assuming that all casual users will eventually want to pair with different dedicated users (and vice-versa), the covenant tree doesn&amp;#39;t actually provide any long-term scaling benefit.&lt;br/&gt;&lt;br/&gt;Fortunately, real long-term scaling can be achieved by adding a deadline after which all non-leaf outputs in the covenant tree can be spent without having to meet the conditions of the covenant.&lt;br/&gt;The resulting covenant tree is called a &amp;#34;timeout-tree&amp;#34; [9, Section 5.3].&lt;br/&gt;&lt;br/&gt;Let A_1 ... A_n denote a large number of casual users, let B be a dedicated user, and let E denote some fixed time in the future.&lt;br/&gt;User B creates a timeout-tree with expiry E where:&lt;br/&gt; * leaf i has an output that funds a Lightning channel owned by A_i and B, and&lt;br/&gt; * after time E, each non-leaf output in the covenant tree can also be spent by user B without having to meet the conditions of the covenant.&lt;br/&gt;&lt;br/&gt;Thus, any time before E, casual user A_i can put the Lightning channel (A_i, B) on-chain by putting all of its ancestors in the timeout-tree on-chain.&lt;br/&gt;Once (A_i, B) is on-chain, the expiry E has no effect so A_i and B can continue to use the Lightning channel to send and receive payments from and to A_i.&lt;br/&gt;&lt;br/&gt;On the other hand, sometime shortly before E, casual user A_i can use the Lightning Network to send all of their balance in the channel (A_i, B) to themselves in some other Lightning channel that is the leaf of some other timeout-tree.&lt;br/&gt;More precisely, casual user A_i should rollover their balance by sending it from a given timeout-tree between time E - to_self_delay_i and time E, where E is the timeout-tree&amp;#39;s expiry and to_self_delay_i is A_i&amp;#39;s Lightning channel safety parameter.&lt;br/&gt;Note that to_self_delay_i can be in the range of 1 to 3 months if a watchtower-free channel protocol is used [5][6], so performing the drain within this time window does not put an unreasonable availability requirement on A_i.&lt;br/&gt;&lt;br/&gt;If all casual users drain their balances from the timeout-tree before E, then after E dedicated user B can create a new timeout-tree, with leaves that create Lightning channels for a new set of casual users, by putting a single transaction on-chain that spends the UTXO which created the expired timeout-tree.&lt;br/&gt;In this case, all n of the old Lightning channels are closed and n new channels are created with a single on-chain transaction.&lt;br/&gt;&lt;br/&gt;Of course, it&amp;#39;s possible that some casual users will put their Lightning channel in the old timeout-tree on-chain, while others will drain their balance from the timeout-tree before E.&lt;br/&gt;In this case, user B can create a new timeout-tree that&amp;#39;s funded by the non-leaf outputs of the old timeout-tree that have been put on-chain.&lt;br/&gt;While this results in a larger on-chain footprint than the case in which all casual users drain their balances from the old timeout-tree, it can still provide substantial scaling as long as the number of leaves put on-chain is small (in particular, well below n/(log n)).&lt;br/&gt;By creating incentives that reward users who drain their balances from the timeout-tree rather than putting their channels on-chain, almost all leaves will stay off-chain and good scalability will be achieved.&lt;br/&gt;&lt;br/&gt;Passive Rollovers For Casual Users&lt;br/&gt;==================================&lt;br/&gt;&lt;br/&gt;The timeout-trees defined above don&amp;#39;t place unreasonable availability requirements on casual users and they allow a very large number of casual users to obtain a Lightning channel with a single on-chain transaction.&lt;br/&gt;However, there are two problems with forcing casual users to drain their balances from an old timeout-tree to a new timeout-tree before the old timeout-tree&amp;#39;s expiry:&lt;br/&gt;  1) if a casual user fails to perform the required drain before the old timeout-tree&amp;#39;s expiry (due to unexpected unavailability), they lose all of their funds in the timeout-tree, and&lt;br/&gt;  2) if the dedicated user B is unavailable when a casual user attempts to drain their funds prior to the timeout-tree&amp;#39;s expiry, the casual user will put their timeout-tree leaf on-chain (thus increasing the on-chain footprint and limiting scalability).&lt;br/&gt;This second problem matters, as a casual user should only have to devote a short period (e.g., 10 minutes) every few months to performing the drain, so even a short period of unavailability by the dedicated user could force the casual user to go on-chain.&lt;br/&gt;&lt;br/&gt;Instead, it would be preferable if the dedicated user could facilitate the rollover of the casual user&amp;#39;s funds from a timeout-tree that&amp;#39;s about to expire to another one without requiring input from the casual user.&lt;br/&gt;This can be achieved by using a variation of the FFO-WF Lightning channel protocol [6].&lt;br/&gt;The FFO-WF protocol uses control transactions to determine the current state of the Lightning channel and the resolution of any outstanding HTLCs, and these control transactions determine how the channel&amp;#39;s value transactions disperse the channel&amp;#39;s funds.&lt;br/&gt;&lt;br/&gt;As a result, just prior to E - to_self_delay_i, B can create a new timeout-tree that funds a new Lightning channel with casual user A_i where the new channel is controlled by A_i&amp;#39;s *same* control transactions (thus allowing A_i to obtain their funds from either the old or new Lightning channel, but not from both).&lt;br/&gt;Therefore, once the old timeout-tree expires, A_i can still access their funds in the new timeout-tree&amp;#39;s Lightning channel without having to perform any actions.&lt;br/&gt;Of course, sometime between E - to_self_delay_i and E, A_i should verify that B has created such a new timeout-tree.&lt;br/&gt;&lt;br/&gt;In addition, HTLCs can be handled so that rolling over the casual user&amp;#39;s funds from one timeout-tree to another does not require any actions from the casual user.&lt;br/&gt;The details are given in the paper [3].&lt;br/&gt;&lt;br/&gt;Off-Chain bitcoin&lt;br/&gt;=================&lt;br/&gt;&lt;br/&gt;The Lightning Network lets casual users send and receive bitcoin entirely off-chain&lt;br/&gt;However, the casual user has to wait (for a period of time specified by their Lightning partner&amp;#39;s to_self_delay parameter) before they can access their Lightning funds on-chain.&lt;br/&gt;This is problematic, as accessing one&amp;#39;s Lightning funds on-chain requires paying fees to put transactions on-chain, and those fees cannot be paid using one&amp;#39;s Lightning funds (due to the delay mentioned above).&lt;br/&gt;Thus, while Lightning can be used for most of a user&amp;#39;s funds, the user must also be able to access some bitcoin (enough to pay transaction fees) without any delays.&lt;br/&gt;&lt;br/&gt;Fortunately, timeout-trees can be used to provide casual users with immediately-accessible off-chain bitcoin in addition to bitcoin in Lightning channels.&lt;br/&gt;Furthermore, it&amp;#39;s possible to use a control output owned by a casual user to rollover the casual user&amp;#39;s immediately-accessible bitcoin from one timeout-tree to the next along with their Lightning funds [3].&lt;br/&gt;In fact, this rollover can also be done without requiring any actions from the casual user and it can be used to rebalance the fraction of the user&amp;#39;s funds that are immediately-accessible versus within Lightning [3].&lt;br/&gt;&lt;br/&gt;Control UTXOs&lt;br/&gt;=============&lt;br/&gt;&lt;br/&gt;The FFO-WF protocol (as adapted for timeout-trees) requires that each casual user own an independent UTXO that is spent by that user&amp;#39;s control transactions.&lt;br/&gt;Creating an on-chain UTXO for every casual user could require a significant on-chain footprint, thus limiting scalability.&lt;br/&gt;Instead, each casual user can be given an off-chain UTXO that is created by a leaf of a tree of off-chain transactions defined by covenants [3].&lt;br/&gt;&lt;br/&gt;Improving Capital Efficiency&lt;br/&gt;============================&lt;br/&gt;&lt;br/&gt;In order to rollover funds from one timeout-tree to another, the dedicated user creating those timeout-trees must fund both the old and new timeout-trees simultaneously, even though they only create one timeout-tree&amp;#39;s worth of Lightning channel capacity.&lt;br/&gt;Fortunately, this overhead can be made very small by funding multiple timeout-trees in a staggered fashion, where only one has to be rolled-over at a time [3].&lt;br/&gt;&lt;br/&gt;Also, because casual users may send and receive payments infrequently, the dedicated user&amp;#39;s capital devoted to timeout-trees may generate few routing fees.&lt;br/&gt;As a result, casual users may have to pay significant fees for the creation of their Lightning channels (and/or for payments to or from those channels).&lt;br/&gt;&lt;br/&gt;However, the fees that casual users have to pay could be reduced if the capital in their channels could also be used for routing payments between other users.&lt;br/&gt;This can be accomplished by having the timeout-trees create hierarchical channels, each of which is owned by a single casual user and a pair of dedicated users [7].&lt;br/&gt;By using an idea created by Towns [10][11][3], a single unit of capital in each hierarchical channel can be used to route two independent payments of one unit each.&lt;br/&gt;&lt;br/&gt;Scalability&lt;br/&gt;===========&lt;br/&gt;&lt;br/&gt;The above protocols can perform the following actions completely off-chain:&lt;br/&gt;  * Lightning sends and receives, and&lt;br/&gt;  * resizing of Lightning channels.&lt;br/&gt;&lt;br/&gt;Assuming:&lt;br/&gt;  * 1 million hierarchical Lightning channels per timeout-tree,&lt;br/&gt;  * a 1,000-block (about a week) to_self_delay parameter for dedicated users, and&lt;br/&gt;  * a 10,000-block (about 69 days) to_self_delay parameter for casual users, and&lt;br/&gt;  * 121,000 blocks (about 2.3 years) from the creation of each timeout-tree to its expiry,&lt;br/&gt;&lt;br/&gt;a single 1-input/2-output transaction per block provides:&lt;br/&gt;  * 11 Lightning channels per casual user to each of 10 billion casual users [3].&lt;br/&gt;&lt;br/&gt;Furthermore, given the above assumptions, a single 1-input/2-output transaction per block allows each casual user to:&lt;br/&gt;  * close an existing Lightning channel,&lt;br/&gt;  * open a new Lightning channel with a new partner, and&lt;br/&gt;  * rebalance funds between Lightning and immediately-accessible off-chain bitcoin&lt;br/&gt;once every 10,000 blocks (about 69 days) [3].&lt;br/&gt;&lt;br/&gt;Of course, the above calculations don&amp;#39;t mean that 10 billion casual Lightning users would create only 1 on-chain transaction per block.&lt;br/&gt;In reality, their on-chain footprint would be dominated by users who don&amp;#39;t follow the protocol due to errors, unavailability, or malicious intent.&lt;br/&gt;The rate of such protocol violations is hard to predict, but it&amp;#39;s likely that casual users&amp;#39; unavailability would be the most significant problem.&lt;br/&gt;&lt;br/&gt;Usability&lt;br/&gt;=========&lt;br/&gt;&lt;br/&gt;The above protocols have the following properties for casual users:&lt;br/&gt;  * watchtower-freedom (that is, they accommodate months-long unavailability without requiring a watchtower service to secure the user&amp;#39;s funds) ([5] Section 3.1),&lt;br/&gt;  * one-shot receives (that is, receiving a payment does not require performing actions at multiple blockheights) ([5] Section 3.4),&lt;br/&gt;  * asynchronous receives (that is, it&amp;#39;s possible to receive a payment when the sender is offline) ([5] Section 3.6), and&lt;br/&gt;  * tunable penalties for attempting to put an old state on-chain ([12]).&lt;br/&gt;&lt;br/&gt;Limitations&lt;br/&gt;===========&lt;br/&gt;&lt;br/&gt;Finally, the above results depend on the following assumptions:&lt;br/&gt;  1) the cost of resolving an HTLC on-chain is less than the value of the HTLC,&lt;br/&gt;  2) transaction packages are relayed reliably from users to miners, and&lt;br/&gt;  3) there is a known upper bound on the delay from when a package is submitted to when it is included in the blockchain.&lt;br/&gt;&lt;br/&gt;These limitations, and ideas for how they can be addressed, are discussed further in the paper [3].&lt;br/&gt;&lt;br/&gt;Conclusions&lt;br/&gt;===========&lt;br/&gt;&lt;br/&gt;With the current Bitcoin consensus rules, there are reasons to believe that the scalability of Lightning is inherently limited.&lt;br/&gt;However, simple covenants and timeout-trees can overcome these scalability limitations.&lt;br/&gt;In particular, CheckTemplateVerify (CTV) and/or AnyPrevOut (APO) could be used to dramatically increase the number of casual users who send and receive bitcoin in a trust-free manner.&lt;br/&gt;As a result, it&amp;#39;s hoped that CTV, APO or a similar mechanism that enables simple covenants will be added to Bitcoin&amp;#39;s consensus rules in order to allow Lightning to become a widely-used means of payment.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John&lt;br/&gt;&lt;br/&gt;[1] BIP 119 CHECKTEMPLATEVERIFY, &lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0119.mediawiki&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0119.mediawiki&lt;/a&gt;&lt;br/&gt;[2] BIP 118 SIGHASH_ANYPREVOUT, &lt;a href=&#34;https://anyprevout.xyz/&#34;&gt;https://anyprevout.xyz/&lt;/a&gt;&lt;br/&gt;[3] Law, &amp;#34;Scaling Lightning With Simple Covenants&amp;#34;, &lt;a href=&#34;https://github.com/JohnLaw2/ln-scaling-covenants&#34;&gt;https://github.com/JohnLaw2/ln-scaling-covenants&lt;/a&gt;&lt;br/&gt;[4] &amp;#34;BOLT (Basis Of Lightning Technology) specifications&amp;#34;, &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc&#34;&gt;https://github.com/lightningnetwork/lightning-rfc&lt;/a&gt;&lt;br/&gt;[5] Law, &amp;#34;Watchtower-Free Lightning Channels For Casual Users&amp;#34;, &lt;a href=&#34;https://github.com/JohnLaw2/ln-watchtower-free&#34;&gt;https://github.com/JohnLaw2/ln-watchtower-free&lt;/a&gt;&lt;br/&gt;[6] Law, &amp;#34;Factory-Optimized Channel Protocols For Lightning&amp;#34;, available at &lt;a href=&#34;https://github.com/JohnLaw2/ln-factory-optimized&#34;&gt;https://github.com/JohnLaw2/ln-factory-optimized&lt;/a&gt;.&lt;br/&gt;[7] Law, &amp;#34;Resizing Lightning Channels Off-Chain With Hierarchical Channels&amp;#34;, &lt;a href=&#34;https://github.com/JohnLaw2/ln-hierarchical-channels&#34;&gt;https://github.com/JohnLaw2/ln-hierarchical-channels&lt;/a&gt;&lt;br/&gt;[8] Burchert, Decker and Wattenhofer, &amp;#34;Scalable Funding of Bitcoin Micropayment Channel Networks&amp;#34;, &lt;a href=&#34;http://dx.doi.org/10.1098/rsos.180089&#34;&gt;http://dx.doi.org/10.1098/rsos.180089&lt;/a&gt;&lt;br/&gt;[9] Law, &amp;#34;Scaling Bitcoin With Inherited IDs&amp;#34;, &lt;a href=&#34;https://github.com/JohnLaw2/btc-iids&#34;&gt;https://github.com/JohnLaw2/btc-iids&lt;/a&gt;&lt;br/&gt;[10] Towns, &amp;#34;Re: Resizing Lightning Channels Off-Chain With Hierarchical Channels&amp;#34;, &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-April/003913.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-April/003913.html&lt;/a&gt;&lt;br/&gt;[11] Law, &amp;#34;Re: Resizing Lightning Channels Off-Chain With Hierarchical Channels&amp;#34;, &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-April/003917.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-April/003917.html&lt;/a&gt;&lt;br/&gt;[12] Law, &amp;#34;Lightning Channels With Tunable Penalties&amp;#34;, &lt;a href=&#34;https://github.com/JohnLaw2/ln-tunable-penalties&#34;&gt;https://github.com/JohnLaw2/ln-tunable-penalties&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Sent with [Proton Mail](&lt;a href=&#34;https://proton.me/&#34;&gt;https://proton.me/&lt;/a&gt;) secure email.&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/20230908/90196255/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20230908/90196255/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-09-12T08:59:58Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsxnf9l9fx6fg47gzs6l0gwsk4rwe0878q78ug5nr57j5qhe0aadhgzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gz4sj8xq</id>
    
      <title type="html">📅 Original date posted:2023-04-28 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsxnf9l9fx6fg47gzs6l0gwsk4rwe0878q78ug5nr57j5qhe0aadhgzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gz4sj8xq" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvp369nwwytm680x8zypge5xl7p9dvuj0l2w29u7grdsaatqxm46qtlt0ld&#39;&gt;nevent1q…t0ld&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-04-28&lt;br/&gt;🗒️ Summary of this message: A discussion on the terminology used in Lightning Network, including the definition of terms such as &amp;#34;node&amp;#34; and &amp;#34;channel&amp;#34;, and suggestions for alternative terms like &amp;#34;channel co-op&amp;#34;. There is also a suggestion to write a BOLT/BLIP for a single channel backed by multiple on-chain utxos.&lt;br/&gt;📝 Original message:&lt;br/&gt;Replies inline:&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; One thing that confuses me about the paper is how to think about routing&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; to a &amp;#34;channel&amp;#34; rather than a node -- ie the payment from &amp;#34;E-&amp;gt;FG-&amp;gt;A&amp;#34; where&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;#34;FG&amp;#34; isn&amp;#39;t &amp;#34;F&amp;#34; or &amp;#34;G&amp;#34;, but &amp;#34;both of them&amp;#34;.&lt;br/&gt;&amp;gt; &amp;gt; Yes, I found it very difficult to think about, and I kept getting confused between concepts like &amp;#34;user&amp;#34;, &amp;#34;node&amp;#34;, &amp;#34;channel&amp;#34;, and &amp;#34;factory&amp;#34;.&lt;br/&gt;&amp;gt; &amp;gt; The thing that works best for me is to create a clear definition of each of these terms, along with the term &amp;#34;party&amp;#34;.&lt;br/&gt;&lt;br/&gt;&amp;gt; Okay, that makes sense. I think it might work better to treat &amp;#34;node&amp;#34; as&lt;br/&gt;&amp;gt; synonymous with &amp;#34;user&amp;#34; rather than &amp;#34;party&amp;#34; though -- that way you can say&lt;br/&gt;&amp;gt; &amp;#34;you create a lightning node by running lightning node software such as&lt;br/&gt;&amp;gt; lnd/cln/eclair/etc&amp;#34;. That means not all vertices in the payment routing&lt;br/&gt;&amp;gt; network are nodes; but all vertices in the *gossip* network are nodes,&lt;br/&gt;&amp;gt; so that seems okay.&lt;br/&gt;&lt;br/&gt;Yes, it&amp;#39;s probably best to refer to a user who runs lightning node software as being a &amp;#34;node&amp;#34;.&lt;br/&gt;&lt;br/&gt;On the other hand, it sounds really awkward to talk about routing in a directed graph without using the word &amp;#34;node&amp;#34; in some form. Maybe &amp;#34;routing node&amp;#34; for entities in the routing network?&lt;br/&gt;&lt;br/&gt;&amp;gt; (I&amp;#39;m not sure &amp;#34;channel factories&amp;#34; is really the most evocative way of&lt;br/&gt;&amp;gt; describing them -- at least when I think of a factory, I think the product&lt;br/&gt;&amp;gt; should be accessible to everyone; but for channel factories you have to&lt;br/&gt;&amp;gt; be involved in the factory&amp;#39;s original mutlisig to be able to use one of&lt;br/&gt;&amp;gt; its channels. Maybe better to call them &amp;#34;channel coops&amp;#34;, where you&amp;#39;re&lt;br/&gt;&amp;gt; creating a little commune of friends/allies to work together with each&lt;br/&gt;&amp;gt; other. Could be pronounced like &amp;#34;workers&amp;#39; co-op&amp;#34; or like &amp;#34;chicken coop&amp;#34;,&lt;br/&gt;&amp;gt; either way :)&lt;br/&gt;&lt;br/&gt;Good point regarding &amp;#34;factories&amp;#34;. I like &amp;#34;channel co-op&amp;#34; as an alternative.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; * Logical Channel: a layer 2 construct that consists of all of the physical channels owned by a specific pair of parties&lt;br/&gt;&amp;gt; &amp;gt;   - the size (capacity) of a logical channel is the sum of the sizes of their physical channels&lt;br/&gt;&amp;gt; &amp;gt;   - (Footnote: It&amp;#39;s possible, with a significant amount of software development work that I in no way discount, to route a payment through a logical channel where the payment traverses multiple physical channels at the same time. This is done by using separate HTLCs, all sharing the same secret, in each of the physical channels that the payment traverses. I can write more about this if that would be helpful.)&lt;br/&gt;&lt;br/&gt;&amp;gt; I think it might already be interesting to write a BOLT/BLIP for that?&lt;br/&gt;&amp;gt; Having a single channel backed by multiple on-chain utxos is probably&lt;br/&gt;&amp;gt; interesting for splicing (adding or spending a utxo while keeping the&lt;br/&gt;&amp;gt; channel open on the other utxos might be able to be done more simply than&lt;br/&gt;&amp;gt; splicing in general), and having multiple utxos might let you increase&lt;br/&gt;&amp;gt; some of your channel limits, eg `max_accepted_htlcs` might be able to&lt;br/&gt;&amp;gt; be increased to 483*U where U is the number of UTXOs backing the channel.&lt;br/&gt;&lt;br/&gt;Sounds good. I&amp;#39;m glad to write something up, but I&amp;#39;m afraid it may take me a few months.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; It feels like there&amp;#39;s a whole&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; mass of complications hidden in there from a routing perspective; like how&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; do you link &amp;#34;FG&amp;#34; back with &amp;#34;F&amp;#34; and &amp;#34;G&amp;#34;, how do you decide fees, how do&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; you communicate fees/max_htlc/etc.&lt;br/&gt;&amp;gt; &amp;gt; Regarding the specific issues you raised:&lt;br/&gt;&amp;gt; &amp;gt; Q: How do you link &amp;#34;FG&amp;#34; back with &amp;#34;F&amp;#34; and &amp;#34;G&amp;#34;?&lt;br/&gt;&amp;gt; &amp;gt; A: In terms of gossiping and the channel graph, you don&amp;#39;t&lt;br/&gt;&lt;br/&gt;&amp;gt; Yeah, I think that simplifies things substantially.&lt;br/&gt;&lt;br/&gt;&amp;gt; I think the main thing that misled me here was the &amp;#34;CD-&amp;gt;E-&amp;gt;FG&amp;#34; payment&lt;br/&gt;&amp;gt; chain -- it doesn&amp;#39;t make sense to me why E would want to devote funds&lt;br/&gt;&amp;gt; that can only be used for rebalancing channels, but not normal payments.&lt;br/&gt;&lt;br/&gt;Actually, E&amp;#39;s funds in the channels ((C,D),E) and (E,(F,G)) can be used for normal payments. It might not seem attractive to do so, but there may be reasons for doing just that (see below).&lt;br/&gt;&lt;br/&gt;&amp;gt; Having that be CD-&amp;gt;DE-&amp;gt;FG seems like it would make much more sense in that&lt;br/&gt;&amp;gt; model. (Though, obviously, no one except D and E could necessarily tell&lt;br/&gt;&amp;gt; the difference between those two scenarios in practice, and just because&lt;br/&gt;&amp;gt; something doesn&amp;#39;t make sense, doesn&amp;#39;t mean nobody will actually do it)&lt;br/&gt;&lt;br/&gt;I included going from a single-user party to a multi-user party and back to a single-user party, as in E-&amp;gt;FG-&amp;gt;HI-&amp;gt;A in Figure 4 in the paper, just to show the poassibility. I didn&amp;#39;t think it would be common, given the extra signatures and fees required. However, I&amp;#39;m now thinking that routing through multi-user parties could be important in practice, even when making normal LN payments between single users. There&amp;#39;s a lot more on that idea below.&lt;br/&gt;&lt;br/&gt;&amp;gt; The other thing was that going from N nodes to C*N channels, then&lt;br/&gt;&amp;gt; re-considering each of the C*N channels (A-&amp;gt;B, etc) as also potentially&lt;br/&gt;&amp;gt; being nodes and adding an additional K*C*N channels (AB-&amp;gt;CD, etc) seemed&lt;br/&gt;&amp;gt; like it might be quadratic to me. But it&amp;#39;s probably not -- C (channels per&lt;br/&gt;&amp;gt; node) and K (utxos per channel) are probably constant or logarithmic in&lt;br/&gt;&amp;gt; N, so it&amp;#39;s probably okay?&lt;br/&gt;&lt;br/&gt;Yep, I&amp;#39;d assume C and K are largely independent of N (and constant or nearly so as the network grows), so that shouldn&amp;#39;t be a problem.&lt;br/&gt;&lt;br/&gt;&amp;gt; On the other hand, I could see the rebalancing channels not actually&lt;br/&gt;&amp;gt; being very useful for routing payments (they require 3&#43; signatures,&lt;br/&gt;&amp;gt; and may not even be publicly connected to any of the level-1 nodes),&lt;br/&gt;&amp;gt; so it could make sense to just treat them as two different networks,&lt;br/&gt;&amp;gt; where regular people doing payments only see the base channels, but&lt;br/&gt;&amp;gt; high-availability nodes also find out about the rebalancing channels.&lt;br/&gt;&amp;gt; If so, then the extra nodes/channels in the rebalancing graph only affect&lt;br/&gt;&amp;gt; people who can afford to dedicate the resources to storing it anyway,&lt;br/&gt;&amp;gt; so it&amp;#39;s probably fine.&lt;br/&gt;&lt;br/&gt;It would be possible to have a separate rebalancing network consisting of multi-user parties only and a base network consisting of single-user parties only. However, that both complicates and limits the rebalancing functionality.&lt;br/&gt;&lt;br/&gt;Let&amp;#39;s say A and B want to decrease the size of their channel (A,B) using the separate rebalancing network.&lt;br/&gt;&lt;br/&gt;They make a payment on the rebalancing network:&lt;br/&gt;&lt;br/&gt;AB-&amp;gt;CD-&amp;gt;EF-&amp;gt;GH-&amp;gt;IJ&lt;br/&gt;&lt;br/&gt;However, there are two problems with this approach:&lt;br/&gt;&lt;br/&gt;1) A and B have to find another channel (I,J) that wants to increase its capacity by exactly the same amount (minus fees) to offset the decrease in (A,B). In general, the rebalancing network can move capacity from one base channel (a.k.a., two-user channel or channel with single-user parties) to another one, but it can&amp;#39;t increase or decrease the overall capacity of the channels in the base network.&lt;br/&gt;&lt;br/&gt;2) The payment AB-&amp;gt;CD-&amp;gt;EF-&amp;gt;IJ not only rebalances channels, it also sends bitcoin from the payer in (A,B) to the payee in (I,J). This would have to be offset by making a corresponding payment (using the base network) from the payee in (I,J) (e.g., I) to the payer in (A,B) (e.g., A) and that offsetting payment would have to be atomic with the rebalancing payment. It&amp;#39;s possible to make this work by using the same secret for the payments in the base network and the rebalancing network, but it certainly adds complexity.&lt;br/&gt;&lt;br/&gt;In addition, there are reasons for wanting to include multi-user parties when making regular LN payments (again, see below).&lt;br/&gt;&lt;br/&gt;Connecting the level-2 routing nodes with the level-1 routing nodes requires at least some channels that consist of a multi-user party and a single-user party, such as the channel ((C,D),E). Once that&amp;#39;s done, the above problems go away and it&amp;#39;s possible to increase or decrease the overall capacity of the two-user channels without going on-chain.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; Finally, I realize that creating a world without factories doesn&amp;#39;t sound like a good solution for scaling Bitcoin. However, I believe hierarchical channels largely solve the problem of resizing channels off-chain.&lt;br/&gt;&lt;br/&gt;&amp;gt; I think this is probably a lot harder in practice than in theory? If&lt;br/&gt;&amp;gt; you have an {A,B} channel holding 3 BTC across two hierarchial channels,&lt;br/&gt;&amp;gt; {X:1 BTC, AB:1 BTC} and {Y:1 BTC, AB:2 BTC}, and someone wants to route&lt;br/&gt;&amp;gt; 0.5 BTC through X-&amp;gt;AB-&amp;gt;Y, then that will look something like:&lt;br/&gt;&lt;br/&gt;&amp;gt;    {X:1, AB:1}    {AB:2, Y:1}&lt;br/&gt;&lt;br/&gt;&amp;gt;    {X:0.5, XAB:0.5, AB:1}  {AB:2, Y:1}&lt;br/&gt;&lt;br/&gt;&amp;gt;    {X:0.5, XAB:0.5, AB:1}  {AB:1.5, ABY:0.5 Y:1}&lt;br/&gt;&lt;br/&gt;&amp;gt; and either:&lt;br/&gt;&lt;br/&gt;&amp;gt;    {X:1, AB:1}    {AB:2, Y:1}   (on failure)&lt;br/&gt;&amp;gt; or&lt;br/&gt;&amp;gt;    {X:0.5, AB:1.5}    {AB:1.5, Y:1.5}   (on success)&lt;br/&gt;&lt;br/&gt;&amp;gt; But what if you&amp;#39;re in the middle of routing 2 BTC over the A,B channel&lt;br/&gt;&amp;gt; in the meantime? In that case you need some of the AB payments to be&lt;br/&gt;&amp;gt; conditional on the success path of XAB and the failure path of ABY.&lt;br/&gt;&lt;br/&gt;&amp;gt; I *think* that&amp;#39;s fine, and doesn&amp;#39;t involve a combinatorical blowup in&lt;br/&gt;&amp;gt; the event that you&amp;#39;re routing rebalances across multiple off-chain utxos&lt;br/&gt;&amp;gt; -- you just end up splitting your channel across {X&#43;2*Y} utxos where X&lt;br/&gt;&amp;gt; is the number of &amp;#34;physical&amp;#34; channels and &amp;#34;Y&amp;#34; is the number of pending&lt;br/&gt;&amp;gt; rebalances. But it seems like there&amp;#39;s a fair chunk of complexity and&lt;br/&gt;&amp;gt; maybe some extra round trips (eg, moving a pending HTLC from being&lt;br/&gt;&amp;gt; purely in the AB:2 output to being split across the {XAB:0.5/success and&lt;br/&gt;&amp;gt; ABY:0.5/timeout} atomically seems tricky?).&lt;br/&gt;&lt;br/&gt;Wow, that&amp;#39;s a cool idea!&lt;br/&gt;&lt;br/&gt;I hadn&amp;#39;t considered having an active HTLC (sending 2 BTC from A to B) that&amp;#39;s (partially) funded by a pair of active HTLCs (sending 0.5 BTC from X to Y via the path X-&amp;gt;AB-&amp;gt;Y). I figured that would be too complex, but I hadn&amp;#39;t thought through the details.&lt;br/&gt;&lt;br/&gt;In contrast, I had considered having an active HTLC that&amp;#39;s funded by a resolved (either successful or failed) HTLC. This seems important, as the resolved HTLC requires 3&#43; signatures in order to merge it into a new Commitment transaction, so it might not be possible to get all the signatures right away. For example, dedicated users A and B want to be able to use their newly-gained capacity in the channel (C,(A,B)) after making a payment from casual user C without having to wait for C to update the state of (C,(A,B)).&lt;br/&gt;&lt;br/&gt;The hierarchical channels paper requires that all the funds in an HTLC be provided by a single user, denoted as the &amp;#34;payer&amp;#34;. As a result, the capital in a hierarchical channel can only be used for a single active HTLC at a single level at a time. This requires multiplexing the capital between level-1 channel HTLCs and level-2 channel HTLCs, but I figured that was OK as the level-2 channels would mainly be used for rebalancing, which should be far less frequent than level-1 payments (and the rebalancing could wait until a path was available). Thus, one doesn&amp;#39;t have to allow an active HTLC to be funded by a pair of active HTLCs in order to have flexible off-chain rebalancing of channels.&lt;br/&gt;&lt;br/&gt;However, as you point out, it should be possible to have an active HTLC be funded by a pair of active HTLCs. The thing that&amp;#39;s amazing about this is that the *same capital* is used for routing at two different levels in the hierarchy simultaneously! In other words, in addition to routing normal LN payments through single-user parties, it&amp;#39;s possible to simultaneously route independent normal LN payments through multi-user parties by re-using the *same capital*.&lt;br/&gt;&lt;br/&gt;Sure, the payments through multi-user parties require more signatures, so that could slow them down or complicate them, but the potential to maybe double the routing fees that can be generated from a given unit of capital (in addition to enabling off-chain rebalancing) sounds pretty compelling if the cost of capital is high.&lt;br/&gt;&lt;br/&gt;As you noted, making this work atomically is tricky. Let&amp;#39;s consider your example again, using slightly modified notation.&lt;br/&gt;&lt;br/&gt;Initially, there&amp;#39;s an {A,B} channel holding 3 BTC across two hierarchical channels:&lt;br/&gt;&lt;br/&gt;State 0:&lt;br/&gt;	{X:1 BTC, {A:0.5 BTC, B:0.5 BTC}}&lt;br/&gt;	and&lt;br/&gt;	{{A:2 BTC, B:0 BTC}, Y:1 BTC}&lt;br/&gt;&lt;br/&gt;First, A initiates a payment of 2 BTC with secret s1 via B in the hierarchical channel with Y:&lt;br/&gt;&lt;br/&gt;State 1:&lt;br/&gt;	{X:1 BTC, {A:0.5 BTC, B:0.5 BTC}}&lt;br/&gt;	and&lt;br/&gt;	{{A_or_s1_B:2 BTC}, Y:1 BTC}&lt;br/&gt;&lt;br/&gt;Then, while this payment is pending, X sends 0.5 BTC with secret s2 to Y via the following states:&lt;br/&gt;&lt;br/&gt;State 2:&lt;br/&gt;	{X:0.5 BTC, X_or_s2_{A_or_s1_B:0.5 BTC}, {A:0.5 BTC, B:0.5 BTC}}&lt;br/&gt;	and&lt;br/&gt;	{{A_or_s1_B:2 BTC}, Y:1 BTC}&lt;br/&gt;&lt;br/&gt;State 3:&lt;br/&gt;	{X:0.5 BTC, X_or_s2_{A_or_s1_B:0.5 BTC}, {A:0.5 BTC, B:0.5 BTC}}&lt;br/&gt;	and&lt;br/&gt;	{{A_or_s1_B:1.5 BTC}, {A_or_s1_B:0.5 BTC}_or_s2_Y:0.5 BTC, Y:1 BTC}&lt;br/&gt;&lt;br/&gt;&amp;gt;From this point, there are 8 possibilities in terms of whether the HTLCs succeed or fail, and in which order they do so.&lt;br/&gt;&lt;br/&gt;For example, if s1 is revealed and then the payment with secret s2 times out, we get:&lt;br/&gt;&lt;br/&gt;State 4:&lt;br/&gt;	{X:0.5 BTC, X_or_s2_{B:0.5 BTC}, {A:0.5 BTC, B:0.5 BTC}}&lt;br/&gt;	and&lt;br/&gt;	{{B:1.5 BTC}, {B:0.5 BTC}_or_s2_Y:0.5 BTC, Y:1 BTC}&lt;br/&gt;&lt;br/&gt;State 5:&lt;br/&gt;	{X:0.5 BTC, X:0.5 BTC, {A:0.5 BTC, B:0.5 BTC}}&lt;br/&gt;	and&lt;br/&gt;	{{B:1.5 BTC}, {B:0.5 BTC}, Y:1 BTC}&lt;br/&gt;&lt;br/&gt;State 6:&lt;br/&gt;	{X:1.0 BTC, {A:0.5 BTC, B:0.5 BTC}}&lt;br/&gt;	and&lt;br/&gt;	{{A:0 BTC, B:2.0 BTC}, Y:1 BTC}&lt;br/&gt;&lt;br/&gt;Alternatively, if s2 is revealed and then s1 is revealed, we get:&lt;br/&gt;&lt;br/&gt;State 4&amp;#39;:&lt;br/&gt;	{X:0.5 BTC, {A_or_s1_B:0.5 BTC}, {A:0.5 BTC, B:0.5 BTC}}&lt;br/&gt;	and&lt;br/&gt;	{{A_or_s1_B:1.5 BTC}, Y:0.5 BTC, Y:1 BTC}&lt;br/&gt;&lt;br/&gt;State 5&amp;#39;:&lt;br/&gt;	{X:0.5 BTC, {B:0.5 BTC}, {A:0.5 BTC, B:0.5 BTC}}&lt;br/&gt;	and&lt;br/&gt;	{{B:1.5 BTC}, Y:0.5 BTC, Y:1 BTC}&lt;br/&gt;&lt;br/&gt;State 6&amp;#39;:&lt;br/&gt;	{X:0.5 BTC, {A:0.5 BTC, B:1 BTC}}&lt;br/&gt;	and&lt;br/&gt;	{{A:0 BTC, B:1.5 BTC}, Y:1.5 BTC}&lt;br/&gt;&lt;br/&gt;The trickiest step is defining State 2. When A and B get the HTCL offered by X with secret s2, A and B figure out what they&amp;#39;re going to give up in the hierarchical channel with Y in case the payment from X succeeds. Given that all of A&amp;#39;s and B&amp;#39;s capital in {{A_or_s1_B:2 BTC}, Y:1 BTC} is in the HTLC with secret s1, they take 0.5 BTC of that HTLC and add it as the payout from secret s2 in the channel with X to obtain State 2. Then, they update the channel with Y to obtain State 3.&lt;br/&gt;&lt;br/&gt;This seems to address the atomicity issue. However, there are a couple other details to address in the hierarchical channel protocol.&lt;br/&gt;&lt;br/&gt;First, in the adaptation of the FFO protocol to hierarchical channels, the &amp;#34;payee&amp;#34; for an HTLC is the user that must provide the HTLC&amp;#39;s secret with an HTLC-kickoff transaction (see Figure 14 in the paper). However, when the HTLC pays to a lower-level HTLC, there is no single &amp;#34;payee&amp;#34; that can be determined. This could be addressed by enabling both users that could be payees to reveal the HTLC&amp;#39;s secret with an HTLC-kickoff transaction followed by an HTLC-success transaction (note that this doubles the number of HTLC-payment transactions that are required).&lt;br/&gt;&lt;br/&gt;Second, in going from HTLCs to PTLCs, the payee has to create a secret that&amp;#39;s subtracted from the secret that&amp;#39;s revealed at the payment&amp;#39;s next hop. The challenge is how to define a secret that depends on multiple potential payees&amp;#39; secrets. I think it may be possible to solve this by having all potential payees at hop i create their own secret, define the overall secret at hop i as being the sum of the potential payees&amp;#39; secrets (after protecting against key/secret cancellation), and sharing partial signatures between potential payees at hop i such that each potential payee just needs to get hop (i&#43;1)&amp;#39;s secret in order to produce hop (i)&amp;#39;s overall secret, but I haven&amp;#39;t worked through the details.&lt;br/&gt;&lt;br/&gt;To be clear, the idea of having an active HTLC that&amp;#39;s funded by a pair of active HTLCs is your idea, and it&amp;#39;s very interesting. We don&amp;#39;t need to support this in order to resize channels off-chain, but it does allow a given unit of capital to facilitate two independent payments simultaneously, which is amazing!&lt;br/&gt;&lt;br/&gt;&amp;gt; (I figure implementing something eltoo-like via 2-user tunable penalty&lt;br/&gt;&amp;gt; channels and/or ln-symmetry (let alone splicing, taproot funding&lt;br/&gt;&amp;gt; addresses, and ptlcs) is a sufficient sink for all the available&lt;br/&gt;&amp;gt; engineering effort any time soon, but talking about hierarchial/factory&lt;br/&gt;&amp;gt; things well in advance of when they could reasonably be implemented is&lt;br/&gt;&amp;gt; fun too)&lt;br/&gt;&lt;br/&gt;That makes sense.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m also hoping that a good understanding of what&amp;#39;s possible without changing Bitcoin, plus what&amp;#39;s enabled with changes like CTV and/or APO, will help inform any future changes to Bitcoin&amp;#39;s consensus rules.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John
    </content>
    <updated>2023-06-09T13:13:00Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqs8agtz4vgpj6yatqfk8t08hdfxewzhem2lnd0cqhsvknv8cvet3eszyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzndhzhv</id>
    
      <title type="html">📅 Original date posted:2023-04-18 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqs8agtz4vgpj6yatqfk8t08hdfxewzhem2lnd0cqhsvknv8cvet3eszyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzndhzhv" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqstfdnhprny75ryu3kfrzeyrmdlqeqnw2qshvlcncdqd02qhvkwykc27jvt5&#39;&gt;nevent1q…jvt5&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-04-18&lt;br/&gt;🗒️ Summary of this message: To understand routing in Lightning Network, it&amp;#39;s important to define terms like user, party, node, physical channel, and logical channel. Hierarchical channels exist without factories.&lt;br/&gt;📝 Original message:&lt;br/&gt;&amp;gt; One thing that confuses me about the paper is how to think about routing&lt;br/&gt;&amp;gt; to a &amp;#34;channel&amp;#34; rather than a node -- ie the payment from &amp;#34;E-&amp;gt;FG-&amp;gt;A&amp;#34; where&lt;br/&gt;&amp;gt; &amp;#34;FG&amp;#34; isn&amp;#39;t &amp;#34;F&amp;#34; or &amp;#34;G&amp;#34;, but &amp;#34;both of them&amp;#34;.&lt;br/&gt;&lt;br/&gt;Yes, I found it very difficult to think about, and I kept getting confused between concepts like &amp;#34;user&amp;#34;, &amp;#34;node&amp;#34;, &amp;#34;channel&amp;#34;, and &amp;#34;factory&amp;#34;.&lt;br/&gt;The thing that works best for me is to create a clear definition of each of these terms, along with the term &amp;#34;party&amp;#34;.&lt;br/&gt;&lt;br/&gt;I also think it&amp;#39;s best to imagine a world in which there are hierarchical channels, but there are no &amp;#34;factories&amp;#34; per se.&lt;br/&gt;The distinction is meaningful in the sense that a hierarchical channel requires that there are exactly *two* *fixed* &amp;#34;parties&amp;#34; to which the hierarchical channel pays out, and all changes to the balances paid to those parties are made via HTLCs.&lt;br/&gt;In contrast, a &amp;#34;factory&amp;#34; can pay out to an arbitrary number of users or groups of users, and changes to the balances paid to those users or groups of users are made via updating the state of the factory (typically without an HTLC being required).&lt;br/&gt;&lt;br/&gt;So, in a world with hierarchical channels, but without factories, we have the following terms:&lt;br/&gt;* User: a person&lt;br/&gt;* Party: a fixed group consisting of one or more users&lt;br/&gt;* Node: a party&lt;br/&gt;  - so &amp;#34;party&amp;#34; and &amp;#34;node&amp;#34; are synonyms, with &amp;#34;party&amp;#34; emphasizing the human side of things and &amp;#34;node&amp;#34; emphasizing the graph side of things, such as when discussing the Lightning routing graph&lt;br/&gt;* Physical channel: a layer 2 construct that is funded by an on-chain or an off-chain UTXO, is owned by 2 parties, pays a balance to each of the parties, and updates the parties&amp;#39; balances through HTLCs and a channel protocol&lt;br/&gt;  - a physical channel can be non-hierarchical (where each of the 2 parties is a single user) or hierarchical (where at least one party consists of more than 1 user)&lt;br/&gt;  - (Footnote: The concept of an &amp;#34;off-chain UTXO&amp;#34; is itself a bit tricky, as it often refers to one of multiple possible transaction outputs, where the transactions or their ancestors conflict, so only one of them can actually be instantiated. For example, a Lightning channel (using the current penalty protocol) can be said to create an off-chain UTXO that pays to one of the users, even though it&amp;#39;s not clear which of the users&amp;#39; Commitment transactions will actually be instantiated. In general, an off-chain UTXO is a guaranteed way of getting a certain portion of a specific on-chain UTXO&amp;#39;s funds. Let&amp;#39;s skip going down this rabbit hole any further and just assume we understand these issues.)&lt;br/&gt;* Logical Channel: a layer 2 construct that consists of all of the physical channels owned by a specific pair of parties&lt;br/&gt;  - the size (capacity) of a logical channel is the sum of the sizes of their physical channels&lt;br/&gt;  - (Footnote: It&amp;#39;s possible, with a significant amount of software development work that I in no way discount, to route a payment through a logical channel where the payment traverses multiple physical channels at the same time. This is done by using separate HTLCs, all sharing the same secret, in each of the physical channels that the payment traverses. I can write more about this if that would be helpful.)&lt;br/&gt;* Lightning Network (LN): a layer 2 network consisting of parties and logical channels between parties&lt;br/&gt;  - the LN can be represented as a directed graph, where each party is a node and each logical channel is pair of arcs (one in each direction) between two nodes&lt;br/&gt;  - the LN can be used to make payments from one node to another node via a path through the graph&lt;br/&gt;    - the purpose of the payment could be to send bitcoin from one user to another (in this case, the payment&amp;#39;s source and destination nodes are both 1-user parties)&lt;br/&gt;    - the purpose of the payment could be to increase or decrease the size of a logical channel (in this case, the payment&amp;#39;s source and/or destination node is a multi-user party)&lt;br/&gt;      - (Footnote: Here&amp;#39;s another great opportunity for confusion, as the source and/or destination of the payment is a multi-user party, which is defined as more than two users, and yet the purpose of the payment is to resize a logical channel. Obviously, a group of users is different from a logical channel (as shown in the definitions above), so how does making a payment to or from a group of users change the size of a logical channel? The answer is that the logical channel being resized is the one owned by the group of users.)&lt;br/&gt;* Factory: a term that doesn&amp;#39;t exist in this world view&lt;br/&gt;&lt;br/&gt;Sorry if all of this seems overly pedantic.&lt;br/&gt;It&amp;#39;s the only way I&amp;#39;ve been able to keep these concepts straight in my mind.&lt;br/&gt;I&amp;#39;ve also found that drawings help clarify these issues, which is why the paper has 20 drawings, many of which are examples of payments and channel graphs.&lt;br/&gt;&lt;br/&gt;&amp;gt; It feels like there&amp;#39;s a whole&lt;br/&gt;&amp;gt; mass of complications hidden in there from a routing perspective; like how&lt;br/&gt;&amp;gt; do you link &amp;#34;FG&amp;#34; back with &amp;#34;F&amp;#34; and &amp;#34;G&amp;#34;, how do you decide fees, how do&lt;br/&gt;&amp;gt; you communicate fees/max_htlc/etc.&lt;br/&gt;&lt;br/&gt;In addition to the assumptions and definitions above, we need to use Rusty Russell&amp;#39;s idea for channel_update_v2 messages [1].&lt;br/&gt;&lt;br/&gt;Regarding the specific issues you raised:&lt;br/&gt;&lt;br/&gt;Q: How do you link &amp;#34;FG&amp;#34; back with &amp;#34;F&amp;#34; and &amp;#34;G&amp;#34;?&lt;br/&gt;A: In terms of gossiping and the channel graph, you don&amp;#39;t explicitly link &amp;#34;FG&amp;#34; with &amp;#34;F&amp;#34; and &amp;#34;G&amp;#34;. &amp;#34;FG&amp;#34;, &amp;#34;F&amp;#34; and &amp;#34;G&amp;#34; each have their own identity in the LN&amp;#39;s Onion network and each one appears as a separate node in the routing graph, with no explicit linkage between them. Every logical channel in the channel graph is announced with channel_update_v2 messages that provide the channel&amp;#39;s current capacity and refer back to an on-chain UTXO. It&amp;#39;s possible, but not necessary, that some of the logical channels between &amp;#34;FG&amp;#34; and other nodes, between &amp;#34;F&amp;#34; and other nodes, and between &amp;#34;G&amp;#34; and other nodes, use the same on-chain UTXO for their channel_update_v2 messages.&lt;br/&gt;&lt;br/&gt;Q: How do you decide fees?&lt;br/&gt;A: All of the users that own a given logical channel negotiate the routing fees that they want to charge. These routing fees are of two types: 1) a fee for devoting capital (by being the &amp;#34;payer&amp;#34; or &amp;#34;payee&amp;#34; as defined in the paper), and 2) a fee for providing signatures without devoting capital. For example, in order to traverse the logical channel ((A,B),(C,D)) (where A, B, C and D are dedicated users, A is the &amp;#34;payer&amp;#34;, and C is the &amp;#34;payee&amp;#34;), C will get a payment for devoting capital and D will get a payment for providing signatures. It&amp;#39;s reasonable to assume that the sum of these fees will be larger than the fees charged by most non-hierarchical channels, so it&amp;#39;s reasonable to assume that the logical channel ((A,B),(C,D)) will be used more often as the first or last hop in a payment (in order to resize (A,B) or (C,D), but not both of them), rather than as an intermediate hop in a payment.&lt;br/&gt;&lt;br/&gt;Q: How do you communicate fees/max_htlc/etc.?&lt;br/&gt;A: Just like you do today, with the only difference being that a specific user within each node should handle the Onion traffic for that node and (and should forward it to the other users within that node, if it&amp;#39;s a multi-user node). This user could be called the &amp;#34;leader&amp;#34; for the node. I didn&amp;#39;t describe this detail in the paper, but I could add it if you think it would be helpful.&lt;br/&gt;&lt;br/&gt;&amp;gt; I think it also implies that channel&lt;br/&gt;&amp;gt; capacity is no longer really something you can gossip very sensibly --&lt;br/&gt;&lt;br/&gt;Given the above definitions and assumptions, including the use of channel_update_v2 messages, I think you can gossip channel capacity quite reasonably.&lt;br/&gt;&lt;br/&gt;As is shown in the paper, just routing through a logical channel does *not* change its capacity (except for a slight increase due to fees). The only time a channel capacity changes significantly is when it is being resized by being the source or destination of a LN payment. The new capacity will be broadcast in the next weekly channel_update_v2 message. Obviously, there&amp;#39;s some potential for an unexpected inability for a channel to route requested payments before the channel_update_v2 message showing a reduced capacity has been received, but nothing actually breaks. Of course, it may be worth sending out a channel_update_v2 message as soon as a channel is resized.&lt;br/&gt;&lt;br/&gt;&amp;gt; if you have a factory ((A,B),C,D,E) then every payment through AB to C&lt;br/&gt;&amp;gt; or D or E will decrease AB&amp;#39;s channel capacity.&lt;br/&gt;&lt;br/&gt;First, let&amp;#39;s translate this example into one without factories (as that&amp;#39;s the world I&amp;#39;m envisioning). Let&amp;#39;s assume we have logical channals ((A,B),C), ((A,B),D) and ((A,B),D).&lt;br/&gt;&lt;br/&gt;Let&amp;#39;s assume that C sends a payment to some other random user/node G that is routed through AB. In this case, the logical channel between A and B does *not* change capacity (except for growing slightly due to fees)! This is shown in Figures 8 and 9 of the paper (with &amp;#34;BC&amp;#34; in those figures playing the role of &amp;#34;AB&amp;#34; described here). That&amp;#39;s the beauty of using logical, rather than physical, channels in the channel graph.&lt;br/&gt;&lt;br/&gt;It took me a long time to see this and I obviously have not succeeded in explaining it very well. Please let me know if this example isn&amp;#39;t clear, in which case I&amp;#39;ll try to find a better way of explaining it.&lt;br/&gt;&lt;br/&gt;&amp;gt; You could still gossip the&lt;br/&gt;&amp;gt; capacity of the overall factory, and sum that to get an overall lightning&lt;br/&gt;&amp;gt; network capacity, of course. But a lot of the ways of simplifying it&lt;br/&gt;&amp;gt; also make it harder to do all the nice rebalancing.&lt;br/&gt;&lt;br/&gt;I think the above approach solves these problems. Please let me know if I&amp;#39;ve missed something.&lt;br/&gt;&lt;br/&gt;Finally, I realize that creating a world without factories doesn&amp;#39;t sound like a good solution for scaling Bitcoin. However, I believe hierarchical channels largely solve the problem of resizing channels off-chain. This still leaves the problem of creating channels off-chain, but I don&amp;#39;t think we need factories to solve that problem. The key observation is that we don&amp;#39;t need to create a factory with *updatable* state in order to create a huge number of channels off-chain. Instead, we just need something that instantiates all of those off-chain channels in a way that guarantees the off-chain UTXOs creating those factories. I think the solution to this simpler problem is Timeout-Trees, but I still need to write that up. In any case, please consider hierarchical channels as being a partial solution to scaling Bitcoin and wait until I can make the case for Timeout-Trees before evaluating whether or not we need factories.&lt;br/&gt;&lt;br/&gt;&amp;gt; Anyway, I&amp;#39;ve tried a few times now to put some thoughts together on that&lt;br/&gt;&amp;gt; and come up with nothing that I&amp;#39;m happy with, so figured it might be at&lt;br/&gt;&amp;gt; least worth posing explicitly as a problem...&lt;br/&gt;&lt;br/&gt;Thanks!&lt;br/&gt;&lt;br/&gt;I really appreciate your working through all of these issues.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-February/003470.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-February/003470.html&lt;/a&gt;
    </content>
    <updated>2023-06-09T13:12:59Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsq0d9ca8qjl75dav0h9rfkquuflvf8slvl2aew84j47aqgvwaxvlgzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzm0vnxs</id>
    
      <title type="html">📅 Original date posted:2023-04-08 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsq0d9ca8qjl75dav0h9rfkquuflvf8slvl2aew84j47aqgvwaxvlgzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzm0vnxs" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8ek4ssz02dlt0tx4fdy2y6gkvdcyvp9ha8qfe2z989j7qux7u0zspywxv3&#39;&gt;nevent1q…wxv3&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-04-08&lt;br/&gt;🗒️ Summary of this message: The proposed Factory Optimized protocols for Lighting aim to improve channels within factories, reducing state compared to the &amp;#34;tunable penalties&amp;#34; approach.&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi aj,&lt;br/&gt;&lt;br/&gt;Thanks for your great write-up!&lt;br/&gt;&lt;br/&gt;Comments below:&lt;br/&gt;&lt;br/&gt;&amp;gt; Even with Harding&amp;#39;s optech write ups, and the optech space, I barely&lt;br/&gt;&amp;gt; follow all this, so I&amp;#39;m going to try explaining it too as a way of&lt;br/&gt;&amp;gt; understanding it myself; hopefully maybe that helps someone. Corrections&lt;br/&gt;&amp;gt; welcome, obviously!&lt;br/&gt;&lt;br/&gt;&amp;gt; I think understanding all this requires going through each of the four&lt;br/&gt;&amp;gt; steps.&lt;br/&gt;&lt;br/&gt;[...]&lt;br/&gt;&lt;br/&gt;&amp;gt; Step 3: Factory Optimized protocols for Lighting&lt;br/&gt;&amp;gt;  &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://github.com/JohnLaw2/ln-factory-optimized&amp;#34;&amp;gt;https://github.com/JohnLaw2/ln-factory-optimized&amp;lt;/a&amp;gt&#34;&gt;https://github.com/JohnLaw2/ln-factory-optimized&amp;#34;&amp;gt;https://github.com/JohnLaw2/ln-factory-optimized&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt;  &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-December/003782.html&amp;#34;&amp;gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-December/003782.html&amp;lt;/a&amp;gt&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-December/003782.html&amp;#34;&amp;gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-December/003782.html&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt;  &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://bitcoinops.org/en/newsletters/2022/12/14/#factory-optimized-ln-protocol-proposal&amp;#34;&amp;gt;https://bitcoinops.org/en/newsletters/2022/12/14/#factory-optimized-ln-protocol-proposal&amp;lt;/a&amp;gt&#34;&gt;https://bitcoinops.org/en/newsletters/2022/12/14/#factory-optimized-ln-protocol-proposal&amp;#34;&amp;gt;https://bitcoinops.org/en/newsletters/2022/12/14/#factory-optimized-ln-protocol-proposal&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&lt;br/&gt;&amp;gt; In this case your transactions are:&lt;br/&gt;&lt;br/&gt;&amp;gt;   F - the funding output, only available once the factory is closed&lt;br/&gt;&amp;gt;   InB - as before&lt;br/&gt;&amp;gt;   StBi - your state commitment, one output that will be spent by ComBi,&lt;br/&gt;&amp;gt;          k outputs for each pending HTLC paying to B in state i.&lt;br/&gt;&amp;gt;   HBi-j-k - the kickoff transaction for HTLC &amp;#34;j&amp;#34; paying to B, spends&lt;br/&gt;&amp;gt;          the appropriate output of StBi, conditional on revealing the&lt;br/&gt;&amp;gt; 	 HTLC preimage and B&amp;#39;s signature. Spendable either by B after&lt;br/&gt;&amp;gt; 	 to-self-delay, or by A after the HTLC&amp;#39;s expiry plus&lt;br/&gt;&amp;gt; 	 to-self-delay&lt;br/&gt;&amp;gt;   HBi-j-s - the success transaction, spendable by B&lt;br/&gt;&amp;gt;   HBi-j-p - the payment transaction, spends HBi-j-s and the HTLC output&lt;br/&gt;&amp;gt;          from ComB_i&lt;br/&gt;&amp;gt;   HAi-j-p - the payment transaction, spends HBi-j-s and the HTLC output&lt;br/&gt;&amp;gt;          from ComA_i&lt;br/&gt;&lt;br/&gt;&amp;gt; I think there&amp;#39;s an error in the paper here; it says as well as being&lt;br/&gt;&amp;gt; spendable by H{A,B}i-j-p as above, the HTLC output in ComA_i should be&lt;br/&gt;&amp;gt; spendable by A after to-self-delay. I believe it should require both&lt;br/&gt;&amp;gt; to-self-delay (relative timelock) and the HTLC expiry (absolute timelock)&lt;br/&gt;&amp;gt; before it can be spendable by A.&lt;br/&gt;&lt;br/&gt;It&amp;#39;s not actually an error in the paper, because the paper includes a &amp;#34;max_cltv_expiry&amp;#34; parameter that prevents the race you&amp;#39;re concerned about.&lt;br/&gt;However, it&amp;#39;s easy to miss that parameter (it&amp;#39;s only introduced in an appendix) and I like your idea of using an absolute delay in the HTLC output in ComA_i when it is spent by A.&lt;br/&gt;I plan to change the paper to add such an absolute delay (which I believe should be Alice&amp;#39;s to-self-delay after the HTLC&amp;#39;s expiry) and remove the &amp;#34;max_cltv_expiry&amp;#34; parameter.&lt;br/&gt;Thanks for the good idea!&lt;br/&gt;&lt;br/&gt;&amp;gt; While this is described as an optimisation focussed on improving channels&lt;br/&gt;&amp;gt; within factories; it seems to me that the reduction in state compared to&lt;br/&gt;&amp;gt; the &amp;#34;tunable penalties&amp;#34; approach in step 1 makes this a strict improvement&lt;br/&gt;&amp;gt; in general.&lt;br/&gt;&lt;br/&gt;I agree.&lt;br/&gt;&lt;br/&gt;&amp;gt; Every participant needs 1&#43;c &amp;#34;In&amp;#34; confirmed utxos available -- one for&lt;br/&gt;&amp;gt; the factory itself, and one for each channel they&amp;#39;re involved in.&lt;br/&gt;&lt;br/&gt;While 1&#43;c &amp;#34;In&amp;#34; confirmed utxos will work, it&amp;#39;s also possible to just have a single confirmed utxo and to create the 1&#43;c desired &amp;#34;In&amp;#34; utxos from it by putting a transaction, or a tree of transactions, on-chain if and when needed.&lt;br/&gt;This optimization is described as the &amp;#34;Off-Chain Control Outputs&amp;#34; extension in the original Tunable Penalties paper and in the Factory Optimized Channels paper.&lt;br/&gt;&lt;br/&gt;&amp;gt; Step 4: Resizing Lightning Channels Off-Chain / Hierarchial Channels&lt;br/&gt;&amp;gt;   &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-March/003886.html&amp;#34;&amp;gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-March/003886.html&amp;lt;/a&amp;gt&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-March/003886.html&amp;#34;&amp;gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-March/003886.html&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt;   &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://github.com/JohnLaw2/ln-hierarchical-channels&amp;#34;&amp;gt;https://github.com/JohnLaw2/ln-hierarchical-channels&amp;lt;/a&amp;gt&#34;&gt;https://github.com/JohnLaw2/ln-hierarchical-channels&amp;#34;&amp;gt;https://github.com/JohnLaw2/ln-hierarchical-channels&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt;   &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://bitcoinops.org/en/newsletters/2023/03/29/#preventing-stranded-capital-with-multiparty-channels-and-channel-factories&amp;#34;&amp;gt;https://bitcoinops.org/en/newsletters/2023/03/29/#preventing-stranded-capital-with-multiparty-channels-and-channel-factories&amp;lt;/a&amp;gt&#34;&gt;https://bitcoinops.org/en/newsletters/2023/03/29/#preventing-stranded-capital-with-multiparty-channels-and-channel-factories&amp;#34;&amp;gt;https://bitcoinops.org/en/newsletters/2023/03/29/#preventing-stranded-capital-with-multiparty-channels-and-channel-factories&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&lt;br/&gt;&amp;gt; Hey, we made it to this thread!&lt;br/&gt;&lt;br/&gt;&amp;gt; I&amp;#39;m not entirely sure of the novelty in this proposal; once you have&lt;br/&gt;&amp;gt; channels in factories, lots of magic is possible, but it&amp;#39;s all very&lt;br/&gt;&amp;gt; complex. I believe the particular proposal here is something like:&lt;br/&gt;&lt;br/&gt;&amp;gt;  - Instead of just having Alice/Bob/Carol/etc as identities in&lt;br/&gt;&amp;gt;    lightning, let them &amp;#34;pair&amp;#34; up, so that AliceBob is considered a node,&lt;br/&gt;&amp;gt;    and CarolDave is also a node.&lt;br/&gt;&lt;br/&gt;&amp;gt;  - So we have a utxo where AliceBob has a channel with CarolDave, and&lt;br/&gt;&amp;gt;    another where CarolDave has a channel with Elizabeth, eg.&lt;br/&gt;&lt;br/&gt;&amp;gt;  - But actually the AliceBob/CarolDave utxo is a factory; and there&amp;#39;s&lt;br/&gt;&amp;gt;    an internal channel between Alice and Bob, and another between Carol&lt;br/&gt;&amp;gt;    and Dave&lt;br/&gt;&lt;br/&gt;&amp;gt;  - Now, because we describe AliceBob and CarolDave as a channel, that&lt;br/&gt;&amp;gt;    means funds can move between AliceBob and CarolDave; but that is&lt;br/&gt;&amp;gt;    equivalent to saying the overall capacity of the internal Alice/Bob&lt;br/&gt;&amp;gt;    channel is actually decreasing without any on-chain activity! Neat!&lt;br/&gt;&lt;br/&gt;&amp;gt; But... that was always the point of channel factories? And the specific&lt;br/&gt;&amp;gt; structure of four participants split into a single pair of channels&lt;br/&gt;&amp;gt; doesn&amp;#39;t seem particularly compelling? I don&amp;#39;t know, I feel like I&amp;#39;m&lt;br/&gt;&amp;gt; missing something here. Or maybe it&amp;#39;s just the first three steps were&lt;br/&gt;&amp;gt; amazing, so merely interesting seems pedestrian by comparison?&lt;br/&gt;&lt;br/&gt;Thanks!&lt;br/&gt;&lt;br/&gt;&amp;gt;From my perspective, this paper makes two contributions (which, to be fair, may only be &amp;#34;interesting&amp;#34; :)&lt;br/&gt;1) it allows dedicated users to resize Lightning channels off-chain by sending channel capacity over the Lightning network, and&lt;br/&gt;2) it allows each casual user to work with a pair of dedicated users in order to let the casual user send and receive payments without forcing the dedicated users to leave any of the channel capacity idle when the casual user is unavailable.&lt;br/&gt;&lt;br/&gt;I&amp;#39;ll discuss 2) more below.&lt;br/&gt;&lt;br/&gt;Regarding 1), I wouldn&amp;#39;t say that &amp;#34;that was always the point of channel factories&amp;#34;.&lt;br/&gt;While it&amp;#39;s true that channel factories allow users to resize two-user channels off-chain, they can only do this subject to the following limitations:&lt;br/&gt;* whatever channel capacity change is being made is exactly offset by one or more other channel capacity changes in the other direction (assuming all factory capacity is in channels),&lt;br/&gt;* the desired change and the offsetting change(s) have to be within a single channel factory, and&lt;br/&gt;* every user in the factory has to be available to sign for the factory update.&lt;br/&gt;&lt;br/&gt;The first two limitations make one want to create factories with lots of users (in order to have flexibility in finding offsetting channels), while the third limitation makes one want factories with few users (in order to enable obtaining all of the required signatures).&lt;br/&gt;&lt;br/&gt;1) eliminates all of these limitations by allowing channel capacity to be routed over the Lightning Network.&lt;br/&gt;Previously, I hadn&amp;#39;t realized this was possible.&lt;br/&gt;&lt;br/&gt;As a result, hierarchical channels with just 3 or 4 users seem to be enough for resizing channels off-chain.&lt;br/&gt;&lt;br/&gt;&amp;gt; Hmm, looking at Harding&amp;#39;s email, I see:&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; **Liquidity multiplexing:** Alice, Bob, Carol, and Dan each rightfully&lt;br/&gt;&amp;gt;&amp;gt; own some portion of a UTXO.  Alice and Bob expect to always be&lt;br/&gt;&amp;gt;&amp;gt; available; Carol and Dan may sometimes be unavailable.  The proposal&lt;br/&gt;&amp;gt;&amp;gt; allows Carol and Dan to spend/receive in combination with Alice and&lt;br/&gt;&amp;gt;&amp;gt; Bob, but also ensures Alice and Bob can spend back and forth the&lt;br/&gt;&amp;gt;&amp;gt; entirety their portions of the UTXO even if Carol, Dan, or both of&lt;br/&gt;&amp;gt;&amp;gt; them are unavailable.&lt;br/&gt;&lt;br/&gt;&amp;gt; I guess I&amp;#39;m not entirely enthusiastic about that because in that case&lt;br/&gt;&amp;gt; Alice can only send funds to Carol when Dan (and whoever else is involved&lt;br/&gt;&amp;gt; in the factory) eventually come online to signoff on the factory state&lt;br/&gt;&amp;gt; update. That&amp;#39;s still useful for (slow) offchain channel reallocations,&lt;br/&gt;&amp;gt; but it doesn&amp;#39;t seem reliable/fast enough for a payment.&lt;br/&gt;&lt;br/&gt;I too would not be enthusiastic if a casual user could only send and receive funds when some other casual user is available.&lt;br/&gt;However, by using three-user channels (two of whom are dedicated), a casual user can send and receive without requiring availability from any other casual user (and without stranding funds).&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John
    </content>
    <updated>2023-06-09T13:12:59Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqs8ek4ssz02dlt0tx4fdy2y6gkvdcyvp9ha8qfe2z989j7qux7u0zszyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzr4aesl</id>
    
      <title type="html">📅 Original date posted:2023-04-08 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqs8ek4ssz02dlt0tx4fdy2y6gkvdcyvp9ha8qfe2z989j7qux7u0zszyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzr4aesl" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs87e4nwe8fpmqa68577dncr0nxqpkgee57s03y84kmdjrjttr80lglgy8qz&#39;&gt;nevent1q…y8qz&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-04-08&lt;br/&gt;🗒️ Summary of this message: A new construction called &amp;#34;tunable penalties&amp;#34; allows for a 2-party lightning channel where cheating doesn&amp;#39;t result in losing all funds. It is an improvement on ln-penalty.&lt;br/&gt;📝 Original message:&lt;br/&gt;Comments below:&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; Step 1: Tunable penalties;&lt;br/&gt;&amp;gt;&amp;gt; &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://github.com/JohnLaw2/ln-tunable-penalties&amp;#34;&amp;gt;https://github.com/JohnLaw2/ln-tunable-penalties&amp;lt;/a&amp;gt&#34;&gt;https://github.com/JohnLaw2/ln-tunable-penalties&amp;#34;&amp;gt;https://github.com/JohnLaw2/ln-tunable-penalties&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt;&amp;gt; &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-October/003732.html&amp;#34;&amp;gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-October/003732.html&amp;lt;/a&amp;gt&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-October/003732.html&amp;#34;&amp;gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-October/003732.html&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; This is a clever constructions that lets you do a 2-party lightning&lt;br/&gt;&amp;gt;&amp;gt; channel with existing opcodes where cheating doesn&amp;#39;t result in you&lt;br/&gt;&amp;gt;&amp;gt; losing all your funds (or, in fact, any of your in-channel funds).&lt;br/&gt;&lt;br/&gt;&amp;gt; Ah, a significant difference between this and eltoo is in the game&lt;br/&gt;&amp;gt; theory of what happens if you lose access to the latest state.&lt;br/&gt;&lt;br/&gt;&amp;gt; In eltoo, how things would work in that case, is that you would attempt&lt;br/&gt;&amp;gt; to close the channel to an old state that you do still remember (from a&lt;br/&gt;&amp;gt; backup), at which point either (a) your counterparty publishes a later&lt;br/&gt;&amp;gt; state, and you settle with that (possibly with you paying some modest&lt;br/&gt;&amp;gt; penalty if you&amp;#39;re using a Daric-like protocol), or (b) your counterparty&lt;br/&gt;&amp;gt; does nothing, and you settle at the old state.&lt;br/&gt;&lt;br/&gt;&amp;gt; With tunable penalties, you are in more of a quandry. If you broadcast&lt;br/&gt;&amp;gt; an old &amp;#34;St&amp;#34; transaction to attempt to close to an old state, then your&lt;br/&gt;&amp;gt; counterparty will simply claim those funds and penalise you; however&lt;br/&gt;&amp;gt; there is nothing forcing them to publish any newer state as well. At&lt;br/&gt;&amp;gt; that point your counterparty can hold your share of the channel funds&lt;br/&gt;&amp;gt; hostage indefinitely.&lt;br/&gt;&lt;br/&gt;&amp;gt; Holding your funds hostage is probably an improvement on simply losing&lt;br/&gt;&amp;gt; them altogether, of course, so I think this is still a strict improvement&lt;br/&gt;&amp;gt; on ln-penalty (modulo additional complexity etc).&lt;br/&gt;&lt;br/&gt;Yes, that&amp;#39;s a good point.&lt;br/&gt;&lt;br/&gt;I did describe an extension, called &amp;#34;Unilateral Close after an Old Transaction is Put On-Chain&amp;#34;, in the Tunable Penalties paper and in the Factory Optimized Channels paper.&lt;br/&gt;The idea is to add a Trigger transaction that spends the output of the Funding transaction.&lt;br/&gt;In response to seeing the Trigger transaction, the other party can put their final State transaction and (after a to-self-delay) Commitment transaction on-chain.&lt;br/&gt;However, if the other party doesn&amp;#39;t do so, then after a 3*to-self-delay, the party that forgot the state can initiate the Decker-Wattenhofer protocol to settle the channel.&lt;br/&gt;Of course, the eltoo protocol could be used instead of the Decker-Wattenhofer protocol at this point if APO is available.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John
    </content>
    <updated>2023-06-09T13:12:58Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqs8s96adretah7x7kzhkk2w4w0zqdv94fl8t7eavp39t6jgc84u8xqzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzx48dwn</id>
    
      <title type="html">📅 Original date posted:2023-04-03 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqs8s96adretah7x7kzhkk2w4w0zqdv94fl8t7eavp39t6jgc84u8xqzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzx48dwn" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgqzmu5nggpaatl5nng3a7yw8dxs0f77jp0cpp6y0yndmclvfsjfcyxezjj&#39;&gt;nevent1q…ezjj&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-04-03&lt;br/&gt;🗒️ Summary of this message: The proposed tunable penalties offer offchain channel resizes and liquidity multiplexing, but the former can already be achieved with existing techniques using channel factories.&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Dave,&lt;br/&gt;&lt;br/&gt;Thank you for your clear and insightful response.&lt;br/&gt;&lt;br/&gt;Comments inline below:&lt;br/&gt;&lt;br/&gt;&amp;gt;Hi John,&lt;br/&gt;&lt;br/&gt;&amp;gt;Thank you for another innovative application of your tunable penalties.&lt;br/&gt;&amp;gt;I see two key benefits being described by your paper[1]:&lt;br/&gt;&lt;br/&gt;&amp;gt;- **Offchain channel resizes:** in state 0, Alice and Bob share control&lt;br/&gt;&amp;gt;   over an offchain UTXO valued at x satoshis; in state 1, the value of&lt;br/&gt;&amp;gt;   the offchain UTXO is y satoshis.&lt;br/&gt;&lt;br/&gt;&amp;gt;- **Liquidity multiplexing:** Alice, Bob, Carol, and Dan each rightfully&lt;br/&gt;&amp;gt;   own some portion of a UTXO.  Alice and Bob expect to always be&lt;br/&gt;&amp;gt;   available; Carol and Dan may sometimes be unavailable.  The proposal&lt;br/&gt;&amp;gt;   allows Carol and Dan to spend/receive in combination with Alice and&lt;br/&gt;&amp;gt;   Bob, but also ensures Alice and Bob can spend back and forth the&lt;br/&gt;&amp;gt;   entirety their portions of the UTXO even if Carol, Dan, or both of&lt;br/&gt;&amp;gt;   them are unavailable.&lt;br/&gt;&lt;br/&gt;&amp;gt;For the Offchain Channel Resizes, I don&amp;#39;t see how your proposal&lt;br/&gt;&amp;gt;functionally differs from a classic channel factory.  In section 3, you&lt;br/&gt;&amp;gt;show the set {A, B, C, D} with the subset {A,B} where A reduces its&lt;br/&gt;&amp;gt;balance in {A,B} by transfering it to {C,D} via an HTLC to another of its&lt;br/&gt;&amp;gt;nodes (A&amp;#39;).&lt;br/&gt;&lt;br/&gt;&amp;gt;Your description uses hierarchical channels (which may have &amp;gt;2&lt;br/&gt;&amp;gt;participants per channel).  In a classic pair-producing channel factory,&lt;br/&gt;&amp;gt;each channel only has two participants, e.g. the factory {A, B, C, D}&lt;br/&gt;&amp;gt;produces the channels,&lt;br/&gt;&lt;br/&gt;&amp;gt;   {A,B}&lt;br/&gt;&amp;gt;   {A,C}&lt;br/&gt;&amp;gt;   {A,D}&lt;br/&gt;&amp;gt;   {B,C}&lt;br/&gt;&amp;gt;   {B,D}&lt;br/&gt;&amp;gt;   {C,D}&lt;br/&gt;&lt;br/&gt;&amp;gt;However, the same thing is possible, A as part of {A,B} can pay through&lt;br/&gt;&amp;gt;{B,C} out of the factory to A&amp;#39;.  After the HTLCs are settled, the&lt;br/&gt;&amp;gt;offchain channel setup transactions inside the factory can be&lt;br/&gt;&amp;gt;regenerated with the cooperation of all {A, B, C, D}.&lt;br/&gt;&lt;br/&gt;&amp;gt;Am I missing something, or is this first key benefit something that was&lt;br/&gt;&amp;gt;already possible (in theory) with pair-producing channel factories?&lt;br/&gt;&lt;br/&gt;When the first key benefit is defined as:&lt;br/&gt;&lt;br/&gt;	Benefit 1: Ability to resize a channel owned by Alice and Bob&lt;br/&gt;	offchain from x satoshis to y satoshis&lt;br/&gt;&lt;br/&gt;you are correct that this can be achieved with existing techniques&lt;br/&gt;using channel factories.&lt;br/&gt;&lt;br/&gt;However, when the key benefit is defined differently, it becomes clear&lt;br/&gt;that it can be achieved only with hierarchical channels. I&amp;#39;ll give two&lt;br/&gt;other definitions of the benefit that demonstrate what is new. In these&lt;br/&gt;definitions, note that the quantity &amp;#34;delta&amp;#34; could be positive or&lt;br/&gt;negative. Also, assume that all capacity owned by the users considered&lt;br/&gt;must be in a Lightning channel at all times (in order to avoid&lt;br/&gt;stranding liquidity). Finally, for simplicity, ignore routing fees&lt;br/&gt;in the following.&lt;br/&gt;&lt;br/&gt;	Benefit 2: Ability to resize a channel owned by Alice and Bob&lt;br/&gt;	offchain from x satoshis to y = x - delta satoshis, while&lt;br/&gt;	resizing a channel owned by Harriet and Isaac from u satoshis&lt;br/&gt;	to v = u &#43; delta satoshis, where:&lt;br/&gt;		a) Harriet and Isaac do not know Alice and Bob and&lt;br/&gt;		never co-sign transactions with Alice and Bob, and&lt;br/&gt;		b) all other 2-user channels&amp;#39; capacities are&lt;br/&gt;		unchanged.&lt;br/&gt;&lt;br/&gt;Note that Benefit 2 can&amp;#39;t be achieved with channel factories, as they&lt;br/&gt;would violate requirement a) above. In contrast, Benefit 2 can be&lt;br/&gt;achieved with hierarchical channels, as long as all channels are&lt;br/&gt;viewed as logical (rather than physical) channels. An example of&lt;br/&gt;how this can be achieved is with the payment given in Figure 4 of&lt;br/&gt;the paper (p. 8), but stopping the payment one hop earlier as it&lt;br/&gt;is received by H and I (Harriet and Isaac). Benefit 2 matters, as&lt;br/&gt;it&amp;#39;s a lot easier to find a channel that wants to make a capacity&lt;br/&gt;change that offsets the capacity change that Alice and Bob want&lt;br/&gt;to make if the offsetting channel can be anywhere in the world&lt;br/&gt;(but connected via the Lightning Network) as opposed to in a&lt;br/&gt;channel factory containing Alice and Bob (as there will only&lt;br/&gt;be, say, 10 or 100 users in each such factory). Having to offset&lt;br/&gt;a channel capacity change by finding a channel making the opposite&lt;br/&gt;change within a channel factory is like having to make LN payments&lt;br/&gt;without using HTLCs. It would be possible to make payments within&lt;br/&gt;a factory, but in most cases that wouldn&amp;#39;t help, as the payer and&lt;br/&gt;payee would not happen to be in the same factory.&lt;br/&gt;&lt;br/&gt;	Benefit 3: Ability to resize a channel owned by Alice and Bob&lt;br/&gt;	offchain from x satoshis to y = x - delta satoshis, where all&lt;br/&gt;	other 2-user channels&amp;#39; capacities are unchanged.&lt;br/&gt;&lt;br/&gt;Note that Benefit 3 cannot be achieved with channel factories, as any&lt;br/&gt;change in the capacity of a channel in a factory must be offset by&lt;br/&gt;the opposite change in one or more other channels within the factory&lt;br/&gt;(given our requirement that all capacity is always kept within channels&lt;br/&gt;in order to avoid stranding liquidity).&lt;br/&gt;&lt;br/&gt;In contrast, Benefit 3 is possible with hierarchical channels, as&lt;br/&gt;long as they are viewed as logical channels. Examples include the&lt;br/&gt;payment shown in Figure 1 of the paper (p. 4). This somewhat&lt;br/&gt;surprising result is due to the existence of a 3-user hierarchical&lt;br/&gt;channel (namely the one owned by C, D and E in Figure 1) that&lt;br/&gt;transitions from HTLCs that swap capacity between pairs of 2-user&lt;br/&gt;channels to HTLCs that swap balances between users within a 2-user&lt;br/&gt;channel. This benefit is even stronger than the previous one, as&lt;br/&gt;no channel that wants to make an offsetting capacity change has&lt;br/&gt;to be found at all.&lt;br/&gt;&lt;br/&gt;I hope these two explicitly-stated benefits demonstrate that&lt;br/&gt;hierarchical channels *do* provide new capabilities that did not&lt;br/&gt;exist previously, and that these new capabilities are very&lt;br/&gt;important in practice.&lt;br/&gt;&lt;br/&gt;Please let me know if any of this doesn&amp;#39;t make sense.&lt;br/&gt;&lt;br/&gt;Thanks again,&lt;br/&gt;John
    </content>
    <updated>2023-06-09T13:12:58Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsrym2n9hwsw08n7g09cwgyj487zqtts5thn37n555qmfap5zq58jczyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzgwxm9t</id>
    
      <title type="html">📅 Original date posted:2023-03-17 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsrym2n9hwsw08n7g09cwgyj487zqtts5thn37n555qmfap5zq58jczyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzgwxm9t" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxzj0rytw5m49a8q68dzw8vpu7x88cp9t5w44yyaxnqg3qrcukhuc76yt3p&#39;&gt;nevent1q…yt3p&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-03-17&lt;br/&gt;🗒️ Summary of this message: Hierarchical channels allow for flexible, off-chain resizing of Lightning channels, solving issues with on-chain resizing and channel factories. No changes to Bitcoin protocol needed.&lt;br/&gt;📝 Original message:&lt;br/&gt;TL;DR&lt;br/&gt;=====&lt;br/&gt;&lt;br/&gt;* Dynamic management of Lightning channel capacity is required to support efficient Lightning Network (LN) payments&lt;br/&gt;  - On-chain resizing introduces delays, adds costs and limits scalability&lt;br/&gt;  - Fast and cheap resizing may be required to support watchtower-free LN payments for casual users&lt;br/&gt;  - Channel factories allow off-chain channel resizing, but only by exchanging capacity within a single factory&lt;br/&gt;* Hierarchical channels allow flexible, off-chain resizing of channels&lt;br/&gt;  - They don&amp;#39;t require an exchange of capacity within a limited pool of users&lt;br/&gt;  - They also support watchtower-free casual users without stranding any channel capacity&lt;br/&gt;* Hierarchical channels do for channel capacity what the LN does for bitcoin&lt;br/&gt;* No change to the underlying Bitcoin protocol is required&lt;br/&gt;&lt;br/&gt;Overview&lt;br/&gt;========&lt;br/&gt;&lt;br/&gt;The ability to move Lightning channel capacity to where it&amp;#39;s most needed is central to the efficient operation of the LN.&lt;br/&gt;In fact, it&amp;#39;s been stated that the &amp;#34;main (probably only) job of&amp;#34; a dedicated Lightning user &amp;#34;is to efficiently allocate their liquidity&amp;#34; [10].&lt;br/&gt;&lt;br/&gt;The use of on-chain transactions to resize channels limits the LN&amp;#39;s scalability and increases its fees.&lt;br/&gt;In addition, resizing channels on-chain can introduce substantial delays.&lt;br/&gt;In fact, delays of multiple months are possible in the case of a casual user who operates in a watchtower-free manner [3], thus stranding capital and potentially preventing such users from operating in a watchtower-free manner in the current environment [10].&lt;br/&gt;&lt;br/&gt;Existing proposals for resizing channels off-chain consist of creating a channel factory [1] or CoinPool [7] and exchanging capacity between channels within the same factory or pool.&lt;br/&gt;However, only a very small fraction of the LN&amp;#39;s channels can be expected to be in a single factory or pool [8], so the ability to match channels that have insufficient capacity with channels that have excess capacity is highly constrained.&lt;br/&gt;&lt;br/&gt;This post uses hierarchical Lightning channels to solve two problems.&lt;br/&gt;&lt;br/&gt;First, as long as Lightning channels are created within hierarchical channels, it&amp;#39;s possible to resize them flexibly, nearly instantly and off-chain.&lt;br/&gt;Thus, hierarchical channels do for channel capacity what Lightning does for bitcoin.&lt;br/&gt;In fact, this is more than just an analogy, as the channel capacity is actually transferred over the LN.&lt;br/&gt;&lt;br/&gt;Second, hierarchical channels can be created by a casual user and a pair of dedicated users such that the casual user can send and receive bitcoin in a watchtower-free manner, while the dedicated users can use all of their channel capacity to route payments even while the casual user is inactive.&lt;br/&gt;As a result, casual users can operate in a watchtower-free manner without stranding any capital.&lt;br/&gt;&lt;br/&gt;The remainder of this post describes hierarchical channels and how to use them.&lt;br/&gt;A more complete description, including figures, is available in a paper [6].&lt;br/&gt;&lt;br/&gt;Hierarchical Channels&lt;br/&gt;=====================&lt;br/&gt;&lt;br/&gt;A *party* is a group of one or more users.&lt;br/&gt;A *hierarchical channel* is a 2-party channel that has two main outputs, one per party, plus zero or more HTLC outputs.&lt;br/&gt;Each output from a hierarchical channel that pays to a multi-user party funds another (potentially hierarchical) channel.&lt;br/&gt;As a result, each output in a hierarchical channel (including an HTLC output once it has been resolved) can be viewed as the root of an off-chain tree of outputs where the leaves are owned by single users.&lt;br/&gt;&lt;br/&gt;In order to update a hierarchical channel, funds are offered by one party to the other party in an HTLC.&lt;br/&gt;One user within the party offering the HTLC is designated as the *payer* and one user within the party offered the HTLC is designated as the *payee*.&lt;br/&gt;All of the funds for the HTLC are provided by the payer, and if the HTLC succeeds, the bulk of the funds go to the payee (but users within the offered party other than the payee can also get routing fees).&lt;br/&gt;Before the channel state is updated to include a new HTLC output, all of the users in the channel sign new transactions that spend the new channel state&amp;#39;s main outputs, its existing HTLC outputs, and the new HTLC output.&lt;br/&gt;The users then sign transactions that implement the new channel state (including the new HTLC output) and revoke the previous channel state.&lt;br/&gt;Once the HTLC is resolved, the channel state is updated to include the HTLC&amp;#39;s funds in the offered party&amp;#39;s main output (if the HTLC succeeded) or in the offering party&amp;#39;s main output (if the HTLC failed).&lt;br/&gt;&lt;br/&gt;Because the two parties within a hierarchical channel can use an HTLC to exchange bitcoin, they can link their HTLC to HTLCs in other (potentially hierarchical) channels, thus making payments over the LN.&lt;br/&gt;In particular, each party in a (potentially hierarchical) channel appears as a node in the LN channel graph and each (potentially hierarchical) channel appears as a pair of unidirectional edges linking the channel&amp;#39;s two parties.&lt;br/&gt;As in the current LN, a payment consists of a path where the node that&amp;#39;s offered an HTLC in one hop offers an HTLC in the next hop (and the user that is the payee in one hop is the payer in the next hop).&lt;br/&gt;&lt;br/&gt;Resizing Routing Channels Off-Chain&lt;br/&gt;===================================&lt;br/&gt;&lt;br/&gt;Dedicated users who provide routing services to others can use hierarchical channels to resize their Lightning channels off-chain.&lt;br/&gt;For example, consider dedicated users A, B, C and D who create a hierarchical channel with parties AB and CD.&lt;br/&gt;This hierarchical channel&amp;#39;s main outputs fund the (non-hierarchical) channels owned by AB and by CD.&lt;br/&gt;Also, assume that party CD has a separate hierarchical channel with (single-user) party E.&lt;br/&gt;&lt;br/&gt;If AB wants to reduce the capacity of their (non-hierarchical) channel, they can create a payment through the LN from party AB (with user A being the payer) to party (and user) A consisting of the path AB -&amp;gt; CD -&amp;gt; E -&amp;gt; F -&amp;gt; G -&amp;gt; A.&lt;br/&gt;Because this payment is from party AB within the hierarchical channel owned by parties AB and CD, this payment reduces the value of the main output that pays to AB from this hierarchical channel.&lt;br/&gt;Furthermore, because the (non-hierarchical) channel owned by A and B is funded by the main output that pays to AB from that hierarchical channel, this payment reduces the size of the channel owned by A and B.&lt;br/&gt;Finally, because this payment is paid by A (as the payer within the offering party AB at the payment&amp;#39;s first hop) and pays to A (as the payment&amp;#39;s destination), user A neither gains nor loses funds (except for paying routing fees to users C, D, E, F and G).&lt;br/&gt;&lt;br/&gt;Furthermore, as in any LN payment, each routing node that gains funds in one hop loses an identical (minus fees) amount of funds in the next hop, so their overall balance is unchanged (except for a slight increase due to fees).&lt;br/&gt;There&amp;#39;s nothing new about this for routing nodes E, F and G, as they act as they do in the current LN.&lt;br/&gt;However, it&amp;#39;s worth looking in more detail at routing node CD, as the existence of multi-user nodes in the LN is new with hierarchical channels.&lt;br/&gt;&lt;br/&gt;Like any routing node, CD gains funds in the hierarchical channel with AB and loses an identical (minus fees) amount of funds in the hierarchical channel with E.&lt;br/&gt;Note that C and D also appear as nodes within the LN channel graph, the channel between C and D that&amp;#39;s funded by the hierarchical channel with AB appears as a pair of unidirectional edges between C and D, and the channel between C and D that&amp;#39;s funded by the hierarchical channel with E appears as a pair of unidirectional edges between C and D.&lt;br/&gt;Thus, the sum of the capacities of the two channels between C and D is unchanged, except for a slight increase due to fees.&lt;br/&gt;&lt;br/&gt;The effects of this payment from AB to A on a portion of the LN channel graph are shown below.&lt;br/&gt;Each party appears as a box and each channel appears as a pair of directed edges between a pair of parties.&lt;br/&gt;The channel&amp;#39;s capacity is shown between the pair of directed edges, and each party&amp;#39;s balance appears either above or below the pair of edges.&lt;br/&gt;&lt;br/&gt;                                                                  200&lt;br/&gt;     PHYSICAL CHANNELS                                       &#43;--&#43; -&amp;gt;  &#43;--&#43;&lt;br/&gt;  BEFORE AB -&amp;gt; A PAYMENT                                     |C | 500 |D |&lt;br/&gt;  OF 100 UNITS PLUS FEES                                     |  |  &amp;lt;- |  |&lt;br/&gt;                                                             |  | 300 |  |&lt;br/&gt;                                                             |  |     |  |&lt;br/&gt;     800      800      400      200      500      500        |  | 700 |  |&lt;br/&gt;&#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43;   |  | -&amp;gt;  |  |&lt;br/&gt;|AB|1300 |CD|1000 |E |1000 |F | 400 |G | 700 |A | 800 |B |   |  | 800 |  |&lt;br/&gt;&#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;   &#43;--&#43;  &amp;lt;- &#43;--&#43;&lt;br/&gt;     500      200      600      200      200      300             100&lt;br/&gt;&lt;br/&gt;                                                                  308&lt;br/&gt;     PHYSICAL CHANNELS                                       &#43;--&#43; -&amp;gt;  &#43;--&#43;&lt;br/&gt;   AFTER AB -&amp;gt; A PAYMENT                                     |C | 609 |D |&lt;br/&gt;  OF 100 UNITS PLUS FEES                                     |  |  &amp;lt;- |  |&lt;br/&gt;                                                             |  | 301 |  |&lt;br/&gt;                                                             |  |     |  |&lt;br/&gt;     691      694      296       98      400      391        |  | 594 |  |&lt;br/&gt;&#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43;   |  | -&amp;gt;  |  |&lt;br/&gt;|AB|1300 |CD|1000 |E |1000 |F | 400 |G | 700 |A | 691 |B |   |  | 694 |  |&lt;br/&gt;&#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;   &#43;--&#43;  &amp;lt;- &#43;--&#43;&lt;br/&gt;     609      306      704      302      300      300             100&lt;br/&gt;&lt;br/&gt;Logical vs. Physical Channels&lt;br/&gt;=============================&lt;br/&gt;&lt;br/&gt;Because there are two separate channels between C and D (one funded by the hierarchical channel with AB and the other funded by the hierarchical channel with E), it&amp;#39;s natural to express these channels as two separate pairs of edges between C and D (as is shown above).&lt;br/&gt;However, a better viewpoint is obtained by logically merging the two physical channels between C and D into a single logical channel containing the sum of the capacities of the two physical channels.&lt;br/&gt;In fact, a large payment can be routed between C and D by using parallel HTLCs in the two physical channels connecting them.&lt;br/&gt;In addition, when logical (rather than physical) channels are advertised to LN peers, the resulting channel capacities are much more stable, as they don&amp;#39;t change (other than increasing due to fees) when the parties owning the channel are used to route a payment.&lt;br/&gt;&lt;br/&gt;For example, in the payment shown above the capacity of the channel between A and B is decreased by the amount of the payment from AB to A (plus fees), and the capacity of all other logical channels (including the one between C and D) is unchanged (other than increases due to fees).&lt;br/&gt;&lt;br/&gt;     LOGICAL CHANNELS&lt;br/&gt;  BEFORE AB -&amp;gt; A PAYMENT&lt;br/&gt;  OF 100 UNITS PLUS FEES&lt;br/&gt;&lt;br/&gt;     800      800      400      200      500      500             900&lt;br/&gt;&#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43;   &#43;--&#43; -&amp;gt;  &#43;--&#43;&lt;br/&gt;|AB|1300 |CD|1000 |E |1000 |F | 400 |G | 700 |A | 800 |B |   |C |1300 |D |&lt;br/&gt;&#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;   &#43;--&#43;  &amp;lt;- &#43;--&#43;&lt;br/&gt;     500      200      600      200      200      300             400&lt;br/&gt;&lt;br/&gt;     LOGICAL CHANNELS&lt;br/&gt;   AFTER AB -&amp;gt; A PAYMENT&lt;br/&gt;  OF 100 UNITS PLUS FEES&lt;br/&gt;&lt;br/&gt;     691      694      296       98      400      391             902&lt;br/&gt;&#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43;   &#43;--&#43; -&amp;gt;  &#43;--&#43;&lt;br/&gt;|AB|1300 |CD|1000 |E |1000 |F | 400 |G | 700 |A | 691 |B |   |C |1303 |D |&lt;br/&gt;&#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;   &#43;--&#43;  &amp;lt;- &#43;--&#43;&lt;br/&gt;     609      306      704      302      300      300             401&lt;br/&gt;&lt;br/&gt;Of course, the example given above could be reversed (by making a payment from A to AB) in order to increase the capacity of the channel between A and B off-chain.&lt;br/&gt;&lt;br/&gt;Supporting Casual Users Without Stranding Capacity&lt;br/&gt;==================================================&lt;br/&gt;&lt;br/&gt;Hierarchical channels can also be used to support watchtower-free casual users without stranding any channel capacity.&lt;br/&gt;Consider a watchtower-free casual user A who creates a hierarchical channel with dedicated users B and C, where A is one party and BC is the other party in the channel.&lt;br/&gt;Assume A wants to make a payment to G, and that party BC has a separate hierarchical channel with user D, D has a channel with E, E has a channel with F, and F has a channel with G.&lt;br/&gt;In this case, A can create a payment through the LN consisting of the path A -&amp;gt; BC -&amp;gt; D -&amp;gt; E -&amp;gt; F -&amp;gt; G.&lt;br/&gt;&lt;br/&gt;Of course, this example could be reversed in order to make a payment from G to casual user A.&lt;br/&gt;&lt;br/&gt;The key observation is that whenever A is neither sending nor receiving a payment, dedicated users B and C can utilize all of the capacity in the channel between them to route LN payments.&lt;br/&gt;Also, note that as long as B and C advertise their two physical channels (namely the one funded by the hierarchical channel shared with A and the one funded by the hierarchical channel shared with D) as a single logical channel, the capacity of the logical channel is unchanged (other than in increase due to fees) when B and C route payments to and from A.&lt;br/&gt;&lt;br/&gt;Protocols For Hierarchical Channels&lt;br/&gt;===================================&lt;br/&gt;&lt;br/&gt;Several issues have to be addressed in order to create a protocol for hierarchical channels.&lt;br/&gt;&lt;br/&gt;First, each main output (or resolved HTLC output) from a hierarchical channel must be able to pay to a tree of transactions that distribute the output&amp;#39;s funds to individual users at the leaves.&lt;br/&gt;This can be achieved by requiring the users in the hierarchical channel to exchange signatures for the tree of transactions that spend each output of a given Commitment transaction prior to signing that Commitment transaction.&lt;br/&gt;&lt;br/&gt;Second, a Lightning channel is currently announced with a channel_announcement message that references the on-chain UTXO funding the channel and the channel&amp;#39;s capacity is static.&lt;br/&gt;These channel_announcement messages won&amp;#39;t work for hierarchical channels that are funded by off-chain UTXOs and have dynamic capacities.&lt;br/&gt;Russell&amp;#39;s proposal [9] for channel_update_v2 messages is well-suited to hierarchical channels as it merges the concepts of channel announcements and channel updates and it includes the channel&amp;#39;s capacity, thus supporting dynamic capacities.&lt;br/&gt;In addition, it supports channels that are funded off-chain by allowing on-chain UTXOs to be cited when announcing channels with capacities that are at most a fixed multiple of the on-chain UTXOs&amp;#39; value.&lt;br/&gt;&lt;br/&gt;Third, hierarchical channels need to support more than two users per channel.&lt;br/&gt;The current Lightning channel protocol only works for 2-user channels, as it penalizes a user that puts an old Commitment transaction on-chain by allowing the other user to obtain all of the channel&amp;#39;s funds.&lt;br/&gt;Such an approach doesn&amp;#39;t work if there are more than two users in the channel, where at least two are dishonest.&lt;br/&gt;In such a case, a dishonest user could put an old Commitment transaction on-chain and another dishonest user could &amp;#34;punish&amp;#34; that user by claiming all of the channel funds, including those from the honest users.&lt;br/&gt;Even if the dishonest users can&amp;#39;t guarantee that they&amp;#39;ll take the channel&amp;#39;s funds, the expected value obtained by dishonest behavior could exceed the expected value from honest behavior.&lt;br/&gt;&lt;br/&gt;In contrast, channel factory protocols are designed to allow more than two users to update factory states off-chain, where each factory state consists of a division of the factory&amp;#39;s funds among the factory&amp;#39;s users.&lt;br/&gt;Therefore, if we define the hierarchical channel&amp;#39;s state as consisting of its two main outputs, plus any HTLC outputs, a channel factory protocol can be used to update the channel&amp;#39;s state off-chain.&lt;br/&gt;In particular, the Invalidation Tree protocol [2], the Tunable-Penalty Factory protocol [5] or the Single-Commitment Factory protocol [5] can be used.&lt;br/&gt;Of these, the Tunable-Penalty Factory protocol appears most attractive, as it requires only O(1) time and O(1) on-chain bytes for a unilateral close.&lt;br/&gt;&lt;br/&gt;Finally, in addition to maintaining the channel&amp;#39;s current set of outputs, each HTLC output must be resolved according to the terms of its associated HTLC.&lt;br/&gt;A simple approach, based on the current Lightning protocol, is to allow the HTLC output to be spent by either:&lt;br/&gt;* an HTLC-success transaction put on-chain by the payee and providing the HTLC&amp;#39;s required preimage, or&lt;br/&gt;* an HTLC-timeout transaction put on-chain by any user within the offering party after the HTLC&amp;#39;s expiry.&lt;br/&gt;&lt;br/&gt;This approach works, but it has two serious performance problems:&lt;br/&gt;1) resolving an HTLC on-chain requires closing the hierarchical channel, and&lt;br/&gt;2) the latency required for putting the HTLC output on-chain can significantly delay the HTLC&amp;#39;s expiry.&lt;br/&gt;&lt;br/&gt;Fortunately, both of these performance challenges are solved by using separate control transactions to resolve the HTCLs, as is done in the FFO and FFO-WF channel protocols [4].&lt;br/&gt;Specifically, the FFO protocol can be extended to resolve HTLCs in hierarchical channels owned by more than two dedicated users, and the FFO-WF protocol can be extended to resolve HTLCs in hierarchical channels with more than two users, exactly one of whom is a casual user.&lt;br/&gt;The details are given in the paper [6].&lt;br/&gt;&lt;br/&gt;Conclusions&lt;br/&gt;===========&lt;br/&gt;&lt;br/&gt;Sending bitcoin between users can be performed on-chain.&lt;br/&gt;However, allocating bitcoin to a Lightning channel allows it to be sent off-chain nearly instantly, with much lower fees, and in a far more scalable manner.&lt;br/&gt;&lt;br/&gt;Similarly, Lightning channel capacity can be moved to where it&amp;#39;s needed on-chain.&lt;br/&gt;However, allocating Lighting channel capacity within a hierarchical channel allows the channel to be resized off-chain nearly instantly, with much lower fees, and in a far more scalable manner.&lt;br/&gt;&lt;br/&gt;In addition, hierarchical channels can be used to support watchtower-free casual users without stranding any Lightning channel capacity.&lt;br/&gt;As a result, providing watchtower-freedom to casual users appears to be cost-effective.&lt;br/&gt;&lt;br/&gt;Given that these results can be achieved without making changes to the underlying Bitcoin protocol, it&amp;#39;s hoped that hierarchical channels will eventually be adopted in BOLTs and implemented in order to improve the scalability, efficiency, and usability of the Lightning network.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John&lt;br/&gt;&lt;br/&gt;[1] Burchert, Decker and Wattenhofer, &lt;a href=&#34;http://dx.doi.org/10.1098/rsos.180089&#34;&gt;http://dx.doi.org/10.1098/rsos.180089&lt;/a&gt;&lt;br/&gt;[2] Decker and Wattenhofer, &lt;a href=&#34;https://tik-old.ee.ethz.ch/file/716b955c130e6c703fac336ea17b1670/duplex-micropayment-channels.pdf&#34;&gt;https://tik-old.ee.ethz.ch/file/716b955c130e6c703fac336ea17b1670/duplex-micropayment-channels.pdf&lt;/a&gt;&lt;br/&gt;[3] Law, &lt;a href=&#34;https://github.com/JohnLaw2/ln-watchtower-free&#34;&gt;https://github.com/JohnLaw2/ln-watchtower-free&lt;/a&gt;&lt;br/&gt;[4] Law, &lt;a href=&#34;https://github.com/JohnLaw2/ln-factory-optimized&#34;&gt;https://github.com/JohnLaw2/ln-factory-optimized&lt;/a&gt;&lt;br/&gt;[5] Law, &lt;a href=&#34;https://github.com/JohnLaw2/ln-efficient-factories&#34;&gt;https://github.com/JohnLaw2/ln-efficient-factories&lt;/a&gt;&lt;br/&gt;[6] Law, &lt;a href=&#34;https://github.com/JohnLaw2/ln-hierarchical-channels&#34;&gt;https://github.com/JohnLaw2/ln-hierarchical-channels&lt;/a&gt;&lt;br/&gt;[7] Naumenko and Riard, &lt;a href=&#34;https://coinpool.dev/&#34;&gt;https://coinpool.dev/&lt;/a&gt;&lt;br/&gt;[8] Riard, &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-April/020370.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-April/020370.html&lt;/a&gt;&lt;br/&gt;[9] Russell, &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-February/003470.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-February/003470.html&lt;/a&gt;&lt;br/&gt;[10] Teinturier, &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-October/003712.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-October/003712.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Sent with [Proton Mail](&lt;a href=&#34;https://proton.me/&#34;&gt;https://proton.me/&lt;/a&gt;) secure email.&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/20230318/2dfda9d8/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20230318/2dfda9d8/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T13:12:53Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsgl8efmzgaa77ttt7s2gnj5tfrtpgfxpdwtj5dj4zwqjux8qt82rgzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzxzd5vy</id>
    
      <title type="html">📅 Original date posted:2023-01-15 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsgl8efmzgaa77ttt7s2gnj5tfrtpgfxpdwtj5dj4zwqjux8qt82rgzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzxzd5vy" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfkqmeshldn7z0v52telezptqcm0thy0jyc2hcecmg79q482hh0lqf5ge8y&#39;&gt;nevent1q…ge8y&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-01-15&lt;br/&gt;🗒️ Summary of this message: New protocols for Lightning factories that can be closed unilaterally in O(1) time using O(1) on-chain transactions have been presented, which are essential for scaling the Lightning Network. The Tunable-Penalty Factory (TPF) protocol requires P different transactions to instantiate the factory&amp;#39;s channels, while the Single-Commitment (SC) protocol uses only a single transaction.&lt;br/&gt;📝 Original message:&lt;br/&gt;TL;DR&lt;br/&gt;=====&lt;br/&gt;&lt;br/&gt;* Factories that create and update a large number of Lightning channels efficiently are essential for scaling the Lightning Network.&lt;br/&gt;* This post presents the first known protocol for Lightning factories that can be closed unilaterally in O(1) time using O(1) on-chain transactions.&lt;br/&gt;  - If P parties use the protocol, they create P conflicting Commitment transactions, any of which can be used to establish the factory&amp;#39;s state.&lt;br/&gt;  - As a result, each party must maintain P copies of the state of each channel created by the factory.&lt;br/&gt;  - Another factory protocol is presented that eliminates the need to maintain P copies of each channel state (at the expense of requiring more on-chain bytes).&lt;br/&gt;* Both factory protocols are modifications of the Tunable-Penalty Channel protocol and share many of its properties, including:&lt;br/&gt;  - tunable penalties for putting old transactions on-chain, and&lt;br/&gt;  - watchtowers with storage that&amp;#39;s logarithmic in the number of factory states supported (but linear in the number of parties in the factory).&lt;br/&gt;&lt;br/&gt;Overview&lt;br/&gt;========&lt;br/&gt;&lt;br/&gt;Factories that allow multiple two-party Lightning channels to be created, re-sized and closed with a small number of on-chain transactions are essential to the scalability of Bitcoin [2].&lt;br/&gt;Let P denote the number of parties, C denote tha number of channels created, and S denote the number of factory states supported.&lt;br/&gt;The most efficient previously-known factory, created by Burchert, Decker and Wattenhofer [2], can be closed unilaterally in O(log S) time using O(log S) on-chain transactions and O(C &#43; log S) on-chain bytes.&lt;br/&gt;A single fixed transaction is used to instantiate the factory&amp;#39;s channels when it&amp;#39;s closed unilaterally, so the parties using the factory can maintain just a one version of each off-chain channel state.&lt;br/&gt;Performing a unilateral close with O(log S) on-chain transactions requires that the party closing the factory interact with the blockchain at O(log S) different blockheights (so a unilateral close is an O(log S)-shot procedure [4]), which could be awkward for some users [8].&lt;br/&gt;&lt;br/&gt;This paper presents two protocols for factories that can be closed unilaterally in O(1) time using O(1) on-chain transactions.&lt;br/&gt;The first protocol, called the Tunable-Penalty Factory (TPF) protocol, requires only O(C) on-chain bytes for a unilateral close, but it can use P different transactions to instantiate the factory&amp;#39;s channels, thus forcing the parties using the factory to maintain P different versions of each off-chain channel state.&lt;br/&gt;The second protocol, called the Single-Commitment (SC) protocol, requires O(C &#43; log S) on-chain bytes for a unilateral close, but it uses only a single transaction to instantiate the factory&amp;#39;s channels, so multiple versions of off-chain channel states aren&amp;#39;t required.&lt;br/&gt;The TPF protocol is particularly simple and allows a 2-shot unilateral close (that is, the party closing the channel only has to perform actions at 2 different blockheights).&lt;br/&gt;&lt;br/&gt;Both protocols are based on the Tunable-Penalty Channel (TPC) protocol [5] and they share many of its properties, including:&lt;br/&gt;* tunable penalties for putting old transactions on-chain, and&lt;br/&gt;* watchtowers with storage that&amp;#39;s logarithmic in the number of factory states supported (but linear in the number of parties in the factory).&lt;br/&gt;&lt;br/&gt;No change to the underlying Bitcoin protocol is required.&lt;br/&gt;&lt;br/&gt;A more complete description, including a proof of correctness and better figures, is available in a paper [6].&lt;br/&gt;&lt;br/&gt;The Tunable-Penalty Factory (TPF) Protocol&lt;br/&gt;==========================================&lt;br/&gt;&lt;br/&gt;The TPF protocol is a slight modification of the TPC protocol [5].&lt;br/&gt;&lt;br/&gt;Each party using the TPC protocol has their own on-chain Individual transaction, the output of which they spend with their State transaction.&lt;br/&gt;This State transaction is a control transaction and its first output&amp;#39;s value is equal to the desired penalty for putting an old State transaction on-chain.&lt;br/&gt;This first output can be spent by the same party&amp;#39;s Commitment transaction for the same state, but only after a relative delay equal to the maximum of the parties&amp;#39; to_self_delay parameters.&lt;br/&gt;The relative delay gives the other party time to revoke an old State transaction by spending its first output and thus claiming the penalty.&lt;br/&gt;The State transaction also has an HTLC control output for each HTLC that is active in that state.&lt;br/&gt;The TPC protocol revokes old State transactions with per-commitment keys that can be known to all parties, rather than with revocation keys that cannot be known by the party putting the revocable transaction on-chain [5].&lt;br/&gt;&lt;br/&gt;The TPC protocol is modified to create the TPF protocol by:&lt;br/&gt;* eliminating the HTLC control outputs from the State transactions,&lt;br/&gt;* modifying the Commitment transactions to have channel outputs, each of which is owned by two parties in the factory, and&lt;br/&gt;* supporting P &amp;gt; 2 parties by allowing each party to have their own Individual, State and Commitment transactions.&lt;br/&gt;&lt;br/&gt;The TPF protocol is shown below:&lt;br/&gt;&lt;br/&gt;&#43;-&#43; A..Z                           &#43;----&#43; AD&lt;br/&gt;|F|------&#43;-------------------------| CC |-----&lt;br/&gt;&#43;-&#43;      |                         |    |&lt;br/&gt;         |                         |    | BC&lt;br/&gt;         |                         |    |-----&lt;br/&gt;         |                         |    |&lt;br/&gt;         .                         |    | MZ&lt;br/&gt;         .                         |    |-----&lt;br/&gt;         .                         &#43;----&#43;&lt;br/&gt;         |&lt;br/&gt;         |                         &#43;----&#43; AD&lt;br/&gt;         &#43;-------------------------|C_Ai|-----&lt;br/&gt;         |                         |    |&lt;br/&gt;         |                         |    | BC&lt;br/&gt;         |                         |    |-----&lt;br/&gt;         |                         |    |&lt;br/&gt;         |               tsdAZ &amp;amp; A |    | MZ&lt;br/&gt;         |             &#43;-----------|    |-----&lt;br/&gt;         |             |           &#43;----&#43;&lt;br/&gt;         |             |&lt;br/&gt;         |             |           &#43;----&#43; AD&lt;br/&gt;         &#43;-------------------------|C_Bi|-----&lt;br/&gt;         |             |           |    |&lt;br/&gt;         |             |           |    | BC&lt;br/&gt;         |             |           |    |-----&lt;br/&gt;         |             |           |    |&lt;br/&gt;         .             | tsdAZ &amp;amp; B |    | MZ&lt;br/&gt;         .           &#43;-------------|    |-----&lt;br/&gt;         .           | |           &#43;----&#43;&lt;br/&gt;         |           | |&lt;br/&gt;         |           | |           &#43;----&#43; AD&lt;br/&gt;         &#43;-------------------------|C_Zi|-----&lt;br/&gt;         |           | |           |    |&lt;br/&gt;         .           | |           |    | BC&lt;br/&gt;         .           | |           |    |-----&lt;br/&gt;         .           | |           |    |&lt;br/&gt;         |           | | tsdAZ &amp;amp; Z |    | MZ&lt;br/&gt;         V         &#43;---------------|    |-----&lt;br/&gt;                   | | |           &#43;----&#43;&lt;br/&gt;                   | | |&lt;br/&gt;&#43;----&#43; A  &#43;-----&#43;  | | | pckeyAi&lt;br/&gt;|In_A|----|St_Ai|------&#43;-----------&lt;br/&gt;&#43;----&#43;    |     |  | |&lt;br/&gt;          &#43;-----&#43;  | |&lt;br/&gt;                   | |&lt;br/&gt;&#43;----&#43; B  &#43;-----&#43;  | |   pckeyBi&lt;br/&gt;|In_B|----|St_Bi|----&#43;-------------&lt;br/&gt;&#43;----&#43;    |     |  |&lt;br/&gt;          &#43;-----&#43;  |&lt;br/&gt;  .          .     .&lt;br/&gt;  .          .     .&lt;br/&gt;  .          .     .&lt;br/&gt;                   |&lt;br/&gt;&#43;----&#43; Z  &#43;-----&#43;  |     pckeyZi&lt;br/&gt;|In_Z|----|St_Zi|--&#43;---------------&lt;br/&gt;&#43;----&#43;    |     |&lt;br/&gt;          &#43;-----&#43;&lt;br/&gt;&lt;br/&gt;where:&lt;br/&gt;F is the Funding transaction,&lt;br/&gt;CC is the Cooperative Close transaction,&lt;br/&gt;In_{A..Z} is {A..Z&amp;#39;s} Individual transaction,&lt;br/&gt;St_{A..Z}i is {A..Z&amp;#39;s} State transaction for state i, and&lt;br/&gt;C_{A..Z}i is {A..Z&amp;#39;s} Commitment transaction for state i.&lt;br/&gt;&lt;br/&gt;Requirements for output cases are as follows:&lt;br/&gt;{A..Z}: {A..Z}&amp;#39;s signature (a single party&amp;#39;s signature),&lt;br/&gt;A..Z: A..Z&amp;#39;s signature (every parties&amp;#39; signature),&lt;br/&gt;pairs of capital letters indicate signatures from those two parties,&lt;br/&gt;pckey{A..Z}i: a signature using a per-commitment key for revoking {A..Z}&amp;#39;s state i transaction, and&lt;br/&gt;tsdAZ: a relative delay equal to the maximum of {A..Z}&amp;#39;s to_self_delay parameters.&lt;br/&gt;&lt;br/&gt;In order to establish a new factory state, all parties:&lt;br/&gt;* calculate the State and Commitment transactions for the new state (this step includes exchanging per-commitment pubkeys for the new state with each of the other parties),&lt;br/&gt;* exchange partial signatures for the new state&amp;#39;s Commitment transactions, and&lt;br/&gt;* exchange per-commitment keys for the old state, thus revoking it.&lt;br/&gt;&lt;br/&gt;All parties constantly look for old (revoked) State transactions put on-chain by other parties, and if they find such a transaction they use the corresponding per-commitment key to spend its first output, thus obtaining the penalty funds and revoking the old state.&lt;br/&gt;Once a State transaction has been on-chain for tsdAZ without its first output being spent, the party that put the State transaction on-chain can attempt to put their corresponding Commitment transaction on-chain at any time.&lt;br/&gt;Any party can close the factory unilaterally by putting their current State transaction on-chain, waiting until it has been on-chain for tsdAZ, and then submitting their corresponding Commitment transaction to the blockchain.&lt;br/&gt;&lt;br/&gt;As was the case with the TPC protocol, per-commitment keys can use the Lightning protocol&amp;#39;s compact storage technique for revocation keys to consume only O(log S) storage to revoke a maximum of S old transactions that could be put on-chain by a single other party [7][5].&lt;br/&gt;Therefore, each party requires O(P*log S) storage to hold the per-commitment keys for all of the P parties.&lt;br/&gt;&lt;br/&gt;The Single-Commitment (SC) Factory Protocol&lt;br/&gt;===========================================&lt;br/&gt;&lt;br/&gt;Note that the TPF factory protocol uses P conflicting Commitment transactions to establish the factory state and to instantiate the factory&amp;#39;s channels.&lt;br/&gt;Therefore, a separate channel state must be maintained and updated for each of the P versions of the channel that could be instantiated, thus increasing the computation, storage, and communication for channels by a factor of P.&lt;br/&gt;The result could be quite expensive if there are a large number of parties in the factory.&lt;br/&gt;&lt;br/&gt;The SC protocol eliminates this factor of P blow-up by having all of the parties use a single shared Commitment transaction.&lt;br/&gt;Like the TPF protocol, the SC protocol uses revocable State transactions, each of which spends a single party&amp;#39;s Individual transaction output, to ensure that only the current Commitment transaction can be put on-chain.&lt;br/&gt;The challenge is how to use a single shared Commitment transaction that depends on the value of an unrevoked State transaction without actually spending any of the outputs of that State transaction (as spending a State transaction output would make the Commitment transaction&amp;#39;s input dependent on which party&amp;#39;s State transaction it spends, thus preventing the use of a single shared Commitment transaction).&lt;br/&gt;This challenge is solved by introducing a shared Trigger transaction and a per-user Mold transaction, where the Commitment and Mold transactions compete for the Trigger transaction&amp;#39;s outputs.&lt;br/&gt;The Mold transaction is put on-chain prior to the Commitment transaction, and it constrains the Commitment transactions that can be put on-chain somewhat like how a mold shapes a liquid that is poured into it.&lt;br/&gt;&lt;br/&gt;Specifically, the Trigger transaction has one value output and log_2(S) control outputs, numbered 0 .. log_2(S) - 1. Commitment transaction i, 0 &amp;lt;= i &amp;lt;= S - 1, spends those Trigger control outputs b, 0 &amp;lt;= b &amp;lt;= log_2(S) - 1, such that bit position b of the binary representation of i is a 0.&lt;br/&gt;Each Mold transaction i, 0 &amp;lt;= i &amp;lt;= S - 1, spends the output of the same party&amp;#39;s State i transaction, and Trigger control outputs b, 0 &amp;lt;= b &amp;lt;= log_2(S) - 1, such that bit position b of the binary representation of i is a 1.&lt;br/&gt;This construction guarantees that if a Mold transaction for state i is on-chain, only Commitment transactions for states j &amp;gt;= i can be put on-chain.&lt;br/&gt;&lt;br/&gt;States 0 through S - 1 are supported, with the exception of states of the form 2^b where 1 &amp;lt;= b &amp;lt;= log_2(S) - 1.&lt;br/&gt;These exceptions are made to guarantee that it is impossible to put Mold transactions on-chain for two consecutive states (other than states 0 and 1) where they would prevent any current Commitment transaction from being put on-chain.&lt;br/&gt;When state i is supported but state i&#43;1 is not, the next state after i is i&#43;2.&lt;br/&gt;&lt;br/&gt;The protocol operation is similar to that of the TPF protocol, except parties closing the channel unilaterally submit the Trigger transaction and their current State transaction to the blockchain, and once their State transaction has been on-chain for tsdAZ, submit their Mold transaction for the same state to the blockchain.&lt;br/&gt;Once the Trigger transaction has been on-chain for 3tsdAZ, they submit to the blockchain the Commitment transaction for the same state as the on-chain Mold transaction.&lt;br/&gt;&lt;br/&gt;Also, all parties monitor the blockchain for the Trigger transaction, and if they find it they use the above protocol for closing the factory as soon as possible.&lt;br/&gt;&lt;br/&gt;Because only Mold transactions for unrevoked State transactions can be put on-chain, and because only the latest State transactions can be unrevoked, only the latest (and thus current) Commitment transactions can be put on-chain.&lt;br/&gt;&lt;br/&gt;A figure for the SC protocol, and a detailed proof of correctness, are in the paper [6].&lt;br/&gt;&lt;br/&gt;Related Work&lt;br/&gt;============&lt;br/&gt;&lt;br/&gt;The concept of creating a channel factory for Lightning, as well as the most efficient published protocol for such a factory, was presented by Burchert, Decker and Wattenhofer [2].&lt;br/&gt;The protocols presented here differ in only requiring O(1) time and O(1) on-chain transactions for a unilateral factory close.&lt;br/&gt;&lt;br/&gt;A number of researchers have proposed changes to Bitcoin in order to support simpler and more efficient factories.&lt;br/&gt;The eltoo factory protocol [3] has a particularly simple structure and it allows the parties to maintain only one version of each off-chain channel state.&lt;br/&gt;It requires O(1) time, O(1) on-chain transactions and O(1) on-chain bytes for a unilateral close.&lt;br/&gt;However, a malicious party could delay the closing of the factory until O(S) transactions are put on-chain, if the malicious party is willing to pay the required fees.&lt;br/&gt;The eltoo protocol differs from the protocols presented here by requiring a change to Bitcoin, namely the support for BIP 118 [1].&lt;br/&gt;&lt;br/&gt;The TPF and SC protocols are based on the TPC protocol presented by Law [5].&lt;br/&gt;&lt;br/&gt;Conclusions&lt;br/&gt;===========&lt;br/&gt;&lt;br/&gt;This post presents new factory protocols that require O(1) time and O(1) on-chain transactions for a unilateral close.&lt;br/&gt;They are the first factory protocols known that achieve those bounds with the existing Bitcoin protocol.&lt;br/&gt;&lt;br/&gt;The ability to unilaterally close a factory with just two or three submissions to the blockchain, with a fixed delay between them, is quite a bit simpler than closing previously-published factories [2].&lt;br/&gt;As a result, it&amp;#39;s hoped that TPF and SC factories will lead to the increased use of factories in practice, thus improving the scalability of Bitcoin and Lightning.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John&lt;br/&gt;&lt;br/&gt;References&lt;br/&gt;==========&lt;br/&gt;[1] &amp;#34;BIP 118: SIGHASH_ANYPREVOUT&amp;#34;, available at &lt;a href=&#34;https://anyprevout.xyz/&#34;&gt;https://anyprevout.xyz/&lt;/a&gt; and &lt;a href=&#34;https://github.com/bitcoin/bips/pull/943&#34;&gt;https://github.com/bitcoin/bips/pull/943&lt;/a&gt;.&lt;br/&gt;[2] Burchert, Decker and Wattenhofer, &amp;#34;Scalable Funding of Bitcoin Micropayment Channel Networks&amp;#34;, available at &lt;a href=&#34;http://dx.doi.org/10.1098/rsos.180089&#34;&gt;http://dx.doi.org/10.1098/rsos.180089&lt;/a&gt;.&lt;br/&gt;[3] Decker, Russell and Osuntokun. eltoo: A Simple Layer2 Protocol for Bitcoin. Available at &lt;a href=&#34;https://blockstream.com/eltoo.pdf&#34;&gt;https://blockstream.com/eltoo.pdf&lt;/a&gt;.&lt;br/&gt;[4] Law, &amp;#34;Watchtower-Free Lightning Channels For Casual Users&amp;#34;, available at &lt;a href=&#34;https://github.com/JohnLaw2/ln-watchtower-free&#34;&gt;https://github.com/JohnLaw2/ln-watchtower-free&lt;/a&gt;.&lt;br/&gt;[5] Law, &amp;#34;Lightning Channels With Tunable Penalties&amp;#34;, available at &lt;a href=&#34;https://github.com/JohnLaw2/ln-tunable-penalties&#34;&gt;https://github.com/JohnLaw2/ln-tunable-penalties&lt;/a&gt;.&lt;br/&gt;[6] Law, &amp;#34;Efficient Factories For Lightning Channels&amp;#34;, available at &lt;a href=&#34;https://github.com/JohnLaw2/ln-efficient-factories&#34;&gt;https://github.com/JohnLaw2/ln-efficient-factories&lt;/a&gt;.&lt;br/&gt;[7] Russell, &amp;#34;Efficient Per-Commitment Secret Storage&amp;#34;, available at &lt;a href=&#34;https://github.com/lightning/bolts/blob/master/03-transactions.md#efficient-per-commitment-secret-storage&#34;&gt;https://github.com/lightning/bolts/blob/master/03-transactions.md#efficient-per-commitment-secret-storage&lt;/a&gt;.&lt;br/&gt;[8] ZmnSCPxj, &amp;#34;Channel Eviction From Channel Factories By New Covenant Operations&amp;#34;, available at &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-February/003479.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-February/003479.html&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;Sent with [Proton Mail](&lt;a href=&#34;https://proton.me/&#34;&gt;https://proton.me/&lt;/a&gt;) secure email.&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/20230115/1c24b7f0/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20230115/1c24b7f0/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T13:12:32Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsf8d7wc73dn287c3ndqyukkslrlas5lpf0vw48nx7sgsaalvsz2kszyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gz4tgrs3</id>
    
      <title type="html">📅 Original date posted:2023-04-28 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsf8d7wc73dn287c3ndqyukkslrlas5lpf0vw48nx7sgsaalvsz2kszyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gz4tgrs3" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0ulh4r602lr3xkt5z89pj20fu0v5hwzdhjumzma0drn0z5tjy9kgh6yk9a&#39;&gt;nevent1q…yk9a&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-04-28&lt;br/&gt;📝 Original message:&lt;br/&gt;Replies inline:&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; One thing that confuses me about the paper is how to think about routing&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; to a &amp;#34;channel&amp;#34; rather than a node -- ie the payment from &amp;#34;E-&amp;gt;FG-&amp;gt;A&amp;#34; where&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;#34;FG&amp;#34; isn&amp;#39;t &amp;#34;F&amp;#34; or &amp;#34;G&amp;#34;, but &amp;#34;both of them&amp;#34;.&lt;br/&gt;&amp;gt; &amp;gt; Yes, I found it very difficult to think about, and I kept getting confused between concepts like &amp;#34;user&amp;#34;, &amp;#34;node&amp;#34;, &amp;#34;channel&amp;#34;, and &amp;#34;factory&amp;#34;.&lt;br/&gt;&amp;gt; &amp;gt; The thing that works best for me is to create a clear definition of each of these terms, along with the term &amp;#34;party&amp;#34;.&lt;br/&gt;&lt;br/&gt;&amp;gt; Okay, that makes sense. I think it might work better to treat &amp;#34;node&amp;#34; as&lt;br/&gt;&amp;gt; synonymous with &amp;#34;user&amp;#34; rather than &amp;#34;party&amp;#34; though -- that way you can say&lt;br/&gt;&amp;gt; &amp;#34;you create a lightning node by running lightning node software such as&lt;br/&gt;&amp;gt; lnd/cln/eclair/etc&amp;#34;. That means not all vertices in the payment routing&lt;br/&gt;&amp;gt; network are nodes; but all vertices in the *gossip* network are nodes,&lt;br/&gt;&amp;gt; so that seems okay.&lt;br/&gt;&lt;br/&gt;Yes, it&amp;#39;s probably best to refer to a user who runs lightning node software as being a &amp;#34;node&amp;#34;.&lt;br/&gt;&lt;br/&gt;On the other hand, it sounds really awkward to talk about routing in a directed graph without using the word &amp;#34;node&amp;#34; in some form. Maybe &amp;#34;routing node&amp;#34; for entities in the routing network?&lt;br/&gt;&lt;br/&gt;&amp;gt; (I&amp;#39;m not sure &amp;#34;channel factories&amp;#34; is really the most evocative way of&lt;br/&gt;&amp;gt; describing them -- at least when I think of a factory, I think the product&lt;br/&gt;&amp;gt; should be accessible to everyone; but for channel factories you have to&lt;br/&gt;&amp;gt; be involved in the factory&amp;#39;s original mutlisig to be able to use one of&lt;br/&gt;&amp;gt; its channels. Maybe better to call them &amp;#34;channel coops&amp;#34;, where you&amp;#39;re&lt;br/&gt;&amp;gt; creating a little commune of friends/allies to work together with each&lt;br/&gt;&amp;gt; other. Could be pronounced like &amp;#34;workers&amp;#39; co-op&amp;#34; or like &amp;#34;chicken coop&amp;#34;,&lt;br/&gt;&amp;gt; either way :)&lt;br/&gt;&lt;br/&gt;Good point regarding &amp;#34;factories&amp;#34;. I like &amp;#34;channel co-op&amp;#34; as an alternative.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; * Logical Channel: a layer 2 construct that consists of all of the physical channels owned by a specific pair of parties&lt;br/&gt;&amp;gt; &amp;gt;   - the size (capacity) of a logical channel is the sum of the sizes of their physical channels&lt;br/&gt;&amp;gt; &amp;gt;   - (Footnote: It&amp;#39;s possible, with a significant amount of software development work that I in no way discount, to route a payment through a logical channel where the payment traverses multiple physical channels at the same time. This is done by using separate HTLCs, all sharing the same secret, in each of the physical channels that the payment traverses. I can write more about this if that would be helpful.)&lt;br/&gt;&lt;br/&gt;&amp;gt; I think it might already be interesting to write a BOLT/BLIP for that?&lt;br/&gt;&amp;gt; Having a single channel backed by multiple on-chain utxos is probably&lt;br/&gt;&amp;gt; interesting for splicing (adding or spending a utxo while keeping the&lt;br/&gt;&amp;gt; channel open on the other utxos might be able to be done more simply than&lt;br/&gt;&amp;gt; splicing in general), and having multiple utxos might let you increase&lt;br/&gt;&amp;gt; some of your channel limits, eg `max_accepted_htlcs` might be able to&lt;br/&gt;&amp;gt; be increased to 483*U where U is the number of UTXOs backing the channel.&lt;br/&gt;&lt;br/&gt;Sounds good. I&amp;#39;m glad to write something up, but I&amp;#39;m afraid it may take me a few months.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; It feels like there&amp;#39;s a whole&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; mass of complications hidden in there from a routing perspective; like how&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; do you link &amp;#34;FG&amp;#34; back with &amp;#34;F&amp;#34; and &amp;#34;G&amp;#34;, how do you decide fees, how do&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; you communicate fees/max_htlc/etc.&lt;br/&gt;&amp;gt; &amp;gt; Regarding the specific issues you raised:&lt;br/&gt;&amp;gt; &amp;gt; Q: How do you link &amp;#34;FG&amp;#34; back with &amp;#34;F&amp;#34; and &amp;#34;G&amp;#34;?&lt;br/&gt;&amp;gt; &amp;gt; A: In terms of gossiping and the channel graph, you don&amp;#39;t&lt;br/&gt;&lt;br/&gt;&amp;gt; Yeah, I think that simplifies things substantially.&lt;br/&gt;&lt;br/&gt;&amp;gt; I think the main thing that misled me here was the &amp;#34;CD-&amp;gt;E-&amp;gt;FG&amp;#34; payment&lt;br/&gt;&amp;gt; chain -- it doesn&amp;#39;t make sense to me why E would want to devote funds&lt;br/&gt;&amp;gt; that can only be used for rebalancing channels, but not normal payments.&lt;br/&gt;&lt;br/&gt;Actually, E&amp;#39;s funds in the channels ((C,D),E) and (E,(F,G)) can be used for normal payments. It might not seem attractive to do so, but there may be reasons for doing just that (see below).&lt;br/&gt;&lt;br/&gt;&amp;gt; Having that be CD-&amp;gt;DE-&amp;gt;FG seems like it would make much more sense in that&lt;br/&gt;&amp;gt; model. (Though, obviously, no one except D and E could necessarily tell&lt;br/&gt;&amp;gt; the difference between those two scenarios in practice, and just because&lt;br/&gt;&amp;gt; something doesn&amp;#39;t make sense, doesn&amp;#39;t mean nobody will actually do it)&lt;br/&gt;&lt;br/&gt;I included going from a single-user party to a multi-user party and back to a single-user party, as in E-&amp;gt;FG-&amp;gt;HI-&amp;gt;A in Figure 4 in the paper, just to show the poassibility. I didn&amp;#39;t think it would be common, given the extra signatures and fees required. However, I&amp;#39;m now thinking that routing through multi-user parties could be important in practice, even when making normal LN payments between single users. There&amp;#39;s a lot more on that idea below.&lt;br/&gt;&lt;br/&gt;&amp;gt; The other thing was that going from N nodes to C*N channels, then&lt;br/&gt;&amp;gt; re-considering each of the C*N channels (A-&amp;gt;B, etc) as also potentially&lt;br/&gt;&amp;gt; being nodes and adding an additional K*C*N channels (AB-&amp;gt;CD, etc) seemed&lt;br/&gt;&amp;gt; like it might be quadratic to me. But it&amp;#39;s probably not -- C (channels per&lt;br/&gt;&amp;gt; node) and K (utxos per channel) are probably constant or logarithmic in&lt;br/&gt;&amp;gt; N, so it&amp;#39;s probably okay?&lt;br/&gt;&lt;br/&gt;Yep, I&amp;#39;d assume C and K are largely independent of N (and constant or nearly so as the network grows), so that shouldn&amp;#39;t be a problem.&lt;br/&gt;&lt;br/&gt;&amp;gt; On the other hand, I could see the rebalancing channels not actually&lt;br/&gt;&amp;gt; being very useful for routing payments (they require 3&#43; signatures,&lt;br/&gt;&amp;gt; and may not even be publicly connected to any of the level-1 nodes),&lt;br/&gt;&amp;gt; so it could make sense to just treat them as two different networks,&lt;br/&gt;&amp;gt; where regular people doing payments only see the base channels, but&lt;br/&gt;&amp;gt; high-availability nodes also find out about the rebalancing channels.&lt;br/&gt;&amp;gt; If so, then the extra nodes/channels in the rebalancing graph only affect&lt;br/&gt;&amp;gt; people who can afford to dedicate the resources to storing it anyway,&lt;br/&gt;&amp;gt; so it&amp;#39;s probably fine.&lt;br/&gt;&lt;br/&gt;It would be possible to have a separate rebalancing network consisting of multi-user parties only and a base network consisting of single-user parties only. However, that both complicates and limits the rebalancing functionality.&lt;br/&gt;&lt;br/&gt;Let&amp;#39;s say A and B want to decrease the size of their channel (A,B) using the separate rebalancing network.&lt;br/&gt;&lt;br/&gt;They make a payment on the rebalancing network:&lt;br/&gt;&lt;br/&gt;AB-&amp;gt;CD-&amp;gt;EF-&amp;gt;GH-&amp;gt;IJ&lt;br/&gt;&lt;br/&gt;However, there are two problems with this approach:&lt;br/&gt;&lt;br/&gt;1) A and B have to find another channel (I,J) that wants to increase its capacity by exactly the same amount (minus fees) to offset the decrease in (A,B). In general, the rebalancing network can move capacity from one base channel (a.k.a., two-user channel or channel with single-user parties) to another one, but it can&amp;#39;t increase or decrease the overall capacity of the channels in the base network.&lt;br/&gt;&lt;br/&gt;2) The payment AB-&amp;gt;CD-&amp;gt;EF-&amp;gt;IJ not only rebalances channels, it also sends bitcoin from the payer in (A,B) to the payee in (I,J). This would have to be offset by making a corresponding payment (using the base network) from the payee in (I,J) (e.g., I) to the payer in (A,B) (e.g., A) and that offsetting payment would have to be atomic with the rebalancing payment. It&amp;#39;s possible to make this work by using the same secret for the payments in the base network and the rebalancing network, but it certainly adds complexity.&lt;br/&gt;&lt;br/&gt;In addition, there are reasons for wanting to include multi-user parties when making regular LN payments (again, see below).&lt;br/&gt;&lt;br/&gt;Connecting the level-2 routing nodes with the level-1 routing nodes requires at least some channels that consist of a multi-user party and a single-user party, such as the channel ((C,D),E). Once that&amp;#39;s done, the above problems go away and it&amp;#39;s possible to increase or decrease the overall capacity of the two-user channels without going on-chain.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; Finally, I realize that creating a world without factories doesn&amp;#39;t sound like a good solution for scaling Bitcoin. However, I believe hierarchical channels largely solve the problem of resizing channels off-chain.&lt;br/&gt;&lt;br/&gt;&amp;gt; I think this is probably a lot harder in practice than in theory? If&lt;br/&gt;&amp;gt; you have an {A,B} channel holding 3 BTC across two hierarchial channels,&lt;br/&gt;&amp;gt; {X:1 BTC, AB:1 BTC} and {Y:1 BTC, AB:2 BTC}, and someone wants to route&lt;br/&gt;&amp;gt; 0.5 BTC through X-&amp;gt;AB-&amp;gt;Y, then that will look something like:&lt;br/&gt;&lt;br/&gt;&amp;gt;    {X:1, AB:1}    {AB:2, Y:1}&lt;br/&gt;&lt;br/&gt;&amp;gt;    {X:0.5, XAB:0.5, AB:1}  {AB:2, Y:1}&lt;br/&gt;&lt;br/&gt;&amp;gt;    {X:0.5, XAB:0.5, AB:1}  {AB:1.5, ABY:0.5 Y:1}&lt;br/&gt;&lt;br/&gt;&amp;gt; and either:&lt;br/&gt;&lt;br/&gt;&amp;gt;    {X:1, AB:1}    {AB:2, Y:1}   (on failure)&lt;br/&gt;&amp;gt; or&lt;br/&gt;&amp;gt;    {X:0.5, AB:1.5}    {AB:1.5, Y:1.5}   (on success)&lt;br/&gt;&lt;br/&gt;&amp;gt; But what if you&amp;#39;re in the middle of routing 2 BTC over the A,B channel&lt;br/&gt;&amp;gt; in the meantime? In that case you need some of the AB payments to be&lt;br/&gt;&amp;gt; conditional on the success path of XAB and the failure path of ABY.&lt;br/&gt;&lt;br/&gt;&amp;gt; I *think* that&amp;#39;s fine, and doesn&amp;#39;t involve a combinatorical blowup in&lt;br/&gt;&amp;gt; the event that you&amp;#39;re routing rebalances across multiple off-chain utxos&lt;br/&gt;&amp;gt; -- you just end up splitting your channel across {X&#43;2*Y} utxos where X&lt;br/&gt;&amp;gt; is the number of &amp;#34;physical&amp;#34; channels and &amp;#34;Y&amp;#34; is the number of pending&lt;br/&gt;&amp;gt; rebalances. But it seems like there&amp;#39;s a fair chunk of complexity and&lt;br/&gt;&amp;gt; maybe some extra round trips (eg, moving a pending HTLC from being&lt;br/&gt;&amp;gt; purely in the AB:2 output to being split across the {XAB:0.5/success and&lt;br/&gt;&amp;gt; ABY:0.5/timeout} atomically seems tricky?).&lt;br/&gt;&lt;br/&gt;Wow, that&amp;#39;s a cool idea!&lt;br/&gt;&lt;br/&gt;I hadn&amp;#39;t considered having an active HTLC (sending 2 BTC from A to B) that&amp;#39;s (partially) funded by a pair of active HTLCs (sending 0.5 BTC from X to Y via the path X-&amp;gt;AB-&amp;gt;Y). I figured that would be too complex, but I hadn&amp;#39;t thought through the details.&lt;br/&gt;&lt;br/&gt;In contrast, I had considered having an active HTLC that&amp;#39;s funded by a resolved (either successful or failed) HTLC. This seems important, as the resolved HTLC requires 3&#43; signatures in order to merge it into a new Commitment transaction, so it might not be possible to get all the signatures right away. For example, dedicated users A and B want to be able to use their newly-gained capacity in the channel (C,(A,B)) after making a payment from casual user C without having to wait for C to update the state of (C,(A,B)).&lt;br/&gt;&lt;br/&gt;The hierarchical channels paper requires that all the funds in an HTLC be provided by a single user, denoted as the &amp;#34;payer&amp;#34;. As a result, the capital in a hierarchical channel can only be used for a single active HTLC at a single level at a time. This requires multiplexing the capital between level-1 channel HTLCs and level-2 channel HTLCs, but I figured that was OK as the level-2 channels would mainly be used for rebalancing, which should be far less frequent than level-1 payments (and the rebalancing could wait until a path was available). Thus, one doesn&amp;#39;t have to allow an active HTLC to be funded by a pair of active HTLCs in order to have flexible off-chain rebalancing of channels.&lt;br/&gt;&lt;br/&gt;However, as you point out, it should be possible to have an active HTLC be funded by a pair of active HTLCs. The thing that&amp;#39;s amazing about this is that the *same capital* is used for routing at two different levels in the hierarchy simultaneously! In other words, in addition to routing normal LN payments through single-user parties, it&amp;#39;s possible to simultaneously route independent normal LN payments through multi-user parties by re-using the *same capital*.&lt;br/&gt;&lt;br/&gt;Sure, the payments through multi-user parties require more signatures, so that could slow them down or complicate them, but the potential to maybe double the routing fees that can be generated from a given unit of capital (in addition to enabling off-chain rebalancing) sounds pretty compelling if the cost of capital is high.&lt;br/&gt;&lt;br/&gt;As you noted, making this work atomically is tricky. Let&amp;#39;s consider your example again, using slightly modified notation.&lt;br/&gt;&lt;br/&gt;Initially, there&amp;#39;s an {A,B} channel holding 3 BTC across two hierarchical channels:&lt;br/&gt;&lt;br/&gt;State 0:&lt;br/&gt;	{X:1 BTC, {A:0.5 BTC, B:0.5 BTC}}&lt;br/&gt;	and&lt;br/&gt;	{{A:2 BTC, B:0 BTC}, Y:1 BTC}&lt;br/&gt;&lt;br/&gt;First, A initiates a payment of 2 BTC with secret s1 via B in the hierarchical channel with Y:&lt;br/&gt;&lt;br/&gt;State 1:&lt;br/&gt;	{X:1 BTC, {A:0.5 BTC, B:0.5 BTC}}&lt;br/&gt;	and&lt;br/&gt;	{{A_or_s1_B:2 BTC}, Y:1 BTC}&lt;br/&gt;&lt;br/&gt;Then, while this payment is pending, X sends 0.5 BTC with secret s2 to Y via the following states:&lt;br/&gt;&lt;br/&gt;State 2:&lt;br/&gt;	{X:0.5 BTC, X_or_s2_{A_or_s1_B:0.5 BTC}, {A:0.5 BTC, B:0.5 BTC}}&lt;br/&gt;	and&lt;br/&gt;	{{A_or_s1_B:2 BTC}, Y:1 BTC}&lt;br/&gt;&lt;br/&gt;State 3:&lt;br/&gt;	{X:0.5 BTC, X_or_s2_{A_or_s1_B:0.5 BTC}, {A:0.5 BTC, B:0.5 BTC}}&lt;br/&gt;	and&lt;br/&gt;	{{A_or_s1_B:1.5 BTC}, {A_or_s1_B:0.5 BTC}_or_s2_Y:0.5 BTC, Y:1 BTC}&lt;br/&gt;&lt;br/&gt;&amp;gt;From this point, there are 8 possibilities in terms of whether the HTLCs succeed or fail, and in which order they do so.&lt;br/&gt;&lt;br/&gt;For example, if s1 is revealed and then the payment with secret s2 times out, we get:&lt;br/&gt;&lt;br/&gt;State 4:&lt;br/&gt;	{X:0.5 BTC, X_or_s2_{B:0.5 BTC}, {A:0.5 BTC, B:0.5 BTC}}&lt;br/&gt;	and&lt;br/&gt;	{{B:1.5 BTC}, {B:0.5 BTC}_or_s2_Y:0.5 BTC, Y:1 BTC}&lt;br/&gt;&lt;br/&gt;State 5:&lt;br/&gt;	{X:0.5 BTC, X:0.5 BTC, {A:0.5 BTC, B:0.5 BTC}}&lt;br/&gt;	and&lt;br/&gt;	{{B:1.5 BTC}, {B:0.5 BTC}, Y:1 BTC}&lt;br/&gt;&lt;br/&gt;State 6:&lt;br/&gt;	{X:1.0 BTC, {A:0.5 BTC, B:0.5 BTC}}&lt;br/&gt;	and&lt;br/&gt;	{{A:0 BTC, B:2.0 BTC}, Y:1 BTC}&lt;br/&gt;&lt;br/&gt;Alternatively, if s2 is revealed and then s1 is revealed, we get:&lt;br/&gt;&lt;br/&gt;State 4&amp;#39;:&lt;br/&gt;	{X:0.5 BTC, {A_or_s1_B:0.5 BTC}, {A:0.5 BTC, B:0.5 BTC}}&lt;br/&gt;	and&lt;br/&gt;	{{A_or_s1_B:1.5 BTC}, Y:0.5 BTC, Y:1 BTC}&lt;br/&gt;&lt;br/&gt;State 5&amp;#39;:&lt;br/&gt;	{X:0.5 BTC, {B:0.5 BTC}, {A:0.5 BTC, B:0.5 BTC}}&lt;br/&gt;	and&lt;br/&gt;	{{B:1.5 BTC}, Y:0.5 BTC, Y:1 BTC}&lt;br/&gt;&lt;br/&gt;State 6&amp;#39;:&lt;br/&gt;	{X:0.5 BTC, {A:0.5 BTC, B:1 BTC}}&lt;br/&gt;	and&lt;br/&gt;	{{A:0 BTC, B:1.5 BTC}, Y:1.5 BTC}&lt;br/&gt;&lt;br/&gt;The trickiest step is defining State 2. When A and B get the HTCL offered by X with secret s2, A and B figure out what they&amp;#39;re going to give up in the hierarchical channel with Y in case the payment from X succeeds. Given that all of A&amp;#39;s and B&amp;#39;s capital in {{A_or_s1_B:2 BTC}, Y:1 BTC} is in the HTLC with secret s1, they take 0.5 BTC of that HTLC and add it as the payout from secret s2 in the channel with X to obtain State 2. Then, they update the channel with Y to obtain State 3.&lt;br/&gt;&lt;br/&gt;This seems to address the atomicity issue. However, there are a couple other details to address in the hierarchical channel protocol.&lt;br/&gt;&lt;br/&gt;First, in the adaptation of the FFO protocol to hierarchical channels, the &amp;#34;payee&amp;#34; for an HTLC is the user that must provide the HTLC&amp;#39;s secret with an HTLC-kickoff transaction (see Figure 14 in the paper). However, when the HTLC pays to a lower-level HTLC, there is no single &amp;#34;payee&amp;#34; that can be determined. This could be addressed by enabling both users that could be payees to reveal the HTLC&amp;#39;s secret with an HTLC-kickoff transaction followed by an HTLC-success transaction (note that this doubles the number of HTLC-payment transactions that are required).&lt;br/&gt;&lt;br/&gt;Second, in going from HTLCs to PTLCs, the payee has to create a secret that&amp;#39;s subtracted from the secret that&amp;#39;s revealed at the payment&amp;#39;s next hop. The challenge is how to define a secret that depends on multiple potential payees&amp;#39; secrets. I think it may be possible to solve this by having all potential payees at hop i create their own secret, define the overall secret at hop i as being the sum of the potential payees&amp;#39; secrets (after protecting against key/secret cancellation), and sharing partial signatures between potential payees at hop i such that each potential payee just needs to get hop (i&#43;1)&amp;#39;s secret in order to produce hop (i)&amp;#39;s overall secret, but I haven&amp;#39;t worked through the details.&lt;br/&gt;&lt;br/&gt;To be clear, the idea of having an active HTLC that&amp;#39;s funded by a pair of active HTLCs is your idea, and it&amp;#39;s very interesting. We don&amp;#39;t need to support this in order to resize channels off-chain, but it does allow a given unit of capital to facilitate two independent payments simultaneously, which is amazing!&lt;br/&gt;&lt;br/&gt;&amp;gt; (I figure implementing something eltoo-like via 2-user tunable penalty&lt;br/&gt;&amp;gt; channels and/or ln-symmetry (let alone splicing, taproot funding&lt;br/&gt;&amp;gt; addresses, and ptlcs) is a sufficient sink for all the available&lt;br/&gt;&amp;gt; engineering effort any time soon, but talking about hierarchial/factory&lt;br/&gt;&amp;gt; things well in advance of when they could reasonably be implemented is&lt;br/&gt;&amp;gt; fun too)&lt;br/&gt;&lt;br/&gt;That makes sense.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m also hoping that a good understanding of what&amp;#39;s possible without changing Bitcoin, plus what&amp;#39;s enabled with changes like CTV and/or APO, will help inform any future changes to Bitcoin&amp;#39;s consensus rules.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John
    </content>
    <updated>2023-06-09T13:08:28Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqs9kaa6gjgl7dt42mvsyjzzw87y6fvwduyvn75fckqeu2dyqh3fdmszyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gz5laxqr</id>
    
      <title type="html">📅 Original date posted:2023-04-08 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqs9kaa6gjgl7dt42mvsyjzzw87y6fvwduyvn75fckqeu2dyqh3fdmszyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gz5laxqr" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqst9ccdzvm2gr2sphnwu7kw7sz7zm9swzyta8dm028pnvk6rkwhzaq8pzf8k&#39;&gt;nevent1q…zf8k&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-04-08&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi aj,&lt;br/&gt;&lt;br/&gt;Thanks for your great write-up!&lt;br/&gt;&lt;br/&gt;Comments below:&lt;br/&gt;&lt;br/&gt;&amp;gt; Even with Harding&amp;#39;s optech write ups, and the optech space, I barely&lt;br/&gt;&amp;gt; follow all this, so I&amp;#39;m going to try explaining it too as a way of&lt;br/&gt;&amp;gt; understanding it myself; hopefully maybe that helps someone. Corrections&lt;br/&gt;&amp;gt; welcome, obviously!&lt;br/&gt;&lt;br/&gt;&amp;gt; I think understanding all this requires going through each of the four&lt;br/&gt;&amp;gt; steps.&lt;br/&gt;&lt;br/&gt;[...]&lt;br/&gt;&lt;br/&gt;&amp;gt; Step 3: Factory Optimized protocols for Lighting&lt;br/&gt;&amp;gt;  &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://github.com/JohnLaw2/ln-factory-optimized&amp;#34;&amp;gt;https://github.com/JohnLaw2/ln-factory-optimized&amp;lt;/a&amp;gt&#34;&gt;https://github.com/JohnLaw2/ln-factory-optimized&amp;#34;&amp;gt;https://github.com/JohnLaw2/ln-factory-optimized&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt;  &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-December/003782.html&amp;#34;&amp;gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-December/003782.html&amp;lt;/a&amp;gt&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-December/003782.html&amp;#34;&amp;gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-December/003782.html&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt;  &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://bitcoinops.org/en/newsletters/2022/12/14/#factory-optimized-ln-protocol-proposal&amp;#34;&amp;gt;https://bitcoinops.org/en/newsletters/2022/12/14/#factory-optimized-ln-protocol-proposal&amp;lt;/a&amp;gt&#34;&gt;https://bitcoinops.org/en/newsletters/2022/12/14/#factory-optimized-ln-protocol-proposal&amp;#34;&amp;gt;https://bitcoinops.org/en/newsletters/2022/12/14/#factory-optimized-ln-protocol-proposal&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&lt;br/&gt;&amp;gt; In this case your transactions are:&lt;br/&gt;&lt;br/&gt;&amp;gt;   F - the funding output, only available once the factory is closed&lt;br/&gt;&amp;gt;   InB - as before&lt;br/&gt;&amp;gt;   StBi - your state commitment, one output that will be spent by ComBi,&lt;br/&gt;&amp;gt;          k outputs for each pending HTLC paying to B in state i.&lt;br/&gt;&amp;gt;   HBi-j-k - the kickoff transaction for HTLC &amp;#34;j&amp;#34; paying to B, spends&lt;br/&gt;&amp;gt;          the appropriate output of StBi, conditional on revealing the&lt;br/&gt;&amp;gt; 	 HTLC preimage and B&amp;#39;s signature. Spendable either by B after&lt;br/&gt;&amp;gt; 	 to-self-delay, or by A after the HTLC&amp;#39;s expiry plus&lt;br/&gt;&amp;gt; 	 to-self-delay&lt;br/&gt;&amp;gt;   HBi-j-s - the success transaction, spendable by B&lt;br/&gt;&amp;gt;   HBi-j-p - the payment transaction, spends HBi-j-s and the HTLC output&lt;br/&gt;&amp;gt;          from ComB_i&lt;br/&gt;&amp;gt;   HAi-j-p - the payment transaction, spends HBi-j-s and the HTLC output&lt;br/&gt;&amp;gt;          from ComA_i&lt;br/&gt;&lt;br/&gt;&amp;gt; I think there&amp;#39;s an error in the paper here; it says as well as being&lt;br/&gt;&amp;gt; spendable by H{A,B}i-j-p as above, the HTLC output in ComA_i should be&lt;br/&gt;&amp;gt; spendable by A after to-self-delay. I believe it should require both&lt;br/&gt;&amp;gt; to-self-delay (relative timelock) and the HTLC expiry (absolute timelock)&lt;br/&gt;&amp;gt; before it can be spendable by A.&lt;br/&gt;&lt;br/&gt;It&amp;#39;s not actually an error in the paper, because the paper includes a &amp;#34;max_cltv_expiry&amp;#34; parameter that prevents the race you&amp;#39;re concerned about.&lt;br/&gt;However, it&amp;#39;s easy to miss that parameter (it&amp;#39;s only introduced in an appendix) and I like your idea of using an absolute delay in the HTLC output in ComA_i when it is spent by A.&lt;br/&gt;I plan to change the paper to add such an absolute delay (which I believe should be Alice&amp;#39;s to-self-delay after the HTLC&amp;#39;s expiry) and remove the &amp;#34;max_cltv_expiry&amp;#34; parameter.&lt;br/&gt;Thanks for the good idea!&lt;br/&gt;&lt;br/&gt;&amp;gt; While this is described as an optimisation focussed on improving channels&lt;br/&gt;&amp;gt; within factories; it seems to me that the reduction in state compared to&lt;br/&gt;&amp;gt; the &amp;#34;tunable penalties&amp;#34; approach in step 1 makes this a strict improvement&lt;br/&gt;&amp;gt; in general.&lt;br/&gt;&lt;br/&gt;I agree.&lt;br/&gt;&lt;br/&gt;&amp;gt; Every participant needs 1&#43;c &amp;#34;In&amp;#34; confirmed utxos available -- one for&lt;br/&gt;&amp;gt; the factory itself, and one for each channel they&amp;#39;re involved in.&lt;br/&gt;&lt;br/&gt;While 1&#43;c &amp;#34;In&amp;#34; confirmed utxos will work, it&amp;#39;s also possible to just have a single confirmed utxo and to create the 1&#43;c desired &amp;#34;In&amp;#34; utxos from it by putting a transaction, or a tree of transactions, on-chain if and when needed.&lt;br/&gt;This optimization is described as the &amp;#34;Off-Chain Control Outputs&amp;#34; extension in the original Tunable Penalties paper and in the Factory Optimized Channels paper.&lt;br/&gt;&lt;br/&gt;&amp;gt; Step 4: Resizing Lightning Channels Off-Chain / Hierarchial Channels&lt;br/&gt;&amp;gt;   &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-March/003886.html&amp;#34;&amp;gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-March/003886.html&amp;lt;/a&amp;gt&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-March/003886.html&amp;#34;&amp;gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-March/003886.html&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt;   &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://github.com/JohnLaw2/ln-hierarchical-channels&amp;#34;&amp;gt;https://github.com/JohnLaw2/ln-hierarchical-channels&amp;lt;/a&amp;gt&#34;&gt;https://github.com/JohnLaw2/ln-hierarchical-channels&amp;#34;&amp;gt;https://github.com/JohnLaw2/ln-hierarchical-channels&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt;   &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://bitcoinops.org/en/newsletters/2023/03/29/#preventing-stranded-capital-with-multiparty-channels-and-channel-factories&amp;#34;&amp;gt;https://bitcoinops.org/en/newsletters/2023/03/29/#preventing-stranded-capital-with-multiparty-channels-and-channel-factories&amp;lt;/a&amp;gt&#34;&gt;https://bitcoinops.org/en/newsletters/2023/03/29/#preventing-stranded-capital-with-multiparty-channels-and-channel-factories&amp;#34;&amp;gt;https://bitcoinops.org/en/newsletters/2023/03/29/#preventing-stranded-capital-with-multiparty-channels-and-channel-factories&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&lt;br/&gt;&amp;gt; Hey, we made it to this thread!&lt;br/&gt;&lt;br/&gt;&amp;gt; I&amp;#39;m not entirely sure of the novelty in this proposal; once you have&lt;br/&gt;&amp;gt; channels in factories, lots of magic is possible, but it&amp;#39;s all very&lt;br/&gt;&amp;gt; complex. I believe the particular proposal here is something like:&lt;br/&gt;&lt;br/&gt;&amp;gt;  - Instead of just having Alice/Bob/Carol/etc as identities in&lt;br/&gt;&amp;gt;    lightning, let them &amp;#34;pair&amp;#34; up, so that AliceBob is considered a node,&lt;br/&gt;&amp;gt;    and CarolDave is also a node.&lt;br/&gt;&lt;br/&gt;&amp;gt;  - So we have a utxo where AliceBob has a channel with CarolDave, and&lt;br/&gt;&amp;gt;    another where CarolDave has a channel with Elizabeth, eg.&lt;br/&gt;&lt;br/&gt;&amp;gt;  - But actually the AliceBob/CarolDave utxo is a factory; and there&amp;#39;s&lt;br/&gt;&amp;gt;    an internal channel between Alice and Bob, and another between Carol&lt;br/&gt;&amp;gt;    and Dave&lt;br/&gt;&lt;br/&gt;&amp;gt;  - Now, because we describe AliceBob and CarolDave as a channel, that&lt;br/&gt;&amp;gt;    means funds can move between AliceBob and CarolDave; but that is&lt;br/&gt;&amp;gt;    equivalent to saying the overall capacity of the internal Alice/Bob&lt;br/&gt;&amp;gt;    channel is actually decreasing without any on-chain activity! Neat!&lt;br/&gt;&lt;br/&gt;&amp;gt; But... that was always the point of channel factories? And the specific&lt;br/&gt;&amp;gt; structure of four participants split into a single pair of channels&lt;br/&gt;&amp;gt; doesn&amp;#39;t seem particularly compelling? I don&amp;#39;t know, I feel like I&amp;#39;m&lt;br/&gt;&amp;gt; missing something here. Or maybe it&amp;#39;s just the first three steps were&lt;br/&gt;&amp;gt; amazing, so merely interesting seems pedestrian by comparison?&lt;br/&gt;&lt;br/&gt;Thanks!&lt;br/&gt;&lt;br/&gt;&amp;gt;From my perspective, this paper makes two contributions (which, to be fair, may only be &amp;#34;interesting&amp;#34; :)&lt;br/&gt;1) it allows dedicated users to resize Lightning channels off-chain by sending channel capacity over the Lightning network, and&lt;br/&gt;2) it allows each casual user to work with a pair of dedicated users in order to let the casual user send and receive payments without forcing the dedicated users to leave any of the channel capacity idle when the casual user is unavailable.&lt;br/&gt;&lt;br/&gt;I&amp;#39;ll discuss 2) more below.&lt;br/&gt;&lt;br/&gt;Regarding 1), I wouldn&amp;#39;t say that &amp;#34;that was always the point of channel factories&amp;#34;.&lt;br/&gt;While it&amp;#39;s true that channel factories allow users to resize two-user channels off-chain, they can only do this subject to the following limitations:&lt;br/&gt;* whatever channel capacity change is being made is exactly offset by one or more other channel capacity changes in the other direction (assuming all factory capacity is in channels),&lt;br/&gt;* the desired change and the offsetting change(s) have to be within a single channel factory, and&lt;br/&gt;* every user in the factory has to be available to sign for the factory update.&lt;br/&gt;&lt;br/&gt;The first two limitations make one want to create factories with lots of users (in order to have flexibility in finding offsetting channels), while the third limitation makes one want factories with few users (in order to enable obtaining all of the required signatures).&lt;br/&gt;&lt;br/&gt;1) eliminates all of these limitations by allowing channel capacity to be routed over the Lightning Network.&lt;br/&gt;Previously, I hadn&amp;#39;t realized this was possible.&lt;br/&gt;&lt;br/&gt;As a result, hierarchical channels with just 3 or 4 users seem to be enough for resizing channels off-chain.&lt;br/&gt;&lt;br/&gt;&amp;gt; Hmm, looking at Harding&amp;#39;s email, I see:&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; **Liquidity multiplexing:** Alice, Bob, Carol, and Dan each rightfully&lt;br/&gt;&amp;gt;&amp;gt; own some portion of a UTXO.  Alice and Bob expect to always be&lt;br/&gt;&amp;gt;&amp;gt; available; Carol and Dan may sometimes be unavailable.  The proposal&lt;br/&gt;&amp;gt;&amp;gt; allows Carol and Dan to spend/receive in combination with Alice and&lt;br/&gt;&amp;gt;&amp;gt; Bob, but also ensures Alice and Bob can spend back and forth the&lt;br/&gt;&amp;gt;&amp;gt; entirety their portions of the UTXO even if Carol, Dan, or both of&lt;br/&gt;&amp;gt;&amp;gt; them are unavailable.&lt;br/&gt;&lt;br/&gt;&amp;gt; I guess I&amp;#39;m not entirely enthusiastic about that because in that case&lt;br/&gt;&amp;gt; Alice can only send funds to Carol when Dan (and whoever else is involved&lt;br/&gt;&amp;gt; in the factory) eventually come online to signoff on the factory state&lt;br/&gt;&amp;gt; update. That&amp;#39;s still useful for (slow) offchain channel reallocations,&lt;br/&gt;&amp;gt; but it doesn&amp;#39;t seem reliable/fast enough for a payment.&lt;br/&gt;&lt;br/&gt;I too would not be enthusiastic if a casual user could only send and receive funds when some other casual user is available.&lt;br/&gt;However, by using three-user channels (two of whom are dedicated), a casual user can send and receive without requiring availability from any other casual user (and without stranding funds).&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John
    </content>
    <updated>2023-06-09T13:08:27Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsqjneg303jz9h22w8hscfvvlztrrphde5px7fqvurejkmq3825rdszyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzlme6ge</id>
    
      <title type="html">📅 Original date posted:2023-04-18 📝 Original message: &amp;gt; ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsqjneg303jz9h22w8hscfvvlztrrphde5px7fqvurejkmq3825rdszyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzlme6ge" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvyg4szu7vgzale9l7f6acx7hugtrffje8vxdg9jtttsgcrjwaw8sfdudzl&#39;&gt;nevent1q…udzl&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-04-18&lt;br/&gt;📝 Original message:&lt;br/&gt;&amp;gt; One thing that confuses me about the paper is how to think about routing&lt;br/&gt;&amp;gt; to a &amp;#34;channel&amp;#34; rather than a node -- ie the payment from &amp;#34;E-&amp;gt;FG-&amp;gt;A&amp;#34; where&lt;br/&gt;&amp;gt; &amp;#34;FG&amp;#34; isn&amp;#39;t &amp;#34;F&amp;#34; or &amp;#34;G&amp;#34;, but &amp;#34;both of them&amp;#34;.&lt;br/&gt;&lt;br/&gt;Yes, I found it very difficult to think about, and I kept getting confused between concepts like &amp;#34;user&amp;#34;, &amp;#34;node&amp;#34;, &amp;#34;channel&amp;#34;, and &amp;#34;factory&amp;#34;.&lt;br/&gt;The thing that works best for me is to create a clear definition of each of these terms, along with the term &amp;#34;party&amp;#34;.&lt;br/&gt;&lt;br/&gt;I also think it&amp;#39;s best to imagine a world in which there are hierarchical channels, but there are no &amp;#34;factories&amp;#34; per se.&lt;br/&gt;The distinction is meaningful in the sense that a hierarchical channel requires that there are exactly *two* *fixed* &amp;#34;parties&amp;#34; to which the hierarchical channel pays out, and all changes to the balances paid to those parties are made via HTLCs.&lt;br/&gt;In contrast, a &amp;#34;factory&amp;#34; can pay out to an arbitrary number of users or groups of users, and changes to the balances paid to those users or groups of users are made via updating the state of the factory (typically without an HTLC being required).&lt;br/&gt;&lt;br/&gt;So, in a world with hierarchical channels, but without factories, we have the following terms:&lt;br/&gt;* User: a person&lt;br/&gt;* Party: a fixed group consisting of one or more users&lt;br/&gt;* Node: a party&lt;br/&gt;  - so &amp;#34;party&amp;#34; and &amp;#34;node&amp;#34; are synonyms, with &amp;#34;party&amp;#34; emphasizing the human side of things and &amp;#34;node&amp;#34; emphasizing the graph side of things, such as when discussing the Lightning routing graph&lt;br/&gt;* Physical channel: a layer 2 construct that is funded by an on-chain or an off-chain UTXO, is owned by 2 parties, pays a balance to each of the parties, and updates the parties&amp;#39; balances through HTLCs and a channel protocol&lt;br/&gt;  - a physical channel can be non-hierarchical (where each of the 2 parties is a single user) or hierarchical (where at least one party consists of more than 1 user)&lt;br/&gt;  - (Footnote: The concept of an &amp;#34;off-chain UTXO&amp;#34; is itself a bit tricky, as it often refers to one of multiple possible transaction outputs, where the transactions or their ancestors conflict, so only one of them can actually be instantiated. For example, a Lightning channel (using the current penalty protocol) can be said to create an off-chain UTXO that pays to one of the users, even though it&amp;#39;s not clear which of the users&amp;#39; Commitment transactions will actually be instantiated. In general, an off-chain UTXO is a guaranteed way of getting a certain portion of a specific on-chain UTXO&amp;#39;s funds. Let&amp;#39;s skip going down this rabbit hole any further and just assume we understand these issues.)&lt;br/&gt;* Logical Channel: a layer 2 construct that consists of all of the physical channels owned by a specific pair of parties&lt;br/&gt;  - the size (capacity) of a logical channel is the sum of the sizes of their physical channels&lt;br/&gt;  - (Footnote: It&amp;#39;s possible, with a significant amount of software development work that I in no way discount, to route a payment through a logical channel where the payment traverses multiple physical channels at the same time. This is done by using separate HTLCs, all sharing the same secret, in each of the physical channels that the payment traverses. I can write more about this if that would be helpful.)&lt;br/&gt;* Lightning Network (LN): a layer 2 network consisting of parties and logical channels between parties&lt;br/&gt;  - the LN can be represented as a directed graph, where each party is a node and each logical channel is pair of arcs (one in each direction) between two nodes&lt;br/&gt;  - the LN can be used to make payments from one node to another node via a path through the graph&lt;br/&gt;    - the purpose of the payment could be to send bitcoin from one user to another (in this case, the payment&amp;#39;s source and destination nodes are both 1-user parties)&lt;br/&gt;    - the purpose of the payment could be to increase or decrease the size of a logical channel (in this case, the payment&amp;#39;s source and/or destination node is a multi-user party)&lt;br/&gt;      - (Footnote: Here&amp;#39;s another great opportunity for confusion, as the source and/or destination of the payment is a multi-user party, which is defined as more than two users, and yet the purpose of the payment is to resize a logical channel. Obviously, a group of users is different from a logical channel (as shown in the definitions above), so how does making a payment to or from a group of users change the size of a logical channel? The answer is that the logical channel being resized is the one owned by the group of users.)&lt;br/&gt;* Factory: a term that doesn&amp;#39;t exist in this world view&lt;br/&gt;&lt;br/&gt;Sorry if all of this seems overly pedantic.&lt;br/&gt;It&amp;#39;s the only way I&amp;#39;ve been able to keep these concepts straight in my mind.&lt;br/&gt;I&amp;#39;ve also found that drawings help clarify these issues, which is why the paper has 20 drawings, many of which are examples of payments and channel graphs.&lt;br/&gt;&lt;br/&gt;&amp;gt; It feels like there&amp;#39;s a whole&lt;br/&gt;&amp;gt; mass of complications hidden in there from a routing perspective; like how&lt;br/&gt;&amp;gt; do you link &amp;#34;FG&amp;#34; back with &amp;#34;F&amp;#34; and &amp;#34;G&amp;#34;, how do you decide fees, how do&lt;br/&gt;&amp;gt; you communicate fees/max_htlc/etc.&lt;br/&gt;&lt;br/&gt;In addition to the assumptions and definitions above, we need to use Rusty Russell&amp;#39;s idea for channel_update_v2 messages [1].&lt;br/&gt;&lt;br/&gt;Regarding the specific issues you raised:&lt;br/&gt;&lt;br/&gt;Q: How do you link &amp;#34;FG&amp;#34; back with &amp;#34;F&amp;#34; and &amp;#34;G&amp;#34;?&lt;br/&gt;A: In terms of gossiping and the channel graph, you don&amp;#39;t explicitly link &amp;#34;FG&amp;#34; with &amp;#34;F&amp;#34; and &amp;#34;G&amp;#34;. &amp;#34;FG&amp;#34;, &amp;#34;F&amp;#34; and &amp;#34;G&amp;#34; each have their own identity in the LN&amp;#39;s Onion network and each one appears as a separate node in the routing graph, with no explicit linkage between them. Every logical channel in the channel graph is announced with channel_update_v2 messages that provide the channel&amp;#39;s current capacity and refer back to an on-chain UTXO. It&amp;#39;s possible, but not necessary, that some of the logical channels between &amp;#34;FG&amp;#34; and other nodes, between &amp;#34;F&amp;#34; and other nodes, and between &amp;#34;G&amp;#34; and other nodes, use the same on-chain UTXO for their channel_update_v2 messages.&lt;br/&gt;&lt;br/&gt;Q: How do you decide fees?&lt;br/&gt;A: All of the users that own a given logical channel negotiate the routing fees that they want to charge. These routing fees are of two types: 1) a fee for devoting capital (by being the &amp;#34;payer&amp;#34; or &amp;#34;payee&amp;#34; as defined in the paper), and 2) a fee for providing signatures without devoting capital. For example, in order to traverse the logical channel ((A,B),(C,D)) (where A, B, C and D are dedicated users, A is the &amp;#34;payer&amp;#34;, and C is the &amp;#34;payee&amp;#34;), C will get a payment for devoting capital and D will get a payment for providing signatures. It&amp;#39;s reasonable to assume that the sum of these fees will be larger than the fees charged by most non-hierarchical channels, so it&amp;#39;s reasonable to assume that the logical channel ((A,B),(C,D)) will be used more often as the first or last hop in a payment (in order to resize (A,B) or (C,D), but not both of them), rather than as an intermediate hop in a payment.&lt;br/&gt;&lt;br/&gt;Q: How do you communicate fees/max_htlc/etc.?&lt;br/&gt;A: Just like you do today, with the only difference being that a specific user within each node should handle the Onion traffic for that node and (and should forward it to the other users within that node, if it&amp;#39;s a multi-user node). This user could be called the &amp;#34;leader&amp;#34; for the node. I didn&amp;#39;t describe this detail in the paper, but I could add it if you think it would be helpful.&lt;br/&gt;&lt;br/&gt;&amp;gt; I think it also implies that channel&lt;br/&gt;&amp;gt; capacity is no longer really something you can gossip very sensibly --&lt;br/&gt;&lt;br/&gt;Given the above definitions and assumptions, including the use of channel_update_v2 messages, I think you can gossip channel capacity quite reasonably.&lt;br/&gt;&lt;br/&gt;As is shown in the paper, just routing through a logical channel does *not* change its capacity (except for a slight increase due to fees). The only time a channel capacity changes significantly is when it is being resized by being the source or destination of a LN payment. The new capacity will be broadcast in the next weekly channel_update_v2 message. Obviously, there&amp;#39;s some potential for an unexpected inability for a channel to route requested payments before the channel_update_v2 message showing a reduced capacity has been received, but nothing actually breaks. Of course, it may be worth sending out a channel_update_v2 message as soon as a channel is resized.&lt;br/&gt;&lt;br/&gt;&amp;gt; if you have a factory ((A,B),C,D,E) then every payment through AB to C&lt;br/&gt;&amp;gt; or D or E will decrease AB&amp;#39;s channel capacity.&lt;br/&gt;&lt;br/&gt;First, let&amp;#39;s translate this example into one without factories (as that&amp;#39;s the world I&amp;#39;m envisioning). Let&amp;#39;s assume we have logical channals ((A,B),C), ((A,B),D) and ((A,B),D).&lt;br/&gt;&lt;br/&gt;Let&amp;#39;s assume that C sends a payment to some other random user/node G that is routed through AB. In this case, the logical channel between A and B does *not* change capacity (except for growing slightly due to fees)! This is shown in Figures 8 and 9 of the paper (with &amp;#34;BC&amp;#34; in those figures playing the role of &amp;#34;AB&amp;#34; described here). That&amp;#39;s the beauty of using logical, rather than physical, channels in the channel graph.&lt;br/&gt;&lt;br/&gt;It took me a long time to see this and I obviously have not succeeded in explaining it very well. Please let me know if this example isn&amp;#39;t clear, in which case I&amp;#39;ll try to find a better way of explaining it.&lt;br/&gt;&lt;br/&gt;&amp;gt; You could still gossip the&lt;br/&gt;&amp;gt; capacity of the overall factory, and sum that to get an overall lightning&lt;br/&gt;&amp;gt; network capacity, of course. But a lot of the ways of simplifying it&lt;br/&gt;&amp;gt; also make it harder to do all the nice rebalancing.&lt;br/&gt;&lt;br/&gt;I think the above approach solves these problems. Please let me know if I&amp;#39;ve missed something.&lt;br/&gt;&lt;br/&gt;Finally, I realize that creating a world without factories doesn&amp;#39;t sound like a good solution for scaling Bitcoin. However, I believe hierarchical channels largely solve the problem of resizing channels off-chain. This still leaves the problem of creating channels off-chain, but I don&amp;#39;t think we need factories to solve that problem. The key observation is that we don&amp;#39;t need to create a factory with *updatable* state in order to create a huge number of channels off-chain. Instead, we just need something that instantiates all of those off-chain channels in a way that guarantees the off-chain UTXOs creating those factories. I think the solution to this simpler problem is Timeout-Trees, but I still need to write that up. In any case, please consider hierarchical channels as being a partial solution to scaling Bitcoin and wait until I can make the case for Timeout-Trees before evaluating whether or not we need factories.&lt;br/&gt;&lt;br/&gt;&amp;gt; Anyway, I&amp;#39;ve tried a few times now to put some thoughts together on that&lt;br/&gt;&amp;gt; and come up with nothing that I&amp;#39;m happy with, so figured it might be at&lt;br/&gt;&amp;gt; least worth posing explicitly as a problem...&lt;br/&gt;&lt;br/&gt;Thanks!&lt;br/&gt;&lt;br/&gt;I really appreciate your working through all of these issues.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-February/003470.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-February/003470.html&lt;/a&gt;
    </content>
    <updated>2023-06-09T13:08:27Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsd7wvg2qxpl32eavt2cqsk8u4rfw8ejhf4ud0f6p7j9mktygxrzgqzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gz7mqt44</id>
    
      <title type="html">📅 Original date posted:2023-04-03 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsd7wvg2qxpl32eavt2cqsk8u4rfw8ejhf4ud0f6p7j9mktygxrzgqzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gz7mqt44" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8x88yhky24tg3k4wx34s54hdeuawjvprlu632x4afj7vzjqtny6gn5cert&#39;&gt;nevent1q…cert&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-04-03&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Dave,&lt;br/&gt;&lt;br/&gt;Thank you for your clear and insightful response.&lt;br/&gt;&lt;br/&gt;Comments inline below:&lt;br/&gt;&lt;br/&gt;&amp;gt;Hi John,&lt;br/&gt;&lt;br/&gt;&amp;gt;Thank you for another innovative application of your tunable penalties.&lt;br/&gt;&amp;gt;I see two key benefits being described by your paper[1]:&lt;br/&gt;&lt;br/&gt;&amp;gt;- **Offchain channel resizes:** in state 0, Alice and Bob share control&lt;br/&gt;&amp;gt;   over an offchain UTXO valued at x satoshis; in state 1, the value of&lt;br/&gt;&amp;gt;   the offchain UTXO is y satoshis.&lt;br/&gt;&lt;br/&gt;&amp;gt;- **Liquidity multiplexing:** Alice, Bob, Carol, and Dan each rightfully&lt;br/&gt;&amp;gt;   own some portion of a UTXO.  Alice and Bob expect to always be&lt;br/&gt;&amp;gt;   available; Carol and Dan may sometimes be unavailable.  The proposal&lt;br/&gt;&amp;gt;   allows Carol and Dan to spend/receive in combination with Alice and&lt;br/&gt;&amp;gt;   Bob, but also ensures Alice and Bob can spend back and forth the&lt;br/&gt;&amp;gt;   entirety their portions of the UTXO even if Carol, Dan, or both of&lt;br/&gt;&amp;gt;   them are unavailable.&lt;br/&gt;&lt;br/&gt;&amp;gt;For the Offchain Channel Resizes, I don&amp;#39;t see how your proposal&lt;br/&gt;&amp;gt;functionally differs from a classic channel factory.  In section 3, you&lt;br/&gt;&amp;gt;show the set {A, B, C, D} with the subset {A,B} where A reduces its&lt;br/&gt;&amp;gt;balance in {A,B} by transfering it to {C,D} via an HTLC to another of its&lt;br/&gt;&amp;gt;nodes (A&amp;#39;).&lt;br/&gt;&lt;br/&gt;&amp;gt;Your description uses hierarchical channels (which may have &amp;gt;2&lt;br/&gt;&amp;gt;participants per channel).  In a classic pair-producing channel factory,&lt;br/&gt;&amp;gt;each channel only has two participants, e.g. the factory {A, B, C, D}&lt;br/&gt;&amp;gt;produces the channels,&lt;br/&gt;&lt;br/&gt;&amp;gt;   {A,B}&lt;br/&gt;&amp;gt;   {A,C}&lt;br/&gt;&amp;gt;   {A,D}&lt;br/&gt;&amp;gt;   {B,C}&lt;br/&gt;&amp;gt;   {B,D}&lt;br/&gt;&amp;gt;   {C,D}&lt;br/&gt;&lt;br/&gt;&amp;gt;However, the same thing is possible, A as part of {A,B} can pay through&lt;br/&gt;&amp;gt;{B,C} out of the factory to A&amp;#39;.  After the HTLCs are settled, the&lt;br/&gt;&amp;gt;offchain channel setup transactions inside the factory can be&lt;br/&gt;&amp;gt;regenerated with the cooperation of all {A, B, C, D}.&lt;br/&gt;&lt;br/&gt;&amp;gt;Am I missing something, or is this first key benefit something that was&lt;br/&gt;&amp;gt;already possible (in theory) with pair-producing channel factories?&lt;br/&gt;&lt;br/&gt;When the first key benefit is defined as:&lt;br/&gt;&lt;br/&gt;	Benefit 1: Ability to resize a channel owned by Alice and Bob&lt;br/&gt;	offchain from x satoshis to y satoshis&lt;br/&gt;&lt;br/&gt;you are correct that this can be achieved with existing techniques&lt;br/&gt;using channel factories.&lt;br/&gt;&lt;br/&gt;However, when the key benefit is defined differently, it becomes clear&lt;br/&gt;that it can be achieved only with hierarchical channels. I&amp;#39;ll give two&lt;br/&gt;other definitions of the benefit that demonstrate what is new. In these&lt;br/&gt;definitions, note that the quantity &amp;#34;delta&amp;#34; could be positive or&lt;br/&gt;negative. Also, assume that all capacity owned by the users considered&lt;br/&gt;must be in a Lightning channel at all times (in order to avoid&lt;br/&gt;stranding liquidity). Finally, for simplicity, ignore routing fees&lt;br/&gt;in the following.&lt;br/&gt;&lt;br/&gt;	Benefit 2: Ability to resize a channel owned by Alice and Bob&lt;br/&gt;	offchain from x satoshis to y = x - delta satoshis, while&lt;br/&gt;	resizing a channel owned by Harriet and Isaac from u satoshis&lt;br/&gt;	to v = u &#43; delta satoshis, where:&lt;br/&gt;		a) Harriet and Isaac do not know Alice and Bob and&lt;br/&gt;		never co-sign transactions with Alice and Bob, and&lt;br/&gt;		b) all other 2-user channels&amp;#39; capacities are&lt;br/&gt;		unchanged.&lt;br/&gt;&lt;br/&gt;Note that Benefit 2 can&amp;#39;t be achieved with channel factories, as they&lt;br/&gt;would violate requirement a) above. In contrast, Benefit 2 can be&lt;br/&gt;achieved with hierarchical channels, as long as all channels are&lt;br/&gt;viewed as logical (rather than physical) channels. An example of&lt;br/&gt;how this can be achieved is with the payment given in Figure 4 of&lt;br/&gt;the paper (p. 8), but stopping the payment one hop earlier as it&lt;br/&gt;is received by H and I (Harriet and Isaac). Benefit 2 matters, as&lt;br/&gt;it&amp;#39;s a lot easier to find a channel that wants to make a capacity&lt;br/&gt;change that offsets the capacity change that Alice and Bob want&lt;br/&gt;to make if the offsetting channel can be anywhere in the world&lt;br/&gt;(but connected via the Lightning Network) as opposed to in a&lt;br/&gt;channel factory containing Alice and Bob (as there will only&lt;br/&gt;be, say, 10 or 100 users in each such factory). Having to offset&lt;br/&gt;a channel capacity change by finding a channel making the opposite&lt;br/&gt;change within a channel factory is like having to make LN payments&lt;br/&gt;without using HTLCs. It would be possible to make payments within&lt;br/&gt;a factory, but in most cases that wouldn&amp;#39;t help, as the payer and&lt;br/&gt;payee would not happen to be in the same factory.&lt;br/&gt;&lt;br/&gt;	Benefit 3: Ability to resize a channel owned by Alice and Bob&lt;br/&gt;	offchain from x satoshis to y = x - delta satoshis, where all&lt;br/&gt;	other 2-user channels&amp;#39; capacities are unchanged.&lt;br/&gt;&lt;br/&gt;Note that Benefit 3 cannot be achieved with channel factories, as any&lt;br/&gt;change in the capacity of a channel in a factory must be offset by&lt;br/&gt;the opposite change in one or more other channels within the factory&lt;br/&gt;(given our requirement that all capacity is always kept within channels&lt;br/&gt;in order to avoid stranding liquidity).&lt;br/&gt;&lt;br/&gt;In contrast, Benefit 3 is possible with hierarchical channels, as&lt;br/&gt;long as they are viewed as logical channels. Examples include the&lt;br/&gt;payment shown in Figure 1 of the paper (p. 4). This somewhat&lt;br/&gt;surprising result is due to the existence of a 3-user hierarchical&lt;br/&gt;channel (namely the one owned by C, D and E in Figure 1) that&lt;br/&gt;transitions from HTLCs that swap capacity between pairs of 2-user&lt;br/&gt;channels to HTLCs that swap balances between users within a 2-user&lt;br/&gt;channel. This benefit is even stronger than the previous one, as&lt;br/&gt;no channel that wants to make an offsetting capacity change has&lt;br/&gt;to be found at all.&lt;br/&gt;&lt;br/&gt;I hope these two explicitly-stated benefits demonstrate that&lt;br/&gt;hierarchical channels *do* provide new capabilities that did not&lt;br/&gt;exist previously, and that these new capabilities are very&lt;br/&gt;important in practice.&lt;br/&gt;&lt;br/&gt;Please let me know if any of this doesn&amp;#39;t make sense.&lt;br/&gt;&lt;br/&gt;Thanks again,&lt;br/&gt;John
    </content>
    <updated>2023-06-09T13:08:26Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqst9ccdzvm2gr2sphnwu7kw7sz7zm9swzyta8dm028pnvk6rkwhzaqzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gz7vtq0z</id>
    
      <title type="html">📅 Original date posted:2023-04-08 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqst9ccdzvm2gr2sphnwu7kw7sz7zm9swzyta8dm028pnvk6rkwhzaqzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gz7vtq0z" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsyczeulfz2nywsv6e2c3d7kkalklvtwnqmc86554ta4xt3n2xat5q4frkdm&#39;&gt;nevent1q…rkdm&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-04-08&lt;br/&gt;📝 Original message:&lt;br/&gt;Comments below:&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; Step 1: Tunable penalties;&lt;br/&gt;&amp;gt;&amp;gt; &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://github.com/JohnLaw2/ln-tunable-penalties&amp;#34;&amp;gt;https://github.com/JohnLaw2/ln-tunable-penalties&amp;lt;/a&amp;gt&#34;&gt;https://github.com/JohnLaw2/ln-tunable-penalties&amp;#34;&amp;gt;https://github.com/JohnLaw2/ln-tunable-penalties&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt;&amp;gt; &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-October/003732.html&amp;#34;&amp;gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-October/003732.html&amp;lt;/a&amp;gt&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-October/003732.html&amp;#34;&amp;gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-October/003732.html&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; This is a clever constructions that lets you do a 2-party lightning&lt;br/&gt;&amp;gt;&amp;gt; channel with existing opcodes where cheating doesn&amp;#39;t result in you&lt;br/&gt;&amp;gt;&amp;gt; losing all your funds (or, in fact, any of your in-channel funds).&lt;br/&gt;&lt;br/&gt;&amp;gt; Ah, a significant difference between this and eltoo is in the game&lt;br/&gt;&amp;gt; theory of what happens if you lose access to the latest state.&lt;br/&gt;&lt;br/&gt;&amp;gt; In eltoo, how things would work in that case, is that you would attempt&lt;br/&gt;&amp;gt; to close the channel to an old state that you do still remember (from a&lt;br/&gt;&amp;gt; backup), at which point either (a) your counterparty publishes a later&lt;br/&gt;&amp;gt; state, and you settle with that (possibly with you paying some modest&lt;br/&gt;&amp;gt; penalty if you&amp;#39;re using a Daric-like protocol), or (b) your counterparty&lt;br/&gt;&amp;gt; does nothing, and you settle at the old state.&lt;br/&gt;&lt;br/&gt;&amp;gt; With tunable penalties, you are in more of a quandry. If you broadcast&lt;br/&gt;&amp;gt; an old &amp;#34;St&amp;#34; transaction to attempt to close to an old state, then your&lt;br/&gt;&amp;gt; counterparty will simply claim those funds and penalise you; however&lt;br/&gt;&amp;gt; there is nothing forcing them to publish any newer state as well. At&lt;br/&gt;&amp;gt; that point your counterparty can hold your share of the channel funds&lt;br/&gt;&amp;gt; hostage indefinitely.&lt;br/&gt;&lt;br/&gt;&amp;gt; Holding your funds hostage is probably an improvement on simply losing&lt;br/&gt;&amp;gt; them altogether, of course, so I think this is still a strict improvement&lt;br/&gt;&amp;gt; on ln-penalty (modulo additional complexity etc).&lt;br/&gt;&lt;br/&gt;Yes, that&amp;#39;s a good point.&lt;br/&gt;&lt;br/&gt;I did describe an extension, called &amp;#34;Unilateral Close after an Old Transaction is Put On-Chain&amp;#34;, in the Tunable Penalties paper and in the Factory Optimized Channels paper.&lt;br/&gt;The idea is to add a Trigger transaction that spends the output of the Funding transaction.&lt;br/&gt;In response to seeing the Trigger transaction, the other party can put their final State transaction and (after a to-self-delay) Commitment transaction on-chain.&lt;br/&gt;However, if the other party doesn&amp;#39;t do so, then after a 3*to-self-delay, the party that forgot the state can initiate the Decker-Wattenhofer protocol to settle the channel.&lt;br/&gt;Of course, the eltoo protocol could be used instead of the Decker-Wattenhofer protocol at this point if APO is available.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John
    </content>
    <updated>2023-06-09T13:08:26Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqs0rcdmm3rz2jaul825z8mw0mhcemcfrf33y22dzwwaz7a4crs0jpqzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzu86sjd</id>
    
      <title type="html">📅 Original date posted:2023-03-17 📝 Original message: TL;DR ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqs0rcdmm3rz2jaul825z8mw0mhcemcfrf33y22dzwwaz7a4crs0jpqzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzu86sjd" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqx022mhw0n73dtkujkr3s5l8dwmpdjle4667enxv5pmq25hmyymq4e0ved&#39;&gt;nevent1q…0ved&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-03-17&lt;br/&gt;📝 Original message:&lt;br/&gt;TL;DR&lt;br/&gt;=====&lt;br/&gt;&lt;br/&gt;* Dynamic management of Lightning channel capacity is required to support efficient Lightning Network (LN) payments&lt;br/&gt;  - On-chain resizing introduces delays, adds costs and limits scalability&lt;br/&gt;  - Fast and cheap resizing may be required to support watchtower-free LN payments for casual users&lt;br/&gt;  - Channel factories allow off-chain channel resizing, but only by exchanging capacity within a single factory&lt;br/&gt;* Hierarchical channels allow flexible, off-chain resizing of channels&lt;br/&gt;  - They don&amp;#39;t require an exchange of capacity within a limited pool of users&lt;br/&gt;  - They also support watchtower-free casual users without stranding any channel capacity&lt;br/&gt;* Hierarchical channels do for channel capacity what the LN does for bitcoin&lt;br/&gt;* No change to the underlying Bitcoin protocol is required&lt;br/&gt;&lt;br/&gt;Overview&lt;br/&gt;========&lt;br/&gt;&lt;br/&gt;The ability to move Lightning channel capacity to where it&amp;#39;s most needed is central to the efficient operation of the LN.&lt;br/&gt;In fact, it&amp;#39;s been stated that the &amp;#34;main (probably only) job of&amp;#34; a dedicated Lightning user &amp;#34;is to efficiently allocate their liquidity&amp;#34; [10].&lt;br/&gt;&lt;br/&gt;The use of on-chain transactions to resize channels limits the LN&amp;#39;s scalability and increases its fees.&lt;br/&gt;In addition, resizing channels on-chain can introduce substantial delays.&lt;br/&gt;In fact, delays of multiple months are possible in the case of a casual user who operates in a watchtower-free manner [3], thus stranding capital and potentially preventing such users from operating in a watchtower-free manner in the current environment [10].&lt;br/&gt;&lt;br/&gt;Existing proposals for resizing channels off-chain consist of creating a channel factory [1] or CoinPool [7] and exchanging capacity between channels within the same factory or pool.&lt;br/&gt;However, only a very small fraction of the LN&amp;#39;s channels can be expected to be in a single factory or pool [8], so the ability to match channels that have insufficient capacity with channels that have excess capacity is highly constrained.&lt;br/&gt;&lt;br/&gt;This post uses hierarchical Lightning channels to solve two problems.&lt;br/&gt;&lt;br/&gt;First, as long as Lightning channels are created within hierarchical channels, it&amp;#39;s possible to resize them flexibly, nearly instantly and off-chain.&lt;br/&gt;Thus, hierarchical channels do for channel capacity what Lightning does for bitcoin.&lt;br/&gt;In fact, this is more than just an analogy, as the channel capacity is actually transferred over the LN.&lt;br/&gt;&lt;br/&gt;Second, hierarchical channels can be created by a casual user and a pair of dedicated users such that the casual user can send and receive bitcoin in a watchtower-free manner, while the dedicated users can use all of their channel capacity to route payments even while the casual user is inactive.&lt;br/&gt;As a result, casual users can operate in a watchtower-free manner without stranding any capital.&lt;br/&gt;&lt;br/&gt;The remainder of this post describes hierarchical channels and how to use them.&lt;br/&gt;A more complete description, including figures, is available in a paper [6].&lt;br/&gt;&lt;br/&gt;Hierarchical Channels&lt;br/&gt;=====================&lt;br/&gt;&lt;br/&gt;A *party* is a group of one or more users.&lt;br/&gt;A *hierarchical channel* is a 2-party channel that has two main outputs, one per party, plus zero or more HTLC outputs.&lt;br/&gt;Each output from a hierarchical channel that pays to a multi-user party funds another (potentially hierarchical) channel.&lt;br/&gt;As a result, each output in a hierarchical channel (including an HTLC output once it has been resolved) can be viewed as the root of an off-chain tree of outputs where the leaves are owned by single users.&lt;br/&gt;&lt;br/&gt;In order to update a hierarchical channel, funds are offered by one party to the other party in an HTLC.&lt;br/&gt;One user within the party offering the HTLC is designated as the *payer* and one user within the party offered the HTLC is designated as the *payee*.&lt;br/&gt;All of the funds for the HTLC are provided by the payer, and if the HTLC succeeds, the bulk of the funds go to the payee (but users within the offered party other than the payee can also get routing fees).&lt;br/&gt;Before the channel state is updated to include a new HTLC output, all of the users in the channel sign new transactions that spend the new channel state&amp;#39;s main outputs, its existing HTLC outputs, and the new HTLC output.&lt;br/&gt;The users then sign transactions that implement the new channel state (including the new HTLC output) and revoke the previous channel state.&lt;br/&gt;Once the HTLC is resolved, the channel state is updated to include the HTLC&amp;#39;s funds in the offered party&amp;#39;s main output (if the HTLC succeeded) or in the offering party&amp;#39;s main output (if the HTLC failed).&lt;br/&gt;&lt;br/&gt;Because the two parties within a hierarchical channel can use an HTLC to exchange bitcoin, they can link their HTLC to HTLCs in other (potentially hierarchical) channels, thus making payments over the LN.&lt;br/&gt;In particular, each party in a (potentially hierarchical) channel appears as a node in the LN channel graph and each (potentially hierarchical) channel appears as a pair of unidirectional edges linking the channel&amp;#39;s two parties.&lt;br/&gt;As in the current LN, a payment consists of a path where the node that&amp;#39;s offered an HTLC in one hop offers an HTLC in the next hop (and the user that is the payee in one hop is the payer in the next hop).&lt;br/&gt;&lt;br/&gt;Resizing Routing Channels Off-Chain&lt;br/&gt;===================================&lt;br/&gt;&lt;br/&gt;Dedicated users who provide routing services to others can use hierarchical channels to resize their Lightning channels off-chain.&lt;br/&gt;For example, consider dedicated users A, B, C and D who create a hierarchical channel with parties AB and CD.&lt;br/&gt;This hierarchical channel&amp;#39;s main outputs fund the (non-hierarchical) channels owned by AB and by CD.&lt;br/&gt;Also, assume that party CD has a separate hierarchical channel with (single-user) party E.&lt;br/&gt;&lt;br/&gt;If AB wants to reduce the capacity of their (non-hierarchical) channel, they can create a payment through the LN from party AB (with user A being the payer) to party (and user) A consisting of the path AB -&amp;gt; CD -&amp;gt; E -&amp;gt; F -&amp;gt; G -&amp;gt; A.&lt;br/&gt;Because this payment is from party AB within the hierarchical channel owned by parties AB and CD, this payment reduces the value of the main output that pays to AB from this hierarchical channel.&lt;br/&gt;Furthermore, because the (non-hierarchical) channel owned by A and B is funded by the main output that pays to AB from that hierarchical channel, this payment reduces the size of the channel owned by A and B.&lt;br/&gt;Finally, because this payment is paid by A (as the payer within the offering party AB at the payment&amp;#39;s first hop) and pays to A (as the payment&amp;#39;s destination), user A neither gains nor loses funds (except for paying routing fees to users C, D, E, F and G).&lt;br/&gt;&lt;br/&gt;Furthermore, as in any LN payment, each routing node that gains funds in one hop loses an identical (minus fees) amount of funds in the next hop, so their overall balance is unchanged (except for a slight increase due to fees).&lt;br/&gt;There&amp;#39;s nothing new about this for routing nodes E, F and G, as they act as they do in the current LN.&lt;br/&gt;However, it&amp;#39;s worth looking in more detail at routing node CD, as the existence of multi-user nodes in the LN is new with hierarchical channels.&lt;br/&gt;&lt;br/&gt;Like any routing node, CD gains funds in the hierarchical channel with AB and loses an identical (minus fees) amount of funds in the hierarchical channel with E.&lt;br/&gt;Note that C and D also appear as nodes within the LN channel graph, the channel between C and D that&amp;#39;s funded by the hierarchical channel with AB appears as a pair of unidirectional edges between C and D, and the channel between C and D that&amp;#39;s funded by the hierarchical channel with E appears as a pair of unidirectional edges between C and D.&lt;br/&gt;Thus, the sum of the capacities of the two channels between C and D is unchanged, except for a slight increase due to fees.&lt;br/&gt;&lt;br/&gt;The effects of this payment from AB to A on a portion of the LN channel graph are shown below.&lt;br/&gt;Each party appears as a box and each channel appears as a pair of directed edges between a pair of parties.&lt;br/&gt;The channel&amp;#39;s capacity is shown between the pair of directed edges, and each party&amp;#39;s balance appears either above or below the pair of edges.&lt;br/&gt;&lt;br/&gt;                                                                  200&lt;br/&gt;     PHYSICAL CHANNELS                                       &#43;--&#43; -&amp;gt;  &#43;--&#43;&lt;br/&gt;  BEFORE AB -&amp;gt; A PAYMENT                                     |C | 500 |D |&lt;br/&gt;  OF 100 UNITS PLUS FEES                                     |  |  &amp;lt;- |  |&lt;br/&gt;                                                             |  | 300 |  |&lt;br/&gt;                                                             |  |     |  |&lt;br/&gt;     800      800      400      200      500      500        |  | 700 |  |&lt;br/&gt;&#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43;   |  | -&amp;gt;  |  |&lt;br/&gt;|AB|1300 |CD|1000 |E |1000 |F | 400 |G | 700 |A | 800 |B |   |  | 800 |  |&lt;br/&gt;&#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;   &#43;--&#43;  &amp;lt;- &#43;--&#43;&lt;br/&gt;     500      200      600      200      200      300             100&lt;br/&gt;&lt;br/&gt;                                                                  308&lt;br/&gt;     PHYSICAL CHANNELS                                       &#43;--&#43; -&amp;gt;  &#43;--&#43;&lt;br/&gt;   AFTER AB -&amp;gt; A PAYMENT                                     |C | 609 |D |&lt;br/&gt;  OF 100 UNITS PLUS FEES                                     |  |  &amp;lt;- |  |&lt;br/&gt;                                                             |  | 301 |  |&lt;br/&gt;                                                             |  |     |  |&lt;br/&gt;     691      694      296       98      400      391        |  | 594 |  |&lt;br/&gt;&#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43;   |  | -&amp;gt;  |  |&lt;br/&gt;|AB|1300 |CD|1000 |E |1000 |F | 400 |G | 700 |A | 691 |B |   |  | 694 |  |&lt;br/&gt;&#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;   &#43;--&#43;  &amp;lt;- &#43;--&#43;&lt;br/&gt;     609      306      704      302      300      300             100&lt;br/&gt;&lt;br/&gt;Logical vs. Physical Channels&lt;br/&gt;=============================&lt;br/&gt;&lt;br/&gt;Because there are two separate channels between C and D (one funded by the hierarchical channel with AB and the other funded by the hierarchical channel with E), it&amp;#39;s natural to express these channels as two separate pairs of edges between C and D (as is shown above).&lt;br/&gt;However, a better viewpoint is obtained by logically merging the two physical channels between C and D into a single logical channel containing the sum of the capacities of the two physical channels.&lt;br/&gt;In fact, a large payment can be routed between C and D by using parallel HTLCs in the two physical channels connecting them.&lt;br/&gt;In addition, when logical (rather than physical) channels are advertised to LN peers, the resulting channel capacities are much more stable, as they don&amp;#39;t change (other than increasing due to fees) when the parties owning the channel are used to route a payment.&lt;br/&gt;&lt;br/&gt;For example, in the payment shown above the capacity of the channel between A and B is decreased by the amount of the payment from AB to A (plus fees), and the capacity of all other logical channels (including the one between C and D) is unchanged (other than increases due to fees).&lt;br/&gt;&lt;br/&gt;     LOGICAL CHANNELS&lt;br/&gt;  BEFORE AB -&amp;gt; A PAYMENT&lt;br/&gt;  OF 100 UNITS PLUS FEES&lt;br/&gt;&lt;br/&gt;     800      800      400      200      500      500             900&lt;br/&gt;&#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43;   &#43;--&#43; -&amp;gt;  &#43;--&#43;&lt;br/&gt;|AB|1300 |CD|1000 |E |1000 |F | 400 |G | 700 |A | 800 |B |   |C |1300 |D |&lt;br/&gt;&#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;   &#43;--&#43;  &amp;lt;- &#43;--&#43;&lt;br/&gt;     500      200      600      200      200      300             400&lt;br/&gt;&lt;br/&gt;     LOGICAL CHANNELS&lt;br/&gt;   AFTER AB -&amp;gt; A PAYMENT&lt;br/&gt;  OF 100 UNITS PLUS FEES&lt;br/&gt;&lt;br/&gt;     691      694      296       98      400      391             902&lt;br/&gt;&#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43; -&amp;gt;  &#43;--&#43;   &#43;--&#43; -&amp;gt;  &#43;--&#43;&lt;br/&gt;|AB|1300 |CD|1000 |E |1000 |F | 400 |G | 700 |A | 691 |B |   |C |1303 |D |&lt;br/&gt;&#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;  &amp;lt;- &#43;--&#43;   &#43;--&#43;  &amp;lt;- &#43;--&#43;&lt;br/&gt;     609      306      704      302      300      300             401&lt;br/&gt;&lt;br/&gt;Of course, the example given above could be reversed (by making a payment from A to AB) in order to increase the capacity of the channel between A and B off-chain.&lt;br/&gt;&lt;br/&gt;Supporting Casual Users Without Stranding Capacity&lt;br/&gt;==================================================&lt;br/&gt;&lt;br/&gt;Hierarchical channels can also be used to support watchtower-free casual users without stranding any channel capacity.&lt;br/&gt;Consider a watchtower-free casual user A who creates a hierarchical channel with dedicated users B and C, where A is one party and BC is the other party in the channel.&lt;br/&gt;Assume A wants to make a payment to G, and that party BC has a separate hierarchical channel with user D, D has a channel with E, E has a channel with F, and F has a channel with G.&lt;br/&gt;In this case, A can create a payment through the LN consisting of the path A -&amp;gt; BC -&amp;gt; D -&amp;gt; E -&amp;gt; F -&amp;gt; G.&lt;br/&gt;&lt;br/&gt;Of course, this example could be reversed in order to make a payment from G to casual user A.&lt;br/&gt;&lt;br/&gt;The key observation is that whenever A is neither sending nor receiving a payment, dedicated users B and C can utilize all of the capacity in the channel between them to route LN payments.&lt;br/&gt;Also, note that as long as B and C advertise their two physical channels (namely the one funded by the hierarchical channel shared with A and the one funded by the hierarchical channel shared with D) as a single logical channel, the capacity of the logical channel is unchanged (other than in increase due to fees) when B and C route payments to and from A.&lt;br/&gt;&lt;br/&gt;Protocols For Hierarchical Channels&lt;br/&gt;===================================&lt;br/&gt;&lt;br/&gt;Several issues have to be addressed in order to create a protocol for hierarchical channels.&lt;br/&gt;&lt;br/&gt;First, each main output (or resolved HTLC output) from a hierarchical channel must be able to pay to a tree of transactions that distribute the output&amp;#39;s funds to individual users at the leaves.&lt;br/&gt;This can be achieved by requiring the users in the hierarchical channel to exchange signatures for the tree of transactions that spend each output of a given Commitment transaction prior to signing that Commitment transaction.&lt;br/&gt;&lt;br/&gt;Second, a Lightning channel is currently announced with a channel_announcement message that references the on-chain UTXO funding the channel and the channel&amp;#39;s capacity is static.&lt;br/&gt;These channel_announcement messages won&amp;#39;t work for hierarchical channels that are funded by off-chain UTXOs and have dynamic capacities.&lt;br/&gt;Russell&amp;#39;s proposal [9] for channel_update_v2 messages is well-suited to hierarchical channels as it merges the concepts of channel announcements and channel updates and it includes the channel&amp;#39;s capacity, thus supporting dynamic capacities.&lt;br/&gt;In addition, it supports channels that are funded off-chain by allowing on-chain UTXOs to be cited when announcing channels with capacities that are at most a fixed multiple of the on-chain UTXOs&amp;#39; value.&lt;br/&gt;&lt;br/&gt;Third, hierarchical channels need to support more than two users per channel.&lt;br/&gt;The current Lightning channel protocol only works for 2-user channels, as it penalizes a user that puts an old Commitment transaction on-chain by allowing the other user to obtain all of the channel&amp;#39;s funds.&lt;br/&gt;Such an approach doesn&amp;#39;t work if there are more than two users in the channel, where at least two are dishonest.&lt;br/&gt;In such a case, a dishonest user could put an old Commitment transaction on-chain and another dishonest user could &amp;#34;punish&amp;#34; that user by claiming all of the channel funds, including those from the honest users.&lt;br/&gt;Even if the dishonest users can&amp;#39;t guarantee that they&amp;#39;ll take the channel&amp;#39;s funds, the expected value obtained by dishonest behavior could exceed the expected value from honest behavior.&lt;br/&gt;&lt;br/&gt;In contrast, channel factory protocols are designed to allow more than two users to update factory states off-chain, where each factory state consists of a division of the factory&amp;#39;s funds among the factory&amp;#39;s users.&lt;br/&gt;Therefore, if we define the hierarchical channel&amp;#39;s state as consisting of its two main outputs, plus any HTLC outputs, a channel factory protocol can be used to update the channel&amp;#39;s state off-chain.&lt;br/&gt;In particular, the Invalidation Tree protocol [2], the Tunable-Penalty Factory protocol [5] or the Single-Commitment Factory protocol [5] can be used.&lt;br/&gt;Of these, the Tunable-Penalty Factory protocol appears most attractive, as it requires only O(1) time and O(1) on-chain bytes for a unilateral close.&lt;br/&gt;&lt;br/&gt;Finally, in addition to maintaining the channel&amp;#39;s current set of outputs, each HTLC output must be resolved according to the terms of its associated HTLC.&lt;br/&gt;A simple approach, based on the current Lightning protocol, is to allow the HTLC output to be spent by either:&lt;br/&gt;* an HTLC-success transaction put on-chain by the payee and providing the HTLC&amp;#39;s required preimage, or&lt;br/&gt;* an HTLC-timeout transaction put on-chain by any user within the offering party after the HTLC&amp;#39;s expiry.&lt;br/&gt;&lt;br/&gt;This approach works, but it has two serious performance problems:&lt;br/&gt;1) resolving an HTLC on-chain requires closing the hierarchical channel, and&lt;br/&gt;2) the latency required for putting the HTLC output on-chain can significantly delay the HTLC&amp;#39;s expiry.&lt;br/&gt;&lt;br/&gt;Fortunately, both of these performance challenges are solved by using separate control transactions to resolve the HTCLs, as is done in the FFO and FFO-WF channel protocols [4].&lt;br/&gt;Specifically, the FFO protocol can be extended to resolve HTLCs in hierarchical channels owned by more than two dedicated users, and the FFO-WF protocol can be extended to resolve HTLCs in hierarchical channels with more than two users, exactly one of whom is a casual user.&lt;br/&gt;The details are given in the paper [6].&lt;br/&gt;&lt;br/&gt;Conclusions&lt;br/&gt;===========&lt;br/&gt;&lt;br/&gt;Sending bitcoin between users can be performed on-chain.&lt;br/&gt;However, allocating bitcoin to a Lightning channel allows it to be sent off-chain nearly instantly, with much lower fees, and in a far more scalable manner.&lt;br/&gt;&lt;br/&gt;Similarly, Lightning channel capacity can be moved to where it&amp;#39;s needed on-chain.&lt;br/&gt;However, allocating Lighting channel capacity within a hierarchical channel allows the channel to be resized off-chain nearly instantly, with much lower fees, and in a far more scalable manner.&lt;br/&gt;&lt;br/&gt;In addition, hierarchical channels can be used to support watchtower-free casual users without stranding any Lightning channel capacity.&lt;br/&gt;As a result, providing watchtower-freedom to casual users appears to be cost-effective.&lt;br/&gt;&lt;br/&gt;Given that these results can be achieved without making changes to the underlying Bitcoin protocol, it&amp;#39;s hoped that hierarchical channels will eventually be adopted in BOLTs and implemented in order to improve the scalability, efficiency, and usability of the Lightning network.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John&lt;br/&gt;&lt;br/&gt;[1] Burchert, Decker and Wattenhofer, &lt;a href=&#34;http://dx.doi.org/10.1098/rsos.180089&#34;&gt;http://dx.doi.org/10.1098/rsos.180089&lt;/a&gt;&lt;br/&gt;[2] Decker and Wattenhofer, &lt;a href=&#34;https://tik-old.ee.ethz.ch/file/716b955c130e6c703fac336ea17b1670/duplex-micropayment-channels.pdf&#34;&gt;https://tik-old.ee.ethz.ch/file/716b955c130e6c703fac336ea17b1670/duplex-micropayment-channels.pdf&lt;/a&gt;&lt;br/&gt;[3] Law, &lt;a href=&#34;https://github.com/JohnLaw2/ln-watchtower-free&#34;&gt;https://github.com/JohnLaw2/ln-watchtower-free&lt;/a&gt;&lt;br/&gt;[4] Law, &lt;a href=&#34;https://github.com/JohnLaw2/ln-factory-optimized&#34;&gt;https://github.com/JohnLaw2/ln-factory-optimized&lt;/a&gt;&lt;br/&gt;[5] Law, &lt;a href=&#34;https://github.com/JohnLaw2/ln-efficient-factories&#34;&gt;https://github.com/JohnLaw2/ln-efficient-factories&lt;/a&gt;&lt;br/&gt;[6] Law, &lt;a href=&#34;https://github.com/JohnLaw2/ln-hierarchical-channels&#34;&gt;https://github.com/JohnLaw2/ln-hierarchical-channels&lt;/a&gt;&lt;br/&gt;[7] Naumenko and Riard, &lt;a href=&#34;https://coinpool.dev/&#34;&gt;https://coinpool.dev/&lt;/a&gt;&lt;br/&gt;[8] Riard, &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-April/020370.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-April/020370.html&lt;/a&gt;&lt;br/&gt;[9] Russell, &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-February/003470.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-February/003470.html&lt;/a&gt;&lt;br/&gt;[10] Teinturier, &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-October/003712.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-October/003712.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Sent with [Proton Mail](&lt;a href=&#34;https://proton.me/&#34;&gt;https://proton.me/&lt;/a&gt;) secure email.&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/20230318/2dfda9d8/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20230318/2dfda9d8/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T13:08:20Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqs089mua9xuhxhu0hzvy8nacuqv98nga7wgqap74y00v554lhxqsaszyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzu86m7t</id>
    
      <title type="html">📅 Original date posted:2023-01-15 📝 Original message: TL;DR ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqs089mua9xuhxhu0hzvy8nacuqv98nga7wgqap74y00v554lhxqsaszyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzu86m7t" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs88x52xh7jwynjd2a96sj6ekduu9jmhmaatayfkrxtp9gcuz27wucpu488h&#39;&gt;nevent1q…488h&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-01-15&lt;br/&gt;📝 Original message:&lt;br/&gt;TL;DR&lt;br/&gt;=====&lt;br/&gt;&lt;br/&gt;* Factories that create and update a large number of Lightning channels efficiently are essential for scaling the Lightning Network.&lt;br/&gt;* This post presents the first known protocol for Lightning factories that can be closed unilaterally in O(1) time using O(1) on-chain transactions.&lt;br/&gt;  - If P parties use the protocol, they create P conflicting Commitment transactions, any of which can be used to establish the factory&amp;#39;s state.&lt;br/&gt;  - As a result, each party must maintain P copies of the state of each channel created by the factory.&lt;br/&gt;  - Another factory protocol is presented that eliminates the need to maintain P copies of each channel state (at the expense of requiring more on-chain bytes).&lt;br/&gt;* Both factory protocols are modifications of the Tunable-Penalty Channel protocol and share many of its properties, including:&lt;br/&gt;  - tunable penalties for putting old transactions on-chain, and&lt;br/&gt;  - watchtowers with storage that&amp;#39;s logarithmic in the number of factory states supported (but linear in the number of parties in the factory).&lt;br/&gt;&lt;br/&gt;Overview&lt;br/&gt;========&lt;br/&gt;&lt;br/&gt;Factories that allow multiple two-party Lightning channels to be created, re-sized and closed with a small number of on-chain transactions are essential to the scalability of Bitcoin [2].&lt;br/&gt;Let P denote the number of parties, C denote tha number of channels created, and S denote the number of factory states supported.&lt;br/&gt;The most efficient previously-known factory, created by Burchert, Decker and Wattenhofer [2], can be closed unilaterally in O(log S) time using O(log S) on-chain transactions and O(C &#43; log S) on-chain bytes.&lt;br/&gt;A single fixed transaction is used to instantiate the factory&amp;#39;s channels when it&amp;#39;s closed unilaterally, so the parties using the factory can maintain just a one version of each off-chain channel state.&lt;br/&gt;Performing a unilateral close with O(log S) on-chain transactions requires that the party closing the factory interact with the blockchain at O(log S) different blockheights (so a unilateral close is an O(log S)-shot procedure [4]), which could be awkward for some users [8].&lt;br/&gt;&lt;br/&gt;This paper presents two protocols for factories that can be closed unilaterally in O(1) time using O(1) on-chain transactions.&lt;br/&gt;The first protocol, called the Tunable-Penalty Factory (TPF) protocol, requires only O(C) on-chain bytes for a unilateral close, but it can use P different transactions to instantiate the factory&amp;#39;s channels, thus forcing the parties using the factory to maintain P different versions of each off-chain channel state.&lt;br/&gt;The second protocol, called the Single-Commitment (SC) protocol, requires O(C &#43; log S) on-chain bytes for a unilateral close, but it uses only a single transaction to instantiate the factory&amp;#39;s channels, so multiple versions of off-chain channel states aren&amp;#39;t required.&lt;br/&gt;The TPF protocol is particularly simple and allows a 2-shot unilateral close (that is, the party closing the channel only has to perform actions at 2 different blockheights).&lt;br/&gt;&lt;br/&gt;Both protocols are based on the Tunable-Penalty Channel (TPC) protocol [5] and they share many of its properties, including:&lt;br/&gt;* tunable penalties for putting old transactions on-chain, and&lt;br/&gt;* watchtowers with storage that&amp;#39;s logarithmic in the number of factory states supported (but linear in the number of parties in the factory).&lt;br/&gt;&lt;br/&gt;No change to the underlying Bitcoin protocol is required.&lt;br/&gt;&lt;br/&gt;A more complete description, including a proof of correctness and better figures, is available in a paper [6].&lt;br/&gt;&lt;br/&gt;The Tunable-Penalty Factory (TPF) Protocol&lt;br/&gt;==========================================&lt;br/&gt;&lt;br/&gt;The TPF protocol is a slight modification of the TPC protocol [5].&lt;br/&gt;&lt;br/&gt;Each party using the TPC protocol has their own on-chain Individual transaction, the output of which they spend with their State transaction.&lt;br/&gt;This State transaction is a control transaction and its first output&amp;#39;s value is equal to the desired penalty for putting an old State transaction on-chain.&lt;br/&gt;This first output can be spent by the same party&amp;#39;s Commitment transaction for the same state, but only after a relative delay equal to the maximum of the parties&amp;#39; to_self_delay parameters.&lt;br/&gt;The relative delay gives the other party time to revoke an old State transaction by spending its first output and thus claiming the penalty.&lt;br/&gt;The State transaction also has an HTLC control output for each HTLC that is active in that state.&lt;br/&gt;The TPC protocol revokes old State transactions with per-commitment keys that can be known to all parties, rather than with revocation keys that cannot be known by the party putting the revocable transaction on-chain [5].&lt;br/&gt;&lt;br/&gt;The TPC protocol is modified to create the TPF protocol by:&lt;br/&gt;* eliminating the HTLC control outputs from the State transactions,&lt;br/&gt;* modifying the Commitment transactions to have channel outputs, each of which is owned by two parties in the factory, and&lt;br/&gt;* supporting P &amp;gt; 2 parties by allowing each party to have their own Individual, State and Commitment transactions.&lt;br/&gt;&lt;br/&gt;The TPF protocol is shown below:&lt;br/&gt;&lt;br/&gt;&#43;-&#43; A..Z                           &#43;----&#43; AD&lt;br/&gt;|F|------&#43;-------------------------| CC |-----&lt;br/&gt;&#43;-&#43;      |                         |    |&lt;br/&gt;         |                         |    | BC&lt;br/&gt;         |                         |    |-----&lt;br/&gt;         |                         |    |&lt;br/&gt;         .                         |    | MZ&lt;br/&gt;         .                         |    |-----&lt;br/&gt;         .                         &#43;----&#43;&lt;br/&gt;         |&lt;br/&gt;         |                         &#43;----&#43; AD&lt;br/&gt;         &#43;-------------------------|C_Ai|-----&lt;br/&gt;         |                         |    |&lt;br/&gt;         |                         |    | BC&lt;br/&gt;         |                         |    |-----&lt;br/&gt;         |                         |    |&lt;br/&gt;         |               tsdAZ &amp;amp; A |    | MZ&lt;br/&gt;         |             &#43;-----------|    |-----&lt;br/&gt;         |             |           &#43;----&#43;&lt;br/&gt;         |             |&lt;br/&gt;         |             |           &#43;----&#43; AD&lt;br/&gt;         &#43;-------------------------|C_Bi|-----&lt;br/&gt;         |             |           |    |&lt;br/&gt;         |             |           |    | BC&lt;br/&gt;         |             |           |    |-----&lt;br/&gt;         |             |           |    |&lt;br/&gt;         .             | tsdAZ &amp;amp; B |    | MZ&lt;br/&gt;         .           &#43;-------------|    |-----&lt;br/&gt;         .           | |           &#43;----&#43;&lt;br/&gt;         |           | |&lt;br/&gt;         |           | |           &#43;----&#43; AD&lt;br/&gt;         &#43;-------------------------|C_Zi|-----&lt;br/&gt;         |           | |           |    |&lt;br/&gt;         .           | |           |    | BC&lt;br/&gt;         .           | |           |    |-----&lt;br/&gt;         .           | |           |    |&lt;br/&gt;         |           | | tsdAZ &amp;amp; Z |    | MZ&lt;br/&gt;         V         &#43;---------------|    |-----&lt;br/&gt;                   | | |           &#43;----&#43;&lt;br/&gt;                   | | |&lt;br/&gt;&#43;----&#43; A  &#43;-----&#43;  | | | pckeyAi&lt;br/&gt;|In_A|----|St_Ai|------&#43;-----------&lt;br/&gt;&#43;----&#43;    |     |  | |&lt;br/&gt;          &#43;-----&#43;  | |&lt;br/&gt;                   | |&lt;br/&gt;&#43;----&#43; B  &#43;-----&#43;  | |   pckeyBi&lt;br/&gt;|In_B|----|St_Bi|----&#43;-------------&lt;br/&gt;&#43;----&#43;    |     |  |&lt;br/&gt;          &#43;-----&#43;  |&lt;br/&gt;  .          .     .&lt;br/&gt;  .          .     .&lt;br/&gt;  .          .     .&lt;br/&gt;                   |&lt;br/&gt;&#43;----&#43; Z  &#43;-----&#43;  |     pckeyZi&lt;br/&gt;|In_Z|----|St_Zi|--&#43;---------------&lt;br/&gt;&#43;----&#43;    |     |&lt;br/&gt;          &#43;-----&#43;&lt;br/&gt;&lt;br/&gt;where:&lt;br/&gt;F is the Funding transaction,&lt;br/&gt;CC is the Cooperative Close transaction,&lt;br/&gt;In_{A..Z} is {A..Z&amp;#39;s} Individual transaction,&lt;br/&gt;St_{A..Z}i is {A..Z&amp;#39;s} State transaction for state i, and&lt;br/&gt;C_{A..Z}i is {A..Z&amp;#39;s} Commitment transaction for state i.&lt;br/&gt;&lt;br/&gt;Requirements for output cases are as follows:&lt;br/&gt;{A..Z}: {A..Z}&amp;#39;s signature (a single party&amp;#39;s signature),&lt;br/&gt;A..Z: A..Z&amp;#39;s signature (every parties&amp;#39; signature),&lt;br/&gt;pairs of capital letters indicate signatures from those two parties,&lt;br/&gt;pckey{A..Z}i: a signature using a per-commitment key for revoking {A..Z}&amp;#39;s state i transaction, and&lt;br/&gt;tsdAZ: a relative delay equal to the maximum of {A..Z}&amp;#39;s to_self_delay parameters.&lt;br/&gt;&lt;br/&gt;In order to establish a new factory state, all parties:&lt;br/&gt;* calculate the State and Commitment transactions for the new state (this step includes exchanging per-commitment pubkeys for the new state with each of the other parties),&lt;br/&gt;* exchange partial signatures for the new state&amp;#39;s Commitment transactions, and&lt;br/&gt;* exchange per-commitment keys for the old state, thus revoking it.&lt;br/&gt;&lt;br/&gt;All parties constantly look for old (revoked) State transactions put on-chain by other parties, and if they find such a transaction they use the corresponding per-commitment key to spend its first output, thus obtaining the penalty funds and revoking the old state.&lt;br/&gt;Once a State transaction has been on-chain for tsdAZ without its first output being spent, the party that put the State transaction on-chain can attempt to put their corresponding Commitment transaction on-chain at any time.&lt;br/&gt;Any party can close the factory unilaterally by putting their current State transaction on-chain, waiting until it has been on-chain for tsdAZ, and then submitting their corresponding Commitment transaction to the blockchain.&lt;br/&gt;&lt;br/&gt;As was the case with the TPC protocol, per-commitment keys can use the Lightning protocol&amp;#39;s compact storage technique for revocation keys to consume only O(log S) storage to revoke a maximum of S old transactions that could be put on-chain by a single other party [7][5].&lt;br/&gt;Therefore, each party requires O(P*log S) storage to hold the per-commitment keys for all of the P parties.&lt;br/&gt;&lt;br/&gt;The Single-Commitment (SC) Factory Protocol&lt;br/&gt;===========================================&lt;br/&gt;&lt;br/&gt;Note that the TPF factory protocol uses P conflicting Commitment transactions to establish the factory state and to instantiate the factory&amp;#39;s channels.&lt;br/&gt;Therefore, a separate channel state must be maintained and updated for each of the P versions of the channel that could be instantiated, thus increasing the computation, storage, and communication for channels by a factor of P.&lt;br/&gt;The result could be quite expensive if there are a large number of parties in the factory.&lt;br/&gt;&lt;br/&gt;The SC protocol eliminates this factor of P blow-up by having all of the parties use a single shared Commitment transaction.&lt;br/&gt;Like the TPF protocol, the SC protocol uses revocable State transactions, each of which spends a single party&amp;#39;s Individual transaction output, to ensure that only the current Commitment transaction can be put on-chain.&lt;br/&gt;The challenge is how to use a single shared Commitment transaction that depends on the value of an unrevoked State transaction without actually spending any of the outputs of that State transaction (as spending a State transaction output would make the Commitment transaction&amp;#39;s input dependent on which party&amp;#39;s State transaction it spends, thus preventing the use of a single shared Commitment transaction).&lt;br/&gt;This challenge is solved by introducing a shared Trigger transaction and a per-user Mold transaction, where the Commitment and Mold transactions compete for the Trigger transaction&amp;#39;s outputs.&lt;br/&gt;The Mold transaction is put on-chain prior to the Commitment transaction, and it constrains the Commitment transactions that can be put on-chain somewhat like how a mold shapes a liquid that is poured into it.&lt;br/&gt;&lt;br/&gt;Specifically, the Trigger transaction has one value output and log_2(S) control outputs, numbered 0 .. log_2(S) - 1. Commitment transaction i, 0 &amp;lt;= i &amp;lt;= S - 1, spends those Trigger control outputs b, 0 &amp;lt;= b &amp;lt;= log_2(S) - 1, such that bit position b of the binary representation of i is a 0.&lt;br/&gt;Each Mold transaction i, 0 &amp;lt;= i &amp;lt;= S - 1, spends the output of the same party&amp;#39;s State i transaction, and Trigger control outputs b, 0 &amp;lt;= b &amp;lt;= log_2(S) - 1, such that bit position b of the binary representation of i is a 1.&lt;br/&gt;This construction guarantees that if a Mold transaction for state i is on-chain, only Commitment transactions for states j &amp;gt;= i can be put on-chain.&lt;br/&gt;&lt;br/&gt;States 0 through S - 1 are supported, with the exception of states of the form 2^b where 1 &amp;lt;= b &amp;lt;= log_2(S) - 1.&lt;br/&gt;These exceptions are made to guarantee that it is impossible to put Mold transactions on-chain for two consecutive states (other than states 0 and 1) where they would prevent any current Commitment transaction from being put on-chain.&lt;br/&gt;When state i is supported but state i&#43;1 is not, the next state after i is i&#43;2.&lt;br/&gt;&lt;br/&gt;The protocol operation is similar to that of the TPF protocol, except parties closing the channel unilaterally submit the Trigger transaction and their current State transaction to the blockchain, and once their State transaction has been on-chain for tsdAZ, submit their Mold transaction for the same state to the blockchain.&lt;br/&gt;Once the Trigger transaction has been on-chain for 3tsdAZ, they submit to the blockchain the Commitment transaction for the same state as the on-chain Mold transaction.&lt;br/&gt;&lt;br/&gt;Also, all parties monitor the blockchain for the Trigger transaction, and if they find it they use the above protocol for closing the factory as soon as possible.&lt;br/&gt;&lt;br/&gt;Because only Mold transactions for unrevoked State transactions can be put on-chain, and because only the latest State transactions can be unrevoked, only the latest (and thus current) Commitment transactions can be put on-chain.&lt;br/&gt;&lt;br/&gt;A figure for the SC protocol, and a detailed proof of correctness, are in the paper [6].&lt;br/&gt;&lt;br/&gt;Related Work&lt;br/&gt;============&lt;br/&gt;&lt;br/&gt;The concept of creating a channel factory for Lightning, as well as the most efficient published protocol for such a factory, was presented by Burchert, Decker and Wattenhofer [2].&lt;br/&gt;The protocols presented here differ in only requiring O(1) time and O(1) on-chain transactions for a unilateral factory close.&lt;br/&gt;&lt;br/&gt;A number of researchers have proposed changes to Bitcoin in order to support simpler and more efficient factories.&lt;br/&gt;The eltoo factory protocol [3] has a particularly simple structure and it allows the parties to maintain only one version of each off-chain channel state.&lt;br/&gt;It requires O(1) time, O(1) on-chain transactions and O(1) on-chain bytes for a unilateral close.&lt;br/&gt;However, a malicious party could delay the closing of the factory until O(S) transactions are put on-chain, if the malicious party is willing to pay the required fees.&lt;br/&gt;The eltoo protocol differs from the protocols presented here by requiring a change to Bitcoin, namely the support for BIP 118 [1].&lt;br/&gt;&lt;br/&gt;The TPF and SC protocols are based on the TPC protocol presented by Law [5].&lt;br/&gt;&lt;br/&gt;Conclusions&lt;br/&gt;===========&lt;br/&gt;&lt;br/&gt;This post presents new factory protocols that require O(1) time and O(1) on-chain transactions for a unilateral close.&lt;br/&gt;They are the first factory protocols known that achieve those bounds with the existing Bitcoin protocol.&lt;br/&gt;&lt;br/&gt;The ability to unilaterally close a factory with just two or three submissions to the blockchain, with a fixed delay between them, is quite a bit simpler than closing previously-published factories [2].&lt;br/&gt;As a result, it&amp;#39;s hoped that TPF and SC factories will lead to the increased use of factories in practice, thus improving the scalability of Bitcoin and Lightning.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John&lt;br/&gt;&lt;br/&gt;References&lt;br/&gt;==========&lt;br/&gt;[1] &amp;#34;BIP 118: SIGHASH_ANYPREVOUT&amp;#34;, available at &lt;a href=&#34;https://anyprevout.xyz/&#34;&gt;https://anyprevout.xyz/&lt;/a&gt; and &lt;a href=&#34;https://github.com/bitcoin/bips/pull/943&#34;&gt;https://github.com/bitcoin/bips/pull/943&lt;/a&gt;.&lt;br/&gt;[2] Burchert, Decker and Wattenhofer, &amp;#34;Scalable Funding of Bitcoin Micropayment Channel Networks&amp;#34;, available at &lt;a href=&#34;http://dx.doi.org/10.1098/rsos.180089&#34;&gt;http://dx.doi.org/10.1098/rsos.180089&lt;/a&gt;.&lt;br/&gt;[3] Decker, Russell and Osuntokun. eltoo: A Simple Layer2 Protocol for Bitcoin. Available at &lt;a href=&#34;https://blockstream.com/eltoo.pdf&#34;&gt;https://blockstream.com/eltoo.pdf&lt;/a&gt;.&lt;br/&gt;[4] Law, &amp;#34;Watchtower-Free Lightning Channels For Casual Users&amp;#34;, available at &lt;a href=&#34;https://github.com/JohnLaw2/ln-watchtower-free&#34;&gt;https://github.com/JohnLaw2/ln-watchtower-free&lt;/a&gt;.&lt;br/&gt;[5] Law, &amp;#34;Lightning Channels With Tunable Penalties&amp;#34;, available at &lt;a href=&#34;https://github.com/JohnLaw2/ln-tunable-penalties&#34;&gt;https://github.com/JohnLaw2/ln-tunable-penalties&lt;/a&gt;.&lt;br/&gt;[6] Law, &amp;#34;Efficient Factories For Lightning Channels&amp;#34;, available at &lt;a href=&#34;https://github.com/JohnLaw2/ln-efficient-factories&#34;&gt;https://github.com/JohnLaw2/ln-efficient-factories&lt;/a&gt;.&lt;br/&gt;[7] Russell, &amp;#34;Efficient Per-Commitment Secret Storage&amp;#34;, available at &lt;a href=&#34;https://github.com/lightning/bolts/blob/master/03-transactions.md#efficient-per-commitment-secret-storage&#34;&gt;https://github.com/lightning/bolts/blob/master/03-transactions.md#efficient-per-commitment-secret-storage&lt;/a&gt;.&lt;br/&gt;[8] ZmnSCPxj, &amp;#34;Channel Eviction From Channel Factories By New Covenant Operations&amp;#34;, available at &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-February/003479.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-February/003479.html&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;Sent with [Proton Mail](&lt;a href=&#34;https://proton.me/&#34;&gt;https://proton.me/&lt;/a&gt;) secure email.&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/20230115/1c24b7f0/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20230115/1c24b7f0/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T13:07:55Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqs2gs0nrf32s3cl306mlfwlwnk3pd02dspzvqkz8p47xah9lvw470gzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzjks3vg</id>
    
      <title type="html">📅 Original date posted:2022-12-02 📝 Original message: TL;DR ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqs2gs0nrf32s3cl306mlfwlwnk3pd02dspzvqkz8p47xah9lvw470gzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzjks3vg" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszzw9tkwc75ymat7pq9rjysjr7w4cwlaavflcnjkpgw85n2n9tl9sppw69e&#39;&gt;nevent1q…w69e&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-12-02&lt;br/&gt;📝 Original message:&lt;br/&gt;TL;DR&lt;br/&gt;=====&lt;br/&gt;* This post presents a channel protocol that&amp;#39;s optimized for use within channel factories.&lt;br/&gt;* The protocol allows HTLCs to be resolved on-chain:&lt;br/&gt;* without making the expiry of the HTLC depend on the time to close the factory, and&lt;br/&gt;* without closing the factory.&lt;br/&gt;* The key ides is the use of separate value and control transactions like those used in the Tunable Penalties protocol.&lt;br/&gt;* A version of the protocol that provides watchtower-freedom and one-shot receives for casual users is also given.&lt;br/&gt;&lt;br/&gt;Overview&lt;br/&gt;========&lt;br/&gt;&lt;br/&gt;While the Lightning Network greatly improves Bitcoin&amp;#39;s scalability, factories that allow multiple two-party channels to be created and closed with a small number of on-chain transactions are essential if Bitcoin is to be widely used in a trust-free manner [2].&lt;br/&gt;Unfortunately, the existing channel protocols aren&amp;#39;t optimized for use within factories, thus limiting the efficiency of both the channels and the factories.&lt;br/&gt;&lt;br/&gt;The Lightning Network uses Hash Time-Locked Contracts (HTLCs) to implement payments across multiple channels.&lt;br/&gt;If one of the parties to an HTLC is unresponsive, the other party must resolve the HTLC on-chain.&lt;br/&gt;This creates two problems.&lt;br/&gt;&lt;br/&gt;First, the HTLC&amp;#39;s expiry must be delayed by the time required to close the factory and put the channel containing the HTLC on-chain.&lt;br/&gt;The most efficient known factory [2] can be closed in O(log S) time using O(log S) on-chain transactions, assuming the factory supports S states.&lt;br/&gt;If all the hops in a multi-hop payment use channels that are implemented with factories, the sum of the delays for closing all of those factories must be included in the HTLC expiry of the first hop.&lt;br/&gt;As a result, this delay could become very large, thus leading to inefficient use of the channels&amp;#39; capital and long waits to obtain payment receipts.&lt;br/&gt;&lt;br/&gt;Second, the requirement to close a factory due to the need to resolve an HTLC on-chain means that a single unresponsive party can force the closure of an entire factory, thus limiting the factory&amp;#39;s ability to scale Bitcoin.&lt;br/&gt;&lt;br/&gt;This post presents factory-optimized channel protocols that solve both of these problems.&lt;br/&gt;The first protocol, called the Partially-Factory-Optimized (PFO) protocol, solves the first problem, while the second protocol, called the Fully-Factory-Optimized (FFO) protocol, solves both problems.&lt;br/&gt;Both protocols are slight modifications of the Tunable-Penalties (TP) protocol [5] and they share many of its properties, including:&lt;br/&gt;* tunable penalties for putting old transactions on-chain, and&lt;br/&gt;* efficient watchtowers with O(log S) storage for supporting O(S) channel states.&lt;br/&gt;&lt;br/&gt;In addition, a version of the FFO protocol, called the Fully-Factory-Optimized-Watchtower-Free (FFO-WF) protocol is presented that supports watchtower-freedom and one-shot receives for casual users [4].&lt;br/&gt;No change to the underlying Bitcoin protocol is required.&lt;br/&gt;&lt;br/&gt;A paper with a more complete description of the protocols, including figures, values for the timing parameters, and proofs of correctness, is available [6].&lt;br/&gt;&lt;br/&gt;The Partially-Factory-Optimized (PFO) Protocol&lt;br/&gt;==============================================&lt;br/&gt;&lt;br/&gt;The PFO protocol is a slight modification of the TP protocol [5].&lt;br/&gt;In the TP protocol, each party has their own on-chain Individual transaction, the output of which they spend with their State transaction.&lt;br/&gt;This State transaction is a control transaction that establishes the channel&amp;#39;s state and has an HTLC control output corresponding to each HTLC outstanding in the channel in that state.&lt;br/&gt;Each HTLC control output is used to resolve an HTLC by spending the output with either an HTLC-success or an HTLC-timeout transaction.&lt;br/&gt;Critically, the State, HTLC-success and HTLC-timeout transactions can be put on-chain without spending any of the channel&amp;#39;s funds.&lt;br/&gt;Therefore, the TP protocol almost solves the problem of resolving a channel&amp;#39;s HTLCs without waiting for the Funding transaction to be put on-chain.&lt;br/&gt;&lt;br/&gt;Unfortunately, there&amp;#39;s one problem in trying to use the TP protocol to resolve the HTLCs of a factory-created channel before the factory is closed and its Funding transaction is on-chain.&lt;br/&gt;The correctness of the TP protocol depends on the ability to put the current Commitment transaction (spending the output of the channel&amp;#39;s Funding transaction) on-chain as soon as possible once the relative delay between it and its corresponding State transaction has been met.&lt;br/&gt;This relative delay is set to tsdAB, which is the maximum of the two parties&amp;#39; to_self_delay parameters.&lt;br/&gt;The problem is that the latency to close the factory and put the channel&amp;#39;s Funding transaction on-chain could exceed tsdAB.&lt;br/&gt;As a result, the TP protocol can&amp;#39;t be used in such a factory.&lt;br/&gt;&lt;br/&gt;The PFO protocol fixes this by simply setting the relative delay between the State transaction and its associated Commitment transaction to the maximum of the factory-close latency and tsdAB.&lt;br/&gt;&lt;br/&gt;The Fully-Factory-Optimized (FFO) Protocol&lt;br/&gt;==========================================&lt;br/&gt;&lt;br/&gt;While the PFO protocol separates the latency to close the factory from the setting of the HTLCs&amp;#39; expiries, it still requires that the factory be closed in order to guarantee that the HTLCs have been resolved correctly.&lt;br/&gt;&lt;br/&gt;The FFO protocol makes several changes to the PFO protocol in order to resolve HTLCs without requiring the closure of the factory.&lt;br/&gt;Consider an HTLC offered by Alice to Bob.&lt;br/&gt;&lt;br/&gt;First, in the FFO protocol only Bob&amp;#39;s State transaction has an HTLC control output that determines the resolution of this HTLC, regardless of which party&amp;#39;s Commitment transaction is put on-chain.&lt;br/&gt;As a result, there&amp;#39;s no race to put one&amp;#39;s Commitment transaction on-chain, and thus no need to close the factory in order to resolve HTLCs.&lt;br/&gt;As another result, it eliminates the possibility of this HTLC being resolved with Alice&amp;#39;s State and associated HTLC-timeout transactions being put on-chain late relative to the HTLC&amp;#39;s expiry.&lt;br/&gt;&lt;br/&gt;Second, because the HTLC is always resolved based on an HTLC control output in Bob&amp;#39;s State transaction, Bob has to be incentivized to put his correct State transaction on-chain (or else he could prevent the HTLC from timing out by not putting his State transaction on-chain).&lt;br/&gt;This is solved by requiring Bob&amp;#39;s State and HTLC-success transactions in order to pay the HTLC, and to refund the HTLC to Alice (after a suitable relative delay) if Bob&amp;#39;s State and HTLC-success transactions are not on-chain.&lt;br/&gt;&lt;br/&gt;Third, Bob is prevented from putting his State transaction on-chain late relative to the HTLC&amp;#39;s expiry by adding a relative delay of tsdA (Alice&amp;#39;s to_self_delay parameter) before he can put his HTLC-success transaction on-chain.&lt;br/&gt;This guarantees that Alice will have time to respond with a conflicting transaction that prevents Bob&amp;#39;s HTLC-success transaction from being put on-chain late relative to the HTLC&amp;#39;s expiry.&lt;br/&gt;&lt;br/&gt;Finally, if the HTLC&amp;#39;s secret were not revealed until the HTLC-success transaction is put on-chain, the worst-case latency for obtaining a secret from a successful HTLC would depend on tsdA, which would greatly increase Bob&amp;#39;s cltv_expiry_delta parameter, in turn increasing the cost of capital reserved for the HTLC and the delay for obtaining a payment receipt.&lt;br/&gt;This problem is solved by introducing a new transaction, called an HTLC-kickoff transaction, that spends the HTLC control output in Bob&amp;#39;s State transaction and reveals the HTLC&amp;#39;s secret, with the HTLC-success transaction spending the HTLC-kickoff transaction&amp;#39;s output.&lt;br/&gt;Thus,the revelation of the HTLC&amp;#39;s secret is performed first, followed by the resolution of the HTLC approximately tsdA later.&lt;br/&gt;&lt;br/&gt;The FFO protocol is shown below:&lt;br/&gt;&lt;br/&gt;&#43;-&#43; AB &#43;----&#43; A&lt;br/&gt;|F|----&#43;-----------------------------| CC |----&lt;br/&gt;&#43;-&#43; | | |&lt;br/&gt;. | | B&lt;br/&gt;. | |----&lt;br/&gt;. &#43;----&#43;&lt;br/&gt;| &#43;----&#43; A&lt;br/&gt;&#43;-----------------------------|C_Ai|----&lt;br/&gt;| | |&lt;br/&gt;| | | B&lt;br/&gt;| | |----&lt;br/&gt;| tsdB &amp;amp; A | | tsdAB &amp;amp; A&lt;br/&gt;| &#43;---------------| |-----&#43;------------&lt;br/&gt;| | &#43;----&#43; |&lt;br/&gt;| | | AB &#43;-----&#43; B&lt;br/&gt;| | &#43;--------------|Hp_Bi|----&lt;br/&gt;| | | |&lt;br/&gt;| | &#43;--| |&lt;br/&gt;| | | &#43;-----&#43;&lt;br/&gt;| | &#43;----&#43; A |&lt;br/&gt;&#43;-----------------------------|C_Bi|---- |&lt;br/&gt;| | | | |&lt;br/&gt;. | | | B |&lt;br/&gt;. | | |---- |&lt;br/&gt;. | tsdA &amp;amp; B | | tsdAB &amp;amp; A |&lt;br/&gt;| &#43;-----------------| |-----&#43;--------------&lt;br/&gt;V | | &#43;----&#43; | |&lt;br/&gt;| | | AB | &#43;-----&#43; B&lt;br/&gt;&#43;----&#43; A &#43;-----&#43; | | pckeyAi &#43;--------------|Hp_Bi|----&lt;br/&gt;|In_A|----|St_Ai|----&#43;---------- | | |&lt;br/&gt;&#43;----&#43; | | | &#43;--| |&lt;br/&gt;| | | | &#43;-----&#43;&lt;br/&gt;| | | |&lt;br/&gt;&#43;-----&#43; | |&lt;br/&gt;| (eAB&#43;tsdA) &amp;amp; A |&lt;br/&gt;&#43;----&#43; B &#43;-----&#43; | pckeyBi &#43;----------------- |&lt;br/&gt;|In_B|----|St_Bi|--&#43;------------ | |&lt;br/&gt;&#43;----&#43; | | | |&lt;br/&gt;| | hp(X) &amp;amp; B &#43;-----&#43; | tsdA &amp;amp; B &#43;-----&#43; B |&lt;br/&gt;| |------------|Hk_Bi|-&#43;-----------|Hs_Bi|----&#43;&lt;br/&gt;&#43;-----&#43; &#43;-----&#43; &#43;-----&#43;&lt;br/&gt;&lt;br/&gt;where:&lt;br/&gt;F is the Funding transaction,&lt;br/&gt;CC is the Cooperative Close transaction,&lt;br/&gt;In_{A|B} is {Alice&amp;#39;s|Bob&amp;#39;s} Individual transaction,&lt;br/&gt;St_{A|B}i is {Alice&amp;#39;s|Bob&amp;#39;s} State transaction for state i,&lt;br/&gt;C_{A|B}i is {Alice&amp;#39;s|Bob&amp;#39;s} Commitment transaction for state i,&lt;br/&gt;Hk_Bi is Bob&amp;#39;s HTLC-kickoff transaction for state i,&lt;br/&gt;Hs_Bi is Bob&amp;#39;s HTLC-success transaction for state i, and&lt;br/&gt;Hp_Bi is Bob&amp;#39;s HTLC-payment transaction for state i.&lt;br/&gt;&lt;br/&gt;Requirements for output cases are as follows:&lt;br/&gt;A: Alice&amp;#39;s signature,&lt;br/&gt;B: Bob&amp;#39;s signature,&lt;br/&gt;AB: Alice&amp;#39;s and Bob&amp;#39;s signatures,&lt;br/&gt;pckey{A|B}i: a signature using a per-commitment key for revoking&lt;br/&gt;{Alice&amp;#39;s|Bob&amp;#39;s} state i transaction,&lt;br/&gt;hp(X): the hash preimage of X,&lt;br/&gt;tsd{A|B}: a relative delay equal to {Alice&amp;#39;s|Bob&amp;#39;s} to_self_delay&lt;br/&gt;parameter,&lt;br/&gt;tsdAB: a relative delay equal to max(tsdA, tsdB), and&lt;br/&gt;eAB: an absolute timelock equal to the expiry of the HTLC in this hop.&lt;br/&gt;&lt;br/&gt;Extensions&lt;br/&gt;==========&lt;br/&gt;&lt;br/&gt;If a party accidentally puts on old State transaction on-chain, they only lose the penalty amount that is the output of that transaction (and potentially some of the minimal values of that transaction&amp;#39;s HTLC control outputs).&lt;br/&gt;However, once their State transaction has been revoked, they&amp;#39;ve lost the ability to force a unilateral close of the channel after the Funding transaction is on-chain.&lt;br/&gt;To address this, it&amp;#39;s possible to add a Trigger [2] transaction that spends the output of the Funding transaction.&lt;br/&gt;After the Trigger transaction has been on-chain for 3tsdAB (in order to allow the other party to put their Commitment transaction on-chain), the Decker-Wattenhofer protocol [3] can be used to settle the channel.&lt;br/&gt;&lt;br/&gt;The FFO protocol shows how a channel&amp;#39;s HTLCs can be resolved on-chain without putting its Funding transaction on-chain, and thus without closing the channel factory.&lt;br/&gt;The party that went on-chain can settle the channel and its HTLCs correctly, even if their partner is malicious.&lt;br/&gt;However, the most likely reason a party goes on-chain is that their partner is unintentionally unavailable, rather than malicious.&lt;br/&gt;When the unavailable partner becomes available again, the two parties could choose to re-start operating the channel, and that&amp;#39;s possible because the channel&amp;#39;s funds haven&amp;#39;t been distributed.&lt;br/&gt;In particular, the party that went on-chain can use the unspent first output of their State transaction to play the role of their Individiual transaction&amp;#39;s output as they resume operating the channel.&lt;br/&gt;This output has slightly less value, as it&amp;#39;s sized for the penalty amount and doesn&amp;#39;t have additional funds for HTLC control outputs, but it seems reasonable to reduce the penalty amount that they will have to pay, given that it was the other party&amp;#39;s unavailability that forced them to go on-chain.&lt;br/&gt;&lt;br/&gt;Watchtower-Freedom And One-Shot Receives For Casual Users&lt;br/&gt;=========================================================&lt;br/&gt;&lt;br/&gt;The WF protocol modified the current Lightning protocol to allow casual users to operate without watchtowers and to perform one-shot receives.&lt;br/&gt;A similar approach can be used to modify the FFO protocol to achieve the same goals, resulting in the FFO-WF protocol.&lt;br/&gt;&lt;br/&gt;Consider a casual user Alice and her dedicated channel partner Bob.&lt;br/&gt;Like the WF protocol, the FFO-WF protocol adds a relative delay before Alice can time out an HTLC offered to Bob, allowing Bob to stay off-chain after the HTLC&amp;#39;s expiry, thus tolerating Alice&amp;#39;s intentional unavailability.&lt;br/&gt;As in the FFO protocol, in the FFO-WF protocol only one of the two parties&amp;#39; State transactions has an HTLC control output for each HTLC that is outstanding.&lt;br/&gt;However, unlike the FFO protocol, Alice&amp;#39;s State transaction has the HTLC control outputs for all HTLCs, even those offered to Bob.&lt;br/&gt;The control of the HTLCs offered to Bob is moved to Alice&amp;#39;s State transaction in order to allow Alice to force Bob to produce a receipt (or to not receive payment) by putting her State transaction on-chain.&lt;br/&gt;While this solves the problem of forcing receipts, it creates a risk that Alice will never put her State transaction on-chain, thus preventing Bob from receiving payment for HTLCs offered to him.&lt;br/&gt;This risk is solved by modifying Bob&amp;#39;s Commitment transaction to ignore the HTLC control results and to pay all HTLC amounts (both those offered by him and those offered to him) to Bob, but delaying Bob&amp;#39;s State and Commitment transactions enough that Alice can always get her State and Commitment transactions on-chain, thus resolving the HTLCs correctly (as she is incentivized to do, given Bob&amp;#39;s Commitment transaction).&lt;br/&gt;&lt;br/&gt;In order to support one-shot receives for Alice, she is able to submit her State and HTLC-success transactions as a single package, without any relative delay between them.&lt;br/&gt;This creates a risk that she will submit them well after the HTLC&amp;#39;s expiry, thus allowing her to receive payment without meeting the terms of the HTLC.&lt;br/&gt;This risk is solved by requiring Alice&amp;#39;s HTLC-success transaction to also spend a new control output in Bob&amp;#39;s Individual transaction, and allowing Bob to spend that new control output with an HTLC-timeout transaction after the HTLC&amp;#39;s expiry (thus blocking Alice&amp;#39;s HTLC-success transaction).&lt;br/&gt;This design creates another issue, namely the possibility of Bob using an old HTLC-timeout transaction (or any other transaction) to spend the new control output and block Alice&amp;#39;s HTLC-success transaction before the HTLC&amp;#39;s expiry.&lt;br/&gt;This final issue is solved by having each HTLC output in Alice&amp;#39;s Commitment transaction default (after a sufficient relative delay) to paying her for the HTLC offered to her unless Bob&amp;#39;s corresponding HTLC-timeout transaction is on-chain.&lt;br/&gt;&lt;br/&gt;The FFO-WF protocol, with a single HTLC outstanding from dedicated user Bob to casual user Alice, is shown below:&lt;br/&gt;&lt;br/&gt;&#43;-&#43; AB &#43;----&#43; A&lt;br/&gt;|F|----&#43;-----------------------------| CC |----&lt;br/&gt;&#43;-&#43; | | |&lt;br/&gt;. | | B&lt;br/&gt;. | |----&lt;br/&gt;. &#43;----&#43;&lt;br/&gt;| tsdB &amp;amp; AB &#43;----&#43; A&lt;br/&gt;&#43;-----------------------------|C_Ai|----&lt;br/&gt;| | |&lt;br/&gt;| | | B&lt;br/&gt;| | |----&lt;br/&gt;| tsdB &amp;amp; A | | tsdAB &amp;amp; A&lt;br/&gt;| &#43;-----------------| |-----&#43;------------&lt;br/&gt;| | &#43;----&#43; |&lt;br/&gt;| | | AB &#43;-----&#43; B&lt;br/&gt;| | &#43;-----------|Hr_Bi|----&lt;br/&gt;| | | |&lt;br/&gt;| | B | |&lt;br/&gt;| | &#43;--| |&lt;br/&gt;| | | &#43;-----&#43;&lt;br/&gt;| tA&#43;B &amp;amp; AB | &#43;----&#43; A |&lt;br/&gt;&#43;-----------------------------|C_Bi|---- |&lt;br/&gt;| | | | |&lt;br/&gt;. | | | B |&lt;br/&gt;. | | |---- |&lt;br/&gt;. | tA&#43;B &amp;amp; B | | |&lt;br/&gt;| | &#43;-------------| | |&lt;br/&gt;V | | &#43;----&#43; |&lt;br/&gt;| | |&lt;br/&gt;&#43;----&#43; A &#43;-----&#43; | | pckeyAi |&lt;br/&gt;|In_A|----|St_Ai|--&#43;-------------- |&lt;br/&gt;&#43;----&#43; | | | |&lt;br/&gt;| | | hp(X) &amp;amp; A &#43;-----&#43; A |&lt;br/&gt;| | ---------------------|Hs_Ai|---- |&lt;br/&gt;&#43;-----&#43; | | | |&lt;br/&gt;| B | | |&lt;br/&gt;| &#43;--| | |&lt;br/&gt;| | &#43;-----&#43; |&lt;br/&gt;&#43;----&#43; (Li)&amp;amp;B &#43;-----&#43; | pckeyBi | |&lt;br/&gt;|In_B|---------|St_Bi|-&#43;---------- | |&lt;br/&gt;| | &#43;-----&#43; | |&lt;br/&gt;| | | (eAB) &amp;amp; B &#43;-----&#43; |&lt;br/&gt;| |------------------------------&#43;------------|Ht_Bi|-&#43;&lt;br/&gt;&#43;----&#43; &#43;-----&#43;&lt;br/&gt;&lt;br/&gt;where notation matches the figure above, plus:&lt;br/&gt;Hs_Ai is Alice&amp;#39;s HTLC-success transaction for state i,&lt;br/&gt;Ht_Bi is Bob&amp;#39;s HTLC-timeout transaction for state i,&lt;br/&gt;Hr_Bi is Bob&amp;#39;s HTLC-refund transaction for state i,&lt;br/&gt;tA&#43;B equals tsdA &#43; tsdB, and&lt;br/&gt;Li is an absolute locktime that is tsdA in the future when state i is&lt;br/&gt;created.&lt;br/&gt;&lt;br/&gt;Related Work&lt;br/&gt;============&lt;br/&gt;&lt;br/&gt;The protocols presented here are designed to make efficient use of channel factories for Lightning.&lt;br/&gt;The concept of channel factories and the most efficient published protocol for a channel factory were created by Burchert, Decker and Wattenhofer [2].&lt;br/&gt;&lt;br/&gt;Towns proposed adding a new opcode to Bitcoin, called TAPLEAF_UPDATE_VERIFY (TLUV), that would support (among other things) the ability to remove one party from a CoinPool without having to close the CoinPool [7], and ZmnSCPxj noted that this opcode could also be used to remove one channel from a factory without closing the factory [8].&lt;br/&gt;Those proposals differ from the protocols presented here in that they require a change to Bitcoin.&lt;br/&gt;&lt;br/&gt;The protocols presented here use HTLC-timeout and HTLC-success transactions to resolve HTLCs before the channel&amp;#39;s Funding transaction has been put on-chain, thus reducing the expiry of those HTLCs.&lt;br/&gt;This idea is analogous to, and inspired by, the Lightning protocol&amp;#39;s use of HTLC-timeout and HTLC-success transactions to resolve HTLCs before their associated Commitment transaction has been verified to be unrevoked [1].&lt;br/&gt;&lt;br/&gt;The PFO, FFO and FFO-WF protocols are based on the TP protocol presented by Law [5].&lt;br/&gt;The techniques for supporting watchtower-freedom and one-shot receives in the FFO-WF protocol are based on those presented by Law in [4] and [5].&lt;br/&gt;&lt;br/&gt;Conclusions&lt;br/&gt;===========&lt;br/&gt;&lt;br/&gt;This post presents channel protocols that are optimized for use within channel factories.&lt;br/&gt;The protocols make the resolution of HTLCs in the channels independent of the latency to close the channel factory.&lt;br/&gt;The FFO and FFO-WF protocols also allows HTLCs to be resolved on-chain without closing the channel factory.&lt;br/&gt;&lt;br/&gt;If the FFO protocol is used in channels owned by pairs of dedicated users and the FFO-WF protocol is used in channels with a casual user:&lt;br/&gt;* casual users do not require watchtowers,&lt;br/&gt;* casual users can use one-shot receives,&lt;br/&gt;* dedicated users can use watchtowers with logarithmic storage,&lt;br/&gt;* all users can have tunable penalties,&lt;br/&gt;* all channels can have HTLCs with expiries that are independent of the latency of closing the factory that created them, and&lt;br/&gt;* all channels can resolve their HTLCs without closing the factories that created them.&lt;br/&gt;&lt;br/&gt;It&amp;#39;s hoped that these factory-optimized protocols will allow channel factories to become commonly-used, thus improving Bitcoin&amp;#39;s scalability.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John&lt;br/&gt;&lt;br/&gt;References&lt;br/&gt;==========&lt;br/&gt;&lt;br/&gt;[1] BOLT specifications, available at &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc&#34;&gt;https://github.com/lightningnetwork/lightning-rfc&lt;/a&gt;.&lt;br/&gt;[2] Burchert, Decker and Wattenhofer, &amp;#34;Scalable Funding of Bitcoin Micropayment Channel Networks&amp;#34;, available at &lt;a href=&#34;http://dx.doi.org/10.1098/rsos.180089&#34;&gt;http://dx.doi.org/10.1098/rsos.180089&lt;/a&gt;.&lt;br/&gt;[3] Decker and Wattenhofer, &amp;#34;A Fast and Scalable Payment Network with Bitcoin Duplex Micropayment Channels&amp;#34;, available at &lt;a href=&#34;https://tik-old.ee.ethz.ch/file/716b955c130e6c703fac336ea17b1670/duplex-micropayment-channels.pdf&#34;&gt;https://tik-old.ee.ethz.ch/file/716b955c130e6c703fac336ea17b1670/duplex-micropayment-channels.pdf&lt;/a&gt;.&lt;br/&gt;[4] Law, &amp;#34;Watchtower-Free Lightning Channels For Casual Users&amp;#34;, available at &lt;a href=&#34;https://github.com/JohnLaw2/ln-watchtower-free&#34;&gt;https://github.com/JohnLaw2/ln-watchtower-free&lt;/a&gt;.&lt;br/&gt;[5] Law, &amp;#34;Lightning Channels With Tunable Penalties&amp;#34;, available at &lt;a href=&#34;https://github.com/JohnLaw2/ln-tunable-penalties&#34;&gt;https://github.com/JohnLaw2/ln-tunable-penalties&lt;/a&gt;.&lt;br/&gt;[6] Law, &amp;#34;Factory-Optimized Channel Protocols For Lightning&amp;#34;, available at &lt;a href=&#34;https://github.com/JohnLaw2/ln-factory-optimized&#34;&gt;https://github.com/JohnLaw2/ln-factory-optimized&lt;/a&gt;.&lt;br/&gt;[7] Towns, &amp;#34;TAPLEAF_UPDATE_VERIFY covenant opcode&amp;#34;, available at &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-September/019419.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-September/019419.html&lt;/a&gt;.&lt;br/&gt;[8] ZmnSCPxj, &amp;#34;Channel Eviction From Channel Factories By New Covenant Operations&amp;#34;, available at &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-February/003479.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-February/003479.html&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;Sent with [Proton Mail](&lt;a href=&#34;https://proton.me/&#34;&gt;https://proton.me/&lt;/a&gt;) secure email.&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/20221202/9a91c6d0/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20221202/9a91c6d0/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T13:07:35Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsrsnn3euq5kwe30f7emql92y4yq53z0xdx5uwvt5t3qsln5ns4tfczyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzww3h8m</id>
    
      <title type="html">📅 Original date posted:2022-12-26 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsrsnn3euq5kwe30f7emql92y4yq53z0xdx5uwvt5t3qsln5ns4tfczyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzww3h8m" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2gs0nrf32s3cl306mlfwlwnk3pd02dspzvqkz8p47xah9lvw470gm454lz&#39;&gt;nevent1q…54lz&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-12-26&lt;br/&gt;📝 Original message:&lt;br/&gt;I&amp;#39;d like to make two corrections to this post:&lt;br/&gt;&lt;br/&gt;1) The link for reference [8] should be: &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-February/003479.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-February/003479.html&lt;/a&gt; (thanks to David A. Harding for this correction).&lt;br/&gt;&lt;br/&gt;2) An extension of the FFO protocol was described in which the parties in a channel could continue to operate the channel after one party put their State transaction on-chain by having the first output of that State transaction play the role of the same party&amp;#39;s Individiual transaction&amp;#39;s output. This doesn&amp;#39;t work, because that party would have to reveal the per-commitment key to invalidate the previous channel state, and once revealed the other party could then spend that output. This problem can be fixed by having the party that put their State transaction on-chain put a new Individual transaction on-chain that spends the first output of their State transaction.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John&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/20221226/fd9d9147/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20221226/fd9d9147/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T13:07:35Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsgng4qapnu62xltl6pez7taqxn8cvmk5kgudlhc8v3nw492sytq8gzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gz90cdyq</id>
    
      <title type="html">📅 Original date posted:2022-10-30 📝 Original message: TL:DR ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsgng4qapnu62xltl6pez7taqxn8cvmk5kgudlhc8v3nw492sytq8gzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gz90cdyq" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspzcrjex6dl85y62ypmadt8lruzy9a9mc8ky7qkv8fdhgujl292uceks5ma&#39;&gt;nevent1q…s5ma&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-10-30&lt;br/&gt;📝 Original message:&lt;br/&gt;TL:DR&lt;br/&gt;&lt;br/&gt;=====&lt;br/&gt;* It&amp;#39;s possible to modify the Lightning channel protocol to impose tunable penalties for putting old transactions on-chain.&lt;br/&gt;* The key idea is the use of separate value transactions and control transactions.&lt;br/&gt;* The Tunable-Penalty (TP) protocol also allows a watchtower to use storage that is logarithmic (vs. linear) in the number of channel states.&lt;br/&gt;* The TP protocol is not suitable for casual users, as it can require that users perform actions at specific times weeks or months after the expiry of an HTLC.&lt;br/&gt;&lt;br/&gt;Overview&lt;br/&gt;========&lt;br/&gt;&lt;br/&gt;In the current Lightning channel protocol [1][2], if a party accidentally puts an old transaction on-chain (for example, due to loss of state caused by a crash or loss of a cell phone), they risk losing all their funds in the channel (this has been called the &amp;#34;toxic-waste&amp;#34; problem) [7]. This post presents a new channel protocol, the Tunable-Penalty (TP) protocol, that supports a tunable penalty for putting old transactions on-chain, thus discouraging the use of old transactions while avoiding the risk of losing all channel funds [9][11]. In addition, the TP protocol allows watchtowers to use storage that is logarithmic, rather than linear, in the number of channel states supported. No change to the underlying Bitcoin protocol is required.&lt;br/&gt;&lt;br/&gt;A paper with a more complete description of the protocol, including figures, is available [6].&lt;br/&gt;&lt;br/&gt;The Challenge&lt;br/&gt;=============&lt;br/&gt;&lt;br/&gt;In order to motivate the TP protocol, first consider a straightforward approach to tuning penalties in a Lightning channel by charging the errant party the desired penalty and then dividing the remaining funds according to the channel&amp;#39;s current state. Consider the case where Alice put an old state i Commitment transaction on-chain, where the current channel state is j &amp;gt; i. In order to assess the penalty and correctly divide the remaining funds, Bob must be able to spend that transaction&amp;#39;s to_self output (which pays to Alice) with a Penalty_Bij transaction that splits its input value into the correct state j values (after assessing the penalty). Alice must approve of this division of funds when she agrees to make state j the current state. Therefore, Alice must sign a separate Penalty_Bij transaction for each pair of states i and j, where i &amp;lt; j, so she must sign a total of O(S^2) penalty transactions and Bob must store O(S) signatures for the current state, where S is the number of channel states [3]. The current Lightning protocol only requires O(S) signatures and O(log S) storage for each party [10], so this approach would be quite expensive.&lt;br/&gt;&lt;br/&gt;The Solution&lt;br/&gt;============&lt;br/&gt;&lt;br/&gt;The TP protocol avoids this problem by using separate value and control transactions. In addition to an on-chain Funding transaction that provides the channel&amp;#39;s funds, each party in the TP protocol has an on-chain Individual transaction that they use to control how the channel&amp;#39;s funds are distributed. Each Individual transaction has a single output with a value slightly larger than the desired penalty amount. Before either party can put their Commitment transaction on-chain, they must first put their State transaction on-chain that spends the output of their Individual transaction. The State transaction encodes the channel&amp;#39;s state number in its nLocktime and nSequence fields, just like the Commitment transaction encodes the state number in the Lightning protocol. The first output of the State transaction has a value equal to the desired penalty amount.  After a relative delay equal to the maximum of the parties&amp;#39; to_self_delay parameters, this output can be spent by the same party&amp;#39;s Commitment transaction for the same state. However, if the State transaction is for an old state, it can be revoked by the other party (thus taking the penalty amount) before it can be used as an input to the Commitment transaction. If one party&amp;#39;s State transaction is revoked, the other party can still put their correct State transaction on-chain, as the two parties&amp;#39; State transactions spend outputs from different Individual transactions, and thus don&amp;#39;t conflict. Because old State transactions are revoked before they can affect the distribution of the channel&amp;#39;s funds, the problem with O(S^2) penalty transactions and signatures described above is avoided.&lt;br/&gt;&lt;br/&gt;The Protocol&lt;br/&gt;============&lt;br/&gt;&lt;br/&gt;The TP protocol is shown below:&lt;br/&gt;&lt;br/&gt;&#43;-&#43; AB                           &#43;----&#43; A&lt;br/&gt;|F|----&#43;-------------------------| CC |----&lt;br/&gt;&#43;-&#43;    |                         |    |&lt;br/&gt;       .                         |    | B&lt;br/&gt;       .                         |    |----&lt;br/&gt;       .                         &#43;----&#43;&lt;br/&gt;       |                         &#43;----&#43; A&lt;br/&gt;       &#43;-------------------------|C_Ai|----&lt;br/&gt;       |                         |    |&lt;br/&gt;       |                         |    | B&lt;br/&gt;       |                         |    |----&lt;br/&gt;       |                         |    |&lt;br/&gt;       |               tsdAB &amp;amp; A |    | AB               &#43;-----&#43; A&lt;br/&gt;       |             &#43;-----------|    |-----&#43;------------|Hr_Ai|----&lt;br/&gt;       |             |           &#43;----&#43;     |  &#43;---------|     |&lt;br/&gt;       |             |                      |  |         &#43;-----&#43;&lt;br/&gt;       |             |                      |  |         &#43;-----&#43; B&lt;br/&gt;       |             |                      &#43;------------|Hp_Bi|----&lt;br/&gt;       |             |                         | &#43;-------|     |&lt;br/&gt;       |             |                         | |       &#43;-----&#43;&lt;br/&gt;       |             |           &#43;----&#43; A      | |&lt;br/&gt;       &#43;-------------------------|C_Bi|----    | |&lt;br/&gt;       |             |           |    |        | |&lt;br/&gt;       .             |           |    | B      | |&lt;br/&gt;       .             |           |    |----    | |&lt;br/&gt;       .             |           |    |        | |&lt;br/&gt;       |             | tsdAB &amp;amp; B |    | AB     | |       &#43;-----&#43; A&lt;br/&gt;       V           &#43;-------------|    |-----&#43;------------|Hr_Ai|----&lt;br/&gt;                   | |           &#43;----&#43;     |  | |  &#43;----|     |&lt;br/&gt;                   | |                      |  | |  |    &#43;-----&#43;&lt;br/&gt;                   | |                      |  | |  |    &#43;-----&#43; B&lt;br/&gt;&#43;----&#43; A  &#43;-----&#43;  | | pckeyAi              &#43;------------|Hp_Bi|----&lt;br/&gt;|In_A|----|St_Ai|----&#43;-----------              | |  | &#43;--|     |&lt;br/&gt;&#43;----&#43;    |     |  |                           | |  | |  &#43;-----&#43;&lt;br/&gt;          |     |  |   eAB &amp;amp; A   &#43;-----&#43; A     | |  | |&lt;br/&gt;          |     |----&#43;-----------|Ht_Ai|-------&#43; |  | |&lt;br/&gt;          &#43;-----&#43;  | |           &#43;-----&#43;         |  | |&lt;br/&gt;                   | | hp(X) &amp;amp; A &#43;-----&#43; B       |  | |&lt;br/&gt;                   | &#43;-----------|Hs_Bi|---------&#43;  | |&lt;br/&gt;                   |             &#43;-----&#43;            | |&lt;br/&gt;&#43;----&#43; B  &#43;-----&#43;  |   pckeyBi                      | |&lt;br/&gt;|In_B|----|St_Bi|--&#43;-------------                   | |&lt;br/&gt;&#43;----&#43;    |     |                                   | |&lt;br/&gt;          |     |      eAB &amp;amp; A   &#43;-----&#43; A          | |&lt;br/&gt;          |     |--&#43;-------------|Ht_Ai|------------&#43; |&lt;br/&gt;          &#43;-----&#43;  |             &#43;-----&#43;              |&lt;br/&gt;                   |   hp(X) &amp;amp; A &#43;-----&#43; B            |&lt;br/&gt;                   &#43;-------------|Hs_Bi|--------------&#43;&lt;br/&gt;                                 &#43;-----&#43;&lt;br/&gt;&lt;br/&gt;where:&lt;br/&gt;F is the Funding transaction,&lt;br/&gt;CC is the Cooperative Close transaction,&lt;br/&gt;In_{A|B} is {Alice&amp;#39;s|Bob&amp;#39;s} Individual transaction,&lt;br/&gt;St_{A|B}i is {Alice&amp;#39;s|Bob&amp;#39;s} State transaction for state i,&lt;br/&gt;C_{A|B}i is {Alice&amp;#39;s|Bob&amp;#39;s} Commitment transaction for state i,&lt;br/&gt;Ht_Ai is Alice&amp;#39;s HTLC-timeout transaction for state i,&lt;br/&gt;Hs_Bi is Bob&amp;#39;s HTLC-success transaction for state i,&lt;br/&gt;Hr_Ai is Alice&amp;#39;s HTLC-refund transaction for state i, and&lt;br/&gt;Hp_Bi is Bob&amp;#39;s HTLC-payment transaction for state i.&lt;br/&gt;&lt;br/&gt;The F, In_A and In_B transactions are on-chain, while the remaining transactions are off-chain during normal protocol operation. The output of the Ht_Ai and Hs_Bi transactions, and the second output of the St_Ai and St_Bi transactions, have the minimal allowed value, as they are used for control.&lt;br/&gt;&lt;br/&gt;Requirements for output cases are as follows:&lt;br/&gt;A: Alice&amp;#39;s signature,&lt;br/&gt;B: Bob&amp;#39;s signature,&lt;br/&gt;AB: Alice&amp;#39;s and Bob&amp;#39;s signatures,&lt;br/&gt;pckey{A|B}i: a signature using a per-commitment key for revoking {Alice&amp;#39;s|Bob&amp;#39;s} state i transaction,&lt;br/&gt;hp(X): the hash preimage of X,&lt;br/&gt;tsdAB: a relative delay equal to the maximum of Alice&amp;#39;s and Bob&amp;#39;s to_self_delay parameters, and&lt;br/&gt;eAB: an absolute timelock equal to the expiry of the HTLC in this hop.&lt;br/&gt;&lt;br/&gt;In order to establish a new channel state, both parties:&lt;br/&gt;* calculate the State, Commitment, HTLC-timeout, HTLC-success, HTLC-refund and HTLC-payment transactions for the new state,&lt;br/&gt;* exchange partial signatures for the new state&amp;#39;s HTLC-refund, HTLC-payment and Commitment transactions (in that order), and&lt;br/&gt;* exchange per-commitment pubkeys for the old state, thus revoking it.&lt;br/&gt;&lt;br/&gt;Consider the case of an HTLC offered by Alice to Bob (as shown in the figure above). When Bob receives the secret for the HTLC, he shares it with Alice and attempts to update the channel state off-chain. If he&amp;#39;s unable to update the state off-chain before his fulfillment_deadline prior to the HTLC&amp;#39;s expiry, he puts his State and associated HTLC-success transactions on-chain. If Alice hasn&amp;#39;t received the HTLC&amp;#39;s secret by her timeout_deadline *prior* to the HTLC&amp;#39;s expiry, she puts her State and associated HTLC-timeout transactions on-chain.&lt;br/&gt;&lt;br/&gt;Both parties constantly look for an old (revoked) State transaction put on-chain by their partner, and if they find such a transaction they use the corresponding per-commitment key to spend its first output, thus obtaining the penalty funds and revoking the old state. Whenever a current State transaction is put on-chain, both parties attempt to resolve its HTLC control output(s) by putting their HTLC-timeout and HTLC-success transactions on-chain. If the first output of a State transaction has not been spent within tsdAB, the party that put the State transaction on-chain attempts to put their corresponding Commitment transaction on-chain. Once a Commitment transaction is on-chain, each party puts its HTLC-refund and HTLC-payment transactions that spend its HTLC outputs on-chain (as determined by whether the corresponding HTLC-timeout or HTLC-success transaction is on-chain).&lt;br/&gt;&lt;br/&gt;Two-Input Transactions&lt;br/&gt;======================&lt;br/&gt;&lt;br/&gt;All transactions in the current Lightning protocol have a single input, while the Commitment, HTLC-refund and HTLC-payment transactions in the TP protocol each have two inputs. The first input is a value input that carries channel funds and requires both parties&amp;#39; signatures (using the SIGHASH_ALL flag). The second input is a control input that only requires one party&amp;#39;s signature. These two-input transactions are quite different from the Lightning protocol&amp;#39;s one-input transactions, so it&amp;#39;s worth examining them in detail.&lt;br/&gt;&lt;br/&gt;First, because the first input requires both parties&amp;#39; signatures, only two-input transactions that have been signed by both parties can be used.  Second, because signatures for the first input use the SIGHASH_ALL flag, they force the source of the second input to have the specified transaction ID. Third, because each transaction&amp;#39;s ID is a function of the transaction IDs of all of its parents (and indirectly, of all of its ancestors), all of the ancestors of the two-input transactions must have the specified transaction IDs. For example, Alice&amp;#39;s partial signature on the first input of Bob&amp;#39;s Commitment transaction forces its second input to spend the first output of Bob&amp;#39;s State transaction for the same state, and indirectly requires Bob&amp;#39;s State transaction for the same state to spend the output of his Individual transaction. Therefore, while Bob could spend the output of his Individual transaction in any way he chooses, spending it with anything other than the correct State transaction will prevent him from ever putting his correct Commitment transaction on-chain.  Similarly, if the first output of Bob&amp;#39;s State transaction is spent by anything other than his corresponding Commitment transaction, that Commitment transaction can never be put on-chain.&lt;br/&gt;&lt;br/&gt;Per-Commitment Keys&lt;br/&gt;===================&lt;br/&gt;&lt;br/&gt;In this way, Bob&amp;#39;s Commitment transaction for state i, and the HTLC-refund and HTLC-payment transactions that spend the HTLC outputs from his Commitment transaction for state i, all require that the first output of Bob&amp;#39;s State transaction for state i be spent by his Commitment transaction for state i. Therefore, revoking an old State transaction by spending its first output also revokes all of the same party&amp;#39;s Commitment transactions (for all states) and their associated HTLC-refund and HTLC-payment transactions. This is why there&amp;#39;s no need to separately revoke any of the outputs from the Commitment, HTLC-refund, HTLC-payment, HTLC-timeout or HTLC-success transactions.&lt;br/&gt;&lt;br/&gt;These dependent revocations also allow the TP protocol to use a different type of key for revoking old states. In the Lightning protocol the party that puts an old transaction on-chain cannot know the key for revoking that transaction. This is necessary in Lightning because if that party did know the revocation key, they could intentionally put an old Commitment transaction on-chain and then &amp;#34;revoke&amp;#34; the outputs of that transaction, thus taking the value for themselves. In contrast, in the TP protocol, if a party puts an old State transaction on-chain and then revokes it by spending its first output with a transaction other than its associated Commitment transaction, that party is actually blocking its ability to ever put a Commitment transaction on-chain. Furthermore, the funds that party obtains by spending the State transaction&amp;#39;s first output are the same penalty funds that they provided from their Individual transaction. As a result, it&amp;#39;s safe in the TP protocol to allow a party to revoke its own State transaction. This allows the TP protocol to use per-commitment keys (which are exactly the private keys of the per-commitment points used by the Lightning protocol [10]) to revoke transactions.&lt;br/&gt;&lt;br/&gt;Watchtowers&lt;br/&gt;===========&lt;br/&gt;&lt;br/&gt;Because these per-commitment keys are known to the party putting the revocable transactions on-chain, they can also be shared with an untrusted watchtower. The watchtower can use the Lightning protocol&amp;#39;s compact storage technique for revocation keys to consume only O(log S) storage to revoke a maximum of S old transactions [10]. Conveniently, the watchtower can also take the penalty amount as payment for the service it provided.  The watchtower must be given the UTXO of the partner&amp;#39;s Individual transaction&amp;#39;s output in order to detect a revoked transaction, but the watchtower will see no association between that UTXO and the Funding transaction or any other channel state.&lt;br/&gt;&lt;br/&gt;Correctness&lt;br/&gt;===========&lt;br/&gt;&lt;br/&gt;Each party is prevented from putting an old Commitment transaction for state i on-chain by the other party spending the first output of the corresponding State transaction for state i. Therefore, only the correct Commitment transaction can appear on-chain.&lt;br/&gt;&lt;br/&gt;While having separate, non-conflicting State transactions enables tunable penalties, it makes HTLC resolution more complex. As can be seen in the figure above, the parties&amp;#39; Commitment transactions conflict and the party whose Commitment transaction appears on-chain (called the winning party) also put on-chain the State transaction with the HTLC control outputs that determine whether HTLCs succeed or time out.&lt;br/&gt;&lt;br/&gt;For example, consider an HTLC offered by Alice to Bob. Bob could fulfill the HTLC by putting his State and associated HTLC-success transactions on-chain before its expiry, but if Alice is the winning party and she puts her State and associated HTLC-timeout transactions on-chain far after its expiry, Bob will not be paid by the HTLC depite having met its terms.  Similary, Alice could time out the HTLC by putting her State and HTLC-timeout transactions on-chain after its expiry, but if Bob is the winning party and he puts his State and associated HTLC-success transactions on-chain far later, Bob will be paid by the HTLC despite having failed to meet its terms.&lt;br/&gt;&lt;br/&gt;Note that both problems require the second party to put their State transaction on-chain late relative to the HTLC&amp;#39;s expiry, and yet be the winning party. These problems can&amp;#39;t occur in the TP protocol because both parties race to put their Commitment transactions on-chain and the relative delays from State transactions to Commitment transactions match.  Therefore, the winning party&amp;#39;s State transaction can&amp;#39;t be put on-chain much later than the other party&amp;#39;s State transaction. In the TP protocol, each party guarantees that the winning party&amp;#39;s State transaction is on-chain early enough relative to the HTLC&amp;#39;s expiry by putting their own State transaction on-chain early. Then, even if the other party is the winning party, the other party&amp;#39;s transaction must still be on-chain early enough relative to the HTLC&amp;#39;s expiry, thus guaranteeing its correct resolution.&lt;br/&gt;&lt;br/&gt;This argument is formalized in the paper [6].&lt;br/&gt;&lt;br/&gt;Related Work&lt;br/&gt;============&lt;br/&gt;&lt;br/&gt;The protocol presented here makes extensive use of previously-published work, namely the Poon-Dryja Lightning channel protocol [1] and the BOLT specifications [2]. The compact storage technique for per-commitment keys comes from the compact storage technique for revocation keys created by Russell [10].&lt;br/&gt;&lt;br/&gt;Riard, ZmnSCPxj and Decker examined the idea of adding penalties to the eltoo protocol [7], but the techniques used there were different, as they did not use separate value and control transactions.&lt;br/&gt;&lt;br/&gt;Rubin (who also credited nullc and sipa) [8] showed how a two-input transaction with separate value and control inputs can be used to delegate the control of a UTXO (the value input) to another UTXO (the control input). This two-input transaction is similar to the TP protocol&amp;#39;s Commitment, HTLC-refund and HTLC-payment transactions, but differs in that its value input does not require a multi-sig, so the delegation can be revoked by the delegator via a double-spend.&lt;br/&gt;&lt;br/&gt;The idea of using separate value and control transactions was presented by Law in the update-forest and challenge-and-response protocols [4], but those protocols were for channel factories as opposed to channels, and they assumed a change to the underlying Bitcoin protocol.&lt;br/&gt;&lt;br/&gt;Conclusions&lt;br/&gt;===========&lt;br/&gt;&lt;br/&gt;This paper presents a new channel protocol that allows one to select the penalty for putting an old transaction on-chain. In addition, it reduces the storage costs for untrusted watchtowers from O(S) to O(log S), where S is the number of channel states supported. A recent paper presented a channel protocol that is watchtower-free for casual users [5] and similar techniques could be used to make the TP protocol watchtower-free for such users. However, the TP protocol is not suitable for them as it can require that users submit their Commitment transaction at a specific time weeks or months after the expiry of an HTLC.&lt;br/&gt;&lt;br/&gt;The TP protocol achieves tunable penalties and logarithmic storage for watchtowers by using separate value and control transactions. As will be shown in the next posts, protocols that use separate value and control transaction and have a structure similar to the TP protocol can also be used to create factory-optimized channels and efficient channel factories.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John&lt;br/&gt;&lt;br/&gt;References&lt;br/&gt;==========&lt;br/&gt;&lt;br/&gt;[1] Poon and Dryja, &amp;#34;The Bitcoin Lightning Network&amp;#34;, available at &lt;a href=&#34;https://lightning.network/lightning-network-paper.pdf&#34;&gt;https://lightning.network/lightning-network-paper.pdf&lt;/a&gt;.&lt;br/&gt;[2] BOLT specifications, available at &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc&#34;&gt;https://github.com/lightningnetwork/lightning-rfc&lt;/a&gt;.&lt;br/&gt;[3] Decker, &amp;#34;Re: Simulating Eltoo Factories using SCU Escrows (aka SCUE&amp;#39;d Eltoo), available at &lt;a href=&#34;https://www.mail-archive.com/lightning-dev@lists.linuxfoundation.org/msg02046.html&#34;&gt;https://www.mail-archive.com/lightning-dev@lists.linuxfoundation.org/msg02046.html&lt;/a&gt;.&lt;br/&gt;[4] Law, &amp;#34;Scaling Bitcoin With Inherited IDs&amp;#34;, available at &lt;a href=&#34;https://github.com/JohnLaw2/btc-iids&#34;&gt;https://github.com/JohnLaw2/btc-iids&lt;/a&gt;.&lt;br/&gt;[5] Law, &amp;#34;Watchtower-Free Lightning Channels For Casual Users&amp;#34;, available at &lt;a href=&#34;https://github.com/JohnLaw2/ln-watchtower-free&#34;&gt;https://github.com/JohnLaw2/ln-watchtower-free&lt;/a&gt;.&lt;br/&gt;[6] Law, &amp;#34;Lightning Channels With Tunable Penalties&amp;#34;, available at &lt;a href=&#34;https://github.com/JohnLaw2/ln-tunable-penalties&#34;&gt;https://github.com/JohnLaw2/ln-tunable-penalties&lt;/a&gt;.&lt;br/&gt;[7] Riard, &amp;#34;Using Per-Update Credential to enable Eltoo-Penalty&amp;#34; and subsequent posts in the thread starting at: &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-July/002064.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-July/002064.html&lt;/a&gt;&lt;br/&gt;[8] Rubin, &amp;#34;Delegated signatures in Bitcoin within existing rules, no fork required&amp;#34; available at &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-March/018615.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-March/018615.html&lt;/a&gt;.&lt;br/&gt;[9] Rubin, &amp;#34;Re: &amp;#39;OP_EVICT&amp;#39;: An Alternative to &amp;#39;OP_TAPLEAFUPDATEVERIFY&amp;#39;&amp;#34;, available at &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-February/019945.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-February/019945.html&lt;/a&gt;.&lt;br/&gt;[10]Russell, &amp;#34;Efficient Per-Commitment Secret Storage&amp;#34;, available at &lt;a href=&#34;https://github.com/lightning/bolts/blob/master/03-transactions.md#efficient-per-commitment-secret-storage&#34;&gt;https://github.com/lightning/bolts/blob/master/03-transactions.md#efficient-per-commitment-secret-storage&lt;/a&gt;&lt;br/&gt;[11]Sanders, &amp;#34;Re: &amp;#39;OP_EVICT&amp;#39;: An Alternative to &amp;#39;OP_TAPLEAFUPDATEVERIFY&amp;#39;&amp;#34;, available at &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-February/019947&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-February/019947&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;Sent with [Proton Mail](&lt;a href=&#34;https://proton.me/&#34;&gt;https://proton.me/&lt;/a&gt;) secure email.&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/20221030/b97aa76e/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20221030/b97aa76e/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T13:07:11Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsvm3d4wursv4kkyjwsg8grqufz7xujhrtgr9j6etrntlud4egdhxqzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzf44jsv</id>
    
      <title type="html">📅 Original date posted:2022-10-30 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsvm3d4wursv4kkyjwsg8grqufz7xujhrtgr9j6etrntlud4egdhxqzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzf44jsv" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspknu3d5ryml69q7r3q905jxqwjcpung8hzd6fdj6a3f8600336ug2sus8v&#39;&gt;nevent1q…us8v&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-10-30&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Bastien,&lt;br/&gt;&lt;br/&gt;Thanks for your detailed response.&lt;br/&gt;&lt;br/&gt;I see how the use of a pre-signed &amp;#34;splice&amp;#34; transaction that allows the dedicated user to obtain some of their capital creates an inherent trade-off between the dedicated user&amp;#39;s capital efficiency and the casual user&amp;#39;s ability to be offline for an extended period of time.&lt;br/&gt;&lt;br/&gt;In order for the use of a pre-signed splice transaction to be safe, the casual user has to check the blockchain and see the splice transaction before it can be spent by the dedicated user (in order to revoke it if needed). As a result, once the dedicated user decides to splice out some channel funds, the dedicated user cannot access those funds until some time *after* the casual user has been online (provided the protocol is trust-free).&lt;br/&gt;&lt;br/&gt;Given this observation, what if the protocol were changed so that, instead of pre-signing a splice transaction, the casual user always checks in with the dedicated user whenever they check the blockchain? At such a check-in, if the dedicated user wants to splice out some channel funds, they send the casual user a splice transaction which splices out some of the funds to the dedicated user without requiring a to_self delay. The casual user then signs the splice transaction and returns the signature as part of the check-in.&lt;br/&gt;&lt;br/&gt;This approach has a couple potential advantages:&lt;br/&gt;1) It allows the dedicated user to splice out funds as soon as the casual user comes online (rather than sometime after the casual user comes online, as shown above). Therefore, the use of capital is made more efficient.&lt;br/&gt;2) It allows the splice transaction to pay fees based on the current fee rate, rather than a pre-calculated fee rate.&lt;br/&gt;&lt;br/&gt;It does have some potential disadvantages:&lt;br/&gt;1) It requires the casual user to stay online long enough to complete the roundtrip of sending a check-in message to the dedicated user, getting the splice message to sign, signing it, and sending the signature back to the dedicated user.&lt;br/&gt;2) It assumes that the casual user checks the blockchain themselves, rather than using a watchtower service.&lt;br/&gt;3) It requires the dedicated user to decide at the time of the check-in whether or not to perform the splice, as the splice transaction cannot be revoked.&lt;br/&gt;&lt;br/&gt;In any case, using a check-in and a non-revokable splice transaction appears to have some advantages in terms of capital efficiency. It&amp;#39;s also somewhat more compatible with the WF protocol, as the delay for the dedicated user to obtain spliced-out funds is dependent on the actual time until the casual user next comes online, rather than the worst-case delay until the casual user comes online. This could be a big difference if the casual user is typically online every day, but doesn&amp;#39;t want the burden of having to be online every day (or every week). I&amp;#39;m interested in your thoughts on this.&lt;br/&gt;&lt;br/&gt;Finally, I understand that the ability to quickly splice out channel funds to improve capital efficiency is critical in the current environment. However, if we eventually get to the point where the blockchain is highly-contested and fees are high, it may no longer be worth paying the fees to put a splice transaction on-chain unless a large amount of capital is at stake for a long period of time.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John&lt;br/&gt;&lt;br/&gt;Sent with [Proton Mail](&lt;a href=&#34;https://proton.me/&#34;&gt;https://proton.me/&lt;/a&gt;) secure email.&lt;br/&gt;&lt;br/&gt;------- Original Message -------&lt;br/&gt;On Monday, October 24th, 2022 at 2:50 AM, Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi John,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; My understanding of the current Lightning protocol is that users specify a to_self_delay safety parameter which is typically about 2 weeks and that they pay for routing, but not for their partner&amp;#39;s cost-of-capital. Is that correct?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; If it is, then when a dedicated user (DLU) partners with a casual user (CLU), the DLU can only move liquidity to another Lightning channel by either:&lt;br/&gt;&amp;gt;&amp;gt; 1) getting the CLU to sign a cooperative close transaction that enables (or directly implements) the desired movement of funds, or&lt;br/&gt;&amp;gt;&amp;gt; 2) putting a non-cooperative close transaction on-chain and waiting approximately 2 weeks (based on the to_self_delay parameter set by the CLU) before moving the liquidity.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; That&amp;#39;s correct, but that&amp;#39;s something we intend to change to let LSPs&lt;br/&gt;&amp;gt; re-allocate their liquidity more frequently and more efficiently.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We don&amp;#39;t have a fully specified proposal yet, but by leveraging a&lt;br/&gt;&amp;gt; mechanism similar to splicing [1], mobile users would pre-sign a&lt;br/&gt;&amp;gt; transaction that keeps the channel open, but lets the LSP get their&lt;br/&gt;&amp;gt; balance (or part of it) out non-interactively. This would be used by&lt;br/&gt;&amp;gt; LSPs if the user isn&amp;#39;t using their channel actively enough and the LSP&lt;br/&gt;&amp;gt; is low on available liquidity for other, more active users.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This transaction would need to be revokable and must be delayed, since&lt;br/&gt;&amp;gt; we still need the user to be able to punish malicious LSPs, but ideally&lt;br/&gt;&amp;gt; (from the LSP&amp;#39;s point of view) that delay should be at most 1 week, which&lt;br/&gt;&amp;gt; forces users to regularly check the blockchain (which isn&amp;#39;t ideal).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It really is a trade-off to be able to lower the fees LSPs make users&lt;br/&gt;&amp;gt; pay for liquidity, because LSPs know they can move it cheaply when it&lt;br/&gt;&amp;gt; becomes necessary. I can see a future where users chose their trade-off:&lt;br/&gt;&amp;gt; pay more to be able to go offline for longer periods or pay less but&lt;br/&gt;&amp;gt; check the blockchain regularly. The same LSP could offer both features,&lt;br/&gt;&amp;gt; if they&amp;#39;re able to price them correctly (which isn&amp;#39;t trivial).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; My intuition is that in the long run, the cost of bitcoin capital will be very low, as it is an inherently deflationary monetary unit (and thus its value should increase with time). If this is correct, the long term cost-of-capital charges should be very low.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m not convinced by that...even though the value of capital increases&lt;br/&gt;&amp;gt; with time, liquidity providers will compete to earn more return on their&lt;br/&gt;&amp;gt; locked capital. If one liquidity provider is able to use their capital&lt;br/&gt;&amp;gt; more efficiently than another, they will be able to offer lower prices&lt;br/&gt;&amp;gt; to their customers to a point that isn&amp;#39;t economically viable for the&lt;br/&gt;&amp;gt; other, less efficient liquidity provider?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Since lightning doesn&amp;#39;t allow any form of fractional reserve, the total&lt;br/&gt;&amp;gt; available capital needs to be split between all existing users of the&lt;br/&gt;&amp;gt; system, which is very inconvenient when trying to onboard a high number&lt;br/&gt;&amp;gt; of new users.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is very theoretical though, I have absolutely no idea how those&lt;br/&gt;&amp;gt; dynamics will actually play out, but it will be interesting to watch it&lt;br/&gt;&amp;gt; unfold.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; Bastien&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1] &lt;a href=&#34;https://github.com/lightning/bolts/pull/863&#34;&gt;https://github.com/lightning/bolts/pull/863&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Le mer. 12 oct. 2022 à 02:11, jlspc &amp;lt;jlspc at protonmail.com&amp;gt; a écrit :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Hey Bastien,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thanks for your reply.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Responses are in-line below:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Hey John,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Thanks for sharing, this is very interesting.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; There is a good insight here that we can remove the intermediate&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; HTLC-timeout transaction for outgoing payments because we are the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; origin of that payment (and thus don&amp;#39;t need to quickly claim the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; HTLC on-chain to then relay that failure to a matching incoming HTLC).&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; More generally, you have perfectly identified that most of the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; complexity of today&amp;#39;s transactions come from the need to ensure that&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; a failing/malicious downstream channel doesn&amp;#39;t negatively impact&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; honest upstream channels when relaying payments, and that some of this&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; complexity can be lifted when nodes don&amp;#39;t relay payments.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thanks!&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; However, my main criticism of your proposal is that liquidity isn&amp;#39;t free.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; While your improvements are great from the CLU&amp;#39;s point of view, I&amp;#39;m not&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; sure they&amp;#39;re acceptable for the DLU. The main (probably only) job of an&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; LSP (DLU in your terminology) is to efficiently allocate their liquidity.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; In order to do so, they must be able to quickly move liquidity from where&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; it&amp;#39;s unused to where it may be better used. That means closely watching&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; the demand for block space and doing on-chain transactions when fees are&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; low (to open/close channels, splice funds in/out [1], make peer swaps [2],&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; etc). With your proposal, DLUs won&amp;#39;t be able to quickly move liquidity&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; around, so the only way to make up for this is to charge the CLU for the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; loss of expected revenue. I&amp;#39;m afraid that the amount DLUs would need to&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; charge CLUs will be prohibitively expensive for most CLUs.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; I&amp;#39;m curious to get your feedback on that point.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I really appreciate your insight here. I&amp;#39;m just an interested observer who doesn&amp;#39;t have experience with creating and deploying Lightning nodes, so I&amp;#39;m sure you have a better understanding of the current costs and trade-offs than I do.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; My understanding of the current Lightning protocol is that users specify a to_self_delay safety parameter which is typically about 2 weeks and that they pay for routing, but not for their partner&amp;#39;s cost-of-capital. Is that correct?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; If it is, then when a dedicated user (DLU) partners with a casual user (CLU), the DLU can only move liquidity to another Lightning channel by either:&lt;br/&gt;&amp;gt;&amp;gt; 1) getting the CLU to sign a cooperative close transaction that enables (or directly implements) the desired movement of funds, or&lt;br/&gt;&amp;gt;&amp;gt; 2) putting a non-cooperative close transaction on-chain and waiting approximately 2 weeks (based on the to_self_delay parameter set by the CLU) before moving the liquidity.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; In contrast, with the Watchtower-Free (WF) protocol, the DLU could only move liquidity to another Lightning channel by either:&lt;br/&gt;&amp;gt;&amp;gt; 1) getting the CLU to sign a cooperative close transaction that enables (or directly implements), the desired movement of funds, or&lt;br/&gt;&amp;gt;&amp;gt; 2) putting a non-cooperative close transaction on-chain and waiting approximately 1-3 months (based on the I_L parameter set by the CLU) before moving the liquidity.&lt;br/&gt;&amp;gt;&amp;gt; In case 1), it would make sense for the DLU to refund the remaining portion of CLU&amp;#39;s cost-of-capital pre-payment to the CLU, as that capital is now being made available to the DLU. This was not proposed in the paper, but it should probably be added.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; With this change (namely refunding the remainder of the cost-of-capital pre-payment), it seems like the only disadvantage of the WF protocol to the DLU is the larger delay (1-3 months vs. 2 weeks). Do you feel increasing the delay from 2 weeks to 1 month is prohibitive?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; My intuition is that in the long run, the cost of bitcoin capital will be very low, as it is an inherently deflationary monetary unit (and thus its value should increase with time). If this is correct, the long term cost-of-capital charges should be very low.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; What are your thoughts on this?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thanks,&lt;br/&gt;&amp;gt;&amp;gt; John&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Thanks again for sharing, and for the inherited IDs [3] proposal as well!&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Bastien&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; [1] &amp;lt;a href=&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://github.com/lightning/bolts/pull/863&#34;&gt;https://github.com/lightning/bolts/pull/863&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;#34;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://github.com/lightning/bolts/pull/863&#34;&gt;https://github.com/lightning/bolts/pull/863&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;lt;/a&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; [2] &amp;lt;a href=&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://www.peerswap.dev/&#34;&gt;https://www.peerswap.dev/&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;#34;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://www.peerswap.dev/&#34;&gt;https://www.peerswap.dev/&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;lt;/a&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; [3] &amp;lt;a href=&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://github.com/JohnLaw2/btc-iids&#34;&gt;https://github.com/JohnLaw2/btc-iids&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;#34;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://github.com/JohnLaw2/btc-iids&#34;&gt;https://github.com/JohnLaw2/btc-iids&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;lt;/a&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Sent with [Proton Mail](&lt;a href=&#34;https://proton.me/&#34;&gt;https://proton.me/&lt;/a&gt;) secure email.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;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/20221031/06378968/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20221031/06378968/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T13:07:01Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsrjz7t9aqrwmqg2ypc8fs83q32d0w7e07zd0t9lexsu05j6n7ngcgzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzs969qx</id>
    
      <title type="html">📅 Original date posted:2022-10-11 📝 Original message: Hey ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsrjz7t9aqrwmqg2ypc8fs83q32d0w7e07zd0t9lexsu05j6n7ngcgzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzs969qx" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspazvcp0tdxuut2k9s8vs3hmtmckuy8sf03xyd4ert8g7z4nxwftsn5k85c&#39;&gt;nevent1q…k85c&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-10-11&lt;br/&gt;📝 Original message:&lt;br/&gt;Hey Bastien,&lt;br/&gt;&lt;br/&gt;Thanks for your reply.&lt;br/&gt;&lt;br/&gt;Responses are in-line below:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hey John,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks for sharing, this is very interesting.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There is a good insight here that we can remove the intermediate&lt;br/&gt;&amp;gt; HTLC-timeout transaction for outgoing payments because we are the&lt;br/&gt;&amp;gt; origin of that payment (and thus don&amp;#39;t need to quickly claim the&lt;br/&gt;&amp;gt; HTLC on-chain to then relay that failure to a matching incoming HTLC).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; More generally, you have perfectly identified that most of the&lt;br/&gt;&amp;gt; complexity of today&amp;#39;s transactions come from the need to ensure that&lt;br/&gt;&amp;gt; a failing/malicious downstream channel doesn&amp;#39;t negatively impact&lt;br/&gt;&amp;gt; honest upstream channels when relaying payments, and that some of this&lt;br/&gt;&amp;gt; complexity can be lifted when nodes don&amp;#39;t relay payments.&lt;br/&gt;&lt;br/&gt;Thanks!&lt;br/&gt;&lt;br/&gt;&amp;gt; However, my main criticism of your proposal is that liquidity isn&amp;#39;t free.&lt;br/&gt;&amp;gt; While your improvements are great from the CLU&amp;#39;s point of view, I&amp;#39;m not&lt;br/&gt;&amp;gt; sure they&amp;#39;re acceptable for the DLU. The main (probably only) job of an&lt;br/&gt;&amp;gt; LSP (DLU in your terminology) is to efficiently allocate their liquidity.&lt;br/&gt;&amp;gt; In order to do so, they must be able to quickly move liquidity from where&lt;br/&gt;&amp;gt; it&amp;#39;s unused to where it may be better used. That means closely watching&lt;br/&gt;&amp;gt; the demand for block space and doing on-chain transactions when fees are&lt;br/&gt;&amp;gt; low (to open/close channels, splice funds in/out [1], make peer swaps [2],&lt;br/&gt;&amp;gt; etc). With your proposal, DLUs won&amp;#39;t be able to quickly move liquidity&lt;br/&gt;&amp;gt; around, so the only way to make up for this is to charge the CLU for the&lt;br/&gt;&amp;gt; loss of expected revenue. I&amp;#39;m afraid that the amount DLUs would need to&lt;br/&gt;&amp;gt; charge CLUs will be prohibitively expensive for most CLUs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m curious to get your feedback on that point.&lt;br/&gt;&lt;br/&gt;I really appreciate your insight here. I&amp;#39;m just an interested observer who doesn&amp;#39;t have experience with creating and deploying Lightning nodes, so I&amp;#39;m sure you have a better understanding of the current costs and trade-offs than I do.&lt;br/&gt;&lt;br/&gt;My understanding of the current Lightning protocol is that users specify a to_self_delay safety parameter which is typically about 2 weeks and that they pay for routing, but not for their partner&amp;#39;s cost-of-capital. Is that correct?&lt;br/&gt;&lt;br/&gt;If it is, then when a dedicated user (DLU) partners with a casual user (CLU), the DLU can only move liquidity to another Lightning channel by either:&lt;br/&gt;1) getting the CLU to sign a cooperative close transaction that enables (or directly implements) the desired movement of funds, or&lt;br/&gt;2) putting a non-cooperative close transaction on-chain and waiting approximately 2 weeks (based on the to_self_delay parameter set by the CLU) before moving the liquidity.&lt;br/&gt;&lt;br/&gt;In contrast, with the Watchtower-Free (WF) protocol, the DLU could only move liquidity to another Lightning channel by either:&lt;br/&gt;1) getting the CLU to sign a cooperative close transaction that enables (or directly implements), the desired movement of funds, or&lt;br/&gt;2) putting a non-cooperative close transaction on-chain and waiting approximately 1-3 months (based on the I_L parameter set by the CLU) before moving the liquidity.&lt;br/&gt;In case 1), it would make sense for the DLU to refund the remaining portion of CLU&amp;#39;s cost-of-capital pre-payment to the CLU, as that capital is now being made available to the DLU. This was not proposed in the paper, but it should probably be added.&lt;br/&gt;&lt;br/&gt;With this change (namely refunding the remainder of the cost-of-capital pre-payment), it seems like the only disadvantage of the WF protocol to the DLU is the larger delay (1-3 months vs. 2 weeks). Do you feel increasing the delay from 2 weeks to 1 month is prohibitive?&lt;br/&gt;&lt;br/&gt;My intuition is that in the long run, the cost of bitcoin capital will be very low, as it is an inherently deflationary monetary unit (and thus its value should increase with time). If this is correct, the long term cost-of-capital charges should be very low.&lt;br/&gt;&lt;br/&gt;What are your thoughts on this?&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;John&lt;br/&gt;&lt;br/&gt;&amp;gt; Thanks again for sharing, and for the inherited IDs [3] proposal as well!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Bastien&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1] &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://github.com/lightning/bolts/pull/863&amp;#34;&amp;gt;https://github.com/lightning/bolts/pull/863&amp;lt;/a&amp;gt&#34;&gt;https://github.com/lightning/bolts/pull/863&amp;#34;&amp;gt;https://github.com/lightning/bolts/pull/863&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt; [2] &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://www.peerswap.dev/&amp;#34;&amp;gt;https://www.peerswap.dev/&amp;lt;/a&amp;gt&#34;&gt;https://www.peerswap.dev/&amp;#34;&amp;gt;https://www.peerswap.dev/&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt; [3] &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://github.com/JohnLaw2/btc-iids&amp;#34;&amp;gt;https://github.com/JohnLaw2/btc-iids&amp;lt;/a&amp;gt&#34;&gt;https://github.com/JohnLaw2/btc-iids&amp;#34;&amp;gt;https://github.com/JohnLaw2/btc-iids&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&lt;br/&gt;Sent with [Proton Mail](&lt;a href=&#34;https://proton.me/&#34;&gt;https://proton.me/&lt;/a&gt;) secure email.&lt;br/&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/20221012/f0ea0daa/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20221012/f0ea0daa/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T13:07:00Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsql64ctzkjnnz5cmmcxy3e9g9uwfxatzqjpkj025xhztju3j3t7rszyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gz32ln9n</id>
    
      <title type="html">📅 Original date posted:2022-10-11 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsql64ctzkjnnz5cmmcxy3e9g9uwfxatzqjpkj025xhztju3j3t7rszyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gz32ln9n" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsw6c8z8l0qke5wwv9szy3kzyt3z05x9t5pat8d6a8rm80079ac2nqttah68&#39;&gt;nevent1q…ah68&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-10-11&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Dave,&lt;br/&gt;&lt;br/&gt;Thanks for reading and for doing a better job of explaining the ideas than I did!&lt;br/&gt;&lt;br/&gt;Responses are in-line below:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi John,&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; I had difficulty understanding your proposal description here and in &lt;br/&gt;&amp;gt; your paper[1].  I wonder if others are having the same the same &lt;br/&gt;&amp;gt; difficulty, so I&amp;#39;ve tried to reduce it down to just the essential idea &lt;br/&gt;&amp;gt; so you can tell me if I&amp;#39;m understanding correctly and others can &lt;br/&gt;&amp;gt; evaluate it more quickly.  Here I go:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; In a traditional HTLC, the agreement is essentially:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - Setup: Alice has x BTC, an unpublished value y, and the hash digest z &lt;br/&gt;&amp;gt; which is hash(y)&lt;br/&gt;&amp;gt; - HTLC success: Alice offers Bob the x BTC, which he can claim at any &lt;br/&gt;&amp;gt; time if he publishes y satisfying the equation hash(y) == z&lt;br/&gt;&amp;gt; - HTLC failure: Alice can spend the x BTC back to her wallet after some &lt;br/&gt;&amp;gt; time t has elapsed&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; If I understand your modified protocol correctly, the essential modified &lt;br/&gt;&amp;gt; agreement is:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - [Setup the same]&lt;br/&gt;&amp;gt; - [HTLC success the same]&lt;br/&gt;&amp;gt; - HTLC failure: Alice can spend the x BTC back to her wallet by first &lt;br/&gt;&amp;gt; getting a trigger[2] transaction confirmed onchain, waiting b blocks, &lt;br/&gt;&amp;gt; then getting the actual spend-back-to-wallet transaction confirmed&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Because the trigger transaction needs to be confirmed for b blocks &lt;br/&gt;&amp;gt; before Alice can can spend the money back to her wallet, Bob doesn&amp;#39;t &lt;br/&gt;&amp;gt; need to take any action to lock-in an HTLC Success unless he sees the &lt;br/&gt;&amp;gt; trigger transaction appear onchain or he expects to be offline for more &lt;br/&gt;&amp;gt; than b blocks.  This allows Alice to stay offline for as long as Bob can &lt;br/&gt;&amp;gt; tolerate (which goes towards your point of Alice prepaying Bob for that &lt;br/&gt;&amp;gt; tolerance).&lt;br/&gt;&lt;br/&gt;Yes, that&amp;#39;s exactly right.&lt;br/&gt;&lt;br/&gt;I&amp;#39;d note that the transaction that plays the role of the &amp;#34;trigger&amp;#34; transaction is actually just Alice&amp;#39;s Commitment transaction, so no new transaction is required.&lt;br/&gt;&lt;br/&gt;I&amp;#39;d also note that the parameter &amp;#34;b&amp;#34; is exactly Bob&amp;#39;s to_self_delay parameter and he has already committed himself to being able to respond to Alice&amp;#39;s on-chain transactions within a window of b blocks, so the protocol doesn&amp;#39;t put any additional requirements on his monitoring of the blockchain.&lt;br/&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; [1] &lt;br/&gt;&amp;gt; &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://raw.githubusercontent.com/JohnLaw2/ln-watchtower-free/main/watchtowerfree10.pdf&amp;#34;&amp;gt;https://raw.githubusercontent.com/JohnLaw2/ln-watchtower-free/main/watchtowerfree10.pdf&amp;lt;/a&amp;gt&#34;&gt;https://raw.githubusercontent.com/JohnLaw2/ln-watchtower-free/main/watchtowerfree10.pdf&amp;#34;&amp;gt;https://raw.githubusercontent.com/JohnLaw2/ln-watchtower-free/main/watchtowerfree10.pdf&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt; [2] &amp;#34;Trigger&amp;#34; transaction is the name given to that type of transaction &lt;br/&gt;&amp;gt; in section 4.2 of the Eltoo paper: &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://blockstream.com/eltoo.pdf&amp;#34;&amp;gt;https://blockstream.com/eltoo.pdf&amp;lt;/a&amp;gt&#34;&gt;https://blockstream.com/eltoo.pdf&amp;#34;&amp;gt;https://blockstream.com/eltoo.pdf&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; One-Shot Receives&lt;br/&gt;&amp;gt; &amp;gt; =================&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; I understand the essence of this idea to be simply encumbering dedicated &lt;br/&gt;&amp;gt; user Bob&amp;#39;s commitment transaction with a timelock so that he can&amp;#39;t &lt;br/&gt;&amp;gt; publish it until near the time when any HTLCs in it would expire.  &lt;br/&gt;&amp;gt; Alice&amp;#39;s version of commitment would be unencumbered, so she could &lt;br/&gt;&amp;gt; publish it any time.&lt;br/&gt;&lt;br/&gt;Yes, that&amp;#39;s correct.&lt;br/&gt;&lt;br/&gt;In particular, dedicated user Bob can&amp;#39;t publish his current Commitment transaction until Alice has put her conflicting current Commitment transaction on-chain (assuming she follows the protocol) or both parties have updated the state off-chain. As a result, Alice doesn&amp;#39;t have to worry about the case where she submits her current Commitment and HTLC-success transactions only to later discover that Bob&amp;#39;s current Commitment transaction has won the race, thus forcing Alice to then submit her transaction (which is like an HTLC-success transaction but isn&amp;#39;t actually called that in the protocol) which reveals the hash preimage and takes payment of the HTLC. Forcing Alice to wait around to see who&amp;#39;s current Commitment transaction has won the race seems like an inconvenient requirement for a casual user.&lt;br/&gt;&lt;br/&gt;Is my understanding of this issue correct, or can Alice submit her transaction spending the HTLC output of Bob&amp;#39;s current Commitment transaction even before he has submitted his current Commitment transaction? I realize this part of the protocol depends on node relay behavior, so it&amp;#39;s harder to nail down and reason about than the consensus portion of the protocol. I may not have the correct understanding here, and if my understanding isn&amp;#39;t correct, I&amp;#39;d really like to fix it.&lt;br/&gt;&lt;br/&gt;&amp;gt; Although your proposal may address this in the normal case, I think it &lt;br/&gt;&amp;gt; doesn&amp;#39;t address the pathological case where honest casual user Alice &lt;br/&gt;&amp;gt; broadcasts the latest commitment transaction but her channel partner, &lt;br/&gt;&amp;gt; malicious dedicated user Mallory, broadcasts an older revoked commitment &lt;br/&gt;&amp;gt; transaction.  Because Mallory&amp;#39;s revoked commitment transaction is older, &lt;br/&gt;&amp;gt; its timelock has expired, so it can win the race against Alice&amp;#39;s latest &lt;br/&gt;&amp;gt; commitment transaction.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; To become aware of this situation and to broadcast a penalty transaction &lt;br/&gt;&amp;gt; within the necessary time limit, Alice still needs to monitor the block &lt;br/&gt;&amp;gt; chain.  If Alice still needs to monitor the block chain in any case, &lt;br/&gt;&amp;gt; this proposed change doesn&amp;#39;t eliminate the underlying problem of onerous &lt;br/&gt;&amp;gt; monitoring as far as I can tell.&lt;br/&gt;&lt;br/&gt;You&amp;#39;re right that Bob (or Mallory) could still broadcast an older revoked transaction, and if that happens, Alice needs to broadcast a penalty transaction within her long interval (I_L) safety parameter which I was suggesting she could set to something like 1-3 months. I felt that being able to shut off her phone and not worry about the Lightning app for all but a short time (say 10 minutes) every few months wasn&amp;#39;t overly onerous. Do you feel that casual users wouldn&amp;#39;t see it that way?&lt;br/&gt;&lt;br/&gt;The issue of how often Alice needs to monitor the blockchain is based on her setting of her I_L parameter and is really independent of her ability to perform one-shot receives. My understanding is that in the current Lightning protocol, if Alice is receiving a payment and she gives the payment&amp;#39;s secret to her partner Bob, and if Bob fails to update the channel state to reflect the payment, Alice has to 1) submit her Commitment and HTLC-success transactions, 2) wait to see if her current Commitment transaction or Bob&amp;#39;s current Commitment transaction won the race, and if Bob&amp;#39;s current Commitment transaction won, 3) submit her transaction spending Bob&amp;#39;s current Commitment transaction&amp;#39;s HTLC output. The protocol that supports one-shot receives eliminates steps 2) and 3) above, which seems like a better user interface.&lt;br/&gt;&lt;br/&gt;Does that make sense?&lt;br/&gt;&lt;br/&gt;Many thanks,&lt;br/&gt;John&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Sent with Proton Mail secure email.
    </content>
    <updated>2023-06-09T13:06:59Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqsfp8czrfgqy4sz33l9z765ws20ku99uc88hjmfhcsx0erwdrenrnszyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzhgs960</id>
    
      <title type="html">📅 Original date posted:2022-10-03 📝 Original message: This ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqsfp8czrfgqy4sz33l9z765ws20ku99uc88hjmfhcsx0erwdrenrnszyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzhgs960" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszya43ulzvqg3qtg5x4626qd3acarhcm96n8arpwrvzedwc2fdstc2h07fc&#39;&gt;nevent1q…07fc&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-10-03&lt;br/&gt;📝 Original message:&lt;br/&gt;This is the first in a series of posts on ideas to improve the usability&lt;br/&gt;and scalability of the Lightning Network. This post presents a new channel&lt;br/&gt;protocol that allows casual users to send and receive Lightning payments&lt;br/&gt;without having to meet onerous availability requirements or use a&lt;br/&gt;watchtower service. This new Watchtower-Free (WF) protocol can also be&lt;br/&gt;used to simplify the reception of Lightning payments for casual users. No&lt;br/&gt;change to the underlying Bitcoin protocol is required.&lt;br/&gt;&lt;br/&gt;A paper with a more complete description of the protocol, including&lt;br/&gt;figures, is available [5].&lt;br/&gt;&lt;br/&gt;Properties&lt;br/&gt;==========&lt;br/&gt;&lt;br/&gt;The user-visible properties of the WF protocol can be expressed using&lt;br/&gt;two parameters:&lt;br/&gt;* I_S: a short time interval (e.g., 10 minutes) for communicating with&lt;br/&gt;  peers, checking the blockchain, and submitting transactions to the&lt;br/&gt;  blockchain, and&lt;br/&gt;* I_L: a long time interval (e.g., 1-3 months).&lt;br/&gt;&lt;br/&gt;The casual user must be online for up to:&lt;br/&gt;* I_S every I_L (e.g., 10 minutes every 1-3 months) to safeguard the funds&lt;br/&gt;  in their Lightning channel.&lt;br/&gt;&lt;br/&gt;With the WF protocol, the latency for payments is unchanged from the&lt;br/&gt;current protocol, but the latency for getting a payment receipt from an&lt;br/&gt;uncooperative channel partner is increased. In addition, the casual user&lt;br/&gt;may have to pay their channel partner for the partner&amp;#39;s cost of capital&lt;br/&gt;(which depends on I_L). If the casual user and their channel partner&lt;br/&gt;follow the protocol, the channel can remain off-chain arbitrarily long.&lt;br/&gt;&lt;br/&gt;First Attempt: Use The Current Lightning Protocol&lt;br/&gt;=================================================&lt;br/&gt;&lt;br/&gt;In order to motivate the new protocol, first consider what would happen if&lt;br/&gt;a casual user attempted to achieve the above properties with the current&lt;br/&gt;Lightning channel protocol. The casual user would set their&lt;br/&gt;&amp;#34;to_self_delay&amp;#34; (which controls how quickly their channel partner can&lt;br/&gt;receive funds from a transaction they put on-chain) and&lt;br/&gt;&amp;#34;cltv_expiry_delta&amp;#34; (which controls the staggering of timeouts between&lt;br/&gt;successive hops) parameters to values approaching I_L (because the casual&lt;br/&gt;user could be unavailable for nearly that long). This would create three&lt;br/&gt;problems:&lt;br/&gt;&lt;br/&gt;* Problem 1: The casual user&amp;#39;s proposed channel partner would likely&lt;br/&gt;  reject the creation of the channel due to the excessive &amp;#34;to_self_delay&amp;#34;&lt;br/&gt;  value.&lt;br/&gt;&lt;br/&gt;* Problem 2: If a channel were created with these parameters, Lightning&lt;br/&gt;  payments would not be routed through it due to the excessive&lt;br/&gt;  &amp;#34;cltv_expiry_delta&amp;#34; value.&lt;br/&gt;&lt;br/&gt;* Problem 3: If a channel were created with these parameters and if the&lt;br/&gt;  casual user sent a payment on that channel, their partner could have to&lt;br/&gt;  go on-chain in order to pull the payment from the casual user. In&lt;br/&gt;  particular, the casual user could be offline for nearly I_L (e.g., 1-3&lt;br/&gt;  months) when their partner receives the receipt, thus forcing their&lt;br/&gt;  partner to go on-chain to receive payment before the expiry of the&lt;br/&gt;  associated HTLC.&lt;br/&gt;&lt;br/&gt;The WF Protocol&lt;br/&gt;===============&lt;br/&gt;&lt;br/&gt;The WF protocol solves these problems by modifying the Lightning protocol&lt;br/&gt;as follows:&lt;br/&gt;&lt;br/&gt;* Problem 1 is solved by having the casual user pre-pay their channel&lt;br/&gt;  partner for the cost of the partner&amp;#39;s capital that&amp;#39;s tied up in the&lt;br/&gt;  channel due to the very large &amp;#34;to_self_delay&amp;#34; value. This pre-payment is&lt;br/&gt;  included in the initial channel state and is updated at least once every&lt;br/&gt;  I_L to reflect the additional cost of capital due to the partner not yet&lt;br/&gt;  going on-chain.&lt;br/&gt;&lt;br/&gt;* Problem 2 is solved by allowing casual users to designate themselves as&lt;br/&gt;  Casual-Lightning-Users (CLUs), while the remaining users are&lt;br/&gt;  Dedicated-Lightning-Users (DLUs). CLUs can only partner with DLUs to&lt;br/&gt;  open channels, such channels must be unannounced, and CLUs must not&lt;br/&gt;  route (as opposed to send or receive) payments. These constraints fit&lt;br/&gt;  naturally with the desires of casual users who want to send and receive&lt;br/&gt;  their Lightning payments, but not route payments for others. Support for&lt;br/&gt;  CLUs is analogous to support for SPV (Simplified-Payment-Verification)&lt;br/&gt;  nodes in Bitcoin.&lt;br/&gt;&lt;br/&gt;* Problem 3 is solved by modifying both users&amp;#39; Commitment transactions in&lt;br/&gt;  the channel that sends the payment so the CLU can be offline for nearly&lt;br/&gt;  I_L without forcing their DLU partner to go on-chain. A simple approach&lt;br/&gt;  would be to delay the expiry of the HTLC for each payment in the sending&lt;br/&gt;  channel by I_L. This approach works, but it has the downside of delaying&lt;br/&gt;  (by I_L) the CLU&amp;#39;s ability to force production of a payment receipt. A&lt;br/&gt;  better approach is to add a relative delay before the CLU can time out&lt;br/&gt;  the HTLC output of a Commitment transaction, thus enabling the DLU to&lt;br/&gt;  safely stay off-chain even after the expiry of the HTLC. That&amp;#39;s the&lt;br/&gt;  approach taken here.&lt;br/&gt;&lt;br/&gt;Let Alice be a CLU who shares a channel with DLU Bob. Bob sets his channel&lt;br/&gt;parameters as he would in the current Lightning protocol, while Alice sets&lt;br/&gt;her &amp;#34;to_self_delay&amp;#34; parameter (controlling Bob&amp;#39;s payments to himself) to&lt;br/&gt;I_L greater than it would be in the current Lightning protocol. Consider&lt;br/&gt;the case where Alice sends a Lightning payment on the channel she shares&lt;br/&gt;with Bob.&lt;br/&gt;&lt;br/&gt;Let:&lt;br/&gt;  - eAB denote the expiry for this payment in the channel shared by Alice&lt;br/&gt;    and Bob,&lt;br/&gt;  - tsdA denote the &amp;#34;to_self_delay&amp;#34; parameter set by Alice, and&lt;br/&gt;  - tsdB denote the &amp;#34;to_self_delay&amp;#34; parameter set by Bob.&lt;br/&gt;&lt;br/&gt;Three changes are made relative to the current Lightning protocol:&lt;br/&gt;  - a relative delay of tsdB is enforced before Alice can spend the HTLC&lt;br/&gt;    output for this payment in either Commitment transaction,&lt;br/&gt;  - after eAB, only Alice&amp;#39;s (rather than both parties&amp;#39;) signature is&lt;br/&gt;    required to spend the HTLC output in Alice&amp;#39;s Commitment transaction,&lt;br/&gt;    and that output doesn&amp;#39;t need to be spent using an HTLC-timeout&lt;br/&gt;    transaction that can be revoked (because the relative delay added&lt;br/&gt;    above guarantees Bob can prevent Alice from spending the HTLC output&lt;br/&gt;    in a revoked Commitment transaction that she puts on-chain), and&lt;br/&gt;  - both parties update the channel state off-chain at least once every&lt;br/&gt;    I_L to reflect Bob&amp;#39;s cost of capital, as described above.&lt;br/&gt;&lt;br/&gt;The resulting protocol, with a single payment from Alice outstanding, is&lt;br/&gt;shown below:&lt;br/&gt;&lt;br/&gt;&#43;-&#43; AB      &#43;----&#43; A&lt;br/&gt;|F|----&#43;---&amp;gt;| CC |---&amp;gt;&lt;br/&gt;&#43;-&#43;    |    |    |&lt;br/&gt;       .    |    | B&lt;br/&gt;       .    |    |---&amp;gt;&lt;br/&gt;       .    &#43;----&#43;&lt;br/&gt;       |&lt;br/&gt;       |&lt;br/&gt;       |              revkeyBi&lt;br/&gt;       |            &#43;----------&amp;gt;&lt;br/&gt;       |            |&lt;br/&gt;       |    &#43;----&#43;  | tsdB &amp;amp; A&lt;br/&gt;       &#43;---&amp;gt;|C_Ai|--&#43;----------&amp;gt;&lt;br/&gt;       |    |    |&lt;br/&gt;       |    |    |    B&lt;br/&gt;       |    |    |-------------&amp;gt;&lt;br/&gt;       |    |    |&lt;br/&gt;       |    |    |    revkeyBi&lt;br/&gt;       |    |    |  &#43;----------&amp;gt;&lt;br/&gt;       |    |    |  |&lt;br/&gt;       |    |    |  | tsdB &amp;amp; (eAB) &amp;amp; A&lt;br/&gt;       |    |    |--&#43;-------------------&amp;gt;&lt;br/&gt;       |    &#43;----&#43;  |&lt;br/&gt;       |            | Preimage(X) &amp;amp; B&lt;br/&gt;       |            &#43;-------------------&amp;gt;&lt;br/&gt;       |&lt;br/&gt;       |&lt;br/&gt;       |&lt;br/&gt;       |              revkeyAi&lt;br/&gt;       |            &#43;----------&amp;gt;&lt;br/&gt;       |            |&lt;br/&gt;       |    &#43;----&#43;  | tsdA &amp;amp; B&lt;br/&gt;       &#43;---&amp;gt;|C_Bi|--&#43;----------&amp;gt;&lt;br/&gt;       |    |    |&lt;br/&gt;       |    |    |    A&lt;br/&gt;       |    |    |-------------&amp;gt;&lt;br/&gt;       |    |    |&lt;br/&gt;       |    |    |    revkeyAi&lt;br/&gt;       |    |    |  &#43;----------&amp;gt;&lt;br/&gt;       .    |    |  |&lt;br/&gt;       .    |    |  | tsdB &amp;amp; (eAB) &amp;amp; A              revkeyAi&lt;br/&gt;       .    |    |--&#43;-------------------&amp;gt;         &#43;----------&amp;gt;&lt;br/&gt;       |    &#43;----&#43;  |                             |&lt;br/&gt;       |            | Preimage(X) &amp;amp; AB   &#43;-----&#43;  | tsdA &amp;amp; B&lt;br/&gt;       V            &#43;-------------------&amp;gt;|Hs_Bi|--&#43;----------&amp;gt;&lt;br/&gt;                                         &#43;-----&#43;&lt;br/&gt;&lt;br/&gt;where:&lt;br/&gt;F is the Funding transaction,&lt;br/&gt;CC is the Cooperative Close transaction,&lt;br/&gt;C_Ai is Alice&amp;#39;s Commitment transaction for state i,&lt;br/&gt;C_Bi is Bob&amp;#39;s Commitment transaction for state i, and&lt;br/&gt;Hs_Bi is Bob&amp;#39;s HTLC-success transaction for state i.&lt;br/&gt;&lt;br/&gt;The F transaction is on-chain, while the remaining transactions are&lt;br/&gt;off-chain during normal protocol operation.&lt;br/&gt;&lt;br/&gt;Requirements for output cases are as follows:&lt;br/&gt;A: Alice&amp;#39;s signature,&lt;br/&gt;B: Bob&amp;#39;s signature,&lt;br/&gt;AB: Alice&amp;#39;s and Bob&amp;#39;s signatures,&lt;br/&gt;revkeyAi: a signature using a revocation key that Alice can use to revoke&lt;br/&gt;          Bob&amp;#39;s state i transaction,&lt;br/&gt;revkeyBi: a signature using a revocation key that Bob can use to revoke&lt;br/&gt;          Alice&amp;#39;s state i transaction,&lt;br/&gt;tsdA: a relative delay equal to Alice&amp;#39;s to_self_delay parameter,&lt;br/&gt;tsdB: a relative delay equal to Bob&amp;#39;s to_self_delay parameter,&lt;br/&gt;(eAB): an absolute timelock equal to the expiry of the outstanding HTLC&lt;br/&gt;       offered by Alice, and&lt;br/&gt;Preimage(X): the hash preimage of X.&lt;br/&gt;&lt;br/&gt;Once Bob knows Preimage(X), he sends Preimage(X) to Alice and attempts to&lt;br/&gt;update both parties&amp;#39; Commitment transactions to show payment of the HTLC.&lt;br/&gt;If he has spent I_L time unsuccessfully trying to update those Commitment&lt;br/&gt;transactions, he can submit his Commitment and HTLC-success transactions&lt;br/&gt;to the blockchain. If at any point he sees Alice&amp;#39;s Commitment transaction&lt;br/&gt;on-chain, he stops trying to update the Commitment transactions off-chain&lt;br/&gt;and he puts his transaction that reveals Preimage(X) and spends the HTLC&lt;br/&gt;output in her Commitment transaction on-chain as soon as possible.&lt;br/&gt;&lt;br/&gt;Alice implements the WF channel protocol as she would the current&lt;br/&gt;Lightning channel protocol, except:&lt;br/&gt; - she can choose to be intentionally unavailable, provided she is&lt;br/&gt;   available (or at least not intentionally unavailable) for at least I_S&lt;br/&gt;   every I_L (to update her pre-payment for Bob&amp;#39;s cost of capital and to&lt;br/&gt;   revoke any old transactions put on-chain by Bob), and&lt;br/&gt; - she does not put her Commitment transaction on-chain until she has&lt;br/&gt;   been available (or at least not intentionally unavailable) for at least&lt;br/&gt;   a grace period of G following the expiry of her offered HTLC (where G&lt;br/&gt;   is the same grace period as is used in the current Lightning protocol&lt;br/&gt;   and G &amp;lt;= I_S).&lt;br/&gt;&lt;br/&gt;Correctness&lt;br/&gt;===========&lt;br/&gt;&lt;br/&gt;When Alice sends a payment on the channel she shares with Bob, the WF&lt;br/&gt;protocol matches the Lightning protocol except the parties stay off-chain&lt;br/&gt;longer with the WF protocol (to accommodate Alice&amp;#39;s intentional&lt;br/&gt;unavailability). Staying off-chain longer is safe for Alice, as she&lt;br/&gt;originated the payment and thus does not have to time out the HTLC at any&lt;br/&gt;specific time in order receive payment in an earlier hop. Staying&lt;br/&gt;off-chain longer is also safe for Bob, because whenever Alice&amp;#39;s (or Bob&amp;#39;s)&lt;br/&gt;Commitment transaction is put on-chain, the tsdB relative delay before&lt;br/&gt;Alice can time out the HTLC output is long enough to allow Bob to put his&lt;br/&gt;transaction on-chain that takes payment for the HTLC.&lt;br/&gt;&lt;br/&gt;Finally, the WF protocol requires that Alice and Bob stay off-chain long&lt;br/&gt;enough to guarantee that Alice will be available (or at least not&lt;br/&gt;intentionally unavailable) for at least G, which is sufficient for both&lt;br/&gt;parties to update the channel state off-chain. As a result, if both&lt;br/&gt;parties follow the protocol, the channel will remain off-chain despite&lt;br/&gt;Alice&amp;#39;s intentional unavailability.&lt;br/&gt;&lt;br/&gt;A more detailed proof of correctness is given in the paper [5].&lt;br/&gt;&lt;br/&gt;One-Shot Receives&lt;br/&gt;=================&lt;br/&gt;&lt;br/&gt;While eliminating watchtowers is helpful for casual users, the protocol&lt;br/&gt;for receiving Lightning payments could still be awkward for such users.&lt;br/&gt;With the current Lightning protocol, when a user receives a payment and&lt;br/&gt;their channel partner is unresponsive, the user must submit their&lt;br/&gt;Commitment and HTLC-success transactions to the blockchain. However, if&lt;br/&gt;their partner&amp;#39;s conflicting Commitment transaction wins the race and is&lt;br/&gt;included in the blockchain, the user then has to submit a different&lt;br/&gt;transaction that reveals the HTLC&amp;#39;s secret and spends the HTLC output in&lt;br/&gt;their partner&amp;#39;s Commitment transaction. The requirement to wait and check&lt;br/&gt;the blockchain for the winning Commitment transaction (which might not be&lt;br/&gt;determined until multiple blocks have been added to the blockchain) is&lt;br/&gt;awkward for a casual user. It would be far preferable if the casual user&lt;br/&gt;could always receive a payment by performing a sequence of off-chain&lt;br/&gt;message exchanges and at most one submission to the blockchain. A protocol&lt;br/&gt;that has this property will be said to support &amp;#34;one-shot receives&amp;#34;.&lt;br/&gt;&lt;br/&gt;The WF protocol can be made to support one-short receives (and to simplify&lt;br/&gt;the process of getting a receipt) for CLU Alice by making the following&lt;br/&gt;change whenever a new Commitment transaction for DLU Bob is signed by&lt;br/&gt;Alice:&lt;br/&gt; - if Bob has one or more outstanding HTLCs offered to Alice, the&lt;br/&gt;   nLocktime field of Bob&amp;#39;s Commitment transaction is set to the expiry of&lt;br/&gt;   the earliest such HTLC,&lt;br/&gt; - otherwise, the nLocktime field of Bob&amp;#39;s Commitment transaction is set&lt;br/&gt;   to I_L in the future (relative to when Bob&amp;#39;s Commitment transaction is&lt;br/&gt;   signed by Alice).&lt;br/&gt;&lt;br/&gt;Before examining how this change supports one-shot receives, it&amp;#39;s&lt;br/&gt;important to resolve a technical issue. In the current Lightning protocol,&lt;br/&gt;the nLocktime field in the Commitment transaction provides 24 bits of the&lt;br/&gt;channel&amp;#39;s state number in order to allow efficient revocation of old&lt;br/&gt;on-chain Commitments (with the remaining 24 bits being provided by the&lt;br/&gt;nSequence field of the Commitment transaction&amp;#39;s sole input). Because we&amp;#39;re&lt;br/&gt;now using the nLocktime field to enforce an absolute timelock, those 24&lt;br/&gt;bits of state number can no longer be encoded in the nLocktime field.&lt;br/&gt;There are two solutions to this problem:&lt;br/&gt; - add a second input to Bob&amp;#39;s Commitment transaction that spends a UTXO&lt;br/&gt;   owned by Bob (the value of which is arbitrary and is refunded to Bob in&lt;br/&gt;   the Commitment transaction) and use the nSequence field of that input&lt;br/&gt;   to encode 24 bits of state number, or&lt;br/&gt; - support only 24-bit state numbers, as 16 million channel states are&lt;br/&gt;   likely sufficient for most casual users.&lt;br/&gt;&lt;br/&gt;In addition, the following constraints are added in order to guarantee&lt;br/&gt;one-shot receives:&lt;br/&gt;1. Whenever a new HTLC is offered to Alice, its expiry is set to exactly&lt;br/&gt;   her min_final_cltv_expiry parameter in the future. This constraint&lt;br/&gt;   guarantees that new HTLCs have expiries that are monotonically&lt;br/&gt;   nondecreasing.&lt;br/&gt;2. Whenever Alice gives Bob a secret for an HTLC, that HTLC has the&lt;br/&gt;   earliest expiry of all the HTLCs in Alice&amp;#39;s current Commitment&lt;br/&gt;   transaction.&lt;br/&gt;3. Whenever a new channel state i&#43;1 is created, Alice&amp;#39;s partial signature&lt;br/&gt;   for Bob&amp;#39;s Commitment transaction for state i&#43;1 is given to Bob, and the&lt;br/&gt;   revocation key for Bob&amp;#39;s Commitment transaction for state i is given to&lt;br/&gt;   Alice, before Bob&amp;#39;s partial signature for Alice&amp;#39;s Commitment&lt;br/&gt;   transaction for state i&#43;1 is given to Alice.&lt;br/&gt;&lt;br/&gt;Given these constraints and the setting of the nLocktime field in Bob&amp;#39;s&lt;br/&gt;Commitment transaction, Alice can always put her Commitment transaction&lt;br/&gt;on-chain before Bob can put a conflicting current Commitment transaction&lt;br/&gt;on-chain, thus providing one-shot receives. The details are provided in&lt;br/&gt;the paper [5].&lt;br/&gt;&lt;br/&gt;Finally, it&amp;#39;s important to verify that the delay of Bob&amp;#39;s Commitment&lt;br/&gt;transaction (caused by the setting of its nLocktime field) does not create&lt;br/&gt;any problems for Bob. First, for HTLCs offered to Alice (that is, payments&lt;br/&gt;received by Alice), the current Lightning protocol requires that Bob wait&lt;br/&gt;until after the expiry of his offered HTLC before he goes on-chain with&lt;br/&gt;his Commitment and HTLC-timeout transactions. Therefore, the nLocktime&lt;br/&gt;field has no impact on Bob&amp;#39;s actions regarding HTLCs offered to Alice.&lt;br/&gt;Second, for HTLCs offered by Alice (that is, payments sent by Alice), the&lt;br/&gt;WF protocol does not force Bob to put his Commitment and associated&lt;br/&gt;HTLC-success transactions on-chain before any specific time in order&lt;br/&gt;guarantee the success of any HTLCs. As a result, Bob&amp;#39;s ability to force&lt;br/&gt;payment for HTLCs offered by Alice is unaffected by the nLocktime field in&lt;br/&gt;his Commitment transactions. Note that the Lightning protocol does&lt;br/&gt;require Bob to put his Commitment and associated HTLC-success transactions&lt;br/&gt;on-chain by a specific time, which is why the changes described here&lt;br/&gt;cannot be made to the Lightning protocol to support one-shot receives.&lt;br/&gt;&lt;br/&gt;Getting A Payment Receipt&lt;br/&gt;=========================&lt;br/&gt;&lt;br/&gt;Consider again the case where casual user Alice has offered an HTLC to&lt;br/&gt;Bob. At any time after the expiry of the HTLC, if Alice needs to get a&lt;br/&gt;payment receipt and Bob is uncooperative, Alice can put her Commitment&lt;br/&gt;transaction on-chain and then attempt to spend the HTLC output of her&lt;br/&gt;Commitment transaction tsdB later. As was shown above, she is guaranteed&lt;br/&gt;to win the race in putting her Commitment transaction on-chain due to the&lt;br/&gt;nLocktime field in Bob&amp;#39;s Commitment transaction. Therefore, she will&lt;br/&gt;either get her receipt before she is able to spend the HTLC output or she&lt;br/&gt;will not have to make her payment (because she succeeded in spending the&lt;br/&gt;HTLC output). This procedure for getting a payment receipt isn&amp;#39;t one-shot&lt;br/&gt;and may be awkward for casual users. Fortunately, it&amp;#39;s only required when&lt;br/&gt;there&amp;#39;s both a payment dispute (or other need to get a receipt quickly)&lt;br/&gt;and an uncooperative channel partner.&lt;br/&gt;&lt;br/&gt;Asynchronous Payments&lt;br/&gt;=====================&lt;br/&gt;&lt;br/&gt;The WF protocol gives significant flexibility to when CLUs have to be&lt;br/&gt;online, but it still requires that the sender and receiver are both online&lt;br/&gt;simultaneously. This requirement can be eliminated by keeping the relative&lt;br/&gt;delay but removing the absolute delay in Alice&amp;#39;s transaction that times&lt;br/&gt;out an HTLC for a payment that she initiates. The details are given in the&lt;br/&gt;paper [5].&lt;br/&gt;&lt;br/&gt;Related Work&lt;br/&gt;============&lt;br/&gt;&lt;br/&gt;The protocol presented here is based extensively on previously-published&lt;br/&gt;work, namely the Poon-Dryja Lightning channel protocol [1] and the BOLT&lt;br/&gt;specifications [2]. The asynchronous payments protocol is based on&lt;br/&gt;Corallo&amp;#39;s proposal for sending tips to an offline receiver [3], but&lt;br/&gt;differs by using only a relative delay in the sender&amp;#39;s HTLC.&lt;br/&gt;&lt;br/&gt;The idea of eliminating watchtowers for a casual user by delaying their&lt;br/&gt;partner&amp;#39;s ability to put transactions on-chain was described by Law [4],&lt;br/&gt;but the interaction of that delay with HTLCs was not analyzed and that&lt;br/&gt;paper assumed modifications to the underlying Bitcoin protocol.&lt;br/&gt;&lt;br/&gt;Conclusions&lt;br/&gt;===========&lt;br/&gt;&lt;br/&gt;This post presents the idea of dividing users into Casual-Lightning-Users&lt;br/&gt;(CLUs) that only send and receive payments, and Dedicated-Lightning-Users&lt;br/&gt;(DLUs) that can also route payments. It gives a new protocol that allows&lt;br/&gt;casual users to send and receive Lightning payments in a trust-free manner&lt;br/&gt;without requiring a watchtower service. It also allows CLUs to receive&lt;br/&gt;payments in a one-shot manner (that is, without having to wait for blocks&lt;br/&gt;to be added to the blockchain). No changes to the Bitcoin protocol are&lt;br/&gt;required.&lt;br/&gt;&lt;br/&gt;The new protocol does have some disadvantages, such as increasing the cost&lt;br/&gt;of capital for DLUs that partner with CLUs and increasing the latency for&lt;br/&gt;CLUs to get payment receipts from uncooperative partners. Hopefully, the&lt;br/&gt;elimination of watchtowers for casual users, and their ability to do&lt;br/&gt;one-shot receives, will more than make up for these drawbacks.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not an expert in the area, so I might have missed something.&lt;br/&gt;&lt;br/&gt;Corrections and comments are greatly appreciated.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John&lt;br/&gt;&lt;br/&gt;References&lt;br/&gt;==========&lt;br/&gt;&lt;br/&gt;[1] Poon and Dryja, The Bitcoin Lightning Network, available at&lt;br/&gt;    &lt;a href=&#34;https://lightning.network/lightning-network-paper.pdf&#34;&gt;https://lightning.network/lightning-network-paper.pdf&lt;/a&gt;.&lt;br/&gt;[2] BOLT specifications, available at&lt;br/&gt;    &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc&#34;&gt;https://github.com/lightningnetwork/lightning-rfc&lt;/a&gt;.&lt;br/&gt;[3] Corallo, A Mobile Lightning User Goes to Pay a Mobile Lightning&lt;br/&gt;    User..., available at &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-October/003307.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-October/003307.html&lt;/a&gt;.&lt;br/&gt;[4] Law, Section 3.6 of Scaling Bitcoin With Inherited IDs, available at&lt;br/&gt;    &lt;a href=&#34;https://github.com/JohnLaw2/btc-iids&#34;&gt;https://github.com/JohnLaw2/btc-iids&lt;/a&gt;.&lt;br/&gt;[5] Law, Watchtower-Free Lightning Channels For Casual Users, available at&lt;br/&gt;    &lt;a href=&#34;https://github.com/JohnLaw2/ln-watchtower-free&#34;&gt;https://github.com/JohnLaw2/ln-watchtower-free&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;Sent with [Proton Mail](&lt;a href=&#34;https://proton.me/&#34;&gt;https://proton.me/&lt;/a&gt;) secure email.&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/20221003/ee49228d/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20221003/ee49228d/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T13:06:58Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqszqd0ce0wtvlnzj2jp8n6499vsvty9rmuftrf27py2e60jvnds4eqzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzvj876a</id>
    
      <title type="html">📅 Original date posted:2021-10-10 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqszqd0ce0wtvlnzj2jp8n6499vsvty9rmuftrf27py2e60jvnds4eqzyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzvj876a" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs827803y4e08zzwg4hqj8ulam6te66sc7z5u8w0wmztntj3qv7v7qn58vjj&#39;&gt;nevent1q…8vjj&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-10-10&lt;br/&gt;📝 Original message:&lt;br/&gt;Response to email from Anthony Towns sent on 20210918 at 11:37:40 UTC&lt;br/&gt;==============================================&lt;br/&gt;aj,&lt;br/&gt;&lt;br/&gt;Thanks for taking the time to go through my paper on inherited IDs (IIDs). Also, thanks for your concise and accurate description of the IID proposal and the 2Stage channel protocol. I&amp;#39;m glad you feel the 2Stage protocol might be better than eltoo for a two-party channel.&lt;br/&gt;&lt;br/&gt;I want to address other parts of the paper that were obviously not as clear, as they led to two important misunderstandings.&lt;br/&gt;&lt;br/&gt;First, there is the issue of the use of an operator in the &amp;#34;timeout trees&amp;#34;, &amp;#34;update-forest&amp;#34; and &amp;#34;challenge-and-response&amp;#34; factory protocols. While those protocols do include a party that is designated as the &amp;#34;operator&amp;#34;, the operator is in no way a trusted party. While it&amp;#39;s true that one would prefer an operator that follows the protocol fully and promptly, as that would allow one to keep the protocol off-chain, the operator can never take funds or prevent others from obtaining the funds that are due to them. In fact, this is exactly analogous to the selection of the party with whom one shares a two-party lightning channel. If one views lightning as being trust-free, then one will also view &amp;#34;timeout trees&amp;#34;, &amp;#34;update-forest&amp;#34; and &amp;#34;challenge-and-response&amp;#34; to be trust-free.&lt;br/&gt;&lt;br/&gt;Second, there is the question of whether or not IIDs can be simulated with anyprevout. I don&amp;#39;t believe that they can. Consider for example the case where Alice has an on-chain funding transaction F1 with output F1:0 that will be spent by a (currently off-chain) transaction F2 with output F2:0 that will be spent by a settlement transaction S. Assume further that there is an on-chain control transaction C1 with output C1:0 owned by untrusted operator O, where C1:0 will be spent by a (currently off-chain) transaction C2 with output C2:0 that may, in certain cases, also be spent by S. In particular, assume F1 puts a covenant on F2 such that F2 puts a covenant on S, where the covenant on S can be met by either: A) waiting a CSV delay of one time unit (defined to be long enough to allow a party with a competing transaction to put that competing transaction on-chain first) and then spending only F2:0 (where F2:0 is referenced via IID) and giving ownership of S:0 to Alice, or B) waiting until a CLV reaches time T_lock and then spending both F2:0 and C2:0 (where F2:0 and C2:0 are referenced via IIDs).&lt;br/&gt;&lt;br/&gt;Assume that after Alice put F1 on-chain she wants to transfer ownership of the output S:0 to Bob without having to put F2 or S on-chain. She can do this with IIDs as follows. First, Alice asks the untrusted operator O to put C2 on-chain where C2 puts a covenant on S that forces S to spend both F2:0 and C2:0 (where F2:0 and C2:0 are referenced via IIDs) and to give ownership of S:0 to Bob (by making it spendable using Bob&amp;#39;s public key).&lt;br/&gt;&lt;br/&gt;There are two cases. First, if O promptly puts the desired C2 on-chain, then Alice and Bob can wait until T_lock (while putting nothing else on-chain), at which point Bob can be assured that he owns S:0 (as any attempt by Alice to spend S:0 by meetiing the covenant using case A above can be thwarted by Bob putting S on-chain first using case B above). Second, if O puts a different C2 on-chain, or fails to put any C2 on-chain promptly, Alice can reclaim her funds by putting F2 on-chain, waiting one time window, and then putting S on-chain using case A above.&lt;br/&gt;&lt;br/&gt;Thus, IIDs provide a trust-free means for Alice to transfer funds from F1 to a party that is unknown to Alice when she puts F1 on-chain. I see two problems in tryinig to use anyprevout to achieve the same result. First, I don&amp;#39;t know of any mechanism by which Alice can create a covenant that F2 puts on S which implements case B above. In some other settings, I can understand how one could use unique single-use keys in place of IID outputs. However, in this setting I don&amp;#39;t see how to define a covenant that F2 puts on S that in case B forces the other input to spend C2:0, as signatures that are evaluated in spending F2:0 don&amp;#39;t commit to the output scripts of other inputs to S. Second, and more fundamentally, even if one could define a covenant that F2 puts on S in case B forcing the other input to be signed by a single-use key owned by O, that still wouldn&amp;#39;t unconditionally transfer ownership to Bob (without putting F2 and S on-chain). That&amp;#39;s because in order to have single-use keys play the role of IIDs, they have to truly be single-use and there is no way Bob can know that O won&amp;#39;t just sign some other S&amp;#39; that competes with S and sends S&amp;#39;:0 to O, thus stealing the funds. Please let me know if I&amp;#39;ve missed something here.&lt;br/&gt;&lt;br/&gt;The example above isn&amp;#39;t very useful, as it doesn&amp;#39;t cut down on the number of on-chain transactions required to transfer ownership from Alice to Bob. However, it does capture the core functionality that IIDs provide that (I believe) anyprevout does not provide. This functionality is exactly what enables &amp;#34;update-forest&amp;#34; and &amp;#34;challenge-and-response&amp;#34; to allow a single on-chain transaction to transfer ownership of thousands or millions of channels in a trust-free manner, thus accomplishing with one on-chain transaction what would have required thousands or millions of anyprevout transactions (at least as far as I can tell). This is exactly the power of IIDs that I was referring to, and I found surprising that this power was actually the result of restricting how a signed transaction can be used (as compared to a signed transaction that uses anyprevout).&lt;br/&gt;&lt;br/&gt;I hope clearing up these two misunderstandings is enough to pique your interest in reading the &amp;#34;timeout trees&amp;#34;, &amp;#34;update-forest&amp;#34; and &amp;#34;challenge-and-response&amp;#34; protocols in more detail, as I&amp;#39;d be interested in your expert opinion on them.&lt;br/&gt;&lt;br/&gt;My remaining comments are minor compared to the previous ones.&lt;br/&gt;* Regarding the worst-case delay for eltoo-2party vs. 2Stage, I agree that there is no single agreed upon model for analyzing this and opinions may differ. In any case, I think that if one had a nearly-expired HTLC (or if one is setting the lock time for an HTLC) and one could choose between eltoo-2party, where the other party could have thousands or millions of transactions competing with your settlement transaction, and 2Stage, where the other party can have at most one competing transaction, some would prefer 2Stage.&lt;br/&gt;* In comparing eltoo-2party and 2Stage, I was surprised that you didn&amp;#39;t consider 2Stage&amp;#39;s elimination of watchtowers for one or both parties as being an advantage. I had through that would be a big win in practice.&lt;br/&gt;* Regarding footnote 13&amp;#39;s description of OP_CODESEPARATOR, I realize that that footnote does not capture the change made in taproot. I addressed that issue on p. 54 (and explained it in footnote 43), as footnote 13 was designed to explain OP_CODESEPARATOR to those not already familiar with it, while p. 54 was designed for the experts.&lt;br/&gt;* Regarding the new address type for floating transactions mentioned in the paper, thanks for the correction. I&amp;#39;ll remove this from the next version.&lt;br/&gt;&lt;br/&gt;In summary, the paper shows that:&lt;br/&gt;1) IIDs can be used to eliminate watchtowers for one or both parties in a two-party channel (2Stage),&lt;br/&gt;2) IIDs can be used to create factories that allow very large numbers of new users to obtain bitcoin in a watchtower-free and trust-free manner (timeout trees),&lt;br/&gt;3) IIDs support trust-free factories with unbounded numbers of parties (and channels) that allow the channels to be bought and sold by anyone, including parties not originally in the factory, with a single on-chain transaction, and&lt;br/&gt;4) IIDs achieve these results while using a more constrained, and thus safer, change to Bitcoin than the support for floating transactions.&lt;br/&gt;&lt;br/&gt;Are these results of interest?&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;John&lt;br/&gt;&lt;br/&gt;Sent with [ProtonMail](&lt;a href=&#34;https://protonmail.com/&#34;&gt;https://protonmail.com/&lt;/a&gt;) Secure Email.&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/20211010/ef8682ee/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20211010/ef8682ee/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T13:04:11Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqs9m38u8dsz0f3ae9uu7xnplpz9n8y5f4t87fc0wwhtez0lq7c6arszyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzl9tqdk</id>
    
      <title type="html">📅 Original date posted:2023-03-17 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqs9m38u8dsz0f3ae9uu7xnplpz9n8y5f4t87fc0wwhtez0lq7c6arszyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzl9tqdk" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2jwq8032vqzq9kwua9jkh4h26d2ly4mgs2quscm4agpr5gt2j29cd07kgm&#39;&gt;nevent1q…7kgm&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-03-17&lt;br/&gt;🗒️ Summary of this message: The post discusses the liveliness/interactivity requirements of updating balance distribution in pools and the design of Lightning Network for always-online participants. The author suggests a trust-minimized solution for non-interactive, off-chain updates of the pool/factory. The post also discusses the double-spend issue and proposes solutions based on prophylactic or corrective security models.&lt;br/&gt;📝 Original message:Hi Antoine,&lt;br/&gt;&lt;br/&gt;Thanks for your insightful post on the interactivity issue.&lt;br/&gt;&lt;br/&gt;Some thoughts are inline below.&lt;br/&gt;&lt;br/&gt;&amp;gt; However, those constructions require all the users to be online and&lt;br/&gt;&amp;gt; exchange rounds of signatures to update the balance distribution. Those&lt;br/&gt;&amp;gt; liveliness/interactivity requirements are increasing with the number of&lt;br/&gt;&amp;gt; users, as there are higher odds of *one* lazzy/buggy/offline user stalling&lt;br/&gt;&amp;gt; the pool/factory updates.&lt;br/&gt;&lt;br/&gt;&amp;gt; In echo, the design of LN was envisioned for a network of&lt;br/&gt;&amp;gt; always-online/self-hosted participants, the early deployment of LN showed&lt;br/&gt;&amp;gt; the resort to delegated channel hosting solutions, relieving users from the&lt;br/&gt;&amp;gt; liveliness requirement. While the trust trade-offs of those solutions are&lt;br/&gt;&amp;gt; significant, they answer the reality of a world made of unreliable networks&lt;br/&gt;&amp;gt; and mobile devices.&lt;br/&gt;&lt;br/&gt;Agreed that signing updates and monitoring the blockchain both create always-online requirements that are not compatible with casual users&amp;#39; desires.&lt;br/&gt;I think it&amp;#39;s helpful to separate these two cases, as they affect different parties and their solutions differ.&lt;br/&gt;In particular, limited availability to sign updates affects one&amp;#39;s partners and can be addressed by having fewer partners, not partnering with casual users, evicting unresponsive users, etc.&lt;br/&gt;Limited availability to monitor the blockchain affects the security of one&amp;#39;s own funds and can be addressed by increasing one&amp;#39;s safety parameters (such as the to_self_delay parameter in Lightning).&lt;br/&gt;&lt;br/&gt;&amp;gt; Ideally, I think we would like a trust-minimized solution enabling&lt;br/&gt;&amp;gt; non-interactive, off-chain updates of the pool/factory, with no or minimal&lt;br/&gt;&amp;gt; consumption of blockspace.&lt;br/&gt;&lt;br/&gt;I would argue that we want a completely trust-free solution, if at all possible, while respecting users&amp;#39; actual availability.&lt;br/&gt;We should only consider solutions that require trust if we can&amp;#39;t find a trust-free solution that meets all other requirements.&lt;br/&gt;&lt;br/&gt;&amp;gt; For the remainder of this post, only the pool use-case will be mentioned.&lt;br/&gt;&amp;gt; Though, I think the observations/implications can be extended to factories&lt;br/&gt;&amp;gt; as well.&lt;br/&gt;&lt;br/&gt;&amp;gt; Of course, the double-spend issue is already addressed on the Bitcoin&lt;br/&gt;&amp;gt; base-layer due to nodes consensus convergence on the most-proof-of-work&lt;br/&gt;&amp;gt; accumulated valid chain of blocks. While reorg can happen, a UTXO cannot be&lt;br/&gt;&amp;gt; spent twice on the same chain. This security model can be said to be&lt;br/&gt;&amp;gt; prophylactic, i.e an invalid block cannot be applied to a node&amp;#39;s state and&lt;br/&gt;&amp;gt; should be rejected.&lt;br/&gt;&lt;br/&gt;&amp;gt; The double-spend issue is also solved in its own way in payment channels.&lt;br/&gt;&amp;gt; If a transaction is published, of which the correctness has been revoked&lt;br/&gt;&amp;gt; w.r.t negotiated, private channel state, the wronged channel users must&lt;br/&gt;&amp;gt; react in consequence. This security model can be said to be corrective,&lt;br/&gt;&amp;gt; states updates are applied first on the global ledger then eventually&lt;br/&gt;&amp;gt; corrected.&lt;br/&gt;&lt;br/&gt;&amp;gt; A solution to the pool partition equivocation issue appears as either based&lt;br/&gt;&amp;gt; on a prophylactic one or a corrective security model.&lt;br/&gt;&lt;br/&gt;Actually, there&amp;#39;s a third class of solutions that are possible, namely ones that use separate control transactions and value transactions (where the value transactions &amp;#34;spend&amp;#34;, and therefore depend on, the control transactions).&lt;br/&gt;If an invalid control transaction is put on-chain, it can be blocked by another user by spending its output(s) before the output(s) can affect the value transaction.&lt;br/&gt;Thus, control transactions can be viewed as proposals for state updates, and those proposals are blocked if they aren&amp;#39;t valid.&lt;br/&gt;&lt;br/&gt;These solutions differ from prophylactic solutions, as they allow incorrect transactions to be put on-chain and require another user to block them.&lt;br/&gt;They also differ from your definition of a corrective security model, as they never allow the state update to be applied to the value in the channel or pool, so there&amp;#39;s nothing to be corrected.&lt;br/&gt;An example of this third class of solutions is the Tunable-Penalty Factory protocol [1].&lt;br/&gt;Of course, this example was not available when you noted that solutions are either prophylactic or corrective.&lt;br/&gt;&lt;br/&gt;&amp;gt; E.g, let&amp;#39;s say you have Alice, Bob, Caroll and Dave as pool participants.&lt;br/&gt;&amp;gt; Alice contacts Bob to form a first partition, then Caroll to form a second&lt;br/&gt;&amp;gt; one, then Dave to form a last one. If she is successful in that&lt;br/&gt;&amp;gt; equivocation trick, she can *triple*-spend her balance against any goods or&lt;br/&gt;&amp;gt; out-of-pool payments.&lt;br/&gt;&lt;br/&gt;&amp;gt; However, correction can only&lt;br/&gt;&amp;gt; be limited to the equivocated balance. Therefore, it appears that&lt;br/&gt;&amp;gt; corrective security models in the context of multi-party are always&lt;br/&gt;&amp;gt; producing an economic disequilibrium.&lt;br/&gt;&lt;br/&gt;On the other hand, protocols that use separate control and value transactions do not have this limitation.&lt;br/&gt;For example, the Tunable-Penalty Factory protocol is a multi-party protocol in which every dishonest party is penalized and there is no economic disequilibrium.&lt;br/&gt;&lt;br/&gt;&amp;gt; I think that leveraging covenants a revocation mechanism could be attached&lt;br/&gt;&amp;gt; on any equivocating branch of transactions, allowing in the above case a&lt;br/&gt;&amp;gt; single honest user to punish the publication. While a revocation mechanism&lt;br/&gt;&amp;gt; does not work in case of multiple defrauded users, I believe the existence&lt;br/&gt;&amp;gt; of a revocation mechanism makes the formation of malicious coalitions&lt;br/&gt;&amp;gt; unsafe for their conjurers.&lt;br/&gt;&lt;br/&gt;&amp;gt; Indeed, any user entering in the coalition is not guaranteed to be blinded&lt;br/&gt;&amp;gt; to other equivocating branches generated by the partition initiator.&lt;br/&gt;&amp;gt; Therefore, the publication of a partition statement by everyone is&lt;br/&gt;&amp;gt; holistically optimal to discover any equivocating candidate among the pool&lt;br/&gt;&amp;gt; users.&lt;br/&gt;&lt;br/&gt;If I understand this correctly, I think a penalty mechanism that allows a &amp;#34;wronged&amp;#34; user to take some or all of a dishonest user&amp;#39;s funds could be exploited by a malicious coalition.&lt;br/&gt;Consider the case where Alice is an honest user who joins a partition with Bob, where Bob and Carol are in a malicious coalition.&lt;br/&gt;Alice believes she has pooled her funds with Bob&amp;#39;s and so she is able to work with Bob to implement an off-line update of their balances, with Alice believing that she has gained ownership over some of Bob&amp;#39;s funds.&lt;br/&gt;However, when the partitioning Update transaction that joins Alice&amp;#39;s and Bob&amp;#39;s funds is put on-chain, Carol pretends to have been &amp;#34;wronged&amp;#34; by Bob and uses the penalty mechanism to seize Bob&amp;#39;s funds.&lt;br/&gt;In this case, Alice won&amp;#39;t be able to get the funds that she thought she had obtained from Bob.&lt;br/&gt;&lt;br/&gt;Does that make sense?&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;John&lt;br/&gt;&lt;br/&gt;[1] Law, &amp;#34;Efficient Factories For Lightning Channels&amp;#34;, available at &lt;a href=&#34;https://github.com/JohnLaw2/ln-efficient-factories&#34;&gt;https://github.com/JohnLaw2/ln-efficient-factories&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;Sent with [Proton Mail](&lt;a href=&#34;https://proton.me/&#34;&gt;https://proton.me/&lt;/a&gt;) secure email.&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20230317/04bc8655/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20230317/04bc8655/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T23:20:19Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqs9z2pdhsdgam35qj28005u45npselxh0esla0jls86g3ww9h9yj3szyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzw7eaql</id>
    
      <title type="html">📅 Original date posted:2021-10-10 📝 Original ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqs9z2pdhsdgam35qj28005u45npselxh0esla0jls86g3ww9h9yj3szyq007ldps66y82es44qv4v8rrvljuklxgnztw3m4p7x99javxd7gzw7eaql" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs004y9m35l9ud2rk3dqk2pthvznjt96xgssz86s08gtkuugtdxm9gvw4ha0&#39;&gt;nevent1q…4ha0&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-10-10&lt;br/&gt;📝 Original message:Response to email from Anthony Towns sent on 20210918 at 11:37:40 UTC&lt;br/&gt;==============================================&lt;br/&gt;aj,&lt;br/&gt;&lt;br/&gt;Thanks for taking the time to go through my paper on inherited IDs (IIDs). Also, thanks for your concise and accurate description of the IID proposal and the 2Stage channel protocol. I&amp;#39;m glad you feel the 2Stage protocol might be better than eltoo for a two-party channel.&lt;br/&gt;&lt;br/&gt;I want to address other parts of the paper that were obviously not as clear, as they led to two important misunderstandings.&lt;br/&gt;&lt;br/&gt;First, there is the issue of the use of an operator in the &amp;#34;timeout trees&amp;#34;, &amp;#34;update-forest&amp;#34; and &amp;#34;challenge-and-response&amp;#34; factory protocols. While those protocols do include a party that is designated as the &amp;#34;operator&amp;#34;, the operator is in no way a trusted party. While it&amp;#39;s true that one would prefer an operator that follows the protocol fully and promptly, as that would allow one to keep the protocol off-chain, the operator can never take funds or prevent others from obtaining the funds that are due to them. In fact, this is exactly analogous to the selection of the party with whom one shares a two-party lightning channel. If one views lightning as being trust-free, then one will also view &amp;#34;timeout trees&amp;#34;, &amp;#34;update-forest&amp;#34; and &amp;#34;challenge-and-response&amp;#34; to be trust-free.&lt;br/&gt;&lt;br/&gt;Second, there is the question of whether or not IIDs can be simulated with anyprevout. I don&amp;#39;t believe that they can. Consider for example the case where Alice has an on-chain funding transaction F1 with output F1:0 that will be spent by a (currently off-chain) transaction F2 with output F2:0 that will be spent by a settlement transaction S. Assume further that there is an on-chain control transaction C1 with output C1:0 owned by untrusted operator O, where C1:0 will be spent by a (currently off-chain) transaction C2 with output C2:0 that may, in certain cases, also be spent by S. In particular, assume F1 puts a covenant on F2 such that F2 puts a covenant on S, where the covenant on S can be met by either: A) waiting a CSV delay of one time unit (defined to be long enough to allow a party with a competing transaction to put that competing transaction on-chain first) and then spending only F2:0 (where F2:0 is referenced via IID) and giving ownership of S:0 to Alice, or B) waiting until a CLV reaches time T_lock and then spending both F2:0 and C2:0 (where F2:0 and C2:0 are referenced via IIDs).&lt;br/&gt;&lt;br/&gt;Assume that after Alice put F1 on-chain she wants to transfer ownership of the output S:0 to Bob without having to put F2 or S on-chain. She can do this with IIDs as follows. First, Alice asks the untrusted operator O to put C2 on-chain where C2 puts a covenant on S that forces S to spend both F2:0 and C2:0 (where F2:0 and C2:0 are referenced via IIDs) and to give ownership of S:0 to Bob (by making it spendable using Bob&amp;#39;s public key).&lt;br/&gt;&lt;br/&gt;There are two cases. First, if O promptly puts the desired C2 on-chain, then Alice and Bob can wait until T_lock (while putting nothing else on-chain), at which point Bob can be assured that he owns S:0 (as any attempt by Alice to spend S:0 by meetiing the covenant using case A above can be thwarted by Bob putting S on-chain first using case B above). Second, if O puts a different C2 on-chain, or fails to put any C2 on-chain promptly, Alice can reclaim her funds by putting F2 on-chain, waiting one time window, and then putting S on-chain using case A above.&lt;br/&gt;&lt;br/&gt;Thus, IIDs provide a trust-free means for Alice to transfer funds from F1 to a party that is unknown to Alice when she puts F1 on-chain. I see two problems in tryinig to use anyprevout to achieve the same result. First, I don&amp;#39;t know of any mechanism by which Alice can create a covenant that F2 puts on S which implements case B above. In some other settings, I can understand how one could use unique single-use keys in place of IID outputs. However, in this setting I don&amp;#39;t see how to define a covenant that F2 puts on S that in case B forces the other input to spend C2:0, as signatures that are evaluated in spending F2:0 don&amp;#39;t commit to the output scripts of other inputs to S. Second, and more fundamentally, even if one could define a covenant that F2 puts on S in case B forcing the other input to be signed by a single-use key owned by O, that still wouldn&amp;#39;t unconditionally transfer ownership to Bob (without putting F2 and S on-chain). That&amp;#39;s because in order to have single-use keys play the role of IIDs, they have to truly be single-use and there is no way Bob can know that O won&amp;#39;t just sign some other S&amp;#39; that competes with S and sends S&amp;#39;:0 to O, thus stealing the funds. Please let me know if I&amp;#39;ve missed something here.&lt;br/&gt;&lt;br/&gt;The example above isn&amp;#39;t very useful, as it doesn&amp;#39;t cut down on the number of on-chain transactions required to transfer ownership from Alice to Bob. However, it does capture the core functionality that IIDs provide that (I believe) anyprevout does not provide. This functionality is exactly what enables &amp;#34;update-forest&amp;#34; and &amp;#34;challenge-and-response&amp;#34; to allow a single on-chain transaction to transfer ownership of thousands or millions of channels in a trust-free manner, thus accomplishing with one on-chain transaction what would have required thousands or millions of anyprevout transactions (at least as far as I can tell). This is exactly the power of IIDs that I was referring to, and I found surprising that this power was actually the result of restricting how a signed transaction can be used (as compared to a signed transaction that uses anyprevout).&lt;br/&gt;&lt;br/&gt;I hope clearing up these two misunderstandings is enough to pique your interest in reading the &amp;#34;timeout trees&amp;#34;, &amp;#34;update-forest&amp;#34; and &amp;#34;challenge-and-response&amp;#34; protocols in more detail, as I&amp;#39;d be interested in your expert opinion on them.&lt;br/&gt;&lt;br/&gt;My remaining comments are minor compared to the previous ones.&lt;br/&gt;* Regarding the worst-case delay for eltoo-2party vs. 2Stage, I agree that there is no single agreed upon model for analyzing this and opinions may differ. In any case, I think that if one had a nearly-expired HTLC (or if one is setting the lock time for an HTLC) and one could choose between eltoo-2party, where the other party could have thousands or millions of transactions competing with your settlement transaction, and 2Stage, where the other party can have at most one competing transaction, some would prefer 2Stage.&lt;br/&gt;* In comparing eltoo-2party and 2Stage, I was surprised that you didn&amp;#39;t consider 2Stage&amp;#39;s elimination of watchtowers for one or both parties as being an advantage. I had through that would be a big win in practice.&lt;br/&gt;* Regarding footnote 13&amp;#39;s description of OP_CODESEPARATOR, I realize that that footnote does not capture the change made in taproot. I addressed that issue on p. 54 (and explained it in footnote 43), as footnote 13 was designed to explain OP_CODESEPARATOR to those not already familiar with it, while p. 54 was designed for the experts.&lt;br/&gt;* Regarding the new address type for floating transactions mentioned in the paper, thanks for the correction. I&amp;#39;ll remove this from the next version.&lt;br/&gt;&lt;br/&gt;In summary, the paper shows that:&lt;br/&gt;1) IIDs can be used to eliminate watchtowers for one or both parties in a two-party channel (2Stage),&lt;br/&gt;2) IIDs can be used to create factories that allow very large numbers of new users to obtain bitcoin in a watchtower-free and trust-free manner (timeout trees),&lt;br/&gt;3) IIDs support trust-free factories with unbounded numbers of parties (and channels) that allow the channels to be bought and sold by anyone, including parties not originally in the factory, with a single on-chain transaction, and&lt;br/&gt;4) IIDs achieve these results while using a more constrained, and thus safer, change to Bitcoin than the support for floating transactions.&lt;br/&gt;&lt;br/&gt;Are these results of interest?&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;John&lt;br/&gt;&lt;br/&gt;Sent with [ProtonMail](&lt;a href=&#34;https://protonmail.com/&#34;&gt;https://protonmail.com/&lt;/a&gt;) Secure Email.&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20211010/ef8682ee/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20211010/ef8682ee/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T22:59:59Z</updated>
  </entry>

</feed>