/
state_validation.plantuml
83 lines (68 loc) · 2.57 KB
/
state_validation.plantuml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
@startuml
state "Data Check & Cognitive Work" as cognition {
state "..." as prev
[*] --> prev
prev --> [*]
}
state "Validation" as validation {
state "Lottery for validators" as lottery
state "Gathering validators" as gathering
state "Validating" as validating
state "Disclosing Veto" as disclosing
state "Counting votes" as counting
state "Fineing validators" as fineing
state "Waiting appeals" as waiting
state "Killing workers" as killing
state "Delivering results, payouts & mining" as delivering
lottery: – All validating nodes participate
lottery: – Chances are proportional to stake and reputation
gathering: — Awaits congirmations from
gathering: all selected validtors
gathering: – Timeout leads to penalty
gathering: and validator replacements
delivering: – Can have "partial validation" status
delivering: – In this case QA stake is partially repaid to the Client
delivering: – Payouts and cognitive mining
validating: – Limited by time
validating: – Timeout initiates new
validating: lottery to replace delayed
validating: validators with a new ones
validating: and leads to a fine
disclosing: – Limited by time
disclosing: – Timeout leads to fine
disclosing: validators are not replaced
fineing: – Validators are fined
fineing: loosing reputation and stakes
counting: – Defines True and Faulty Nodes
waiting: – Wait for initial appeals
waiting: with some given timeout time
killing: – Removing stakes/reputation from
killing: the Worker Nodes reported Faulty
prev --> lottery: all results\nare delivered
lottery --> gathering
lottery --> delivering: not enough\nvalidators
gathering --> lottery: some validators\nrejected or\ntimed out
gathering --> validating: all validators\nresponded
gathering --> delivering: timeout\nlimit\nreached
validating --> disclosing: all validators\nsumitted results
validating --> lottery: for timed out\nvalidators
disclosing --> counting: validators\nsubmitted keys
disclosing --> fineing: some validators\ntimed out
fineing --> counting
counting --> delivering: no Faulty\nnodes
counting --> waiting: Faulty nodes\nfound
waiting --> killing: No appeals\nwere submitted
killing --> delivering
delivering --> [*]
}
state "Closed Arbitration" as closed {
state "..." as more1
}
state "Public Arbitration" as public {
state "..." as more2
}
closed --> public
waiting --> closed: appeal was submitted
closed --> delivering: upon\narbitration\ncompletion
public --> delivering: upon\narbitration\ncompletion
@enduml