-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
multisig: add type and bitarray #6241
Conversation
👋 Thanks for creating a PR! Before we can merge this PR, please make sure that all the following items have been For contributor use:
For admin use:
Thank you for your contribution to the Cosmos-SDK! 🚀 |
Codecov Report
@@ Coverage Diff @@
## master #6241 +/- ##
==========================================
+ Coverage 54.75% 54.89% +0.13%
==========================================
Files 442 446 +4
Lines 26960 27158 +198
==========================================
+ Hits 14763 14908 +145
- Misses 11162 11193 +31
- Partials 1035 1057 +22 |
types/compact_bit_array.go
Outdated
"strings" | ||
) | ||
|
||
// CompactBitArray is an implementation of a space efficient bit array. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented out code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bump
} | ||
|
||
|
||
// MultiSignature wraps the signatures from a PubKeyMultisigThreshold. | ||
// See cosmos_sdk.tx.v1.ModeInfo.Multi for how to specify which signers signed | ||
// and with which modes | ||
message MultiSignature { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we now have two MultiSignature
proto types. This can certainly lead to confusion. What are the differences between the two and when use one over the other? The godocs should reflect this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I brought back the hand-written type as I am not sure how this should be integrated to provide backwards compatability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aaronc? Sorry, I'm a bit out of touch with the proto work with how it relates to keys...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexanderbez are you referring to the ModeInfo.Multi
and Multisignature
? One is for the mode infos and the other is the actual signatures.... Is that what you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, just Multisignature
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused. There are two types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes -- review the PR here. There are types.Multisignature
and multisig.Multisignature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine for now. I'm going to need to rework some of this stuff to support multiple signing modes in #6216. In the meantime, maybe we can rename multisig.Multisignature
to something different?
crypto/multisig/codec.go
Outdated
var cdc = amino.NewCodec() | ||
|
||
func init() { | ||
cdc.RegisterInterface((*crypto.PubKey)(nil), nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the need to register here for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these should be kept around to provide backwards compatibility. I haven't dug into how this will be done with the recent changes to the ADR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a good start to me. It's going to need to be modified for sure to support the new sign modes in #6216 and also to address legacy addresses. But I can work from this and would prefer we move forward with merging so I have a starting point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
Description
This pr aims to add the multisign from tendermint to the sdk
closes: #XXXX