github.com/Finschia/finschia-sdk@v0.48.1/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 `MsgUnjail`: 13 14 ```protobuf 15 // MsgUnjail is an sdk.Msg used for unjailing a jailed validator, thus returning 16 // them into the bonded validator set, so they can begin receiving provisions 17 // and rewards again. 18 message MsgUnjail { 19 string validator_addr = 1; 20 } 21 ``` 22 23 Below is a pseudocode of the `MsgSrv/Unjail` RPC: 24 25 ``` 26 unjail(tx MsgUnjail) 27 validator = getValidator(tx.ValidatorAddr) 28 if validator == nil 29 fail with "No validator found" 30 31 if getSelfDelegation(validator) == 0 32 fail with "validator must self delegate before unjailing" 33 34 if !validator.Jailed 35 fail with "Validator not jailed, cannot unjail" 36 37 info = GetValidatorSigningInfo(operator) 38 if info.Tombstoned 39 fail with "Tombstoned validator cannot be unjailed" 40 if block time < info.JailedUntil 41 fail with "Validator still jailed, cannot unjail until period has expired" 42 43 validator.Jailed = false 44 setValidator(validator) 45 46 return 47 ``` 48 49 If the validator has enough stake to be in the top `n = MaximumBondedValidators`, it will be automatically rebonded, 50 and all delegators still delegated to the validator will be rebonded and begin to again collect 51 provisions and rewards.