Skip to content

feat(e2e): enhance the SNARK test with a prover warmup - #3533

Draft
jpraynaud wants to merge 5 commits into
jpraynaud/3424-cache-warmupfrom
jpraynaud/3390-enhance-e2e-snark
Draft

feat(e2e): enhance the SNARK test with a prover warmup#3533
jpraynaud wants to merge 5 commits into
jpraynaud/3424-cache-warmupfrom
jpraynaud/3390-enhance-e2e-snark

Conversation

@jpraynaud

@jpraynaud jpraynaud commented Sep 10, 2026

Copy link
Copy Markdown
Member

Content

This PR includes the changes that enhance the e2e nightly SNARK scenarios, by warming up the prover setup before the first signing round:

  • Warm up the aggregate signature prover when the aggregator starts, in the background, so the first signing round no longer materializes the setup inside its own aggregation.
  • Hand out the dual genesis key bundles for Lagrange on the node versions that accept them.
  • Run the nightly e2e scenarios from a single CI matrix and build the runner with the same build arguments as the nodes.
  • Shorten the end-to-end SNARK epochs, now that the warmup and the setup reuse take the derivation off the signing path:
    • minimal-snark from 2400 to 600 slots with a 60 s run interval
    • minimal-ivc-snark from 2400 to 900 slots with a 120 s run interval.

Measured on the nightly workflow (run 34484111857):

job epoch length before after
minimal-snark 2400 to 600 slots 4h+ 1h01m
minimal-ivc-snark 2400 to 900 slots 4h+ 1h31m

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • CHANGELOG file is updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • All check jobs of the CI have succeeded
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested

Issue(s)

Closes #3390

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.
The prover setup is materialized in the background when the node starts, so the first
signing round does not pay 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.
@jpraynaud jpraynaud self-assigned this Sep 10, 2026
@jpraynaud
jpraynaud added this pull request to stack #3534 September 10, 2026 16:04
@jpraynaud
jpraynaud requested a lite review from Copilot September 10, 2026 16:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

  • IvcSnark aggregation calls snark_aggregate_signature_prover first and then ivc_chain_prover, but this branch only warms ivc_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_keys field is undocumented while being exposed as part of AggregatorConfig.
    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_keys field.
    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.

Comment on lines +19 to +26
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct GenesisKeys {
/// Hex encoded genesis verification key
pub verification_key: &'static str,

/// Hex encoded genesis secret key
pub secret_key: &'static str,
}
@github-actions

Copy link
Copy Markdown

Test Results

     5 files     221 suites   34m 3s ⏱️
 3 595 tests  3 595 ✅ 0 💤 0 ❌
11 731 runs  11 731 ✅ 0 💤 0 ❌

Results for commit 23698b1.

@jpraynaud
jpraynaud deployed to testing-2-preview September 10, 2026 16:47 — with GitHub Actions Active
@jpraynaud
jpraynaud deployed to testing-preview September 10, 2026 16:47 — with GitHub Actions Active
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.

Enhance end-to-end tests for IVC SNARK

2 participants