Persist the SNARK test caches across CI runs
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 38/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- github-actions, rust
- Domain
- build-system, ci-cd, cryptography, testing
Research direction
First check the dependency on #3433, then read the test job in .github/workflows/test-rust.yml and the cache readers in circuits/key_provider.rs and circuits/trusted_setup.rs. Compare the duplicate cache paths in proof_system/ivc_halo2_snark/prover_setup.rs and circuits/halo2_ivc/tests/common/generators/setup.rs. Done means warm CI restores safely, stale entries self-heal, only full slow-suite runs save pruned caches, and the issue reports the measured gain.
Written by the indexing model from the issue text.
Description
Why
Neither the keygen cache nor the SRS is persisted across CI runs (the toolchain-and-cache action only saves dependency artifacts through Swatinem/rust-cache), so every nightly and every slow PR leg starts cold.
What
Add an actions/cache layer for target/mithril-circuit-test-cache with a three-layer invalidation design: content-keyed directories for semantic staleness, a versions-scoped cache key for serialization format drift, and self-healing readers as backstop.
How
Paths are relative to mithril-stm/src/ unless they start with .github/.
- Add an
actions/cache/restorestep fortarget/mithril-circuit-test-cachein the test job of.github/workflows/test-rust.yml(next to thetoolchain-and-cachecomposite step), with an exact key folding a manual generation token and a hash of themidnight-*entries ofCargo.lock - Scope every
restore-keysprefix to that versions hash so amidnight-proofsupgrade (serialization format drift) can never restore stale bytes - Save with
actions/cache/saveonly from the runs that execute the full slow suite (theinclude-slow-tests: trueinvocation fromnightly-dispatcher.yml); PR runs stay restore-only - Make the readers self-healing: on deserialization failure,
KeyProvider::cache_stateandread_optional(circuits/key_provider.rs) andTrustedSetupProvider::get_trusted_setup_parameters(circuits/trusted_setup.rs) should delete the offending file and regenerate instead of failing the test - Prune fingerprint directories not touched by the current run before saving, so retired fingerprints do not accumulate in the archive
- Make one recursive verifying-key cache canonical for both the circuit tests and
IvcSnarkProverSetup::build_for_test_degree, with the prover path storing only the additional proving key: todayproof_system/ivc_halo2_snark/prover_setup.rsandcircuits/halo2_ivc/tests/common/generators/setup.rshold the same key under two protocols, becauseKeyProvider::verification_keytreats a missing proving key as a miss and regenerates the pair - Assess the gain (expected: removes the cold start from warm CI runs) and report it in the issue
Depends on #3433.
- Dominant language
- Rust
- Stars
- 155
- Forks
- 52
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 37
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from IntersectMBO/mithril
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
IntersectMBO/mithril#1605 · 2 comments ·
Maintainers usually reply within 2 days
-
spike :satellite:
Difficulty 5/5 Over a week Newbie friendliness 10/100
IntersectMBO/mithril#3701 ·
Maintainers usually reply within 2 days
-
Publish a DNSLink record of the immutable archives IPNS name in the Mithril networks DNS zonesPossibly taken @jpraynaud claimed this 2 days ago. Openfeature :rocket:
IntersectMBO/mithril#3700 · 1 assignee ·
Maintainers usually reply within 2 days
-
feature :rocket:
Difficulty 4/5 3-5 days Newbie friendliness 25/100
IntersectMBO/mithril#3699 ·
Maintainers usually reply within 2 days
-
feature :rocket:
Difficulty 4/5 3-5 days Newbie friendliness 35/100
IntersectMBO/mithril#3698 ·
Maintainers usually reply within 2 days
All issues in IntersectMBO/mithril
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
storytold/photocraft#14822 ·
Maintainers usually reply within 1 day
-
bug css
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
dginev/latexml-oxide#853 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 2 days
-
[Bug] export_build_environment admits its output directory only after the export ran in the build computerPossibly taken @viniciusdsandrade claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day