Root docs
Repository viewer
Legacy docs parity surface
Back to repository viewer
Repository document
ZK Verification Flow
zk-verification-flow.md
Boundary
This route preserves legacy markdown access inside the Next.js surface. The raw repository file remains authoritative.
Open raw fileZK Verification Flow
This is the shortest deterministic path for independently checking the PrivateDAO zk stack.
1. Build The Registry
npm run build:zk-registryExpected outcome:
- `docs/zk-registry.generated.json` exists
- each zk layer is mapped to its source, sample input, setup artifacts, proof artifacts, and commands
2. Verify The Registry
npm run verify:zk-registryExpected outcome:
- every registry path exists
- each layer has a non-zero public signal count
- per-layer commands align with the registry entries
- tracked artifact hashes match the live files on disk
3. Build The Transcript
npm run build:zk-transcriptExpected outcome:
- `docs/zk-transcript.generated.md` exists
- each layer is summarized in reviewer-readable form
- artifact hashes and replay commands are carried into a published transcript
4. Verify The Transcript
npm run verify:zk-transcriptExpected outcome:
- transcript content matches the current registry
- ptau and per-layer hashes are present
- reviewer replay commands remain aligned
5. Build And Verify The Attestation
npm run build:zk-attestation
npm run verify:zk-attestationExpected outcome:
- `docs/zk-attestation.generated.json` exists
- the attestation binds the registry, transcript, proving system, ptau, and per-layer proof summaries
- machine-readable reviewer state stays aligned with the canonical zk artifact tree
6. Verify The ZK Docs
npm run verify:zk-docsExpected outcome:
- the zk reviewer docs stay aligned on:
- layer names
- replay boundaries
- verification commands
- tracked circuit references
- provenance, transcript, and attestation references
7. Recompute Public Signals
npm run verify:zk-consistencyExpected outcome:
- SDK-side recomputation matches the stored public outputs for:
- vote
- delegation
- tally
8. Check Tamper Rejection
npm run verify:zk-negativeExpected outcome:
- modified public signals are rejected
- modified proof objects are rejected
9. Replay The Full Proof Path
npm run zk:allExpected outcome:
- circuits compile
- witnesses are generated from the tracked sample inputs
- proofs are generated
- proofs verify against the tracked verification keys
10. Verify The ZK Surface
npm run verify:zk-surfaceExpected outcome:
- zk docs remain present
- registry is rebuilt and checked
- consistency and tamper checks pass
- reviewer-facing zk references stay coherent
11. Verify The Full Review Surface
npm run verify:allExpected outcome:
- zk package stays aligned with the wider proof, integrity, and reviewer surfaces
What Reviewers Should Conclude
If these commands pass, the repository supports a stronger claim than “we added zk notes.”
The supported claim is:
- the zk stack is real
- the zk artifacts are wired coherently
- the public outputs are reproducible
- altered zk artifacts are rejected
- the zk review package is integrated into the same verification discipline as the rest of PrivateDAO