MsgCreateValidator's validate commission does not call validate commission. Its not clear to me if its ever checked on the MsgCreateValidator codepath. If its not, that would allow for max commission rates greater than 1.
Commission.Validate is only called (v Validator) SetInitialCommission
, so it seems as though you can update your comission to invalid values?
/cc @cwgoes @sunnya97
Does this need another point release pre-launch?
Commission
has the Validate
and ValidateNewRate
methods. Validate
is called during SetInitialCommission
which is called during the validator creation process. The latter is called during UpdateValidatorCommission
which is called during the edit validator handler. So you cannot update your commission to invalid values.
Do you still see a problem/bug?
Ah your right, thanks! This still should be called in MsgCreateValidator's validate basic though.
Well, SetInitialCommission
still has to be called in the handler because it needs the BFT block time. Validate basic can still perform lazy validation (i.e. just validate the rates) though!
Most helpful comment
Ah your right, thanks! This still should be called in MsgCreateValidator's validate basic though.