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

sweepremoteclosed can't sweep P2WSH #147

Closed
jordodev opened this issue Jul 21, 2024 · 5 comments
Closed

sweepremoteclosed can't sweep P2WSH #147

jordodev opened this issue Jul 21, 2024 · 5 comments

Comments

@jordodev
Copy link

We have a number of channels that were in an ABANDONED state due to a (since-fixed) bug in LND v18.0 and LiT.

They have been force-closed on the remote side, and the funds were sent to a a P2WSH address.

I have attempted to use sweepremoteclosed with a recovery window as high as 10000, still finding 0 sweep targets with total value of 0 satoshis which is below the dust limit of 600.

Have also tried chantools genimportscript --format electrum --recoverywindow 20000 --lndpaths and imported private keys into electrum, but unfortunately it only finds channel open/close transactions with P2WPKH outputs.

How can I sweep these funds?

@guggero
Copy link
Member

guggero commented Jul 22, 2024

Can you DM me some of the close transactions in question? I assume they were of type anchor channel?

@guggero
Copy link
Member

guggero commented Jul 22, 2024

Also, what version of chantools did you use? The releases v0.13.1 or latest master? If it was master then you should try again as there was a small bug that might've skipped unspent outputs in some cases (merged now: #146).

The recovery window highly depends on the number of channels opened over the lifetime of the node. 10k might be enough or it might not be. If you want to get a max number, I'd suggest running lncli wallet accounts list | grep -A8 'default' | grep -A3 1017 and look at the external_key_count, then take one more than that.

@jordodev
Copy link
Author

That was it!

Updated to latest master with your merged changes, ran sweepremoteclosed with --recoverywindow 1000 and it found my 5 force-closed channels. Then repeated with --publish and funds have now been recovered.

Huge thanks @guggero

@guggero
Copy link
Member

guggero commented Jul 22, 2024

Woohoo, happy to hear. And sorry about that stupid bug 🙈

@guggero guggero closed this as completed Jul 22, 2024
@guggero
Copy link
Member

guggero commented Jul 22, 2024

Fixed by #146.

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

2 participants