-
Notifications
You must be signed in to change notification settings - Fork 38
Tap tweak #159
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
Tap tweak #159
Conversation
|
We could also update the methods of |
|
The |
|
This can be rebased to fix CI |
|
|
||
| /// A trait for tweaking Schnorr public keys | ||
| /// A trait for tweaking Schnorr key types (x-only public keys and key pairs). | ||
| pub trait TapTweak { |
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.
In 063a8f5:
Why do we even have this trait? Why not use the one from Bitcoin?
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.
Same with this entire module, really.
|
In general, I'm confused about the value of this PR, which seems to just copy types and traits from rust-bitcoin 0.30. We can just reexport these. |
|
The difference between this trait and the one from rust-bitcoin is that tweaking is done with |
|
Gotcha, ok. Lemme spend a bit more time thinking if there's a better way to keep these crates in sync. But maybe not, and this PR should go in. |
apoelstra
left a comment
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 7b3f081
|
The code duplication is annoying, and we could avoid it by casting between hash types. But then again the only reason these newtypes exist is to prevent casting! One could cast between "equivalent" hashes, like |
|
Casting hashtypes would not be sufficient to eliminate the code duplication. In general, we need to do an overhaul of this library to bring it closer to rust-bitcoin, but Sanket and I decided to wait for rust-bitcoin 1.0 (or at least, for it to quiet down a lot) before trying this. |
Updates
TapTweakto latest rust-bitcoin and addsTweakedKeyPair.