-
Notifications
You must be signed in to change notification settings - Fork 912
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
Anchor spends crash node #6973
Comments
Temporary patch to avoid issue ElementsProject#6973 Changelog-None
My hunch here is that this is an old(-ish) node, or a node that had a channel open without The solutions here are twofold: prevent using tweaked pubkey outputs to bump anchors, or teach the signer about those tweaked key. I was unable to decode the PSBT, so I cannot verify this. But @michael1011 could probably take a look at the inputs and tell us if this idea is correct. |
This is a v2 PSBT. using the following to convert it to v0:
we can decode the result:
analyzepsbt:
|
The release |
The latest version of liberally has been pulled din and it should be fixed, as far as I know. |
Alright. I am gonna close this for now and will reopen in case we observe the same behaviour again |
Still happening on |
linking a patch that at least prevents the crash endothermicdev@5aebe15 |
This is the bitcoind decode (after using lightningd to change to PSBT v0) for this one:
While there's no proper backtrace on the second report, the first shows |
OK. Looking at the testnet one. We have two inputs: second is the anchor, which is finalized fine, and first is a to-remote output from a previous unilateral close, which for some reason we do not finalize. Interestingly, that output did get spent according to the testnet explorer (which is why I know its script!), so we obviously can spend it somehow, but we're failing to do so in this case. Here's the tx which spent it (as third output): https://blockstream.info/testnet/tx/d1d87af8946333427a76d76f9524a8590e15eb1ef3bf691f32907dc4627781a8 |
For the anchor input there is only the |
Good point, but we're OK with that (and indeed, you can see the final_scriptwitness for that one). I've added a test, but it works. I think we'll need @endothermicdev 's "don't crash" fix, and more logging to get to the bottom of this if it happens again... |
Temporary patch to avoid issue ElementsProject#6973 [ Add much more logging! --RR ] Changelog-Fixed: lightningd: avoid crash on signing failure when trying to spend anchor outputs.
Temporary patch to avoid issue ElementsProject#6973 [ Add much more logging! --RR ] Changelog-Fixed: lightningd: avoid crash on signing failure when trying to spend anchor outputs.
Temporary patch to avoid issue #6973 [ Add much more logging! --RR ] Changelog-Fixed: lightningd: avoid crash on signing failure when trying to spend anchor outputs.
Temporary patch to avoid issue ElementsProject#6973 [ Add much more logging! --RR ] Changelog-Fixed: lightningd: avoid crash on signing failure when trying to spend anchor outputs.
I'm closing this for now, will reopen if it happens again. |
Issue and Steps to Reproduce
When trying to create what I think is an anchor spend, CLN crashes:
We have had this happen twice:
getinfo
outputThe only experimental feature we have enabled are the anchors
The text was updated successfully, but these errors were encountered: