Bricked my node during a channel opening

Hello. Yes I’m stupid.

  • I did a triangle swap
  • I opened the channel
  • The transaction for channel open is/was unconfirmed, but broadcast
  • I completely screwed my node, and have had to reflash the SD card
  • I’ve used the channel.backup process to close all my channels
  • The transaction for opening the new channel is still unconfirmed

Should I be worried? Do I need to restore something else? Or will the channel just fail or be successful at opening?

Thanks

Why do you screwed your node? For not having patience?

I was deleting my charge-lnd charge.conf file. And I deleted from too high of a sub directory

What a delightful response. You’re really a welcoming person for the community.

1 Like

I was giving you a warning. Usually noobs are not paying attention to my warnings and in the end they get rekt. But I always say the truth in the face, no matter how it sounds.
That’s life, it’s your choice. I don’t care.

2 Likes

did you back it up before you delete it?

Never go digging around if you don’t know what you are doing 100%.

Be patient next time

  • I initiated a new channel opening on the lightning network with a known node of 1mil sats capacity
  • My Bitcoin wallet had 4mil sats withdrawn
    • 1mil for the channel
    • 3mil UTXO (Unspent Transaction Output)
  • The channel opening transaction was broadcast to the bitcoin network and was sitting unconfirmed
  • Whilst the channel opening transaction was sitting unconfirmed:
    • I accidentally deleted folders on my Umbrel node that I definitely shouldn’t have
    • I turned off my node, reflashed my SD card, and restarted/reinstalled my entire node with my 24 words
    • I executed the restorechanbackup command from my most recent channel backup (cd ~/umbrel && ./bin/lncli restorechanbackup --multi_file /data/.lnd/channel.backup)
    • I failed to take a channel.backup at any point during all of this (so had no backup of the pending channel)
    • I failed to backup anything from my node before restarting/reinstalling it
  • After a day or so, all my channels force closed, however the 4mil sats from the channel opening transaction were “lost” and I couldn’t see the channel on my end
  • I contacted the Umbrel backup team, and tried 2 backups which could have possibly contained the pending channel, and I executed that restore but still couldn’t see the pending channel (https://gist.github.com/louneskmt/e4093a62aa1ae8788ef5d92c119f22a8)
  • I contacted the node I setup the pending channel to, and they were able to successfully force close the channel, but this did not change anything on my end, I still couldn’t see the channel or UTXO
  • I tried to restart my umbrel node with reset-wallet-transactions=true - unfortunately this didn’t find the UTXO or channel
  • I was then introduced to something called chantools (https://github.com/guggero/chantools) - MAKE SURE YOU INSTALL THE NEWEST VERSION by changing the example text from v0.7.1 in both locations!!! (Umbrel on a raspberry pi4 requires ARM64 version.)
  • The author indicated that:
    • Since the other node force closed, the “missing” channel funds could now be swept by me as I have the seed.
    • Unfortunately lnd doesn’t (yet) pick up on such funds automatically.
    • And because my umbrel channel backups didn’t contain the new pending channel yet, I would need to do it manually.
    • Fortunately for such cases the author built the “chantools sweepremoteclosed” command. (https://github.com/guggero/chantools/blob/master/doc/chantools_sweepremoteclosed.md)
  • I ran the “chantools sweepremoteclosed” command whilst SSH’d into my umbrel node:
    • Making sure to adjust the fee rate to something sensible (4 was fine for me at the time)
    • Making sure to specify my own bitcoin address for the sats to be swept to (I used my umbrel node bitcoin address)
    • It will prompt you in the CMD windows for your 24 node words (I had nothing to lose and the tool indicates your words don’t leave your device)
  • This command was successful in recovering my 1mil sats channel capacity
  • To recover my 3mil UTXO, the chantools author indicated the “chantools genimportscript” command will work (https://github.com/guggero/chantools/blob/master/doc/chantools_genimportscript.md)
  • Other advice indicated that using electrum desktop wallet would be easiest to import the private keys the command can generate
  • I therefore executed the command with “-- format electrum” (chantools genimportscript --format electrum \ --recoverywindow 5000 \ --lndpaths)
  • This provided a file on my umbrel node
  • I copied this to my desktop by running a CMD command on my local desktop computer such as (scp umbrel@umbrel.local:/home/umbrel/results/genimportscript-2022-04-05-11-00-50.txt C:\Users\redacted\Desktop\genimportscript-2022-04-05-11-00-50.txt)
  • I then installed electrum desktop wallet, and copied the private keys from the file when I booted up electrum for the first time (I had to select the option to create a wallet from private keys)
  • In about 1 minute, it had a balance of my UTXO transaction (thought I understand this could take longer)

That’s it. All my funds were recovered. I’d like to thanks again the folks that helped me out, so thank you!

1 Like