|
| 1 | +# Validator operations |
| 2 | + |
| 3 | +* [Keep validator account funded with ether](#keep-validator-account-funded-with-ether) |
| 4 | +* [Publishing heartbeats](#publishing-heartbeats) |
| 5 | + * [Heartbeat challenge game](#heartbeat-challenge-game) |
| 6 | +* [Stay updated to the latest node version](#stay-updated-to-the-latest-node-version) |
| 7 | + |
| 8 | +## Keep validator account funded with ether |
| 9 | + |
| 10 | +## Publishing heartbeats |
| 11 | + |
| 12 | +Upon registration each validator receives a heartbeat token on plasma. Validators are supposed to spend their heartbeat tokens to themselves periodically to signal their liveness. There is a `minimumPulse` governance parameter in Operator contract which specifies how often the heartbeat should happen. E.g. `minimumPulse` of 3 means that each validator should spend their heartbeat token at least once every three periods. |
| 13 | + |
| 14 | +### Heartbeat challenge game |
| 15 | + |
| 16 | +Everyone can challenge the validator didn't push their heartbeat within `minimumPulse` periods by calling `PoaOperator.challengeBeat` function (attaching a stake of `PoaOperator.exitStake` size). The validator will need to respond to the challenge in time defined by `casChallengeDuration` governance parameter. Validator responds by calling `PoaOperator.respondBeat` function providing inclusion proof for his heartbeat tx and the `period walk proof` from the challenged period till the period with heartbeat tx. `Period walk proof` is essentially a chain of consecutive period roots. For a validator to win the challenge game, his period walk proof should not be longer than `minimumPulse`. If validator is not responding in time, everyone can call `PoaOperator.timeoutBeat` and challenged slot will be emptied, validator slashed (not yet implemented) and challenger will get his stake back. |
| 17 | + |
| 18 | +**Example 1 (validator wins challenge game):** |
| 19 | + |
| 20 | +1. Current period tip is X and `minimumPulse` is 3. |
| 21 | +2. Challenger claims that there were no heartbeat for slot 1 |
| 22 | +3. Validator responds to challenge submitting: |
| 23 | + - a valid set of consecutive period roots X'' → X' → X |
| 24 | + - a valid proof that heartbeat tx for slot 1 was included in a period X'' |
| 25 | + |
| 26 | + In result, challenge is removed and validator is awarded challenger stake. |
| 27 | + |
| 28 | +**Example 2 (validator didn't respond on time):** |
| 29 | + |
| 30 | +1. Current period tip is X and `minimumPulse` is 3. |
| 31 | +2. Challenger claims that there were no heartbeat for slot 1 |
| 32 | +3. After `casChallengeDuration` someone calls a `timeoutBeat`: challenge is removed, validator got slashed (not yet implemented) and removed from the slot. Challenger gets his stake back and gets part of the validator stake (not yet implemented). |
| 33 | + |
| 34 | +**Example 3 (validator responds with longer period walk proof):** |
| 35 | + |
| 36 | +1. Current period tip is X and `minimumPulse` is 3. |
| 37 | +2. Challenger claims that there were no heartbeat for slot 1 |
| 38 | +3. Validator responds to challenge submitting: |
| 39 | + - a valid set of consecutive period roots X''' → X'' → X' → X |
| 40 | + - a valid proof that heartbeat tx for slot 1 was included in a period X''' |
| 41 | + |
| 42 | + In result, challenge response deemed invalid and challenge remains active |
| 43 | + |
| 44 | +## Stay updated to the latest node version |
0 commit comments