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

Fix Partial Signature Signing. #120

Merged
merged 1 commit into from
Jan 30, 2024
Merged

Conversation

ziggie1984
Copy link
Contributor

@ziggie1984 ziggie1984 commented Jan 30, 2024

Was fixed after a node-runner reached out with the following stack trace:

Helping someone after a crash :

"I use chantools version v0.12.1 for the recovery of 2 channels with the command:"


panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x316d0c]

goroutine 1 [running]:
github.com/btcsuite/btcd/txscript.NewTxSigHashes(0x4000127998, {0x11057a0, 0x4000186188})
github.com/btcsuite/btcd@v0.23.5-0.20230905170901-80f5a0ffdf36/txscript/hashcache.go:243 +0x12c
github.com/lightninglabs/chantools/lnd.(*Signer).AddPartialSignature(0x0?, 0x4000127a18, {{0x2312ba5?, 0x13dea5f?}, 0x400056b680?}, 0x40000486e0, {0x4000586d70, 0x47, 0x47}, 0x0)
github.com/lightninglabs/chantools/lnd/signer.go:154 +0x78
main.(*zombieRecoveryMakeOfferCommand).Execute(0x40001a6c00, 0xa48680?, {0x4000017af0?, 0x4000017ac8?, 0x0?})
github.com/lightninglabs/chantools/cmd/chantools/zombierecovery_makeoffer.go:425 +0x1f3c
github.com/spf13/cobra.(*Command).execute(0x4000215b80, {0x400007e9c0, 0x6, 0x6})
github.com/spf13/cobra@v1.1.3/command.go:852 +0x554
github.com/spf13/cobra.(*Command).ExecuteC(0x19d6f20)
github.com/spf13/cobra@v1.1.3/command.go:960 +0x310
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/cobra@v1.1.3/command.go:897
main.main()
github.com/lightninglabs/chantools/cmd/chantools/root.go:137 +0x370

We need to make sure we populate all the necessary
witness/nonwitness because for taproot inputs we need the prevout
so we check for it in the hashcash creation.
@ziggie1984 ziggie1984 marked this pull request as ready for review January 30, 2024 13:54
@guggero guggero linked an issue Jan 30, 2024 that may be closed by this pull request
Copy link
Member

@guggero guggero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix! I guess I just never actually tested the command with multiple channels before.

LGTM 🎉

@guggero guggero merged commit cf4cabb into lightninglabs:master Jan 30, 2024
2 checks passed
@wyssblitz
Copy link

thank you for the fix. We will try it today or tomorrow and give you a feedback.

@wyssblitz
Copy link

wyssblitz commented Jan 31, 2024

the error persists with version v0.12.2. We used the binary, did not compile from source.

we only used the command chantools zombierecovery makeoffer with the previously generated keyfiles.

We will try again doing the following

  • regenerate the keyfiles on both nodes, using the original matchfile
  • try the makoffer again
  • if this does not work we will change the matchfile to a single channel

If there is no other suggestion from you side, we will proceed either today or tomorrow and keep you informed

@guggero
Copy link
Member

guggero commented Jan 31, 2024

You need to compile from source from the latest master branch. I didn't create a new release yet.

@wyssblitz
Copy link

The fix worked like a charm after I did the compile. A big thanks to all involved!

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

Successfully merging this pull request may close these issues.

chantools zombierecovery makeoffer
3 participants