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

**BROKEN** 02b21ca992bf95e3f324302265ad86cec24f36166fd7afca44efa0809aaa8b25c5-chan#312: Cannot broadcast our commitment tx: they have a future one #7187

Closed
Rassah opened this issue Mar 31, 2024 · 10 comments
Assignees

Comments

@Rassah
Copy link

Rassah commented Mar 31, 2024

Issue and Steps to Reproduce

Channel was force closed months ago. During node start logs show:
BROKEN 02b21ca992bf95e3f324302265ad86cec24f36166fd7afca44efa0809aaa8b25c5-chan#312: Cannot broadcast our commitment tx: they have a future one

The closing transaction has been mined back in January.
lightning-cli listclosedchannels 02b21ca992bf95e3f324302265ad86cec24f36166fd7afca44efa0809aaa8b25c5 result is
{
"closedchannels": []
}

lightning-cli listpeers 02b21ca992bf95e3f324302265ad86cec24f36166fd7afca44efa0809aaa8b25c5 result includes
"state_changes": [
{
"timestamp": "2023-10-26T14:15:45.455Z",
"old_state": "CHANNELD_AWAITING_LOCKIN",
"new_state": "CHANNELD_NORMAL",
"cause": "remote",
"message": "Lockin complete"
},
{
"timestamp": "2024-01-09T11:08:32.320Z",
"old_state": "CHANNELD_NORMAL",
"new_state": "AWAITING_UNILATERAL",
"cause": "local",
"message": "channeld: sent Awaiting unilateral close"
},
{
"timestamp": "2024-01-09T11:33:49.191Z",
"old_state": "AWAITING_UNILATERAL",
"new_state": "FUNDING_SPEND_SEEN",
"cause": "local",
"message": "Onchain funding spend"
},
{
"timestamp": "2024-01-09T11:33:49.323Z",
"old_state": "FUNDING_SPEND_SEEN",
"new_state": "ONCHAIN",
"cause": "local",
"message": "Onchain init reply"
},
{
"timestamp": "2024-01-09T12:08:20.360Z",
"old_state": "ONCHAIN",
"new_state": "FUNDING_SPEND_SEEN",
"cause": "local",
"message": "Onchain funding spend"
},

with last part repeating over and over up through today. At the very end is
"status": [
"ONCHAIN:Owning subdaemon onchaind died (61952)"
],

using bitcoin-cli Iistfunds, the funds are still listed under "channels" with the same "peer_id"
"connected": false,
"state": "ONCHAIN",
"our_amount_msat": 1559141212,

So it seems CLN thinks the funds are still stuck in a channel somehow, even though the closing transaction has been mined already.

How do I recover the funds in this channel?

@nakoshi-satamoto
Copy link

This might be related, see this and if this solution works for you

#7162

@Rassah
Copy link
Author

Rassah commented Apr 1, 2024

I am able to start my Lightning node fine without issues. And using lightning-cli withdraw all only collected the funds I already had available. The funds in the closed channel are still locked, even though the closing transaction confirmed at the beginning of January. I'm afraid that if I forget about this channel, such as with the dev command, these funds may become unrecoverable.

@rustyrussell rustyrussell self-assigned this Apr 2, 2024
@rustyrussell
Copy link
Contributor

Did you restore your database at some point? That's the only way we should ever believe our peer is ahead of us.

If you lose your database, you may not be able to recover funds in theory, but in modern setups it is possible to do so. (And you should get a big nasty message if we cannot).

Is there anything from onchaind in your logs?

@Rassah
Copy link
Author

Rassah commented Apr 2, 2024

Database was not restored. It was a new node set up from scratch that has been running for almost a year. I didn't find any onchaind in the logs, but I'm not sure where all but the last 10,000 entries are. This is CLN running on Start9

@rustyrussell
Copy link
Contributor

Hmm, can you restart with log-level=debug and send me the logs? Email [email protected] works if you prefer...

@Rassah
Copy link
Author

Rassah commented Apr 11, 2024

I emailed the log file directly. Hoping you can help. There's a lot of money locked in that node.

@rustyrussell
Copy link
Contributor

Thanks. This is the recovery plugin, @adi2011. Looks like it's misbehaving?

@adi2011
Copy link
Collaborator

adi2011 commented Apr 14, 2024

Hmm there is one more issue similar to this. Can you please forward the log file so that I can have a look at it. @rustyrussell

@Rassah
Copy link
Author

Rassah commented Apr 14, 2024 via email

@cdecker
Copy link
Member

cdecker commented Jun 13, 2024

There seems to be nothing actionable here, as the ID collision in recovery is already being tracked / fixed in another issue. Closing this for now.

@cdecker cdecker closed this as completed Jun 13, 2024
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

5 participants