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
Derive Hash on a bunch of types #990
Conversation
d468a91
to
c4f9419
Compare
c401c12
to
76e63a0
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.
Concept ACK, but hashes of secret data need to be removed or protected.
src/util/key.rs
Outdated
@@ -235,7 +235,7 @@ impl FromStr for PublicKey { | |||
} | |||
|
|||
/// A Bitcoin ECDSA private key | |||
#[derive(Copy, Clone, PartialEq, Eq)] | |||
#[derive(Copy, Clone, PartialEq, Eq, Hash)] |
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.
This is dangerous, see rust-bitcoin/rust-secp256k1#471
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.
Will remove, cheers.
src/util/bip32.rs
Outdated
@@ -45,7 +45,7 @@ impl_array_newtype!(Fingerprint, u8, 4); | |||
impl_bytes_newtype!(Fingerprint, 4); | |||
|
|||
/// Extended private key | |||
#[derive(Copy, Clone, PartialEq, Eq)] | |||
#[derive(Copy, Clone, PartialEq, Eq, Hash)] |
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.
Also dangerous.
In preparation for being able to derive `Hash` on all types in `miniscript`, derive `Hash` on all of the required types.
I'd ACK this, why is it a draft? |
Was waiting for CI run to finish before taking off draft and forgot about it. |
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 ef7fef0
IMO no need to wait for CI before undrafting next time.
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 ef7fef0
ef7fef0 Derive Hash on a bunch of types (Tobin C. Harding) Pull request description: In preparation for being able to derive `Hash` on all types in `miniscript`, derive `Hash` on all of the required types. This PR includes all the changes in https://github.com/rust-bitcoin/rust-bitcoin/pull/933/files and hence supersedes it. ref: rust-bitcoin/rust-miniscript#226 ACKs for top commit: Kixunil: ACK ef7fef0 apoelstra: ACK ef7fef0 Tree-SHA512: 1a1db8b4df2ea8f9e176434bb6fdee5b96f47dcdc6395ebc59e5f5ac5eb13a66fb61e1d90cdbbf12a027f7685fdff21060338c5f27b9d9bf5e9fee452c7c7e83
In preparation for being able to derive
Hash
on all types inminiscript
, deriveHash
on all of the required types.This PR includes all the changes in https://github.com/rust-bitcoin/rust-bitcoin/pull/933/files and hence supersedes it.
ref: rust-bitcoin/rust-miniscript#226