-
Notifications
You must be signed in to change notification settings - Fork 831
Remove usage of ThirtyTwoByteHash #1998
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
Remove usage of ThirtyTwoByteHash #1998
Conversation
@tcharding I don't think we can do the removal of |
026faf2
to
ac2f092
Compare
Oh interesting, even the commit log never mentions removing the trait - fail. For anyone else following, by the time we release |
de0b59f
to
b3119fc
Compare
This one should be right to go @apoelstra, only changes our usage now, does not touch the trait. My proposed plan is
|
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 b3119fc419abcfc4131a9c38bbbbe92a4c8c8e12
But needs rebase. |
b3119fc
to
da2cf17
Compare
Rebase only, no other changes. |
The rebased version seems to leave a bunch of |
Bother, I must have botched up the rebase. Will fix, thanks. |
The `ThirtyTwoByteHash` trait is defined in `secp256k1` and used in `hashes` as well as `bitcoin`. This means that we must use the same version of `hashes` in both `bitcoin` and `secp256k1`. This makes doing release difficult. Remove usage of `ThirtyTwoByteHash` and use `Message::from_slice`. Include TODO above each usage because as soon as we release the new version of secp we can use the new `Message::from_digest`. This is step backwards as far as type safety goes and it makes the code more ugly as well because it uses `expect` but thems the breaks.
da2cf17
to
d953352
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 d953352
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 d953352
The
ThirtyTwoByteHash
trait is defined insecp256k1
and used inhashes
as well asbitcoin
. This means that we must use the same version ofhashes
in bothbitcoin
andsecp256k1
. This makes doing release difficult.Remove usage of
ThirtyTwoByteHash
and useMessage::from_slice
. Include TODO above each usage because as soon as we release the new version of secp we can use the newMessage::from_digest
.This is step backwards as far as type safety goes and it makes the code more ugly as well because it uses
expect
but thems the breaks.For context see #1985