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
Add support for taproot psbt fields BIP 371 #681
Conversation
7ce7d71
to
187234f
Compare
You can grab |
I will do so after #677 is merged. I like creating a dedicated type for |
Now it can be rebased and finalized |
187234f
to
0a158a7
Compare
@dr-orlovsky, I think we should address this along with a resolution for #670. As implemented #671 is incorrect as it uses the wrong sighash type. |
0a158a7
to
eaf1887
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK eaf1887
Compared against spec descriptions & test vectors and confirm that they do match (actually found a bug in the spec: bitcoin/bips#1241)
eaf1887
to
108ba73
Compare
108ba73
to
0eb6730
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 0eb6730
@Kixunil pls if you could review this Taproot release blocker as well |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, I'm not deeply familiar with byte-level details of Taproot, so I could only check structure of the code and don't feel confident acking. I found various potential improvements and suspicious code.
Thanks, this is super valuable. I will address your comments shortly. As for the correctness of the taproot code, there are exact test vectors from the BIP that we are testing against which should give some confidence. |
0e0ba8e
to
4e79e44
Compare
Sorry for the delay. I was traveling and could not get to this. I have addressed all your comments. |
First light review looks good. Will try to do deeper later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK 4e79e44
Excellent work! Tested all commits with git rebase -x
using full test script.
4e79e44
to
7b2ccbe
Compare
7b2ccbe
to
2f7e0a9
Compare
Needs a rebase again... |
2f7e0a9
to
708f2da
Compare
Rebased |
8387423
to
3bbd446
Compare
Rebased again after #686 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 3bbd446
I also did not check the byte-for-byte compatibility with BIP 371. Hopefully the test vectors save us here. Also I did not check that the test vectors were correct.
3bbd446
to
7d8fc66
Compare
Pushed again to use |
7d8fc66
to
7d982fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 7d982fa
Wow, having the sighashtype inside the signature type really makes things cleaner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-tACK 7d982fa basing on git range-diff
. The original PR before last re-base was tested commit-by-commit.
Built on top of #677 . Will rebase and mark ready for review after #677 is merged.