Closed
Labels
Milestone
Description
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-snarkproof system sub-module in theproof_systemmodule with sub-modules:- gated behind
future_snark -
single_signature -
(we'll do that later)proof -
(we'll do that later)clerk -
aggregate_verification_key
- gated behind
- Adapt the key registration to support the new
halo2proof 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 thephivalue needed for SNARK leaf) - Adapt the conversion of
KeyRegistrationtoClosedKeyRegistration - Implement conversion trait (
From) for theClosedRegistrationEntrytoMerkleTreeSnarkLeaf - Adapt
Initializer
- Create Merkle leaf entry for SNARK
-
Benchmarks - Golden tests
- Property-based tests
- Update the MVP Book
- Run a backward compatibility test when PR is merged
- Create a
Activity
future_snarkfeature tosnark#2814[-]Implement SNARK pre-aggregation primitives in STM library[/-][+]Implement SNARK pre-aggregation primitives in STM library - Phase 1[/+]off-circuitmodule in Halo2 circuit #2945future_snarkfeature tosnark#2814jpraynaud commentedon Feb 9, 2026
Golden tests for
ClosedregistrationEntryandSingleSignature(half of the work now withoutfuture_snarkand the other half in #2943):cfg(feature="future_snark")]cfg(feature="future_snark")]and use JSON created with thecfg(feature="future_snark")]cfg(feature="future_snark")]and use JSON created without thecfg(feature="future_snark")]cfg(feature="future_snark")][-]Implement SNARK pre-aggregation primitives in STM library - Phase 1[/-][+]SNARK pre-aggregation primitives in STM library - Phase 1[/+]