Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c9e82f1
fix(prover): make WriterstoEqual actually compare both encodings
mkrielza Jul 28, 2026
0a1a416
chore(prover): reword the WriterstoEqual doc and name its regression …
coeniebeyers Aug 6, 2026
786bd6f
fix(prover): carry the verifying key through toLagrange
coeniebeyers Jul 24, 2026
7e8d2ab
feat(prover): persist the derived Lagrange SRS so it isn't re-derived…
coeniebeyers Jul 24, 2026
c8cbbf4
refactor(prover): match cached lagrange SRS by verifying key, not fil…
coeniebeyers Jul 27, 2026
ee93032
feat(prover): validate cached lagrange SRS points are on-curve at load
coeniebeyers Jul 27, 2026
6d99bc6
docs(prover): annotate each load check and correct the lock-safety co…
coeniebeyers Jul 27, 2026
8a8574e
feat(prover): sweep aged orphan temp dumps at store construction
coeniebeyers Jul 27, 2026
b216d71
docs(prover): orphaned temps are deleted after an hour since last write
coeniebeyers Jul 27, 2026
cd8d7ff
test(prover): use a genuinely different setup in the SRS rejection test
mkrielza Jul 28, 2026
d35bf70
feat(prover): tag locally derived lagrange dumps as derived, not as c…
mkrielza Jul 28, 2026
efe9c90
refactor(prover): move lagrange persistence out of the GetSRS read path
mkrielza Jul 28, 2026
9f45b40
feat(prover): gate derived-SRS persistence behind an opt-in flag, def…
mkrielza Jul 28, 2026
e9aa8e1
feat(prover): persist the derived SRS at setup by default, backfillin…
coeniebeyers Aug 1, 2026
07b9cf8
feat(prover): warn loudly when a missing lagrange dump forces an in-m…
coeniebeyers Aug 1, 2026
8db0a01
fix(prover): make the derived-SRS backfill cheap when done, fail fast…
coeniebeyers Aug 1, 2026
ee081b8
docs(prover): document derived-SRS persistence and its opt-out in the…
coeniebeyers Aug 1, 2026
4c57b49
docs(prover): tighten the derived-SRS persistence paragraph
coeniebeyers Aug 1, 2026
ee1c862
fix(prover): sweep orphaned srs temps from the setup write path, neve…
coeniebeyers Aug 4, 2026
1a52d56
test(prover): pin that a failed derived-SRS persist warns without fai…
coeniebeyers Aug 4, 2026
f6dab90
fix(prover): ignore a canonical SRS claiming the derived tag instead …
coeniebeyers Aug 4, 2026
656de86
fix(prover): name the persist remedy before the derivation wait, not …
coeniebeyers Aug 4, 2026
d761d01
test(prover): pin the derivation warning's gate, remedy text, and sil…
coeniebeyers Aug 4, 2026
46ef485
test(prover): pin that the writability probe reports before the deriv…
coeniebeyers Aug 4, 2026
b60c1ed
test(prover): pin that canonical SRS load failures stay fatal
coeniebeyers Aug 4, 2026
1d3335f
refactor(prover): rename cacheLagrange to persistLagrange and unify i…
coeniebeyers Aug 4, 2026
2bb5c4d
refactor(prover): build the srs filename pattern's curve list from cu…
coeniebeyers Aug 4, 2026
bbcd83d
chore(prover): tidy docs, name the WriterstoEqual regression test, wr…
coeniebeyers Aug 4, 2026
d00f15c
test(prover): pin that a corrupt canonical fails as a load error, not…
coeniebeyers Aug 4, 2026
882ed1f
chore(prover): write the corrupt-canonical fixture 0600 to satisfy gosec
coeniebeyers Aug 4, 2026
2167c7a
chore(prover): exclude derived srs dumps from the prover-assets s3 sync
coeniebeyers Aug 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion prover/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ setup: bin/prover
## Copy the prover assets to the S3 bucket (zkuat)
##
copy-prover-assets:
aws s3 sync --exclude "*prover/dev*" --exclude "*05b9ef1*" --exclude "*05b9ef1*" --exclude "*96e3a19*" --exclude "*a9e4681*" prover-assets s3://zk-uat-prover/prover-assets/ --profile=zk-uat-s3-access
aws s3 sync --exclude "*prover/dev*" --exclude "*05b9ef1*" --exclude "*05b9ef1*" --exclude "*96e3a19*" --exclude "*a9e4681*" --exclude "*_derived*" prover-assets s3://zk-uat-prover/prover-assets/ --profile=zk-uat-s3-access

download-srs:
aws s3 sync s3://prover-assets/kzgsrs/ ./prover-assets/kzgsrs --exclude "*" --include "*.memdump"
Expand Down
8 changes: 8 additions & 0 deletions prover/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ The repository counts 2 main binaries:
The setup-generation (`make setup`) is used to generate the setup for all the types of provers. Execution, Decompression and Aggregation.
By default, if the `--force` flag is not provided, the tool will compile the circuit and check if the destination dir already contains a setup that matches, skipping the CPU intensive phase of the actual plonk Setup if needed.

The setup also persists the Lagrange form of the SRS into the `kzgsrs` directory
(as `kzg_srs_lagrange_<size>_<curve>_derived.memdump`) whenever it is missing, so
prover starts load it in seconds instead of re-deriving it for hours. Ceremony
files are never modified, and nothing writes into the directory at prove time.
Set `persist_derived_srs = false` in the config to keep the SRS directory
strictly read-only; `--force` additionally re-validates an existing derived dump
in full and repairs it if it does not load.

**Run**

```sh
Expand Down
15 changes: 15 additions & 0 deletions prover/circuits/srs_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ type SRSProvider interface {
GetSRS(ctx context.Context, ccs constraint.ConstraintSystem) (kzg.SRS, kzg.SRS, error)
}

// LagrangePersister is implemented by SRS providers that can pre-compute the
// Lagrange basis and leave it on disk for later runs.
//
// It is deliberately separate from SRSProvider: obtaining an SRS is something
// every prove path does, whereas writing into the SRS directory is a
// provisioning action. Keeping the write off the interface every caller holds
// is what stops it from happening implicitly.
//
// Without force, a dump of the right size already on disk counts as done and
// the call is cheap; force re-validates an existing dump in full and repairs
// it if it does not load, mirroring what --force means to `prover setup`.
type LagrangePersister interface {
DeriveAndPersistLagrange(ctx context.Context, ccs constraint.ConstraintSystem, force bool) error
}

type UnsafeSRSProvider struct {
}

Expand Down
Loading