-
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
Introduce combined sigs commit #63
Conversation
@@ -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 comment
The 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 comment
The 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 comment
The 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.
@@ -156,7 +158,7 @@ func TestSlashingMsgs(t *testing.T) { | |||
require.Equal(t, sdk.ValAddress(addr1), validator.OperatorAddress) | |||
require.Equal(t, sdk.Bonded, validator.Status) | |||
require.True(sdk.IntEq(t, bondTokens, validator.BondedTokens())) | |||
unjailMsg := MsgUnjail{ValidatorAddr: sdk.ValAddress(validator.ConsPubKey.Address())} | |||
unjailMsg := MsgUnjail{ValidatorAddr: validator.OperatorAddress} |
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).
No description provided.