arnaucube
arnaucube/davinci-paperPublic Self-hosted repository
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 dead fill:#f8cecc,stroke:#b85450;
 4  classDef chk fill:#dae8fc,stroke:#6c8ebf;
 5  classDef st fill:#fff2cc,stroke:#d6b656;
 6  P0["P0 — first package<br/>prevPkgDigest = 0"]:::pkg -->|"revote consumes P0"| P1["P1 — live package<br/>references pkgDigest(P0)"]:::pkg
 7  P1 -->|"revote consumes P1"| P2["P2 — live package"]:::pkg
 8  P0 -.->|"after consumption"| D0["P0 consumed (dead):<br/>its E removed from A"]:::dead
 9  subgraph STARK["checked in the voter's ballot STARK"]
10    S1["knows opening of prev package<br/>(same slot, same sk)"]:::chk
11    S2["NULL = PRF(sk, prevPkgDigest)"]:::chk
12  end
13  subgraph BATCH["checked by the batch program"]
14    B1["prev admitted:<br/>voteID → pkgDigest inclusion<br/>proof under current root"]:::chk
15    B2["NULL not in nullifier tree<br/>→ insert (once ever)"]:::chk
16    B3["empty slot → first package only;<br/>occupied slot → must consume<br/>exactly one predecessor"]:::chk
17  end
18  P1 --- STARK
19  P1 --- BATCH
20  N["nullifier tree (depth-256 SMT)<br/>public, unlinkable keys"]:::st
21  B2 --> N