Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
198 commits
Select commit Hold shift + click to select a range
28ef6fb
Model the prover's wide-reduction randomness
TalDerei Sep 6, 2026
c0a18f2
Prove the sparse IPA and linear-mask distribution bounds
TalDerei Sep 6, 2026
f36085c
Simulate the joint IPA transcript and account for sampling bias
TalDerei Sep 6, 2026
68a7215
Connect IPA simulation to the existing Lean verifier
TalDerei Sep 6, 2026
3c2905d
Simulate the linear mask together with its commitments
TalDerei Sep 6, 2026
977915c
Prove joint hiding for masked polynomial columns
TalDerei Sep 6, 2026
d3cf12e
Account for fresh IPA challenges and failed attempts
TalDerei Sep 6, 2026
576975e
Simulate successful IPA attempts and independent retries
TalDerei Sep 6, 2026
899e7d2
Prove joint pre-IPA masking and its batched sampling law
TalDerei Sep 6, 2026
28aaa97
Prove the computed multi-opening supplies the IPA input
TalDerei Sep 6, 2026
ee8d9da
Compose the joint prover simulation over the full field tape
TalDerei Sep 6, 2026
7842f3e
Connect joint simulation to the computed quotient and verifier proof
TalDerei Sep 6, 2026
4cd3892
Derive quotient capacity from the public circuit degree profile
TalDerei Sep 6, 2026
ca23b5d
Derive the quotient identity from row constraint satisfaction
TalDerei Sep 6, 2026
ff9a0a8
Account for inconsistent row states in the joint simulation
TalDerei Sep 6, 2026
8f89f64
Retain the full verifier challenge tape in the joint simulation
TalDerei Sep 6, 2026
5d295a4
Bound exceptional challenges in the joint interactive simulation
TalDerei Sep 6, 2026
3d0cef9
Model product-row exceptions and bound zero denominators
TalDerei Sep 6, 2026
1f4a867
Derive lookup constraints from the computed row scan
TalDerei Sep 6, 2026
24dcd3d
Derive permutation constraints from chained product scans
TalDerei Sep 6, 2026
57aa906
Prove lookup sorting correctness and success on valid prefixes
TalDerei Sep 6, 2026
d3f2c00
Connect partial column construction to the masking schedule
TalDerei Sep 6, 2026
9d80cf9
Derive product constraints from the executed column schedule
TalDerei Sep 7, 2026
128e22e
Bound zero denominators in the reference column construction
TalDerei Sep 7, 2026
867be6f
Integrate concrete denominator errors into the joint simulation
TalDerei Sep 7, 2026
f0f0b6a
zk: derive computed copy products from original witness equations
TalDerei Sep 7, 2026
ce3d2ba
zk: derive reference row validity from original witness constraints
TalDerei Sep 7, 2026
108dfd5
zk: derive fixed masking rows and public degrees from keygen
TalDerei Sep 7, 2026
6f58662
zk: reduce keygen mask checks to the initial selector row
TalDerei Sep 7, 2026
5e8b091
zk: match Action fixed prefix and narrow initial mask checks
TalDerei Sep 7, 2026
9285279
zk: connect domain disclosure to the full reference proof
TalDerei Sep 7, 2026
7ffb723
zk: construct a second valid reference witness on inactive rows
TalDerei Sep 7, 2026
8b2fe72
zk: derive unused-row copy bounds from the compiler
TalDerei Sep 7, 2026
1788918
zk: derive sigma coherence from compiler permutation rows
TalDerei Sep 7, 2026
8583787
zk: clarify protocol theorem scope
TalDerei Sep 7, 2026
a271669
zk: simulate encoded prover attempts and failed prefixes
TalDerei Sep 7, 2026
8029a2a
zk: bound full prover attempt failures
TalDerei Sep 7, 2026
4e34be6
ci: allow change detection in private repositories
TalDerei Sep 7, 2026
57038fa
zk: simulate successful full prover observations
TalDerei Sep 7, 2026
9c38e7a
zk: simulate retained whole-prover retry histories
TalDerei Sep 7, 2026
f614724
zk: establish IPA and attempt-check causality
TalDerei Sep 7, 2026
e85c868
zk: connect staged traces and column causality
TalDerei Sep 7, 2026
9f01f75
docs: explain prover randomness sample count
TalDerei Sep 7, 2026
ad2be56
zk: prove commitment causality on the full prover tape
TalDerei Sep 7, 2026
8bd0c20
zk: prove causality of the complete reference prover
TalDerei Sep 7, 2026
260737d
zk: connect Vesta encodings and blinding to simulation
TalDerei Sep 7, 2026
2b0dbd0
zk: specialize simulation to Action compiler public data
TalDerei Sep 7, 2026
1800da7
zk: connect verifier commitment routing to reference groups
TalDerei Sep 7, 2026
34df995
zk: derive verifier query patterns and Action slot order
TalDerei Sep 7, 2026
887362f
zk: derive the five verifier opening groups from query layout
TalDerei Sep 7, 2026
6d647f1
zk: derive verifier member claims and compressed evaluations
TalDerei Sep 7, 2026
f19b7b2
zk: connect the complete verifier opening to the reference
TalDerei Sep 7, 2026
291f845
zk: derive compiler commitments with the kernel-checked domain root
TalDerei Sep 7, 2026
2f73e5f
zk: derive Action reference key parameters from configuration
TalDerei Sep 7, 2026
7474c5c
zk: prove the actual Action compiler degree profile
TalDerei Sep 7, 2026
cad10f4
zk: derive Action masking checks from source expressions
TalDerei Sep 7, 2026
6e311e2
zk: prove compositional Action selector traces
TalDerei Sep 7, 2026
1b54d4c
zk: prove the complete Action selector trace
TalDerei Sep 7, 2026
dfcf264
zk: prove initial inactivity of Action selectors
TalDerei Sep 7, 2026
a99cde6
zk: preserve inactive selectors through compression
TalDerei Sep 7, 2026
a744e90
zk: derive Action masking from compiler boundary values
TalDerei Sep 7, 2026
ed53358
zk: certify the finite Action compression inputs
TalDerei Sep 7, 2026
3e81ef7
zk: certify ordered Action placement and bitwise packing
TalDerei Sep 7, 2026
3f1b181
zk: discharge the Action selector-compression premise
TalDerei Sep 7, 2026
e1c9aac
docs: add checklist for optional ZK extensions
TalDerei Sep 8, 2026
1d91900
zk: instantiate the Action relation and captured setup
TalDerei Sep 8, 2026
f43315a
zk: lift Action simulation through private randomness sources
TalDerei Sep 8, 2026
6be8d8d
zk: prove unlimited independent Action retry histories
TalDerei Sep 8, 2026
6f5887f
zk: recover raw Fiat-Shamir challenge digests
TalDerei Sep 8, 2026
c82a46c
zk: couple cached oracle execution with trace programming
TalDerei Sep 8, 2026
0cd0cb4
zk: prove Action simulation with a programmable random oracle
TalDerei Sep 8, 2026
8aac0d2
zk: simulate Fiat-Shamir from a fixed uniform bit tape
TalDerei Sep 8, 2026
012fe39
docs: detail the remaining ZK extensions and review checklist
TalDerei Sep 8, 2026
0fd2747
zk: prove finite retries with a shared random oracle
TalDerei Sep 8, 2026
7ad6f33
zk: connect Action simulation to an explicit PRNG security game
TalDerei Sep 8, 2026
ff08e33
zk: carry generator state through finite Action retries
TalDerei Sep 8, 2026
04b4f50
docs: prepare the checked ZK review packet
TalDerei Sep 8, 2026
4464415
zk: compare complete shared-oracle retry streams
TalDerei Sep 8, 2026
9fc1554
docs: record the complete shared-oracle proof boundary
TalDerei Sep 8, 2026
f2e98b7
zk: reduce complete seeded retry streams to finite PRNG games
TalDerei Sep 8, 2026
cef3ec1
docs: record the unlimited seeded simulation boundary
TalDerei Sep 8, 2026
f821c19
zk: construct Action witness hints and original advice rows
TalDerei Sep 8, 2026
4088c26
docs: record the application witness-construction boundary
TalDerei Sep 8, 2026
e357f79
zk: verify witness read dependencies and compiled fixed equations
TalDerei Sep 8, 2026
de10df1
docs: record the witness-dependency proof boundary
TalDerei Sep 8, 2026
169cc23
zk: certify repeated advice writes and Action copy provenance
TalDerei Sep 8, 2026
412f292
docs: record the Action copy-provenance proof boundary
TalDerei Sep 8, 2026
b7aa97e
zk: bound byte-cache execution costs for Action proofs
TalDerei Sep 8, 2026
eceb165
docs: record the byte-cache cost proof boundary
TalDerei Sep 8, 2026
10156f9
zk: certify original Action witness-function read support
TalDerei Sep 9, 2026
cd933ad
docs: record the witness read-support proof boundary
TalDerei Sep 9, 2026
af31bd4
zk: refine Action witness checks to finite address maps
TalDerei Sep 9, 2026
fa9a6d2
docs: record finite-map witness-check validation
TalDerei Sep 9, 2026
ac14798
zk: verify the finite observations needed for Action extraction
TalDerei Sep 9, 2026
a0da84a
docs: record the finite Action extraction boundary
TalDerei Sep 9, 2026
993394d
zk: certify witness loading and input conversion costs
TalDerei Sep 9, 2026
8ec8e0a
docs: record source certificate and input cost validation
TalDerei Sep 9, 2026
229c0be
zk: certify the original value commitment witness stage
TalDerei Sep 9, 2026
ebcd119
docs: record value commitment certificate validation
TalDerei Sep 9, 2026
5116c6f
zk: connect application readings to Action completeness
TalDerei Sep 9, 2026
2443c86
docs: record Action extraction and completeness validation
TalDerei Sep 9, 2026
6008064
zk: connect source constraints to compiled gates and copies
TalDerei Sep 9, 2026
92e951f
docs: record compiler completeness checkpoint validation
TalDerei Sep 9, 2026
4c0b900
zk: connect generated Action rows to lookup and copy constraints
TalDerei Sep 9, 2026
2e65ab0
docs: record Action row bridge validation
TalDerei Sep 9, 2026
852a52b
zk: bound complete IPA simulation and PLONK arithmetic costs
TalDerei Sep 9, 2026
ac9b2fd
docs: record IPA and PLONK arithmetic cost validation
TalDerei Sep 9, 2026
80a59c3
zk: check source certificates in bounded pieces
TalDerei Sep 9, 2026
d985dcd
zk: bound complete constraint evaluation costs
TalDerei Sep 9, 2026
1045c87
docs: record constraint cost and certificate validation
TalDerei Sep 9, 2026
77f9c26
zk: bound public opening evaluation and routing costs
TalDerei Sep 9, 2026
9a64acb
docs: record opening cost validation
TalDerei Sep 9, 2026
d8eca42
zk: count public row polynomial preparation
TalDerei Sep 9, 2026
3379bc7
docs: record public polynomial preparation validation
TalDerei Sep 9, 2026
21d5c1e
zk: count mask simulation and opening claim assembly
TalDerei Sep 9, 2026
0f806af
docs: record mask and opening claim validation
TalDerei Sep 9, 2026
0f338cd
zk: bound the complete public opening computation
TalDerei Sep 9, 2026
dc3edb8
docs: record complete opening cost validation
TalDerei Sep 9, 2026
72f2c6f
zk: check advice map scans in bounded pieces
TalDerei Sep 9, 2026
747a863
docs: record bounded advice scan validation
TalDerei Sep 9, 2026
cca55c8
zk: bound the complete inferred quotient computation
TalDerei Sep 9, 2026
cad7c32
docs: record complete quotient cost validation
TalDerei Sep 9, 2026
1de8631
zk: count stored simulator inputs and complete bit tapes
TalDerei Sep 9, 2026
02dd51a
docs: record stored input and bit tape validation
TalDerei Sep 9, 2026
f083cab
zk: compose complete joint simulator costs on stored Action inputs
TalDerei Sep 9, 2026
f8ad5ef
docs: record joint simulator runtime validation
TalDerei Sep 9, 2026
42126d8
zk: count complete bit-tape production and exact coin routing
TalDerei Sep 9, 2026
0fe1638
docs: record complete tape-production validation
TalDerei Sep 9, 2026
5e50947
zk: bound complete Action joint simulation from stored bits
TalDerei Sep 9, 2026
ed4738a
docs: record bit-driven joint simulator validation
TalDerei Sep 9, 2026
8a73545
zk: count canonical proof and transcript encoding
TalDerei Sep 9, 2026
98fd68a
docs: record canonical encoding validation
TalDerei Sep 9, 2026
89b2439
zk: certify complete original Action advice and activation sources
TalDerei Sep 9, 2026
fa9954c
docs: record complete Action source validation
TalDerei Sep 9, 2026
2a4eaa1
zk: normalize original advice read addresses before policy checks
TalDerei Sep 9, 2026
37d8150
docs: record original read-checker validation
TalDerei Sep 9, 2026
8a1d12c
zk: count full proof routing and original message schedule
TalDerei Sep 9, 2026
ef65f0a
docs: record complete proof schedule validation
TalDerei Sep 9, 2026
acf90bb
zk: bound complete bit-driven transcripts and canonical observation
TalDerei Sep 9, 2026
cbd85e6
docs: record complete transcript and observer validation
TalDerei Sep 9, 2026
019a7dc
zk: bound the complete fixed-bit Action oracle simulator
TalDerei Sep 9, 2026
723dfc1
docs: record complete simulator runtime validation
TalDerei Sep 9, 2026
4b1babf
zk: normalize alias entries before consulting the source map
TalDerei Sep 9, 2026
5897cc7
docs: record alias normalization validation
TalDerei Sep 9, 2026
dac3de9
zk: certify every original Action gate and lookup activation
TalDerei Sep 9, 2026
72f2996
docs: record complete Action coverage validation
TalDerei Sep 9, 2026
5de6ca0
zk: connect application Action witnesses to statistical simulation
TalDerei Sep 9, 2026
ba6cf0b
docs: record complete application ZK validation
TalDerei Sep 9, 2026
e9fab6d
zk: bound lookup sorting and product construction costs
TalDerei Sep 9, 2026
f00f8ad
docs: record lookup and product resource validation
TalDerei Sep 9, 2026
3f1a35f
zk: bound complete real lookup column construction
TalDerei Sep 9, 2026
f9b1a15
docs: record complete lookup construction validation
TalDerei Sep 9, 2026
eea223f
zk: bound complete real permutation column construction
TalDerei Sep 9, 2026
af4f5ef
docs: record complete permutation construction validation
TalDerei Sep 9, 2026
bd41f02
zk: bound complete stored private column construction
TalDerei Sep 9, 2026
7a83506
docs: record stored private column validation
TalDerei Sep 9, 2026
9b4a123
zk: bound complete private material from the actual tape
TalDerei Sep 9, 2026
d6acce6
docs: record actual tape and private material validation
TalDerei Sep 9, 2026
6a26fed
zk: bound complete Action constraint numerator construction
TalDerei Sep 9, 2026
3852b8a
docs: record complete Action numerator validation
TalDerei Sep 9, 2026
f629b5b
zk: bound Action quotient pieces and opening polynomial construction
TalDerei Sep 9, 2026
a40ff93
docs: record quotient and opening-polynomial validation
TalDerei Sep 9, 2026
a11e2cf
zk: bound complete opening material and final multi-opening polynomial
TalDerei Sep 9, 2026
029311f
docs: record complete opening-material validation
TalDerei Sep 9, 2026
1f7b217
zk: bound the complete real IPA on its original randomness tape
TalDerei Sep 9, 2026
9a7f735
docs: record complete real-IPA validation
TalDerei Sep 9, 2026
4bf994f
zk: bound the complete real PLONK and IPA joint computation
TalDerei Sep 9, 2026
06816bd
docs: record complete real joint-prover validation
TalDerei Sep 9, 2026
57eb479
zk: bound the real prover from stored bits through canonical output
TalDerei Sep 9, 2026
0e711db
docs: record complete real bit-tape validation
TalDerei Sep 9, 2026
9283a63
zk: bound the complete cached real prover
TalDerei Sep 9, 2026
28a1b36
docs: record cached real-prover validation
TalDerei Sep 9, 2026
36e1a4c
zk: bound complete recorded retries from fair verifier bits
TalDerei Sep 9, 2026
c0e82f9
docs: record complete retry-runtime validation
TalDerei Sep 9, 2026
351b453
zk: discharge executable PRNG reduction resources
TalDerei Sep 10, 2026
7c069e4
docs: record complete PRNG reduction validation
TalDerei Sep 10, 2026
859e54e
docs: close ZK checklist after independent review
TalDerei Sep 10, 2026
d24bc05
docs: simplify zero-knowledge README
TalDerei Sep 10, 2026
2afb020
zk: add prover completeness bound
TalDerei Sep 10, 2026
9002c39
fix: address zero-knowledge preflight violations
TalDerei Sep 10, 2026
ded712d
docs: remove zero-knowledge review document
TalDerei Sep 10, 2026
8445197
docs: remove archived verification logs and review records
TalDerei Sep 10, 2026
36f0bd0
zk: align the prover model with Zakura 1.4.0
TalDerei Sep 10, 2026
0e7e453
zk: restore compact Action certificate checks
TalDerei Sep 10, 2026
adf6f32
zk: fix released-call proof checks
TalDerei Sep 10, 2026
ae97f8a
zk: cover the full Action scalar range
TalDerei Sep 10, 2026
179235c
zk: replay captured Zakura prover executions
TalDerei Sep 11, 2026
3ecdeb4
zk: keep acceptance proofs abstract over the prover output
TalDerei Sep 11, 2026
43b589f
zk: consume prover fixtures exported directly by Rust
TalDerei Sep 11, 2026
71b0295
zk: import the Zakura trust census commands
TalDerei Sep 11, 2026
780a44c
zk: disclose the collision fixture's proof-only choice
TalDerei Sep 11, 2026
72bf876
fixtures: regenerate captures at the coauthored producer
TalDerei Sep 11, 2026
8d2fd3c
fixtures: refresh captures after recorder fixes
TalDerei Sep 11, 2026
7c76085
fixtures: refresh captures after affine identity validation
TalDerei Sep 11, 2026
e65bc8a
zk: avoid repeated evaluation in private tape readers
TalDerei Sep 11, 2026
f0d93b6
zk: store prover query orders in indexed tables
TalDerei Sep 11, 2026
39a6a84
fixtures: avoid recursive quotient scans during replay
TalDerei Sep 11, 2026
2e9e398
ci: run prover captures concurrently
TalDerei Sep 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read # paths-filter lists changed files through the pull request API
outputs:
book: ${{ steps.filter.outputs.book }}
steps:
Expand Down
75 changes: 31 additions & 44 deletions .github/workflows/fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,17 @@
name: Fixtures

# Enforces that every checked-in verifier-fingerprint fixture family -- the honest
# `Zcash/Snark/Fixtures/{SingleAction,MultiAction}/Honest/Fixture.lean` captures and the
# random match-only `{SingleAction,MultiAction}/Random/` families with
# their `proof-bytes.hex` siblings -- is byte-for-byte what the pinned public sources
# regenerate, by running `scripts/regenerate-fingerprint-fixtures.sh`. The fixtures stay
# checked in -- they are the formal artifact the Lean development proves about, imported
# by the `FixtureCheck` target and required for a self-contained `lake build` -- and this
# workflow closes the "trust that a human ran the capture correctly" gap by regenerating
# them in CI and diffing. See zcash/ironwood#54.
# Regenerate the existing honest/random one-Action and two-Action verifier
# fixture families and their proof-byte siblings from Zakura's released exporters.
# The four exact capture tests and release/package checksums are selected from
# Zcash/Snark/ZeroKnowledge/Zakura/release.json by the regeneration tooling.
# The separate prover captures use Common's pinned Rust-hosted exporter under
# prover-fingerprint / unstable-prover-fingerprint. Lean CI independently
# replays their complete selected executions; this is not universal Rust/Lean parity.
#
# Determinism: the captures use fixed ChaCha20 seeds and the exporter orders points by
# a coordinate-key `BTreeSet` (not HashMap iteration order), and field/curve arithmetic
# is platform-independent, so regeneration is bit-reproducible -- a diff means the
# fixtures genuinely drifted from the pinned upstream, not run-to-run noise.
#
# Pins: single-sourced in `scripts/regenerate-fingerprint-fixtures.sh`, and there is exactly
# one -- the `zcash/orchard` 0.15.5 release tag, which the script asserts is the tag rather
# than a commit merely descended from it. No forks and no unreleased branches: the capture
# tooling is upstream and released, the match-only exporter and `numInstanceColumns` shape
# emission in `halo2_proofs` 0.3.5 (zcash/halo2#924) and the fabricate->replay random-capture
# drivers in orchard 0.15.5 (zcash/orchard#541). Orchard's own published `Cargo.lock`
# resolves `halo2_proofs` 0.3.5 from crates.io by checksum, which the script also asserts,
# so no `[patch.crates-io]` override is involved and every cargo invocation runs `--locked`
# against published crates. All four families -- honest pair included -- regenerate from
# released sources alone.

# Always triggers, so the `Fixtures CI` gate always reports (a workflow skipped by
# `on.paths` would leave a required check pending). The heavy regeneration is instead
# gated on a path filter computed inside the run, so it only builds Rust when the
# fixtures or the pins (the regeneration script, or this workflow) actually change.
# Two cheap guards run on every event regardless of the filter: the committed
# capture-artifact set must equal the script's pinned regeneration list, and every
# capture must carry the exporter header (`--check-set` below).
#
# The weekly schedule and manual dispatch bypass the filter and regenerate
# unconditionally: pin rot — a moved or deleted upstream tag, a toolchain drift — then
# surfaces on a clock, attributed to the pin, instead of failing the next unlucky PR
# that happens to touch a filtered path.
# This workflow always reports its required status. Local inventory/provenance
# guards run on every event; actual regeneration runs when its inputs change or
# on the schedule/manual triggers. The source and generated bytes are checked,
# so existing captures must be refreshed before they can match a changed target.
on:
push:
branches: [main]
Expand All @@ -58,6 +32,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read # paths-filter lists changed files through the pull request API
outputs:
# Scheduled and manually dispatched runs bypass the filter (the filter step is
# skipped, and this expression then forces regeneration).
Expand Down Expand Up @@ -103,7 +78,16 @@ jobs:
- 'Zcash/Snark/Fixtures/SingleAction/Random/proof-bytes.hex'
- 'Zcash/Snark/Fixtures/MultiAction/Random/Fixture.lean'
- 'Zcash/Snark/Fixtures/MultiAction/Random/proof-bytes.hex'
- 'Zcash/Snark/Fixtures/MANIFEST.tsv'
- 'Zcash/Snark/Fixtures/Prover/SingleAction.lean'
- 'Zcash/Snark/Fixtures/Prover/MultiAction.lean'
- 'Zcash/Snark/Fixtures/Prover/producer.json'
- 'Zcash/Snark/ZeroKnowledge/Zakura/release.json'
- 'scripts/regenerate-fingerprint-fixtures.sh'
- 'scripts/regenerate-prover-fixtures.sh'
- 'scripts/regenerate_fingerprint_fixtures.py'
- 'scripts/prepare_zakura_release.py'
- 'scripts/check_zakura_release.py'
- '.github/workflows/fixtures.yml'

verify:
Expand All @@ -118,14 +102,17 @@ jobs:
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
# The script clones the pinned Orchard release, asserts the commit is the release
# tag and that its published lockfile resolves halo2_proofs 0.3.5 from crates.io by
# checksum, installs Orchard's pinned toolchain (`rustup show` against its
# `rust-toolchain.toml`), regenerates all four families plus the proof-byte
# siblings, and diffs every committed artifact byte-for-byte, exiting non-zero on
# any mismatch. Uncached: the job only runs when the path filter above fires.
- name: Regenerate every fixture family from the pinned Orchard release
# Authenticate the release sources and crates, use Common's toolchain/lockfile,
# execute its four existing capture drivers, and compare all six artifacts.
# CI never uses --update; any mismatch fails the check.
- name: Regenerate existing fixtures from the pinned Zakura release
env:
REGEN_WORK_DIR: ${{ runner.temp }}/zakura-fixtures
run: ./scripts/regenerate-fingerprint-fixtures.sh
- name: Regenerate complete prover executions from the pinned Common exporter
env:
REGEN_WORK_DIR: ${{ runner.temp }}/zakura-prover-fixtures
run: ./scripts/regenerate-prover-fixtures.sh

fixtures-ci:
# The single stable check to mark as a required status check. It always runs, so it
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/lean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read # paths-filter lists changed files through the pull request API
outputs:
lean: ${{ steps.filter.outputs.lean }}
steps:
Expand Down Expand Up @@ -54,6 +55,10 @@ jobs:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- name: Check release provenance and fixture preparation failures
run: python3 -m unittest discover -s scripts -p 'test_zakura_*.py'
- name: Verify Zakura release sources and stored public artifacts
run: python3 scripts/check_zakura_release.py --cache-dir "${{ runner.temp }}/zakura-release-sources" --fetch
# Content-pins the checked-in circuit VK fixtures (the `.json` CS/layout dumps
# consumed by `CircuitCheck`). The Lean build does not recompute a hash — there
# is no fast SHA-256 in the toolchain — so this OS `sha256sum -c` is the
Expand Down Expand Up @@ -247,6 +252,18 @@ jobs:
with:
path: .lake/packages
key: lake-deps-${{ runner.os }}-${{ hashFiles('lean-toolchain') }}-${{ hashFiles('lake-manifest.json') }}
# Save completed compilation before the separate, potentially long execution check.
- name: Compare complete Rust and Lean prover executions
# The captures are independent. Wait for both, and propagate either failure.
run: |
lake env lean --run Zcash/Snark/Fixtures/Prover/Main.lean single &
single_replay_pid=$!
lake env lean --run Zcash/Snark/Fixtures/Prover/Main.lean multi &
multi_replay_pid=$!
prover_replay_status=0
wait "$single_replay_pid" || prover_replay_status=1
wait "$multi_replay_pid" || prover_replay_status=1
exit "$prover_replay_status"

lean-ci:
# The single stable check to mark as a required status check. It always
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read # paths-filter lists changed files through the pull request API
outputs:
workflows: ${{ steps.filter.outputs.workflows }}
steps:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
/.lake
/.elan
/scripts/generated/
/Zcash/Snark/ZeroKnowledge/review/
/scripts/__pycache__/
31 changes: 18 additions & 13 deletions Zcash/Arithmetic/Domain.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import Zcash.Arithmetic.Field
# Evaluation-domain scalars (pasta `Fp` constants and facts)

halo2's domain data as pure functions: binary exponentiation (`powFast`), the size-`2^k`
domain root of unity `omegaOf` (CompElliptic's certified Pasta `ROOT_OF_UNITY` squared
down, `EvaluationDomain::new`), `Fp::DELTA`, and the domain facts (primitive-root, power
injectivity, size nonvanishing) derived from the certificate's order fact.
domain root of unity `omegaOf` (Pasta's `ROOT_OF_UNITY` squared down,
`EvaluationDomain::new`), `Fp::DELTA`, and the domain facts (primitive-root, power
injectivity, size nonvanishing). The root's order is checked by Lean's kernel.
Moved out of `Zcash/Bridge` per the Clean-boundary architecture
(`book/src/formal-verification/clean-boundary.md`): these are verifier-native arithmetic
facts, not bridge plumbing.
Expand Down Expand Up @@ -65,25 +65,30 @@ def rootOfUnityFp : Fp :=
theorem rootOfUnityFp_eq_certified :
rootOfUnityFp = CompElliptic.Fields.Pasta.pallasBase.rootOfUnity := rfl

set_option maxRecDepth 8192 in
/-- The deployed root literal has exact order `2^32`, by kernel-checked field arithmetic. -/
theorem rootOfUnityFp_primitiveRoot : IsPrimitiveRoot rootOfUnityFp (2 ^ 32) := by
rw [IsPrimitiveRoot.iff_orderOf]
haveI : Fact (Nat.Prime 2) := ⟨Nat.prime_two⟩
apply orderOf_eq_prime_pow (p := 2) (n := 31)
· rw [← powFast_eq_pow]
decide +kernel
· rw [← powFast_eq_pow]
decide +kernel

/-- The size-`2^k` domain's root of unity: the Pasta root (`ROOT_OF_UNITY = 5^((p−1)/2^32)`,
pasta `Fp::GENERATOR = 5`) squared down `32 − k` times, exactly as `EvaluationDomain::new`
does — so `omega = 5^((p−1)/2^k)`. Its order is a theorem of CompElliptic's certificate via
`rootOfUnityFp_eq_certified`; agreement with the deployed key's omega is pinned by `VkMatch`
against the captured VK. -/
does — so `omega = 5^((p−1)/2^k)`. Its order follows from the kernel-checked root theorem;
agreement with the deployed key's omega is pinned by `VkMatch` against the captured VK. -/
def omegaOf (k : ℕ) : Fp :=
powFast rootOfUnityFp (2 ^ (32 - k))

/-- `omegaOf k` is a primitive size-`2^k` domain root for every supported exponent. -/
theorem omegaOf_isPrimitiveRoot (k : ℕ) (hk : k ≤ 32) :
IsPrimitiveRoot (omegaOf k) (2 ^ k) := by
have hroot :
IsPrimitiveRoot
CompElliptic.Fields.Pasta.pallasBase.rootOfUnity (2 ^ 32) :=
IsPrimitiveRoot.iff_orderOf.mpr
CompElliptic.Fields.Pasta.pallasBase.valid.rootOfUnity_order
unfold omegaOf
rw [rootOfUnityFp_eq_certified, powFast_eq_pow]
apply IsPrimitiveRoot.pow (by positivity) hroot
rw [powFast_eq_pow]
apply IsPrimitiveRoot.pow (by positivity) rootOfUnityFp_primitiveRoot
rw [← pow_add, Nat.sub_add_cancel hk]

/-- Every point `omegaOf k ^ row` lies in the size-`2^k` evaluation domain. -/
Expand Down
5 changes: 5 additions & 0 deletions Zcash/CensusCheck.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import Zcash.Snark.Fixtures.SingleAction.Honest.TrustBoundary
import Zcash.Snark.Fixtures.SingleAction.Random.TrustBoundary
import Zcash.Snark.Fixtures.MultiAction.Honest.TrustBoundary
import Zcash.Snark.Fixtures.MultiAction.Random.TrustBoundary
import Zcash.Snark.Fixtures.Prover.TrustBoundary
import Zcash.Snark.ZeroKnowledge.TrustBoundary
import Zcash.Snark.ZeroKnowledge.Vesta.TrustBoundary
import Zcash.Snark.ZeroKnowledge.Action.TrustBoundary
import Zcash.Snark.ZeroKnowledge.Zakura.TrustBoundary

/-!
# Endpoint-census completeness at the elaborated environment
Expand Down
6 changes: 4 additions & 2 deletions Zcash/Circuits/Action/Circuit.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1388,10 +1388,12 @@ private def pointHint (key : String) :
y := .hintGet key 2 (.const 0) 1
}

/-- One Nat-valued Action hint, read through the field-to-Nat bridge. -/
/-- One scalar-valued Action hint, stored as low and high 128-bit limbs in row zero.
Recombine their natural representatives before computing scalar windows. -/
private def natHint (key : String) :
Witgen.MOver Fp (AssignedCell Fp) (NExpr Fp) :=
pure (.val (.hintGet key 1 (.const 0) 0))
pure (.add (.val (.hintGet key 2 (.const 0) 0))
(.mul (.const (2 ^ 128)) (.val (.hintGet key 2 (.const 0) 1))))

/-- A Merkle sibling hint at layer `i`. -/
private def merkleSiblingHint (i : ℕ) : WitgenIR Fp 1 :=
Expand Down
Loading
Loading