lightninglabs / chantools

A loose collection of tools all somehow related to lnd and Lightning Network channels.
MIT License
222 stars 32 forks source link

Trying to install Chantools No Luck So far #81

Closed Gotagreatdog closed 1 year ago

Gotagreatdog commented 1 year ago

Hi,

I am running an Umbrel lightning node. On Aug 20 when trying to install the latest Umbrel update my node crashed (it's a Raspberry Pi 4). I was able to load a channel backup which force closed all my channels except 4. Now I'm trying to recover from those 4 channels which no longer even appear in my node's list of channels. Until yesterday all 4 channels were still open per Amboss. I was able to contact 2 of the 4 node owners and they closed the channels but of course nothing has come back to my node. I've been referred to chantools

Update - just got chantools installed on my PC. Now I need help to recover funds from 4 channels. I don't have channels backups as the ones provided by Umbrel don't work.

umbrel@umbrel:~ $ ~/umbrel/scripts/app compose lightning exec lnd lncli pendingchannels { “total_limbo_balance”: “0”, “pending_open_channels”: [ ], “pending_closing_channels”: [ ], “pending_force_closing_channels”: [ ], “waiting_close_channels”: [ { “channel”: { “remote_node_pub”: “0298f6074a454a1f5345cb2a7c6f9fce206cd0bf675d177cdbf0ca7508dd28852f”, “channel_point”: “aca482b98702787896393ac4b5bad24a5832be36834868058a445c3d5d6619dd:1”, “capacity”: “10000000”, “local_balance”: “0”, “remote_balance”: “0”, “local_chan_reserve_sat”: “0”, “remote_chan_reserve_sat”: “0”, “initiator”: “INITIATOR_LOCAL”, “commitment_type”: “STATIC_REMOTE_KEY”, “num_forwarding_packages”: “0”, “chan_status_flags”: “ChanStatusRestored”, “private”: true }, “limbo_balance”: “0”, “commitments”: { “local_txid”: “”, “remote_txid”: “”, “remote_pending_txid”: “”, “local_commit_fee_sat”: “0”, “remote_commit_fee_sat”: “0”, “remote_pending_commit_fee_sat”: “0” }, “closing_txid”: “” }, { “channel”: { “remote_node_pub”: “02b56712f65c281a1eacee0bb034699a716535a1c8ae1c912e232893d4ad27d3a7”, “channel_point”: “78f29d9603fe441ee22d0d54f0c2cf0269c27988edae42dafec679e920b4dfd4:0”, “capacity”: “2000000”, “local_balance”: “0”, “remote_balance”: “0”, “local_chan_reserve_sat”: “0”, “remote_chan_reserve_sat”: “0”, “initiator”: “INITIATOR_REMOTE”, “commitment_type”: “ANCHORS”, “num_forwarding_packages”: “0”, “chan_status_flags”: “ChanStatusLocalDataLoss|ChanStatusRestored”, “private”: true }, “limbo_balance”: “0”, “commitments”: { “local_txid”: “”, “remote_txid”: “”, “remote_pending_txid”: “”, “local_commit_fee_sat”: “0”, “remote_commit_fee_sat”: “0”, “remote_pending_commit_fee_sat”: “0” }, “closing_txid”: “” }, { “channel”: { “remote_node_pub”: “02defb1fcf3d8e6254abffe422327ab049848b80d2198bf41afb39d86ee70c4797”, “channel_point”: “39cd769e5c8df97e77ea2f70c70b80fa750cb7a14d0eaab46962fb2794bc03b5:1”, “capacity”: “700933”, “local_balance”: “0”, “remote_balance”: “0”, “local_chan_reserve_sat”: “0”, “remote_chan_reserve_sat”: “0”, “initiator”: “INITIATOR_REMOTE”, “commitment_type”: “ANCHORS”, “num_forwarding_packages”: “0”, “chan_status_flags”: “ChanStatusRestored”, “private”: true }, “limbo_balance”: “0”, “commitments”: { “local_txid”: “”, “remote_txid”: “”, “remote_pending_txid”: “”, “local_commit_fee_sat”: “0”, “remote_commit_fee_sat”: “0”, “remote_pending_commit_fee_sat”: “0” }, “closing_txid”: “” }, { “channel”: { “remote_node_pub”: “02e9046555a9665145b0dbd7f135744598418df7d61d3660659641886ef1274844”, “channel_point”: “0d9995d4136eadacf887931107a9f0cd029e497040ee3c508fbb37cd189731bd:0”, “capacity”: “20000000”, “local_balance”: “0”, “remote_balance”: “0”, “local_chan_reserve_sat”: “0”, “remote_chan_reserve_sat”: “0”, “initiator”: “INITIATOR_LOCAL”, “commitment_type”: “ANCHORS”, “num_forwarding_packages”: “0”, “chan_status_flags”: “ChanStatusRestored”, “private”: true }, “limbo_balance”: “0”, “commitments”: { “local_txid”: “”, “remote_txid”: “”, “remote_pending_txid”: “”, “local_commit_fee_sat”: “0”, “remote_commit_fee_sat”: “0”, “remote_pending_commit_fee_sat”: “0” }, “closing_txid”: “” } ] }

guggero commented 1 year ago

You have a typo in the curl command. It's /guggero/ not /gugerro/.

Gotagreatdog commented 1 year ago

Thank you - got it installed on my PC. How can I recover funds from this one for example https://mempool.space/address/bc1qe9mdvux59atefjntekefp5azlrk5vcflrel7ft4h6jwcnhmwgj5s6qujj4

Now that it's closed it doesn't even appear in my channel list on Amboss https://amboss.space/node/028d3abdb56f8b2675d87fcf15e79e3f4df19d0de3a4a811684be95785fa565581

I have been in contact with the node owner

guggero commented 1 year ago

Try chantools sweepremoteclosed --recoverywindow 500 --feerate 5 --sweepaddr <a_new_address_from_your_wallet_to_send_the_funds_to> --publish

Gotagreatdog commented 1 year ago

Thank you but it's not clear to me - do I run this command from my PC and not from my Umbrel node? How is the system going to know the closed channel ID? Am I supposed to use my node's wallet address for the sweepaddr?

guggero commented 1 year ago

You can run that on any machine. It will ask for your seed and then go through 500 (--recoverywindow) addresses of possible locations for funds after force closes. Yes, as I attempted to make clear in the <...> part, you use a new address from the wallet you want to send the funds to for --sweepaddr.

Gotagreatdog commented 1 year ago

It worked for the 2 closed channels!!! And I was able to forceclose another and recover from it too!!! Thank you so much!! Now to force close the last channel which is offline 2 months appears dead, is there a way to recover from it? https://1ml.com/channel/862485508159438849

H:\Documents\chantools>chantools triggerforceclose \ --peer 02defb1fcf3d8e6254abffe422327ab049848b80d2198bf41afb39d86ee70c4797@3iwrk6kmfkuxkv2miduage7vjikt5loldqjjbkx4qt2sag5klmwaxzyd.onion:9735 --channel_point 39cd769e5c8df97e77ea2f70c70b80fa750cb7a14d0eaab46962fb2794bc03b5:1 2023-10-02 21:27:50.121 [INF] CHAN: chantools version v0.11.3 commit Input your 24-word mnemonic separated by spaces: .... Input your cipher seed passphrase (press enter if your seed doesn't have a passphrase):.... Error: error dialing peer: dial tcp: lookup 3iwrk6kmfkuxkv2miduage7vjikt5loldqjjbkx4qt2sag5klmwaxzyd.onion: no such host

guggero commented 1 year ago

The triggerforceclose command only works for certain versions of CLN peers. And it doesn't work with Tor. You'll need to attempt to get those remaining two channels closed on your Umbrel node itself. But it looks like at least one of the nodes (the one you pasted the onion address for) is broken down as well as it says the last update was 2 months ago... If you have any way to contact the node operators, you can together manually recover the funds. Otherwise adding your node's details to www.node-recovery.com is your only option for those zombie channels.

Closing the issue as the main problem was a typo in the PGP key URL. Feel free to continue the thread if you have further questions.