flowchart TD
classDef root fill:#fff2cc,stroke:#d6b656;
classDef cfg fill:#dae8fc,stroke:#6c8ebf;
classDef ns fill:#d5e8d4,stroke:#82b366;
classDef nul fill:#ffe6cc,stroke:#d79b00;
R["stateRoot — Blake3 SMT, depth 64 (structure as v2)"]:::root
R --> C["config namespace 0x0..0xF"]:::cfg
R --> SL["ballot slot namespace
opaque chained leaves:
vote/overwrite: H(pkgDigest, s_batch)
refresh: H(previous leaf, s_batch)"]:::ns
R --> V["voteID namespace
voteID maps to pkgDigest
(v2 stored 0 — v3 authenticates
the full admitted package)"]:::ns
C --> C3["0x3: H(wardenSet)
ν, θ, epoch, ML-KEM pk hashes
(replaces the election key)"]:::cfg
C --> C4["0x4: H(A)
accumulator digest
(full A published per batch)"]:::cfg
C --> C5["0x5: nullifier tree root"]:::cfg
C5 --> N["nullifier SMT — Blake3, depth 256
key = PRF(sk_voter, pkgDigest)
insert-once = one-live-chain"]:::nul