fix: remove delegator addess from MsgCreateValidator#14567
Conversation
alexanderbez
left a comment
There was a problem hiding this comment.
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.
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.
Maybe we can ignore the value without giving error?
alexanderbez
left a comment
There was a problem hiding this comment.
Left one comment on making the docs clearer, but other LGTM!
julienrbrt
left a comment
There was a problem hiding this comment.
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.mdReviewers 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