-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
proposal: move keys to cosmos-sdk #5819
Comments
In favor of this, but this will we need to clearly document what is breaking and backward-incompatible. AFAIK, addresses are NOT based on the result of |
We are talking about the |
No, they'd be separately maintained packages. The SDK would drop its dependency on Tendermint's |
started a preliminary pr #5832, if this gets accepted ill finish the work there |
Why is that PR so large? That is not what I had in mind at all. We should not be duplicating code to that extent. I would have a separate repo with core types and business logic. |
If we don't want to move it over because its a lot of code then i'd prefer the cosmos-sdk to define their own oneof for proto types. I opened it quickly so I am fine to close it as well |
In general I'm in favor of this since it seems like it would simplify Cosmos SDK maintenance cycles. Trying to understand what the proposed approach is. Are you suggesting a third repo outside of both cosmos-sdk and tendermint @alexanderbez ? |
I believe the approach is to just redefine the high-level types and interfaces (e.g. Pubkey and SECP256K1) and re-use the libraries and auxiliary logic in Tendermint (to keep code DRY). |
Do you have any interest or bandwidth to do this @aaronc? It should be pretty trivial. |
I will tackle this |
I guess this means these key types will be duplicated for now? Tendermint mostly just uses ed25519, but in theory it can/should be able to use other keys. I worry about divergence - if this is necessary for now, so be it, but ideally we can get release cycles back on track and undo this down the road to avoid divergence in types, unless there is a good reason after all (besides release cycles) for these types to be duplicated. |
Since addresses will break when the proto migration is completed, the question on how to best handle addresses arises. One option is to define custom marshallers that the SDK can use for addresses.
The path that is being taken for keys is here: #5997. |
Instead of breaking addresses can we just "grandfather" the amino encoding for multisigs? Also, let's keep #5694 in mind regarding addresses going forward. |
@aaronc what does "grandfather" mean in this context? |
Well just that we keep the current multisig around with addresses formed by amino serialization of legacy compatibility. Then we should add a second multisig that is proto-encoded and follows the new address conventions (#5694). |
I think we should move the multisgs to the SDK. I dont believe anyone other than the sdk uses them and they are not fully implemented as stated here tendermint/tendermint#2163). This would allow the sdk to customize the multisigs without waiting for tendermint to do a release. Are there any objections? |
closing this as the work has been completed. Multisig was moved to sdk but other keytypes are being imported from tendermint which is a better design. We can revisit if anything else needs to change in a different issue |
Summary
Currently, all the keys that are used in the cosmos-sdk are located in Tendermint. This can create issues sometimes if changes need to be made to the keys for the cosmos-sdk it gets blocked on a Tendermint release (major most likely).
Problem Definition
Cosmos-sdk keys (secp, sr25519, multisig) are defined in Tendermint.
Things with the current proto migration are blocked or can not be fully implemented until tendermint implements all keys in proto and does a release with this change (major release).
Proposal
move secp, sr25519 and multi-sig to cosmos-sdk
keys
directory within crypto that will house default keys that the cosmos-sdk supports.For Admin Use
The text was updated successfully, but these errors were encountered: