-
Notifications
You must be signed in to change notification settings - Fork 19
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
Introduce combined sigs commit #63
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,10 @@ package types | |
import ( | ||
"bytes" | ||
"encoding/json" | ||
"fmt" | ||
|
||
"github.com/tendermint/tendermint/crypto" | ||
"github.com/tendermint/tendermint/crypto/bls12_381" | ||
yaml "gopkg.in/yaml.v2" | ||
|
||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
|
@@ -50,6 +52,10 @@ func NewMsgCreateValidator( | |
description Description, commission CommissionRates, minSelfDelegation sdk.Int, | ||
) MsgCreateValidator { | ||
|
||
if _, ok := pubKey.(bls12_381.PubKeyBls); !ok && pubKey != nil { | ||
panic(fmt.Sprintf("Attempt to create validator with non bls based public key is invalid!\n")) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know if this should be a panic. Should we not just reject the msg when the MsgCreateValidator is handled? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It does not need to be a panic, it is quite useful when making the switch to find out when code has tried to create an incorrect validator. I can remove it if you like? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, that's fine. I agree it is useful when switching to keep this. |
||
} | ||
|
||
return MsgCreateValidator{ | ||
Description: description, | ||
DelegatorAddress: sdk.AccAddress(valAddr), | ||
|
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.
Why did this need to change?
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.
The address that is signing the unjail message should be the 'operating address' of the validator, which is not related to its consensus public key (now bls).