Skip to content

feat(stm): add missing off circuit checks - #3480

Open
damrobi wants to merge 6 commits into
mainfrom
damrobi/msnark/3381-add-off-circuit-checks
Open

feat(stm): add missing off circuit checks#3480
damrobi wants to merge 6 commits into
mainfrom
damrobi/msnark/3381-add-off-circuit-checks

Conversation

@damrobi

@damrobi damrobi commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Content

This PR includes the addition of some missing off circuit checks. The goal of those checks is to prevent a prover from trying to create a proof that will fail to verify since the proof creation is a very expensive operations.

Changes

  • Validation of the protocol message hash: it was not done off circuit yet but is done at every step in circuit. Recompute the hash of the protocol message preimage and compares it to the MessageHash received.
  • Check of the validity of the genesis verification key: verifies the key is an actual point on the elliptic curve. The check is done at every step (even post genesis) in circuit.
  • Check that the protocol parameters do not evolve from one epoch to the next: check that protocol_parameters == next_protocol_parameters for the values coming from the rolling state. An update of the parameters would break the recursive proof.
  • Moved all the checks to before the generation of the non recursive proof to allow a failure before the heavy computation: This implied a big restructure of the code around the call to the IVC prover

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

Comments

Issue(s)

Closes #3381

@damrobi damrobi self-assigned this Aug 13, 2026
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown

Test Results

     5 files  ± 0     209 suites  ±0   1h 38m 42s ⏱️ + 8m 59s
 3 429 tests  - 22   3 429 ✅  - 22  0 💤 ±0  0 ❌ ±0 
11 289 runs   - 22  11 289 ✅  - 22  0 💤 ±0  0 ❌ ±0 

Results for commit 1da401e. ± Comparison against base commit c8ff793.

♻️ This comment has been updated with latest results.

@damrobi
damrobi deployed to testing-preview August 14, 2026 11:29 — with GitHub Actions Active
@damrobi
damrobi deployed to testing-2-preview August 14, 2026 11:29 — with GitHub Actions Active
@damrobi
damrobi deployed to testing-preview August 14, 2026 14:50 — with GitHub Actions Active
@damrobi
damrobi deployed to testing-2-preview August 14, 2026 14:50 — with GitHub Actions Active
@damrobi
damrobi force-pushed the damrobi/msnark/3381-add-off-circuit-checks branch from 8233f3e to b082171 Compare August 14, 2026 16:08
@damrobi
damrobi marked this pull request as ready for review August 14, 2026 16:09
Comment thread mithril-stm/src/proof_system/ivc_halo2_snark/prover_input.rs Fixed
Comment thread mithril-stm/src/proof_system/ivc_halo2_snark/prover_input.rs Fixed

@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.

Good initial work 👍 . I left 2 comments.

Comment thread mithril-stm/src/protocol/aggregate_signature/clerk.rs Outdated
Comment thread mithril-stm/src/protocol/aggregate_signature/clerk.rs
@damrobi
damrobi force-pushed the damrobi/msnark/3381-add-off-circuit-checks branch from 99e2d7b to 1da401e Compare August 20, 2026 09:18
@damrobi
damrobi deployed to testing-preview August 20, 2026 10:14 — with GitHub Actions Active
@damrobi
damrobi deployed to testing-2-preview August 20, 2026 10:14 — 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.

Add missing IVC off-circuit checks

3 participants