-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconsensus.msc
More file actions
58 lines (40 loc) · 1.87 KB
/
consensus.msc
File metadata and controls
58 lines (40 loc) · 1.87 KB
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
# Copy this page and paste in https://mscgen.js.org
msc {
arcgradient="10",
hscale="1.6",
wordwraparcs=true;
txh [label="Transaction History", textbgcolor="gray", textcolor="white", linecolor="gray"],
rs [label="Reserved Slot", linecolor="gray"],
ws [label="Waiting Slot", linecolor="gray"],
vs [label="Voting Slot", linecolor="gray"],
txb [label="Transaction Block", textbgcolor="black", textcolor="white"];
ws box ws [label="receive `Txm` from client"];
ws => txh [label="`Txm` added"];
ws box ws [label="validate `Txm` for `INIT`"];
ws :> txh [label="if not passed, update `reason`", linecolor="red"];
--- [label="[INIT]"];
ws box ws [label="broadcast `Txm`"];
ws box ws [label="wait `Ba` for `Txm`\nfrom other validators"];
ws box ws [label="check threshold\n(90 or 100% of connected)"];
ws :> rs [label="if expired"];
rs box rs [label="`Ba` added"];
ws :> vs [label="if passed"];
--- [label="all validators got `Txm`"];
vs box vs [label="`Ba` added"];
--- [label="[SIGN]"];
vs box vs [label="validate `Txm` for `SIGN`"];
vs box vs [label="vote `Ba`"];
vs box vs [label="broadcast `Ba`"];
vs box vs [label="check threshold\n(>=66% of validators)"];
vs rbox vs [label="if not passed, remove from slot"];
vs :> txh [label="if not passed, update `reason`", linecolor="red"];
vs rbox vs [label="if passed, set to `ACCEPT`"];
--- [label="[ACCEPT]"];
vs box vs [label="broadcast `Ba`"];
vs box vs [label="check threshold\n(>=66% of validators)"];
vs rbox vs [label="if not passed, remove from slot"];
vs :> txh [label="if not passed, update `reason`", linecolor="red"];
vs rbox vs [label="if passed, set to `ALL-CONFIRM`"];
--- [label="[ALL-CONFIRM]"];
vs => txb [label="store `Txm`"];
}