2019-02-20 10:21:57 -08:00
|
|
|
# Messages
|
2018-08-23 04:43:01 -07:00
|
|
|
|
2019-01-21 16:52:03 -08:00
|
|
|
In this section we describe the processing of messages for the `slashing` module.
|
2018-08-23 04:43:01 -07:00
|
|
|
|
2019-02-20 10:21:57 -08:00
|
|
|
## Unjail
|
2018-08-23 04:43:01 -07:00
|
|
|
|
|
|
|
If a validator was automatically unbonded due to downtime and wishes to come back online &
|
|
|
|
possibly rejoin the bonded set, it must send `TxUnjail`:
|
|
|
|
|
|
|
|
```
|
|
|
|
type TxUnjail struct {
|
|
|
|
ValidatorAddr sdk.AccAddress
|
|
|
|
}
|
|
|
|
|
|
|
|
handleMsgUnjail(tx TxUnjail)
|
|
|
|
|
|
|
|
validator = getValidator(tx.ValidatorAddr)
|
|
|
|
if validator == nil
|
|
|
|
fail with "No validator found"
|
|
|
|
|
|
|
|
if !validator.Jailed
|
|
|
|
fail with "Validator not jailed, cannot unjail"
|
|
|
|
|
2019-07-19 06:43:38 -07:00
|
|
|
info = GetValidatorSigningInfo(operator)
|
2019-01-10 17:22:49 -08:00
|
|
|
if info.Tombstoned
|
|
|
|
fail with "Tombstoned validator cannot be unjailed"
|
2018-08-23 04:43:01 -07:00
|
|
|
if block time < info.JailedUntil
|
|
|
|
fail with "Validator still jailed, cannot unjail until period has expired"
|
|
|
|
|
|
|
|
validator.Jailed = false
|
|
|
|
setValidator(validator)
|
|
|
|
|
|
|
|
return
|
|
|
|
```
|
|
|
|
|
|
|
|
If the validator has enough stake to be in the top `n = MaximumBondedValidators`, they will be automatically rebonded,
|
|
|
|
and all delegators still delegated to the validator will be rebonded and begin to again collect
|
|
|
|
provisions and rewards.
|