Skip to content

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

Merged
jpraynaud merged 12 commits into
mainfrom
jpraynaud/3390-enhance-e2e-snark
Sep 15, 2026
Merged

jpraynaud merged 12 commits into
mainfrom
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

@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 thread mithril-test-lab/mithril-end-to-end/src/mithril/genesis_keys.rs Outdated
@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown

Test Results

     5 files  ± 0     221 suites  ±0   33m 42s ⏱️ - 59m 28s
 3 627 tests  - 17   3 627 ✅  - 17  0 💤 ±0  0 ❌ ±0 
11 767 runs   -  7  11 767 ✅  -  7  0 💤 ±0  0 ❌ ±0 

Results for commit b1c84b2. ± Comparison against base commit c632786.

This pull request removes 24 and adds 7 tests. Note that renamed tests count towards both.
mithril-stm ‑ circuits::halo2_ivc::tests::encoding::negative::slow::circuit_rejects_preimage_inconsistent_with_the_message
mithril-stm ‑ circuits::halo2_ivc::tests::encoding::negative::slow::circuit_rejects_wrong_current_epoch_byte_range
mithril-stm ‑ circuits::halo2_ivc::tests::encoding::negative::slow::circuit_rejects_wrong_next_merkle_tree_commitment_byte_range
mithril-stm ‑ circuits::halo2_ivc::tests::encoding::negative::slow::circuit_rejects_wrong_next_protocol_parameters_byte_range
mithril-stm ‑ circuits::halo2_ivc::tests::golden::golden_verification_key_test::slow::golden_recursive_modification_test
mithril-stm ‑ circuits::halo2_ivc::tests::golden::positive::slow::genesis_base_case_circuit_is_accepted
mithril-stm ‑ circuits::halo2_ivc::tests::golden::positive::slow::replay_integrity_matches_stored_next_step_output
mithril-stm ‑ circuits::halo2_ivc::tests::in_circuit::accumulator::slow::circuit_rejects_tampered_same_epoch_accumulator_public_inputs
mithril-stm ‑ circuits::halo2_ivc::tests::in_circuit::genesis_gating::slow::genesis_step_accepts_garbage_certificate_proof_bytes
mithril-stm ‑ circuits::halo2_ivc::tests::in_circuit::genesis_gating::slow::genesis_step_accepts_garbage_ivc_proof_bytes
…
mithril-aggregator ‑ services::aggregate_signature_prover_warmer::tests::fails_when_the_current_epoch_cannot_be_read
mithril-aggregator ‑ services::aggregate_signature_prover_warmer::tests::resolves_the_parameters_the_current_epoch_aggregates_with
mithril-end-to-end ‑ mithril::genesis_keys::tests::debug_output_redacts_the_secret_key
mithril-end-to-end ‑ mithril::genesis_keys::tests::legacy_keys_for_lagrange_on_a_client_not_accepting_dual_keys
mithril-end-to-end ‑ mithril::genesis_keys::tests::legacy_keys_for_lagrange_on_an_aggregator_not_accepting_dual_keys
mithril-end-to-end ‑ mithril::genesis_keys::tests::legacy_keys_for_lagrange_without_the_snark_feature
mithril-end-to-end ‑ mithril::genesis_keys::tests::legacy_keys_for_pythagoras_whatever_the_node_versions

♻️ This comment has been updated with latest results.

@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
Base automatically changed from jpraynaud/3424-cache-warmup to main September 11, 2026 10:44
@jpraynaud
jpraynaud force-pushed the jpraynaud/3390-enhance-e2e-snark branch from 23698b1 to 0fd9a7e Compare September 11, 2026 11:00
@jpraynaud
jpraynaud deployed to testing-preview September 11, 2026 11:26 — with GitHub Actions Active
@jpraynaud
jpraynaud deployed to testing-2-preview September 11, 2026 11:26 — with GitHub Actions Active
@jpraynaud
jpraynaud force-pushed the jpraynaud/3390-enhance-e2e-snark branch from 0fd9a7e to 478b96a Compare September 11, 2026 15:59
@jpraynaud
jpraynaud marked this pull request as ready for review September 11, 2026 16:01
@jpraynaud
jpraynaud deployed to testing-2-preview September 11, 2026 17:06 — with GitHub Actions Active
@jpraynaud
jpraynaud deployed to testing-preview September 11, 2026 17:06 — with GitHub Actions Active

@hjeljeli32 hjeljeli32 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM 👍 Just left a suggestion.

Comment thread mithril-stm/src/proof_system/snark_setup_warmer.rs
@jpraynaud
jpraynaud deployed to testing-2-preview September 14, 2026 08:16 — with GitHub Actions Active
@jpraynaud
jpraynaud deployed to testing-preview September 14, 2026 08:16 — with GitHub Actions Active

@damrobi damrobi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM 👍

Comment thread .github/workflows/test-e2e.yml Outdated
Comment thread .github/workflows/test-e2e.yml
Comment thread mithril-aggregator/src/commands/serve_command.rs Outdated
Comment thread mithril-stm/src/proof_system/snark_setup_warmer.rs Outdated
Comment thread mithril-test-lab/mithril-end-to-end/src/main.rs Outdated
Comment thread mithril-test-lab/mithril-end-to-end/src/mithril/genesis_keys.rs
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.
An IVC aggregation proves the certificate before folding it and the two setups have
separate caches, so warming only the IVC setup left the certificate load in the first round.
…a service

The serve command only starts the warm-up; the parameters lookup and the thread live in a
service built by the dependencies builder.
@jpraynaud
jpraynaud force-pushed the jpraynaud/3390-enhance-e2e-snark branch from 3afc82b to bd520bf Compare September 15, 2026 09:44
* mithril-aggregator from `0.10.5` to `0.10.6`
* mithril-common from `0.7.21` to `0.7.22`
* mithril-stm from `0.12.18` to `0.12.19`
* mithril-end-to-end from `0.5.16` to `0.5.17`
@jpraynaud
jpraynaud force-pushed the jpraynaud/3390-enhance-e2e-snark branch from bd520bf to b1c84b2 Compare September 15, 2026 09:47
@jpraynaud
jpraynaud requested a review from Alenar September 15, 2026 09:48

@Alenar Alenar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

jpraynaud added a commit that referenced this pull request Sep 15, 2026
Lagrange genesis bootstrap requires a dual genesis key with 'future_snark',
not supported by the e2e until #3533 is merged.
@jpraynaud
jpraynaud deployed to testing-2-preview September 15, 2026 10:17 — with GitHub Actions Active
@jpraynaud
jpraynaud deployed to testing-preview September 15, 2026 10:17 — with GitHub Actions Active
@jpraynaud
jpraynaud merged commit 928b3f6 into main Sep 15, 2026
95 of 96 checks passed
@jpraynaud
jpraynaud deleted the jpraynaud/3390-enhance-e2e-snark branch September 15, 2026 10:34
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

5 participants