feat(e2e): enhance the SNARK test with a prover warmup - #3533
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
One or more issues must be addressed before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Enhances nightly SNARK e2e scenarios with prover warmup, dual genesis keys, and a unified CI matrix.
Changes:
- Adds background SNARK setup warming.
- Selects compatible legacy or dual genesis keys.
- Enables SNARK scenarios with shorter epochs and shared build arguments.
File summaries
| File | Description |
|---|---|
| mithril-test-lab/mithril-end-to-end/src/stress_test/aggregator_helpers.rs | Updated as part of this pull request. |
| mithril-test-lab/mithril-end-to-end/src/mithril/mod.rs | Updated as part of this pull request. |
| mithril-test-lab/mithril-end-to-end/src/mithril/infrastructure.rs | Updated as part of this pull request. |
| mithril-test-lab/mithril-end-to-end/src/mithril/genesis_keys.rs | Updated as part of this pull request. |
| mithril-test-lab/mithril-end-to-end/src/mithril/client.rs | Updated as part of this pull request. |
| mithril-test-lab/mithril-end-to-end/src/mithril/aggregator.rs | Updated as part of this pull request. |
| mithril-test-lab/mithril-end-to-end/src/main.rs | Updated as part of this pull request. |
| mithril-stm/src/proof_system/snark_setup_warmer.rs | Updated as part of this pull request. |
| mithril-stm/src/proof_system/mod.rs | Updated as part of this pull request. |
| mithril-stm/src/lib.rs | Updated as part of this pull request. |
| mithril-common/src/crypto_helper/mod.rs | Updated as part of this pull request. |
| mithril-aggregator/src/commands/serve_command.rs | Updated as part of this pull request. |
| .github/workflows/test-e2e.yml | Updated as part of this pull request. |
Review details
Suppressed comments (3)
mithril-stm/src/proof_system/snark_setup_warmer.rs:33
IvcSnarkaggregation callssnark_aggregate_signature_proverfirst and thenivc_chain_prover, but this branch only warmsivc_setup. The first IVC aggregation therefore still materializes the certificate SNARK setup on the signing path, so the warmup does not cover the full cold-start cost. Warm the certificate setup here as well before the IVC setup.
AggregateSignatureType::IvcSnark => {
SnarkProverSetupReuse::Enabled.ivc_setup(parameters)?;
}
mithril-test-lab/mithril-end-to-end/src/mithril/aggregator.rs:50
- Because this public config field is newly introduced, it needs a doc comment under the repository's public-API documentation rule. Without one, the new
genesis_keysfield is undocumented while being exposed as part ofAggregatorConfig.
pub genesis_keys: GenesisKeys,
mithril-test-lab/mithril-end-to-end/src/mithril/infrastructure.rs:55
- Because this public config field is newly introduced, it needs a doc comment under the repository's public-API documentation rule. Without one, this struct is missing documentation for the new
genesis_keysfield.
pub genesis_keys: GenesisKeys,
- Files reviewed: 13/13 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Test Results 5 files ± 0 221 suites ±0 33m 56s ⏱️ - 42m 43s Results for commit 478b96a. ± Comparison against base commit baaec57. This pull request removes 39 and adds 6 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
23698b1 to
0fd9a7e
Compare
The dual bundles are handed out when a Lagrange era is run, the runner is built with the SNARK feature and the node versions accept them, legacy keys otherwise.
…regation The warmer loads the setups into the process-wide cache the provers read, so a node can pay for them before its first signing round.
The prover setup is warmed up on a thread of its own when the node starts, so the first signing round does not pay for it inside its aggregation.
The circuit keys are no longer derived at every aggregation and are materialized before the signing round, so the epochs no longer have to absorb the setup.
0fd9a7e to
478b96a
Compare
Content
This PR includes the changes that enhance the e2e nightly SNARK scenarios, by warming up the prover setup before the first signing round:
minimal-snarkfrom 2400 to 600 slots with a 60 s run intervalminimal-ivc-snarkfrom 2400 to 900 slots with a 120 s run interval.Measured on the nightly workflow (run 34484111857):
minimal-snarkminimal-ivc-snarkPre-submit checklist
Issue(s)
Closes #3390