Update transactions.md

This commit is contained in:
Christopher Goes 2018-08-13 14:51:01 +02:00
parent 1a64c8747c
commit 4f8c9e4917
1 changed files with 32 additions and 10 deletions

View File

@ -1,19 +1,41 @@
## Transaction Overview
### TxProveLive In this section we describe the processing of transactions for the `slashing` module.
If a validator was automatically unbonded due to liveness issues and wishes to ### TxUnjail
assert it is still online, it can send `TxProveLive`:
If a validator was automatically unbonded due to downtime and wishes to come back online &
possibly rejoin the bonded set, it must send `TxUnjail`:
```golang ```golang
type TxProveLive struct { type TxUnjail struct {
PubKey crypto.PubKey ValidatorAddr sdk.AccAddress
} }
``` ```
All delegators in the temporary unbonding pool which have not All delegators still delegated to the validator will be rebonded and begin
transacted to move will be bonded back to the now-live validator and begin to to again collect provisions and rewards.
once again collect provisions and rewards.
``` ```golang
TODO: pseudo-code handleMsgUnjail(operator sdk.AccAddress)
validator := getValidator(operator)
if validator == nil
fail with "No validator found"
if !validator.Jailed
fail with "Validator not jailed, cannot unjail"
info := getValidatorSigningInfo(operator)
if BlockHeader.Time.Before(info.JailedUntil)
fail with "Validator still jailed, cannot unjail until period has expired"
// Update the start height so the validator won't be immediately unbonded again
info.StartHeight = BlockHeight
setValidatorSigningInfo(info)
validator.Jailed = false
setValidator(validator)
return
``` ```