Skip to content

Commit ac7cb1b

Browse files
authored
validator: add heartbeat documentation (#61)
1 parent d23b248 commit ac7cb1b

File tree

3 files changed

+47
-2
lines changed

3 files changed

+47
-2
lines changed

docs/validators/instructions.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ As a validator, you don't have to be publicly registered or have a registered bu
1717

1818
As a Validator, you have three main responsibilities to keep your node running:
1919

20-
1. Continuously founding your validator key with Ether to be able to pay the transaction cost on the Ethereum network.
20+
1. Continuously funding your validator key with Ether to be able to pay the transaction cost on the Ethereum network.
2121

22-
2. Make sure you keep your validator online 24/7. This will prevent slashing of the staked tokens for being offline.
22+
2. Make sure you keep your validator online 24/7. This will prevent slashing of the staked tokens for being offline. See [Publishing heartbeats](operations.md#publishing-heartbeats)
2323

2424
3. From time to time updates will be released for the node software. Validators have to run the latest versions of the software to provide correct service.
2525

docs/validators/operations.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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

mkdocs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ nav:
99
- 'Validators':
1010
- 'Leap Network Introduction': validators/general.md
1111
- 'Token Economics': validators/economics.md
12+
- 'Operations': validators/operations.md
1213
- 'FAQ': validators/instructions.md
1314
- 'Dapp Development':
1415
- 'Plasma Bridge': 'recipes/bridge.md'

0 commit comments

Comments
 (0)