Skip to content
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

Add PublicKeyCodec #6372

Merged
merged 12 commits into from
Jun 9, 2020
Merged

Add PublicKeyCodec #6372

merged 12 commits into from
Jun 9, 2020

Conversation

aaronc
Copy link
Member

@aaronc aaronc commented Jun 9, 2020

This is one of several bite-size PR's that are being pulled out of #6216 to implement #6213.

This adds:

  • a crypto/types.PublicKeyCodec interface for marshaling crypto.PubKeys to and from the protobuf PublicKey representation
  • std.DefaultPublicKeyCodec which supports the standard public key types supported by the SDK

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

@codecov
Copy link

codecov bot commented Jun 9, 2020

Codecov Report

Merging #6372 into master will decrease coverage by 4.14%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #6372      +/-   ##
==========================================
- Coverage   55.61%   51.46%   -4.15%     
==========================================
  Files         454      297     -157     
  Lines       27360    17022   -10338     
==========================================
- Hits        15215     8761    -6454     
+ Misses      11050     7673    -3377     
+ Partials     1095      588     -507     

@aaronc aaronc marked this pull request as ready for review June 9, 2020 17:00
@aaronc aaronc added the R4R label Jun 9, 2020
Copy link
Member

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK, I will add to the tendermint tracking issue that the key types have been migrated to []byte. Do you still need to register the old keys in a amino codec?

Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

std/pubkey.go Outdated Show resolved Hide resolved
std/pubkey.go Outdated Show resolved Hide resolved
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
@aaronc
Copy link
Member Author

aaronc commented Jun 9, 2020

utACK, I will add to the tendermint tracking issue that the key types have been migrated to []byte. Do you still need to register the old keys in a amino codec?

Yes, for now we are providing amino backwards compatibility.

@aaronc aaronc added the A:automerge Automatically merge PR once all prerequisites pass. label Jun 9, 2020
@tac0turtle
Copy link
Member

Yes, for now we are providing amino backwards compatibility.

you will then have to provide a cryptoamino codec similar to the one called from Tendermint. We are removing amino entirely.

@mergify mergify bot merged commit 6740d27 into master Jun 9, 2020
@mergify mergify bot deleted the aaronc/6213-pubkey-codec branch June 9, 2020 19:41
@aaronc
Copy link
Member Author

aaronc commented Jun 9, 2020

Yes, for now we are providing amino backwards compatibility.

you will then have to provide a cryptoamino codec similar to the one called from Tendermint. We are removing amino entirely.

We've already added one ;)

@clevinson clevinson added this to the v0.39 milestone Jun 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants