Daily Mail PH

Tuesday, October 17, 2023

[New post] Timeout Trees: A Solution To Scaling Lightning Network LSPs

Site logo image Crypto Breaking News posted: "One of the biggest inherent limitations to the Lightning Network is the limited number of channels that can be opened or closed per block given the blocksize limit. Regardless of how many transactions can occur off-chain how cheaply, this is a fundamental" Crypto Breaking News

Timeout Trees: A Solution To Scaling Lightning Network LSPs

Crypto Breaking News

Oct 17

One of the biggest inherent limitations to the Lightning Network is the limited number of channels that can be opened or closed per block given the blocksize limit. Regardless of how many transactions can occur off-chain how cheaply, this is a fundamental bottleneck restricting how many people could actually realistically use the Lightning Network. Even the Lightning Network whitepaper went through in the conclusion that in a scenario where the entire world's population of 7 billion was using Lightning, with only two on-chain transactions a year per person, Bitcoin would require 133 MB blocks for Lightning to work. This isn't some out of left field problem, or unpredictable issue, it was a limitation of the protocol design fully understood from day one.

Part of the plan to address this issue has always been the idea of channel factories, i.e. a type of channel that more than two users participated in. This was always the direction things would have to go in order to scale Lightning and Bitcoin without a blocksize increase, but the issue is that solving the problem of on-chain footprints introduces a whole host of other problems. First of all, nothing fundamental changes about the requirement to enforce intermediate states if a counterparty becomes non-responsive. This has implications for the value-add. The entire point of a channel factory is that, for example, twenty people can share one UTXO and rearrange the liquidity inside with the other twenty people however they want. Once someone closes out on-chain non-cooperatively this starts to interfere with that goal.

If I close out my channel inside a channel factory, I drag a bunch of people with me out of the factory. Think of a factory like a merkle tree, there's one UTXO at the top, and that splits in half off-chain, and those split in half, etc. until we get to everyone's individual channels. Once I peel my channel out of the factory, everyone on my side of each split that goes on-chain is now cut off from everyone else in the factory. They can no longer reorganize their liquidity into that part of the group if everyone cooperates.

Another big issue is that even to start one you need to have everyone online at the beginning to pre-sign all the transactions. If you want twenty people in a factory, everyone needs to be online to start it. If you want a thousand people, a thousand people need to be online, etc.

This makes channel factories a big design space full of lots of problems to solve. So we solve an existing problem for Lightning, but make a bunch of new ones. Sounds like engineering to me.

Timeout Trees

John Law's recent proposal, Timeout Trees, attempts to offer a solution to the one core issue of channel factories. I wouldn't quite call a timeout tree a channel factory, more of a "proto-factory," but it offers a potential solution to the issue of opening and closing massive amounts of channels without introducing the problem of non-cooperative closes ruining the use of the factory for other users. It requires CHECKTEMPLATEVERIFY (CTV) and a Lighting Service Provider (LSP) in order to work functionally.

A Timeout Tree is essentially a channel factory guaranteed by covenants, with no ability to change how the liquidity is reorganized off-chain after it is made, with a special escape clause. An LSP, we'll call them Bob, plays the role of bridging casual users into the wider Lightning Network. Bob can take coins he controls and create a CTV tree that creates a single UTXO unfurling to open channels to any arbitrary number of users of his LSP service. The nice thing about CTV is it enables this to be done without everyone being online at the same time. Bob can simply get everyone to sign their initial channel state one at a time and hold onto them until everyone has set up the channel, and just spend the funds into the CTV tree when he has channels set up with every user.

This addresses the problem of everyone having to be online at the same time in order to set up the "factory" and start using Lightning. Because of CTV, once Bob spends coins into the tree setting up everyone's Lightning channels, there is no way for him to back out and take the coins (yet). With that first UTXO in the CTV confirmed on-chain, everyone can treat their channels as open and there is no risk of them being doublespent.

Now the last part, closing the channels. Even though opening them only requires a single UTXO on-chain because of CTV, closing them still would require the entire CTV tree to unfurl on-chain so everyone can submit their channel states, right? Wrong. This is the Timeout part of Timeout Trees. Every branch in the Timeout Tree has a script branch where Bob can sweep all of the funds after a timelock.

A diagram of a Timeout Tree.

Now I'm sure you're thinking "what!?" This is the real genius of how this proposal works. Because Bob can sweep the on-chain UTXOs himself without anyone else after the timelock, these channels all have an expiration date unless users actually unfurl the whole tree and confirm the real channel funding on-chain. This allows Bob to do something neat: when that timelock is coming up, he can open a brand new Timeout Tree with all the users of the current one, and have them move all of their funds from the expiring tree into the new one entirely off-chain on Lightning and then sweep the single on-chain UTXO of the last tree.

This allows for efficient closing of all these channels on-chain. The only problem left now is enforcing an HTLC on-chain if the other party stops cooperating. Well…that isn't really an issue in this case, or rather it's an all or nothing issue. The reason channels have to be closed to enforce an HTLC is if the other party of the channel stops responding in the middle of routing it. In a Timeout Tree every single user's counterpart is Bob. So if Bob, as long as he is being honest, is not responding to update a failed or successful HTLC for one user, he's not responding for any other user either. In that case everyone can still close out their channels on-chain before the timeout and stop using Bob's LSP.

Wrapping Up

Users will still have to pay fees for on-chain interactions, there is no way around that, and an entire Timeout Tree closing out on-chain non-cooperatively would be a large and expensive on-chain footprint, but this is ultimately an issue any multiparty channel system will have to address. Timeout Trees however does have compelling solutions to the cooperative case of both opening and closing a massive multiparty channel without degrading the trust model of the system to something custodial.

John has even in his most recent version of the paper proposed a scheme where users could be penalized for non-cooperative closures enough to cover Bob's cost for eventually sweeping a bunch of fragmented tree UTXOs after the timeout. Potentially there are ways to do the reverse if Bob's inactivity or dishonesty is the cause for users having to non-cooperatively close their part of the tree.

At the end of the day though, this is a very concrete and specific proposal for a channel factory design that actually attempts to address the real issues of use and implementation instead of a half-defined and vague concept. That is massive progress in terms of addressing Lightning's long-term scaling limitations. 

Source: Bitcoin Magazine


Unsubscribe to no longer receive posts from Crypto Breaking News.
Change your email settings at manage subscriptions.

Trouble clicking? Copy and paste this URL into your browser:
https://www.cryptobreaking.com/timeout-trees-a-solution-to-scaling-lightning-network-lsps/

WordPress.com and Jetpack Logos

Get the Jetpack app to use Reader anywhere, anytime

Follow your favorite sites, save posts to read later, and get real-time notifications for likes and comments.

Download Jetpack on Google Play Download Jetpack from the App Store
WordPress.com on Twitter WordPress.com on Facebook WordPress.com on Instagram WordPress.com on YouTube
WordPress.com Logo and Wordmark title=

Automattic, Inc. - 60 29th St. #343, San Francisco, CA 94110  

at October 17, 2023
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

CG BOSS Posts from Gargoyles Reboot thanks to creator kept it alive | CG BOSS Games for 04/26/2026

CG BOSS Blog Post Updates ...

  • [New post] 5 Key Technologies Streamlining the Crypto User Experience
    ...
  • CG BOSS Posts from Gargoyles Reboot thanks to creator kept it alive | CG BOSS Games for 04/26/2026
    CG BOSS Blog Post Updates ...
  • Why is Ninoy Aquino Day important to you? Join Rappler’s chat on August 21!
    Hi daily! Who is Ninoy Aquino to you? What lessons from his life still spea...

Search This Blog

  • Home

About Me

Daily Newsletters PH
View my complete profile

Report Abuse

Labels

  • Last Minute Online News

Blog Archive

  • April 2026 (1)
  • February 2026 (1)
  • January 2026 (7)
  • December 2025 (8)
  • November 2025 (4)
  • October 2025 (2)
  • September 2025 (1)
  • August 2025 (2)
  • July 2025 (5)
  • June 2025 (3)
  • May 2025 (2)
  • April 2025 (2)
  • February 2025 (2)
  • December 2024 (1)
  • October 2024 (2)
  • September 2024 (1459)
  • August 2024 (1360)
  • July 2024 (1614)
  • June 2024 (1394)
  • May 2024 (1376)
  • April 2024 (1440)
  • March 2024 (1688)
  • February 2024 (2833)
  • January 2024 (3130)
  • December 2023 (3057)
  • November 2023 (2826)
  • October 2023 (2228)
  • September 2023 (2118)
  • August 2023 (2611)
  • July 2023 (2736)
  • June 2023 (2844)
  • May 2023 (2749)
  • April 2023 (2407)
  • March 2023 (2810)
  • February 2023 (2508)
  • January 2023 (3052)
  • December 2022 (2844)
  • November 2022 (2673)
  • October 2022 (2196)
  • September 2022 (1973)
  • August 2022 (2306)
  • July 2022 (2294)
  • June 2022 (2363)
  • May 2022 (2299)
  • April 2022 (2233)
  • March 2022 (1993)
  • February 2022 (1358)
  • January 2022 (1323)
  • December 2021 (2064)
  • November 2021 (3141)
  • October 2021 (3240)
  • September 2021 (3135)
  • August 2021 (1782)
  • May 2021 (136)
  • April 2021 (294)
Simple theme. Powered by Blogger.