Skip to content

Add support for taproot psbt fields BIP 371#681

Merged
dr-orlovsky merged 4 commits intorust-bitcoin:masterfrom
sanket1729:taproot_psbt
Dec 30, 2021
Merged

Add support for taproot psbt fields BIP 371#681
dr-orlovsky merged 4 commits intorust-bitcoin:masterfrom
sanket1729:taproot_psbt

Conversation

@sanket1729
Copy link
Copy Markdown
Member

@sanket1729 sanket1729 commented Oct 27, 2021

Built on top of #677 . Will rebase and mark ready for review after #677 is merged.

@RCasatta
Copy link
Copy Markdown
Collaborator

Built on top of #666. Will rebase and mark ready for review after #666 is merged.

I think you mean #677

@dr-orlovsky
Copy link
Copy Markdown
Collaborator

You can grab SpendingSignature type implementation from my PR #671 after which I will close it. This type IMO simplifies serialization and readibility.

@sanket1729
Copy link
Copy Markdown
Member Author

I will do so after #677 is merged. I like creating a dedicated type for (signature, sighashtype). I already have a type for it in rust-miniscript and it is indeed handy.

@dr-orlovsky
Copy link
Copy Markdown
Collaborator

dr-orlovsky commented Nov 12, 2021

Now it can be rebased and finalized

@sanket1729
Copy link
Copy Markdown
Member Author

@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.

@sanket1729 sanket1729 marked this pull request as ready for review November 15, 2021 18:31
dr-orlovsky
dr-orlovsky previously approved these changes Nov 23, 2021
Copy link
Copy Markdown
Collaborator

@dr-orlovsky dr-orlovsky left a 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)

dr-orlovsky
dr-orlovsky previously approved these changes Nov 24, 2021
Copy link
Copy Markdown
Collaborator

@dr-orlovsky dr-orlovsky left a comment

Choose a reason for hiding this comment

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

utACK 0eb6730543dc39415b2ad082255505e54f578c9d

@dr-orlovsky
Copy link
Copy Markdown
Collaborator

@Kixunil pls if you could review this Taproot release blocker as well

@Kixunil Kixunil added the one ack PRs that have one ACK, so one more can progress them label Dec 2, 2021
Copy link
Copy Markdown
Collaborator

@Kixunil Kixunil left a 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.

@sanket1729
Copy link
Copy Markdown
Member Author

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.

@sanket1729
Copy link
Copy Markdown
Member Author

Sorry for the delay. I was traveling and could not get to this. I have addressed all your comments.

@Kixunil
Copy link
Copy Markdown
Collaborator

Kixunil commented Dec 12, 2021

First light review looks good. Will try to do deeper later.

dr-orlovsky
dr-orlovsky previously approved these changes Dec 12, 2021
Copy link
Copy Markdown
Collaborator

@dr-orlovsky dr-orlovsky left a comment

Choose a reason for hiding this comment

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

tACK 4e79e4483f4eaa77a7e08d8a6245ce507f18b9e6

Excellent work! Tested all commits with git rebase -x using full test script.

@dr-orlovsky
Copy link
Copy Markdown
Collaborator

Needs a rebase again...

@sanket1729
Copy link
Copy Markdown
Member Author

Rebased

@sanket1729 sanket1729 force-pushed the taproot_psbt branch 2 times, most recently from 8387423 to 3bbd446 Compare December 24, 2021 10:36
@sanket1729
Copy link
Copy Markdown
Member Author

Rebased again after #686

apoelstra
apoelstra previously approved these changes Dec 24, 2021
Copy link
Copy Markdown
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK 3bbd4465731011c8927bd56f0c1d565a136dc542

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.

@sanket1729 sanket1729 removed the one ack PRs that have one ACK, so one more can progress them label Dec 28, 2021
@sanket1729
Copy link
Copy Markdown
Member Author

sanket1729 commented Dec 28, 2021

Pushed again to use schnorr::SchnorrSig struct from #702

Copy link
Copy Markdown
Member

@apoelstra apoelstra left a 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.

Copy link
Copy Markdown
Collaborator

@dr-orlovsky dr-orlovsky left a 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.

@dr-orlovsky dr-orlovsky merged commit 670e808 into rust-bitcoin:master Dec 30, 2021
erickcestari pushed a commit to erickcestari/rust-bitcoin that referenced this pull request Feb 4, 2026
…e features

ccc2815 Remove no-std and actual-serde features (Sexosexosexo)

Pull request description:

  Closes rust-bitcoin#681

  The `no-std` feature is no longer needed with `bitcoin` version 0.32.0

  - Update README.md (in Building I have copy-pasted part of the same section from `rust-bitcoin`)
  - Disable `actual-serde` implicit feature

  I think `FEATURES_WITH_NO_STD` now could be removed from the maintainer tools. Let me know if there's something missing or to improve!

ACKs for top commit:
  apoelstra:
    ACK ccc2815; successfully ran local tests; even nicer!

Tree-SHA512: c1146176d65d1953b765273e55d28b8c6b926bcd091e46db66858b448c9435f90db703ae7ec11425a316276ce73c8ec6025be73afbf22ea88aa6ff27224abe9a
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.

5 participants