arnaucube
arnaucube/davinci-paperPublic Self-hosted repository
davinci-paper/v2/figures/mt-state-mermaid.mmd
v2/figures/mt-state-mermaid.mmdRaw
 1---
 2config:
 3  theme: neutral
 4---
 5flowchart TB
 6 subgraph s1[" "]
 7        NInt[" "]
 8        EInt[" "]
 9        n1[" "]
10        EB["encrypted ballots [...]"]
11        A["commitments [...]"]
12        V["bool"]
13  end
14 subgraph s2[" "]
15        SI1[" "]
16        SIA[" "]
17        SIB[" "]
18        P0["processID"]
19        P1["censusRoot"]
20        P2["ballotMode"]
21        P3["encryptionKey"]
22        P4["results add"]
23        P5["results sub"]
24  end
25    Root["root hash"] --> NInt & EInt & n1 & SI1 & SIA & SIB
26    SI1 -- 0x0 --> P0
27    SI1 -- 0x1 --> P1
28    SIA -- 0x2 --> P2
29    SIA -- 0x3 --> P3
30    SIB -- 0x4 --> P4
31    SIB -- 0x5 --> P5
32    NInt -- nullifiers --> EB
33    EInt -- addresses --> A
34    n1 -- voteIDs --> V
35    n2[" "]
36    n1@{ shape: rect}
37    n2@{ shape: text}
38     NInt:::internal
39     EInt:::internal
40     n1:::internal
41     EB:::leaf
42     A:::leaf
43     A:::leaf
44     V:::leaf
45     V:::empty
46     SI1:::internal
47     SIA:::internal
48     SIB:::internal
49     P0:::leaf
50     P1:::leaf
51     P2:::leaf
52     P3:::leaf
53     P4:::leaf
54     P5:::leaf
55     Root:::internal
56    classDef internal fill:#f8f,stroke:#333,stroke-width:2px
57    classDef leaf     fill:#bbf,stroke:#333,stroke-width:1px
58    classDef empty    fill:#eee, stroke:#999,# stroke-dasharray:5 5