-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
PubKey Post-0.40 Cleanup Effort #7357
Comments
I updated the issue to provide more details about Here the issue is message serialization. While updating the description and describing the problem of Using concrete types for signature verificationI like the simplicity of the tendermints' interface: In the OP, we propose a functional argument, which must be a closure:
This function doesn't take a message to serialize it. It must have it in it's context. So, the Instead, maybe we can store the Or maybe we can have a wrapper, and always call it before calling
|
Apart from ed25519, secp256k1, the sdk has another privkey type: cosmos-sdk/crypto/ledger/ledger_secp256k1.go Lines 40 to 48 in 320a852
It's the same as secp256k1, except that the privkey takes a I would say yes, just wanted to make sure no-one is objecting. |
There is a separate task for that: #7718 -- I was already looking at it. |
BTW, why this file is in |
This file contains a struct representing the private key from a ledger hw wallet. If we add convert it to proto, I suppose we can put it in |
I think the next step here would be forming a WG (maybe just 1-2 people even) for tackling this together with any desired upgrades to TxBuilder & TxFactory? I don't think its super high priority, but this is what imo the next steps would be. |
this will be on hold until the implementation of ADR071 is completed. |
This issue will continue open until the implementation of the Cryptoprovider can be finished as explained in this PR #18824 and working on this Repo https://github.com/cosmos/crypto |
Summary
The PubKey refactor that has been going on for 0.40 left some follow-up work to be cleaned up.
Problem Definition
#6886 (comment) was the fastest way to get Any PubKeys working for 0.40. However, there are some clean-ups tasks to be done.
Proposal
This are small bits that we discussed in issues, PRs, offline chats. Putting them here so we're able to track them.
Remove the old
message PublicKey
proto oneof (@blushi) Remove the old message PublicKey proto oneof #7390Decouple the SDK from Tendermint's
PubKey
interface. Replacetmcrypto.PubKey
by our owncryptotypes.PubKey
(@blushi) Replace tmcrypto.PubKey by our own cryptotypes.PubKey #7419The scope of this item is to not use
tmcrypto.PubKey
throughout the codebase (except when we interface with TM methods), and use our owncryptotypes.PubKey
everywhere. Note:cryptotypes.PubKey
may or may not itself extendtmcrypto.PubKey
, see next point.Rethink our own
PubKey
interface. e.g.VerifySignature
right now doesn't make sense .There is only one place where we don't agree with the
tendermint.PubKey
interface: theVerifySingature
method. This is the Tendermint definition:The
msg []bytes
is serialized with a specific serialization method. Unfortunately, we don't have a single serialization in Cosmos-SDK. We relay on both legacy amino and the protobuf serialization. Hence we need to know what serialization was used when the signature was created, and only then we can serialize the message to validate the signature.Remove bech32 PubKey support #7447 Remove Bech32 encoding of PubKeys.
Should MarshalYAML return
[]byte
instead ofstring
?Shoud
PrivKeyLedgerSecp256k1
be a proto message? In order to remove theLedgerPrivKey
interface. Replace tmcrypto.PubKey by our own cryptotypes.PubKey #7419 (comment)wrapper.GetPubKeys silently ignore unpacked keys wrapper.GetPubKeys silently ignore unpacked keys #8129
cc @blushi Feel free to add more items that you can think of.
For Admin Use
The text was updated successfully, but these errors were encountered: