Conversation
|
The invalid Taproot transactions have been reproduced in embit itself, so it's not a bug in Seedsigner. Related issue: diybitcoinhardware/embit#65 |
|
Approach ACK Not tested in my local environment. |
|
Required fix in the Embit library to sign SIGHASH_SINGLE and SIGHASH_ANYONECANPAY Taproot transactions with a Seedsigner: diybitcoinhardware/embit#66 |
@1ma were you able to build the seedsigner with the embit fix? |
|
Yes, and it worked fine. If I recall correctly I only had to reference my fork of embit and the bugfix branch in Seedsigner's requirements.txt file, though I don't remember the specific pip commands. I tested it in the emulator, but I guess you could as well build an .img file for a real device. |
Description
Solves issue #545
Before this change, attempting to sign a psbt specifying any sighash other than SIGHASH_ALL would show an error on the Seedsigner.
The gist of the issue is that if the sighash argument of
psbt.sign_with()is not explitictly set to None, embit doesn't take the sighash in the psbt into account. With sighash=None, embit signs each input in the manner that the psbt data specifies.This has been tested in native segwit and taproot. However, taproot transactions with an exotic sighash are not signed correctly. I suspect this could be an issue with embit, not seedsigner.
I'm not sure how to write a test for this change, feedback appreciated.
Testing approach
This pull request is categorized as a:
Checklist
pytestand made sure all unit tests pass before sumbitting the PRIf you modified or added functionality/workflow, did you add new unit tests?
I have tested this PR on the following platforms/os:
Note: Keep your changes limited in scope; if you uncover other issues or improvements along the way, ideally submit those as a separate PR. The more complicated the PR the harder to review, test, and merge.