Merge PR #2365: Validator Commission Model
* Update validator commission fields * Remove CommissionChangeToday and update to use CommissionChangeTime * Implement commission as a first class citizen type * Implement stringer for Comission * Move commission type and logic to new file * Add new commission errors * Add commission to create validator message * Implement and call UpdateValidatorCommission * Update godoc for UpdateValidatorCommission * Add Abs to the decimal type * Implement new SetValidatorCommission * Update decimal short godocs * Move set initial commission logic * Move initial commission validation to Commission type * Update initial validator commission logic and unit tests * Remove commission update time from struct and move to validator * Update validator create handler tests * Implement commission logic for CLI * Fix make lint failure * Fix make cover failure * Update edit validator logic to handle new commission rate * Fix lint and cover * Update create/edit validator simulation to include commission params * Update MsgEditValidator godoc * Update pending log * Update staking tx docs * Fix CLI create validator test * Update variables names for commission strings * Merge UpdateTime into Commission type * Update create-validator usage in docs * Update more docs with examples * More doc updates
This commit is contained in:
committed by
Rigel
parent
8774adc7de
commit
9dafa3252d
@@ -35,9 +35,16 @@ gaiacli stake create-validator \
|
||||
--address-validator=<account_cosmosval>
|
||||
--moniker="choose a moniker" \
|
||||
--chain-id=<chain_id> \
|
||||
--name=<key_name>
|
||||
--name=<key_name> \
|
||||
--commission-rate="0.10" \
|
||||
--commission-max-rate="0.20" \
|
||||
--commission-max-change-rate="0.01"
|
||||
```
|
||||
|
||||
__Note__: When specifying commission parameters, the `commission-max-change-rate`
|
||||
is used to measure % _point_ change over the `commission-rate`. E.g. 1% to 2% is
|
||||
a 100% rate increase, but only 1 percentage point.
|
||||
|
||||
### Edit Validator Description
|
||||
|
||||
You can edit your validator's public description. This info is to identify your validator, and will be relied on by delegators to decide which validators to stake to. Make sure to provide input for every flag below, otherwise the field will default to empty (`--moniker` defaults to the machine name).
|
||||
@@ -52,9 +59,17 @@ gaiacli stake edit-validator
|
||||
--identity=6A0D65E29A4CBC8E
|
||||
--details="To infinity and beyond!"
|
||||
--chain-id=<chain_id> \
|
||||
--name=<key_name>
|
||||
--name=<key_name> \
|
||||
--commission-rate="0.10"
|
||||
```
|
||||
|
||||
__Note__: The `commission-rate` value must adhere to the following invariants:
|
||||
|
||||
- Must be between 0 and the validator's `commission-max-rate`
|
||||
- Must not exceed the validator's `commission-max-change-rate` which is maximum
|
||||
% point change rate **per day**. In other words, a validator can only change
|
||||
its commission once per day and within `commission-max-change-rate` bounds.
|
||||
|
||||
### View Validator Description
|
||||
|
||||
View the validator's information with this command:
|
||||
|
||||
Reference in New Issue
Block a user