when a funding TX takes a long time to confirm, channels get stuck in syncingSee original GitHub issue
It’s not a big deal but those channels have to be “unstuck” manually via restart or
disconnect once the funding TX is confirmed. They don’t come online automatically.
In the past, those channels sometimes got stuck for good and had to be force closed. Not sure if this is still an issue though.
- Created 3 years ago
- Comments:16 (9 by maintainers)
Top GitHub Comments
The issue there is that your channels took too long to confirm so the fundee “forgot” them.
There must be a limit after which a fundee will forget about a channel that wasn’t confirmed, otherwise it’s an easy DoS vector (because it costs resources to store information about a channel and check on-chain confirmations). Right now this limit is 5 days in eclair, and probably approximately the same thing in lnd. Since your channels took more than 2 weeks to confirm, your peer deleted the data stored on their side. Unfortunately that means they probably don’t have their funding private keys anymore, so can’t help you do a mutual close (or restore the channel).
I agree that this is not acceptable. But there must be some time limit enforced. I have an idea that could fix this, but it requires a spec change (and a code change in all implementations). Let me know if you think that would work for you, and if it does I’ll start working on a spec PR and discuss it with other implementers:
- When opening a channel, you tell your peer the deadline before which you’ll get it confirmed (for example, 1440 blocks from now)
- The fundee checks that deadline, and if they find it acceptable, tell you to move forward and open the channel: otherwise if they think the deadline is too long, they will tell you straight away and you’ll stop the channel open flow
- Your node broadcasts the funding transaction, and uses CPFP if needed to ensure it confirms before the deadline you and your peer agreed on
- Your peer will keep the channel information on his side until the deadline is reached
That means you’ll sometimes need to pay more fees than you’d like to get your funding tx confirmed through CPFP, but that gives you a guarantee that as long as you get it confirmed before the deadline, your peer will remember it.
Okay cool, that is also my understanding of lnd’s behavior so at least we agree on what the behavior should be 👍