-
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
Update signbatch multisig to work online #7801
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
c6e7665
add test for signbatch multisig
sahith-narahari f2b9abd
Merge branch 'master' into sahith/add-batch-test
sahith-narahari df711ac
update test
sahith-narahari c12c85a
Merge remote-tracking branch 'origin/sahith/add-batch-test' into sahi…
sahith-narahari 9821c77
Merge branch 'master' into sahith/add-batch-test
54ecb38
Merge branch 'master' of github.com:cosmos/cosmos-sdk into sahith/add…
sahith-narahari a3f8641
fix sign batch multisig
sahith-narahari 9879824
Merge branch 'master' of github.com:cosmos/cosmos-sdk into sahith/add…
sahith-narahari 21226ec
update offline usage
sahith-narahari f10cf86
Merge branch 'master' into sahith/add-batch-test
sahith-narahari e8d7643
Merge branch 'master' into sahith/add-batch-test
sahith-narahari 30f1193
address comments
sahith-narahari 0ae873b
Merge branch 'master' into sahith/add-batch-test
ea2ab08
Merge branch 'master' into sahith/add-batch-test
sahith-narahari File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 is a bit confusing for me. Why don't we use DIRECT as default sign mode?
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.
Don't we need multisig to use legacy mode for signing?
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 believe that's incorrect, the
multisig.LegacyAminoPubKey
can generate nested signatures that are SIGN_MODE_DIRECT.Here's how I tested it: in the following test file
cosmos-sdk/crypto/keys/multisig/multisig_test.go
Line 273 in 90e9370
SignMode: signing.SignMode_SIGN_MODE_DIRECT
, all tests still pass.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.
We cannot use sign mode direct with multisig as we'll need to know all the signers info before, this may not be a problem with tests though
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.
We should revisit the sign modes discussion from #6078. I'm partly responsible for this, but I did also try to present alternatives, none of them got enough buy-in so we are where we are with
SIGN_MODE_DIRECT
and it's less than ideal for multisigsThere 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.
See specifically the discussion starting from here: #6078 (comment)
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.
@zmanian could you advise on this please?
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.
Maybe we need a new
SIGN_MODE
?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.
IMO yeah SIGN_MODE_DIRECT isn't great for multisig users but I don't think it is a show stopper
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 suggest we merge this PR as is, to fix the existing multisig implementation of signbatch.
I'll create a separate issue to continue this discussion on a new SIGN_MODE for multisigs , which will be a breaking change and can't be incorporated into stargate at this point.