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 SignatureV2 infrastructure #6373

Merged
merged 35 commits into from
Jun 12, 2020
Merged

Add SignatureV2 infrastructure #6373

merged 35 commits into from
Jun 12, 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.

Summary

This PR adds the basic application logic types for dealing with multiple signing modes as well as multi-signatures in a backwards compatible and hopefully convenient way. The top-level new types here are SignatureV2 to be used for both signing and verifying and the multisig.PubKey interface.

Details

  • SignMode was moved into a separate package (types/tx/signing) because of cyclic dependency issues
  • SignatureV2 and Single|MultiSignatureData types were added
  • multisig.PubKey interface was added which uses MultiSignatureData for verification
  • multisig.Multisignature was renamed to AminoMultisignature and convenience functions for converting between amino StdSignature/AminoMultisignature and new SignatureV2/SignatureData types were added
  • multisig.AddSignature* functions now use MultiSignatureData instead of AminoMultisignature

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

@jgimeno jgimeno closed this Jun 9, 2020
@jgimeno jgimeno reopened this Jun 9, 2020
@codecov
Copy link

codecov bot commented Jun 9, 2020

Codecov Report

Merging #6373 into master will increase coverage by 0.01%.
The diff coverage is 72.29%.

@@            Coverage Diff             @@
##           master    #6373      +/-   ##
==========================================
+ Coverage   55.66%   55.67%   +0.01%     
==========================================
  Files         465      465              
  Lines       27674    27782     +108     
==========================================
+ Hits        15404    15469      +65     
- Misses      11169    11206      +37     
- Partials     1101     1107       +6     

@aaronc aaronc changed the title Aaronc/6213 sig v2 Add SignatureV2 infrastructure Jun 9, 2020
@aaronc aaronc marked this pull request as ready for review June 9, 2020 19:58
@aaronc aaronc added the T: Proto Breaking Protobuf breaking changes: generally don't do this! label Jun 9, 2020
@sahith-narahari
Copy link
Contributor

@fedekunze I addressed the comments, please take a look

@clevinson clevinson added this to the v0.39 milestone Jun 11, 2020
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.

ACK, minor comments

crypto/types/multisig/multisignature.go Show resolved Hide resolved
crypto/types/multisig/multisignature.go Outdated Show resolved Hide resolved
x/auth/types/stdtx.go Outdated Show resolved Hide resolved
@aaronc aaronc added the A:automerge Automatically merge PR once all prerequisites pass. label Jun 12, 2020
@mergify mergify bot merged commit 60f7edf into master Jun 12, 2020
@mergify mergify bot deleted the aaronc/6213-sig-v2 branch June 12, 2020 18:13
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. T: Proto Breaking Protobuf breaking changes: generally don't do this!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants