Minimally-invasive separation of bitcoin keys from ECDSA signature types#757
Minimally-invasive separation of bitcoin keys from ECDSA signature types#757sanket1729 merged 5 commits intorust-bitcoin:masterfrom BP-WG:taproot/key-4
Conversation
|
Concept ACK. Given how trivial the Was also thinking of moving things outside of |
sanket1729
left a comment
There was a problem hiding this comment.
As mentioned in the review comment, we did not really deprecate bitcoin::PublicKey and bitcoin::PrivateKey. I think we can get away with nuking ecdsa::PublicKey and ecdsa::SecretKey.
And I think renaming and moving things can be left to #751 (which I have not reviewed, but might be a better place to organize things in the library).
I think we can limit the PR to removing the ecdsa::PublicKey and ecdsa::PrivateKey and leave the organization and signatures and keys to a longer-term project.
We probably want key stuff in util::key and leave only the signature stuff in ecdsa.rs. I am also okay with punting on this till 0.29 as I don't think this is critical for taproot release.
src/lib.rs
Outdated
There was a problem hiding this comment.
FYI, for the future, this warning does not really work. If you want to deprecate a type, you would have to have to
- Rename the existing type
- Create a new type
pub type OldName = NewName - Add deprecated above it
|
I've redone this PR trying to follow your suggestions. Now it effectively moves keys from |
|
ACK 6ecc8809112ef17c428c24eefaf300f7f84d86b1 except for Kixunil's comment about deprecation. |
|
@apoelstra updated, needs re-ACK |
sanket1729
left a comment
There was a problem hiding this comment.
ACK 38fdb159b458d4ccc344f19eb64d0613670380d8
… of bitcoin ECDSA cf0c48c Improve Debug for PrivateKey (Dr Maxim Orlovsky) b65a6ae Test for extended private key keypair generation f5875a (Dr Maxim Orlovsky) e6a3d60 BIP32 extended key `to_ecdsa()` and `to_schnorr()` methods (Dr Maxim Orlovsky) b72f56c BIP32 extended keys are using Scep256k1 keys instead of bitcoin ECDSA (Dr Maxim Orlovsky) Pull request description: This is third step required to introduce Schnorr key support according to #588. This PR starts API-breaking changes and is follow-up to non-API breaking #589, which is already merged. PR rationale: BIP32 does not support uncompressed keys and using type with compression flag was a mistake ACKs for top commit: apoelstra: ACK cf0c48c sanket1729: ACK cf0c48c. #757 might need rework after this Tree-SHA512: 6356a65004e7517256bacbf9aaeb69a22fd8536b341e567c5c4e819288e1105d083fe12ac0641404c407c97acf039bdc525f8e02b1b594a6cdda90106f3b1bdc
Kixunil
left a comment
There was a problem hiding this comment.
ACK 38fdb159b458d4ccc344f19eb64d0613670380d8
|
Had to re-base after the latest merges; @sanket1729 @Kixunil @apoelstra pls re-ACK |
apoelstra
left a comment
There was a problem hiding this comment.
ACK 0d5d0f349c3c80d364aa3908b4e7c22b52a355a6
|
Now this one also has conflicts |
|
Rebased, another re-ACK required, sorry, @Kixunil @apoelstra @sanket1729 |
apoelstra
left a comment
There was a problem hiding this comment.
re-ACK 406f4c403a04d54daee2448ba7e1de3421c1782a
Took me a moment to figure out why you removed the PSBT changes, but it is because PSBT now uses rust-secp key types and is immune to API changes for rust-bitcoin key types.
|
@apoelstra which is good, isn't it? :D |
Kixunil
left a comment
There was a problem hiding this comment.
ACK 406f4c403a04d54daee2448ba7e1de3421c1782a
|
Rebased after latest merges. @apoelstra @Kixunil @sanket1729 please re-ACK. This will complete Taproot todo list and open a way to get first RC |
apoelstra
left a comment
There was a problem hiding this comment.
ACK 05f4d0792e5a5fc52cfb191e801b2fcec192c811
Kixunil
left a comment
There was a problem hiding this comment.
ACK 05f4d0792e5a5fc52cfb191e801b2fcec192c811
This commit tries to achieve separation of signature- and key-related types, previously mixed in a single ECDSA module. Rationale: bitcoin key types are not specific for signature algorithm. This is achieved through - Remove key mod with its content moved to ecdsa mod - Re-export keys under key module in util mod - to make git generate diff for the rename of ecdsa mod in the next commit correctly.
|
Sorry guys, I know you are tired of this - but while we were-reACKing it it had to be rebased once again :( Hopefully for the last time. |
This PR tries to do a minimally-invazive separation of signature- and key-related types, previously mixed in a single
util::ecdsamodule.Rationale: bitcoin key types are not specific for signature algorithm. See discussion at #588.
This PR became possible after we moved on new
secp256k1version exposingXonlyPublicKeytype, since now all key types may co-exist in a single module under different namesThe PR goal is achieved through
ecmod in it;keymodule, removing previous depreciation message for bitcoin keys.