-
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
fix: remove delegator addess from MsgCreateValidator #14567
Conversation
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.
Thanks for the contrib @0xmuralik! As others have pointed out, we cannot remove fields from Proto schemas. Rather, you must explicitly mark them as deprecated and then you can remove/modify all associated business logic.
@@ -88,17 +81,10 @@ func (msg MsgCreateValidator) GetSignBytes() []byte { | |||
// ValidateBasic implements the sdk.Msg interface. | |||
func (msg MsgCreateValidator) ValidateBasic() error { |
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.
Given that the field is deprecated, we may want to return an error when it is being used?
This makes it state breaking however. But we've done that from bank multisend (going from multiples inputs to only one supported)
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 can ignore the value without giving error?
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.
Left one comment on making the docs clearer, but other LGTM!
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.
lgtm, can you add a changelog entry as well?
Nice! Thanks for the contribution! Once a changelog entry is in, we'll merge 🙌 |
Description
Remove delegator address field from MsgCreateValidator and other related checks, as one cannot create a validator on behalf of other address (i.e. both delegator and validator address are always same while creating a new validator).
Closes: #4595
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change