test(stm): split the IVC prover monolith into separated tests - #3505
Merged
hjeljeli32 merged 5 commits intoSep 1, 2026
Conversation
hjeljeli32
requested review from
curiecrypt,
damrobi and
jpraynaud
as code owners
August 30, 2026 23:12
9 tasks
There was a problem hiding this comment.
Pull request overview
This PR restructures the IVC prover tests to reduce CI runtime by splitting the former “monolith” scenario test into focused cases and moving rejection-path coverage to faster prepare-only tests, while decoupling slow-test setup from asset-generation machinery.
Changes:
- Added fast
IvcProverInput::preparerejection tests that assert typedIvcCircuitErrorvariants (tampered message, mismatched AVK, corrupted previous IVC proof, mismatchedGlobal). - Replaced the
prove_all_scenariosmonolith with two standalone slow prover tests (bootstrap and same-epoch), using a shared slow-context builder. - Built slow-test
Globaland genesis bootstrap input from committed genesis fixtures and verification-context assets (not asset-generation setup).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| mithril-stm/src/proof_system/ivc_halo2_snark/prover_input.rs | Adds fast-tier prepare rejection tests using committed assets and typed error assertions. |
| mithril-stm/src/proof_system/ivc_halo2_snark/proof.rs | Splits the slow prover monolith into two tests and rebuilds slow context from committed fixtures/assets. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
hjeljeli32
force-pushed
the
hjeljeli32/3468-replace-prove-all-scenarios-monolith
branch
from
August 31, 2026 22:59
d26bca9 to
3de9bf0
Compare
hjeljeli32
deleted the
hjeljeli32/3468-replace-prove-all-scenarios-monolith
branch
September 1, 2026 00:01
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.
Content
prove_all_scenariosran eight scenarios in one test to amortize a single setup. It costs 1393.9 s on the nightly and, with the two keygen-onlyprover_setuptests of the single-threadedivc-snark-sequentialgroup, forms an 1830 s serial tail, 59 % of the job's 3116 s test step.Splitting it naively costs more than it saves: at
user / real = 7.39the test already saturates the runner's four vCPUs and peaks at 11.02 GiB against 16 GB, so the group must stay serial and each extra process adds 70-125 s. The split is paid for by removing proving instead — the five rejection scenarios generate no proofs, and the sixprove_with_transcriptcalls cover only four distinct (transition type, transcript) pairs. Warm and local: 175.5 s to 126.0 s, −28 %. On CI, normalised against the two untouched keygen-only tests of the same group, the two replacements cost 951 s against the monolith's 1264 s (−313 s, −25 %) taking the serial tail to 1408 s and the job's test step to 2348 s.Changes
prover_input.rs,proof.rs): fourrun_rejects_*helpers becomepreparetests asserting typedIvcCircuitErrorvariants instead ofis_err(), at ~0.36 s on every PR rather than nightly only, each failed insideprepare, which since Recover the ignored IVC prover input preparation tests #3466 needs no SRS, keygen or cache. The fifth duplicatedprepare_rejects_invalid_snark_proofand is deleted.proof.rs):prove_bootstrap_produces_first_epoch_proof_and_rolling_state(3 proofs) andprove_same_epoch_produces_proof_without_rolling_state(1 proof) share a plainbuild_slow_test_context(), noOnceLock, which amortizes nothing under nextest's process-per-test model.run_next_epoch_pathadds no new pair, andprepare_at_next_epoch_carries_lookahead_protocol_parametersalready pins its state and accumulator against the same asset.proof.rs): the slow context buildsGlobaland the genesis bootstrap input from the committed genesis fixture rather thanAssetGenerationSetup. No measurable wall-time change — setup spans 7.1-8.7 s for identical artifacts and the ~1.0 GB proving key deserialize dominates — so it is kept for the decoupling, not for speed..config/nextest.tomlandfilter-slow-tests.shmatch on module path, so the renamed tests stay grouped and watched. The coverage the reduction rests on still passes; restore a mature next-epoch proving case if production later couples transition type with accumulator provenance, public inputs or transcript selection.Pre-submit checklist
Issue(s)
Closes #3468