You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can however add a Transition for ValidPosAction::ChangeCommissionRate, for which the model would need to have a pre-condition that ensures that the new rate is less than or equal to the validator's max_commission_rate_change with respect to its last epoch's rate. I think this can be done in in the abstract SM by e.g. looking through self.all_valid_actions().into_iter().rev() for the last rate value (either from a previous ValidPosAction::ChangeCommissionRate or ValidPosAction::InitValidator if it's not been changed before) before the last epoch switch. However, the epoch switch is currently not preserved in the abstract state machine - we only have the current epoch, so we might need to change that first.
From a thread of comments on #695:
We can however add a
Transition
forValidPosAction::ChangeCommissionRate
, for which the model would need to have a pre-condition that ensures that the new rate is less than or equal to the validator'smax_commission_rate_change
with respect to its last epoch's rate. I think this can be done in in the abstract SM by e.g. looking throughself.all_valid_actions().into_iter().rev()
for the last rate value (either from a previousValidPosAction::ChangeCommissionRate
orValidPosAction::InitValidator
if it's not been changed before) before the last epoch switch. However, the epoch switch is currently not preserved in the abstract state machine - we only have the currentepoch
, so we might need to change that first.Originally posted by @tzemanovic in #695 (comment)
The text was updated successfully, but these errors were encountered: