davinci-paper/v3-pq/figures/src/revote-lifecycle.mmd
v3-pq/figures/src/revote-lifecycle.mmdRaw
1flowchart LR
2 classDef pkg fill:#d5e8d4,stroke:#82b366;
3 classDef slot fill:#fff2cc,stroke:#d6b656;
4 classDef chk fill:#dae8fc,stroke:#6c8ebf;
5 classDef pub fill:#f5f5f5,stroke:#999999;
6 P0["first package P0<br/>(fresh randomness)"]:::pkg -->|"first write"| T1["slot vector T = E(P0) + Z + M"]:::slot
7 T1 -->|"refresh (any sequencer)"| T2["T' = T + Z' + M'"]:::slot
8 T2 -->|"revote: fresh package P1<br/>(no reference to P0 needed)"| T3["T'' = E(P1) + Z'' + M''"]:::slot
9 O["public record per touched slot:<br/>slot index + new vector —<br/>IDENTICAL for refresh and overwrite"]:::pub
10 T2 --- O
11 T3 --- O
12 subgraph STARK["checked in the voter's ballot STARK (same statement, first vote or revote)"]
13 S1["valid ballot, shares, masks,<br/>commitments, voteID, identity"]:::chk
14 end
15 subgraph BATCH["checked by the batch program"]
16 B1["census join: this voter owns this slot"]:::chk
17 B2["at most 1 real ballot per slot per batch"]:::chk
18 B3["accumulator delta = sum of<br/>published vector changes"]:::chk
19 end
20 P1x["last settled write wins — as v2"]:::pub
21 T3 --- P1x