Skip to content

feat(host): GPU prover setup cache wired into GpuProverBuilder#60

Draft
Deniallugo wants to merge 3 commits into
mainfrom
deniallugo/setup-cache
Draft

feat(host): GPU prover setup cache wired into GpuProverBuilder#60
Deniallugo wants to merge 3 commits into
mainfrom
deniallugo/setup-cache

Conversation

@Deniallugo
Copy link
Copy Markdown
Contributor

Add GpuProverBuilder::with_setup_cache_path. On first run the prover computes the per-level setups as before and dumps them to the given path; on later runs the cache is loaded with the upstream UnrolledProver::new_with_cache constructor and the multi-minute setup compute is skipped.

The caller is responsible for keying the cache path on a binary fingerprint — stale caches surface as proving-time failures, not load errors. Bumps the pinned zksync-airbender rev to f1e26aa5 to pick up the new constructor.

What

Why

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted via cargo fmt and cargo clippy.

Deniallugo added 3 commits May 6, 2026 20:55
Add `GpuProverBuilder::with_setup_cache_path`. On first run the prover
computes the per-level setups as before and dumps them to the given path;
on later runs the cache is loaded with the upstream
`UnrolledProver::new_with_cache` constructor and the multi-minute setup
compute is skipped.

The caller is responsible for keying the cache path on a binary
fingerprint — stale caches surface as proving-time failures, not load
errors. Bumps the pinned zksync-airbender rev to f1e26aa5 to pick up the
new constructor.
Signed-off-by: Danil Lugovskoi <deniallugo@gmail.com>
- Add `RealVerifierBuilder::with_vk_cache_path` so callers can persist the
  multi-minute VK derivation across process restarts (mirrors the GPU
  prover's setup cache).
- Add `RealVerifierBuilder::with_setup_cache_path` plus
  `vk::unified_vk_from_setup_cache` so a verifier can derive its
  `RecursionUnified` VK directly from a pre-existing prover setup cache,
  no compute. Cuts the verifier startup to a file read.
- Switch `create_unrolled_prover` to a load-only semantic: when a setup
  cache path is provided, the file MUST exist; missing-file is now
  surfaced as `HostError::SetupCacheNotFound` instead of being silently
  re-computed and written. Server deployments expect caches to be
  pre-generated.
- Add the inverse `From<SecurityModel> for SecurityLevel` conversion that
  the new VK derivation needs.

Updates the docs on `with_setup_cache_path` to reflect the new contract.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant