Skip to content

SNARK pre-aggregation primitives in STM library - Phase 1 #2792

Closed

Description

@jpraynaud

Why

We need to evolve the STM library in order to implement SNARK primitives. Following the definition of the architecture in #2763, we have defined an implementation plan and we want to address the SNARK pre-aggregation primitives part of the plan for the key registration.

What

Implement the SNARK pre-aggregation primitives for the key registration.

How

  • Implement SNARK pre-aggregation primitives (i.e. not the circuit(s) themselves)
    • Create a halo2-snark proof system sub-module in the proof_system module with sub-modules:
      • gated behind future_snark
      • single_signature
      • proof (we'll do that later)
      • clerk (we'll do that later)
      • aggregate_verification_key
    • Adapt the key registration to support the new halo2 proof system:
      • Create Merkle leaf entry for SNARK MerkleTreeSnarkLeaf (Schnorr verification key and Lottery Target Value)
      • Create SNARK aggregate verification key (root of the Merkle tree for SNARK created, and with the Poseidon hash MembershipDigest::SnarkHash)
      • Add the Schnorr verification key in the RegistrationEntry (as an option for backward compatibility)
      • Move the Merkle tree creation to the ClosedKeyRegistration
      • Implement a new ClosedRegistrationEntry (to be able to compute the phi value needed for SNARK leaf)
      • Adapt the conversion of KeyRegistration to ClosedKeyRegistration
      • Implement conversion trait (From) for the ClosedRegistrationEntry to MerkleTreeSnarkLeaf
      • Adapt Initializer
    • Benchmarks
    • Golden tests
    • Property-based tests
    • Update the MVP Book
    • Run a backward compatibility test when PR is merged

Activity

  1. added
    epic ⚔️
    on Nov 24, 2025
  2. added
    feature 🚀
    and removed
    epic ⚔️
    on Jan 12, 2026
  3. changed the title [-]Implement SNARK pre-aggregation primitives in STM library[/-] [+]Implement SNARK pre-aggregation primitives in STM library - Phase 1[/+] on Jan 21, 2026
  4. jpraynaud commented on Feb 9, 2026

    @jpraynaud
    MemberAuthor

    Golden tests for ClosedregistrationEntry and SingleSignature (half of the work now without future_snark and the other half in #2943):

    How Serialize Deserialize
    The one we already have: without cfg(feature="future_snark")] Previous or New without feature New without feature
    Without cfg(feature="future_snark")] and use JSON created with the cfg(feature="future_snark")] New with feature New without feature
    With cfg(feature="future_snark")] and use JSON created without the cfg(feature="future_snark")] Previous or New without feature New with feature
    With cfg(feature="future_snark")] New with feature New with feature
  5. changed the title [-]Implement SNARK pre-aggregation primitives in STM library - Phase 1[/-] [+]SNARK pre-aggregation primitives in STM library - Phase 1[/+] on Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

cryptography 🔐feature 🚀

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions