Skip to content

Use protobuf public key in BaseAccount #6886

Closed
@aaronc

Description

As a temporary measure in #5682, we decided to use amino-encoded bytes for the BaseAccount pub_key in protobuf. We can't cut a release without fixing this.

We have a cosmos.crypto.PublicKey proto type which we can use on BaseAccount.

The biggest glitch is that the AccountI interface has Get/SetPubKey methods which take crypto.PubKey interfaces.

I see two solutions:

  1. change AccountI.Get/SetPubKey to use cosmos.crypto.PublicKey proto type and then use PublicKeyCodec wherever a conversion to crypto.PubKey is needed
  2. find some magic way to cache crypto.PubKey on the BaseAccount struct (maybe with a hidden field)

My preference is to go with approach 1. Thoughts? @alexanderbez ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions