Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during channel opening results in funds stuck in Limbo #878

Closed
hodlin3614 opened this issue Oct 21, 2024 · 11 comments
Closed

Error during channel opening results in funds stuck in Limbo #878

hodlin3614 opened this issue Oct 21, 2024 · 11 comments

Comments

@hodlin3614
Copy link

I been running an LND node for about 4 months, and up to a couple days ago I managed it using RTL . Out of curiosity tried Lightning terminal and liked the interface and features so I tried opening a new channel with it.
Everything seemed ok until after the last step, when a red error message popped out in the corner, but the transaction still went through and was broadcasted!
The transaction was confirmed but no new channel was created, and the funds are now parked in what I suppose is a 2 of 2 multisig address shared between me and the other node. The ugly part is that this was no small channel, I have a bit over 10M sats in limbo due to this error.

My setup is based on the MyNode software integration, running in a proxmox vm on a mini PC. I manage it remotely from a different location using Zerotier VPN.

The Mynode GUI shows a very limited range of logs so I haven't been able to find what happened at the time of the problem. I lack experience managing it using CLI, so i greatly appreciate some guidance in retrieving more useful information to post here

@levmi
Copy link
Contributor

levmi commented Oct 21, 2024

Do you have any logs that you could share during the channel setup? Also, could you share the tx info?

@hodlin3614
Copy link
Author

Please I need some guidance to retrieve the logs.
TX is 6ed621303e345fbd4dec0c5c02ae229c25958d548e7241f32bd9bcc10dc89c87

@hodlin3614
Copy link
Author

Managed to find the logs. Not much info on litd.log, lnd.log indicate a weird error about fees?
Feerate was set at 2 sat/vB, which was apropiate at that time, it got confirmed in about 2 hours.

litd.log

lnd.log

@guggero
Copy link
Member

guggero commented Oct 22, 2024

What version are you on? lnd, litd and bitcoind?

@hodlin3614
Copy link
Author

Bitcoin = knots 26.1
Lnd = 0.17.4
Litd = 0.12.2

Thanks for passing by. I came here summoning the experts because even that I don't know a thing about coding, I think the fact that an UI allowed a defective transaction to be broadcasted is a very scary bug.

About the transaction, can someone point me where I can find help or resources to recover the funds? is it possible?
All I can finds are tools that aim to recover funds from a crashed node; nothing about a half cooked channel

@guggero
Copy link
Member

guggero commented Oct 22, 2024

Okay, looking at the log, you ran into btcsuite/btcd#2142 which was fixed in lnd v0.17.5-beta (see https://github.com/lightningnetwork/lnd/releases/tag/v0.17.5-beta).

What you can try are the following steps (from easy to very involved, depending on your luck):

  • Try force closing the channel yourself (lncli closechannel --force)
  • If the above results in an error like "channel not found", your node doesn't have the proper channel state anymore. The next step would be to try to ask the remote node if they have the full state, by running chantools triggerforceclose, download the latest release of chantools from here: https://github.com/lightninglabs/chantools/releases/tag/v0.13.3
  • If the peer also doesn't have the state anymore, the only remaining workflow is the chantools zombie recovery workflow. But that requires your peer to help you by running a couple commands on their side. So I hope you have a way to contact them.

@hodlin3614
Copy link
Author

Thank you, so there is some hope in recovering the funds!

So if I understand correctly, the first option should be running the command
lncli closechannel --force 6ed621303e345fbd4dec0c5c02ae229c25958d548e7241f32bd9bcc10dc89c87:1
Don't have many hopes on that because my node never recognized a channel. LND list it just as an external onchain transaction

The other peer is Kraken's node. Managing to communicate to someone capable of running comands on their side could be a proper adventure.

@guggero
Copy link
Member

guggero commented Oct 22, 2024

See lncli closechannel --help. You need to use the --chan_point 6ed621303e345fbd4dec0c5c02ae229c25958d548e7241f32bd9bcc10dc89c87:1 flag if you specify both the TXID and outpoint.

@hodlin3614
Copy link
Author

Amazing!
triggerforceclose worked!

I'm very grateful of your help and patience with my newbie questions. Up to now I have always managed my node using only GUI. The last couple of days have been very stressful and a steep learning curve.

Now, I'm not completely out of the woods yet. Have some trouble with the sweepremoteclosed command.

2024-10-22 21:40:34.802 [INF] CHAN: Found 1 unspent outputs for address bc1qdvfkffygwvgqmwmhumkh4syy0m4hqutwcd26c0fkwe5ys966vk0qrdvn3g
Error: could not query API for addresses with funds: could not query unspent: error decoding data from API 'https://blockstream.info/api/address/bc1qcnky0hvgjxfa35xgu6m79rksdalf6aj7mvw87unm6dwwvfzym4vqsf0aex', server might be experiencing temporary issues, try again later; error details: invalid character 'Y' looking for beginning of value

The address found is the correct output from the remote close. No clue about the api error or the address is looking at

@guggero
Copy link
Member

guggero commented Oct 23, 2024

triggerforceclose worked!

Nice, that is good news indeed!

Unfortunately the blockstream.info API is quite unstable (or blocks users after a couple of requests). You can use my server: --apiurl https://electrs.gugger.guru.

Closing the issue now as both the cause and the solution seem to be clear.

@guggero guggero closed this as completed Oct 23, 2024
@hodlin3614
Copy link
Author

https://electrs.gugger.guru

That did the trick. Funds are safu now
Thank you very much, you are a hero!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants