cosmos-sdk/docs/spec/distribution/triggers.md

27 lines
990 B
Markdown
Raw Normal View History

# Triggers
## Create or modify delegation distribution
- triggered-by: `stake.TxDelegate`, `stake.TxBeginRedelegate`, `stake.TxBeginUnbonding`
The pool of a new delegator bond will be 0 for the height at which the bond was
2018-08-08 12:03:43 -07:00
added, or the withdrawal has taken place. This is achieved by setting
`DelegatorDistInfo.WithdrawalHeight` to the height of the triggering transaction.
## Commission rate change
- triggered-by: `stake.TxEditValidator`
If a validator changes its commission rate, all commission on fees must be
2018-08-08 20:43:40 -07:00
simultaneously withdrawn using the transaction `TxWithdrawValidator`.
Additionally the change and associated height must be recorded in a
`ValidatorUpdate` state record.
2018-08-08 12:03:43 -07:00
## Change in Validator State
- triggered-by: `stake.Slash`, `stake.UpdateValidator`
2018-08-08 20:43:40 -07:00
Whenever a validator is slashed or enters/leaves the validator group all of the
validator entitled reward tokens must be simultaniously withdrawn from
`Global.Pool` and added to `ValidatorDistInfo.Pool`