question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

when a funding TX takes a long time to confirm, channels get stuck in syncing

See 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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
t-bastcommented, Jan 28, 2021

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.

1reaction
cfromknechtcommented, Jun 10, 2020

Okay cool, that is also my understanding of lnd’s behavior so at least we agree on what the behavior should be 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can a channel be closed while the funding tx is still stuck in ...
Technically you can double spend the output that was used for the funding TX with a higher fee. Then the channel will never...
Read more >
COMMON ERRORS IN KRONOS AND HOW TO FIX THEM
Some employees think it is okay to record the time as long as they don't approve it until after it is worked. That...
Read more >
rippled Server Doesn't Sync - XRPL.org
Normal Syncing Behavior​​ Syncing with the network normally takes about 5 to 15 minutes. During that time, the server does several things: Loads...
Read more >
Channel sync timing - Hostaway
Syncing reservations by iCal is a traditional way that takes generally 30 minutes up to multiple days in order to complete. When you...
Read more >
Solving a MetaMask connection issue - Ledger Support
Learn more here. Ensure that Ledger Live is closed otherwise it might prevent your Ledger device from connecting to Metamask. Open the Ethereum ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found