Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a1573ec
fix(prover): carry the verifying key through toLagrange
coeniebeyers Jul 24, 2026
fa9108d
feat(prover): persist the derived Lagrange SRS so it isn't re-derived…
coeniebeyers Jul 24, 2026
86d493e
refactor(prover): match cached lagrange SRS by verifying key, not fil…
coeniebeyers Jul 27, 2026
6db502f
feat(prover): validate cached lagrange SRS points are on-curve at load
coeniebeyers Jul 27, 2026
a184ed7
docs(prover): annotate each load check and correct the lock-safety co…
coeniebeyers Jul 27, 2026
3099ae8
feat(prover): sweep aged orphan temp dumps at store construction
coeniebeyers Jul 27, 2026
fae1345
docs(prover): orphaned temps are deleted after an hour since last write
coeniebeyers Jul 27, 2026
49a860f
test(prover): use a genuinely different setup in the SRS rejection test
mkrielza Jul 28, 2026
33d6733
feat(prover): tag locally derived lagrange dumps as derived, not as c…
mkrielza Jul 28, 2026
187df9d
refactor(prover): move lagrange persistence out of the GetSRS read path
mkrielza Jul 28, 2026
04e8322
feat(prover): gate derived-SRS persistence behind an opt-in flag, def…
mkrielza Jul 28, 2026
3772149
feat(prover): persist the derived SRS at setup by default, backfillin…
coeniebeyers Aug 1, 2026
7fc196b
feat(prover): warn loudly when a missing lagrange dump forces an in-m…
coeniebeyers Aug 1, 2026
2ec8c85
fix(prover): make the derived-SRS backfill cheap when done, fail fast…
coeniebeyers Aug 1, 2026
d8ccd06
docs(prover): document derived-SRS persistence and its opt-out in the…
coeniebeyers Aug 1, 2026
bef616c
docs(prover): tighten the derived-SRS persistence paragraph
coeniebeyers Aug 1, 2026
a6dc741
fix(prover): sweep orphaned srs temps from the setup write path, neve…
coeniebeyers Aug 4, 2026
9c0b3f9
test(prover): pin that a failed derived-SRS persist warns without fai…
coeniebeyers Aug 4, 2026
2d3f96c
fix(prover): ignore a canonical SRS claiming the derived tag instead …
coeniebeyers Aug 4, 2026
45f42a5
fix(prover): name the persist remedy before the derivation wait, not …
coeniebeyers Aug 4, 2026
c4802d7
test(prover): pin the derivation warning's gate, remedy text, and sil…
coeniebeyers Aug 4, 2026
dd00f5e
test(prover): pin that the writability probe reports before the deriv…
coeniebeyers Aug 4, 2026
190295a
test(prover): pin that canonical SRS load failures stay fatal
coeniebeyers Aug 4, 2026
f11fed3
refactor(prover): rename cacheLagrange to persistLagrange and unify i…
coeniebeyers Aug 4, 2026
bb8d295
refactor(prover): build the srs filename pattern's curve list from cu…
coeniebeyers Aug 4, 2026
eef47f8
chore(prover): tidy docs, name the WriterstoEqual regression test, wr…
coeniebeyers Aug 4, 2026
b2a8c26
test(prover): pin that a corrupt canonical fails as a load error, not…
coeniebeyers Aug 4, 2026
1f21d35
chore(prover): write the corrupt-canonical fixture 0600 to satisfy gosec
coeniebeyers Aug 4, 2026
8327c56
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
Loading