Repository navigation
feat(jolt-akita): share verifier state across setups and prepare it ahead of proofs - #2136
Open
mtbadakhshan wants to merge 2 commits into
Open
mtbadakhshan wants to merge 2 commits into
mtbadakhshan wants to merge 2 commits into
Conversation
…head of proofs A deserialized verifier setup filled its serde-skipped cache on first use by running Akita's full prover setup, per setup value, with nothing shared. Derive verifier state from the public seed at verifier size instead and share it: unprepared setups attach to a process-wide state that grows on a miss, and hosts can build it before any proof with AkitaVerifierResources::prepare. GroupedCatalog classifies grouped requests and plans missing rows once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…resource tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
An
AkitaVerifierSetupkeeps its backend verifier in a serde-skipped cache. A deserialized setup, or one for a new shape, filled that cache on its first proof by running Akita's full prover setup (setup_prover+setup_verifier). The prover setup derives the matrix at prover capacity, computes every setup-prefix commitment, and keeps the whole matrix. Nothing was shared, so each shape paid this again and held its own copy.This PR derives verifier state from the public seed at verifier size and shares it:
AkitaVerifierResources::prepare.It also adds a bound grouped catalog that classifies grouped requests (published / plannable / unsupported) and plans missing rows for many requests at once. A host uses it to prepare every shape it serves at startup.
Changes
AkitaScheme::verifier_setup_from_params: builds verifier metadata without a prover setup.AkitaScheme::setupbuilds its verifier half through it.AkitaVerifierResources::prepare(setups): decodes and audits each distinct catalog, then sizes each catalog by its own largest setup. It derives one matrix from the seed, computes only the required prefix commitments, and builds one backend verifier per catalog. It fails on the firstErrbefore generating anything. Holding the value keeps the state alive for setups that attach later.dense_verifier/one_hot_verifier: on a cache miss, attach to the largest live shared state that covers the setup, instead of runningsetup_prover. On a miss they grow it: only missing prefix slots are computed, and the matrix stream is extended.schedule_registry::GroupedCatalogandGroupedAdmission: validate the dense and one-hot catalogs once, classify requests, and extend a catalog for many requests with shared lookup keys planned once.AkitaVerifierSetup::schedule_artifactsis behind anArc, so setups of one catalog share one copy.Performance
Release build, Apple M-series. One-hot K16 setups with a 30-polynomial batch capacity, at 20–26 variables. Each setup is freshly deserialized, the way a long-running verifier receives a new shape; all are held alive, then each is verified twice.
prepare: first verifypreparefor all four shapes runs once, in 211 ms.prepareAt these sizes peak RSS is dominated by the loaded proofs. The savings grow with shape size, because each setup previously kept a prover-capacity matrix.
Testing
cargo nextest run -p jolt-akita(107 passed)cargo clippy --all --features hostand--features host,zkwith-D warnings;cargo fmt --all --checkcargo nextest run -p jolt-prover --features akita,prover-fixtures -E 'binary(e2e_matrix)'cargo nextest run -p jolt-verifier standard_muldiv --features prover-fixturesSecurity Considerations
catalog_digestand the setup fields are still bound into the transcript.Breaking Changes
None to proof formats, transcripts or serialization.
AkitaScheme::setupnow also rejects a group width of zero or above the batch capacity.External contract:
AkitaVerifierResources::prepareandGroupedCatalogare host APIs for long-running deployments that prepare verifier state before serving proofs. In-repo, the lazy path inadapters.rsuses the same machinery.🤖 Generated with Claude Code