Update to secp256k1 0.21.2#755
Conversation
b8cdd3e to
f9dde94
Compare
84c48f7 to
10883eb
Compare
1671dfc Release 0.21.2 (sanket1729) 837be22 Basic derives for Parity (sanket1729) 7059192 Wildcard export from key module (sanket1729) Pull request description: Sorry for getting another point release. This time I have tested against this branch for rust-bitcoin rust-bitcoin/rust-bitcoin#755. Hopefully, this is the last release. Next release, we should have a Release Candidate for a couple of days before publishing a release. ACKs for top commit: apoelstra: ACK 1671dfc Tree-SHA512: 263ad027da3da764bd76f719200382c47ba21a976caefc23ebef45d1c4be35ddfc80ce619b57326310aaab22bbf75ca7f1db80b45e95ec076584805efb791f3f
10883eb to
b5d4f03
Compare
We can check tweak add priv key with latest secp
b5d4f03 to
91470f5
Compare
|
This is ready for review now and kind of a blocker for the rest of the PRs for the next release. @apoelstra, @dr-orlovsky , @Kixunil |
| pub fn encode<Write: io::Write>(&self, mut writer: Write) -> io::Result<usize> { | ||
| let first_byte: u8 = | ||
| (if self.output_key_parity { 1 } else { 0 }) | self.leaf_version.as_u8(); | ||
| let first_byte: u8 = i32::from(self.output_key_parity) as u8 | self.leaf_version.as_u8(); |
There was a problem hiding this comment.
Here, we rely on Parity being only one bit. But converting to u8 should be enough.
Kixunil
left a comment
There was a problem hiding this comment.
ACK 91470f5
However, I'm highly surprised Parity is not an enum (Even, Odd) and even more strangely, impl From<i32> for Parity exists. I'd expect it to be TryFrom. I understand this is something from secp256k1, that's why I'm ACKing this even though I find it suspicious, maybe even wrong.
If someone could explain why it's not an enum, it'd be appreciated.
This was a mistake in rust-secp and I the maintainers agree with it. I think we have to live with this now till the next release :(. For what it's worth, rust-bitcoin only has states Parity(1)/Parity(0) and there is no function that takes input Parity from the user. |
|
As far as I can see, the consumer of rust-bitcoin could construct invalid |
There was a problem hiding this comment.
utACK 91470f5 in order to unlock the rest of PRs required for Taproot, which depend on this.
However I feel that we need another major secp256k1 release fixing Parity (making it enum) before releasing new rust-bitcoin version.
|
One use of deprecated function: Since this is a non-critical warning I will merge this anyway, but it may be nice to fix it in some other PR |
1671dfc2ed7f35fc71ee256392a34196b081744d Release 0.21.2 (sanket1729) 837be22e09b9e1a51eea26a67ec4112fcdf83d6e Basic derives for Parity (sanket1729) 7059192de9e1fb6cf24cb03e8be31a4d6b4f6587 Wildcard export from key module (sanket1729) Pull request description: Sorry for getting another point release. This time I have tested against this branch for rust-bitcoin rust-bitcoin/rust-bitcoin#755. Hopefully, this is the last release. Next release, we should have a Release Candidate for a couple of days before publishing a release. ACKs for top commit: apoelstra: ACK 1671dfc2ed7f35fc71ee256392a34196b081744d Tree-SHA512: 263ad027da3da764bd76f719200382c47ba21a976caefc23ebef45d1c4be35ddfc80ce619b57326310aaab22bbf75ca7f1db80b45e95ec076584805efb791f3f
1671dfc2ed7f35fc71ee256392a34196b081744d Release 0.21.2 (sanket1729) 837be22e09b9e1a51eea26a67ec4112fcdf83d6e Basic derives for Parity (sanket1729) 7059192de9e1fb6cf24cb03e8be31a4d6b4f6587 Wildcard export from key module (sanket1729) Pull request description: Sorry for getting another point release. This time I have tested against this branch for rust-bitcoin rust-bitcoin/rust-bitcoin#755. Hopefully, this is the last release. Next release, we should have a Release Candidate for a couple of days before publishing a release. ACKs for top commit: apoelstra: ACK 1671dfc2ed7f35fc71ee256392a34196b081744d Tree-SHA512: 263ad027da3da764bd76f719200382c47ba21a976caefc23ebef45d1c4be35ddfc80ce619b57326310aaab22bbf75ca7f1db80b45e95ec076584805efb791f3f
No description provided.