Background:
- The latest version of the SDK's staking module params includes
min_commission_rate.
- Both the existing
ValidatorCommissionDecorator of antehandler logic and the newly introduced min_commission_rate in the SDK staking module params perform the same function: they validate the minimum commission rate during the Create and Edit validator processes. Ref1, Ref2.
Suggestions:
antehandler adds complexity due to nested msg processing like authz, performing unnecessary validations on all transactions. Simplifying this process is recommended.
- Without specific reasons against it, using
min_commission_rate is advised for its simplicity and manageability. Moreover, as this parameter is governed not hardcoded, it can be easily modified through governance proposals in the future.
Action Items:
If the decision is made to use min_commission_rate instead of antehandler:
- Remove
ValidatorCommissionDecorator from the antehandler.
- Set the initial value of
min_commission_rate in the upgrade handler.
This will be incorporated in the ongoing SDK v50 bump PR b-harvest#53
Background:
min_commission_rate.ValidatorCommissionDecoratorof antehandler logic and the newly introducedmin_commission_ratein the SDK staking module params perform the same function: they validate the minimum commission rate during the Create and Edit validator processes. Ref1, Ref2.Suggestions:
antehandleradds complexity due to nested msg processing likeauthz, performing unnecessary validations on all transactions. Simplifying this process is recommended.min_commission_rateis advised for its simplicity and manageability. Moreover, as this parameter is governed not hardcoded, it can be easily modified through governance proposals in the future.Action Items:
If the decision is made to use
min_commission_rateinstead ofantehandler:ValidatorCommissionDecoratorfrom theantehandler.min_commission_ratein the upgrade handler.This will be incorporated in the ongoing SDK v50 bump PR b-harvest#53