github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/cosmos-sdk/x/slashing/spec/03_messages.md (about) 1 <!-- 2 order: 3 3 --> 4 5 # Messages 6 7 In this section we describe the processing of messages for the `slashing` module. 8 9 ## Unjail 10 11 If a validator was automatically unbonded due to downtime and wishes to come back online & 12 possibly rejoin the bonded set, it must send `TxUnjail`: 13 14 ``` 15 type TxUnjail struct { 16 ValidatorAddr sdk.AccAddress 17 } 18 19 handleMsgUnjail(tx TxUnjail) 20 21 validator = getValidator(tx.ValidatorAddr) 22 if validator == nil 23 fail with "No validator found" 24 25 if !validator.Jailed 26 fail with "Validator not jailed, cannot unjail" 27 28 info = GetValidatorSigningInfo(operator) 29 if info.Tombstoned 30 fail with "Tombstoned validator cannot be unjailed" 31 if block time < info.JailedUntil 32 fail with "Validator still jailed, cannot unjail until period has expired" 33 34 validator.Jailed = false 35 setValidator(validator) 36 37 return 38 ``` 39 40 If the validator has enough stake to be in the top `n = MaximumBondedValidators`, they will be automatically rebonded, 41 and all delegators still delegated to the validator will be rebonded and begin to again collect 42 provisions and rewards.