pub fn aggregate_snarks<AS>(
pool: &mut SinglePhaseCoreManager<Fr>,
range: &RangeChip<Fr>,
svk: Svk,
snarks: impl IntoIterator<Item = Snark>,
universality: VerifierUniversality,
) -> SnarkAggregationOutputwhere
AS: for<'a> Halo2KzgAccumulationScheme<'a>,
Expand description
Given snarks, this populates the circuit builder with the virtual cells and constraints necessary to verify all the snarks.
§Notes
- This function does not expose any public instances.
svk
is the generator of the KZG trusted setup, usually gotten viaparams.get_g()[0]
(avoids having to passparams
into function just to get generator)
§Universality
- If
universality
is notNone
, then the verifying keys of each snark insnarks
is loaded as a witness in the circuit. - Moreover, if
universality
isFull
, then the number of rowsn
of each snark insnarks
is also loaded as a witness. In this case the generatoromega
of the ordern
multiplicative subgroup ofF
is also loaded as a witness. - By default, these witnesses are private and returned in `self.preprocessed_digests
- The user can optionally modify the circuit after calling this function to add more instances to
assigned_instances
to expose.
§Warning
Will fail silently if snarks
were created using a different multi-open scheme than AS
where AS
can be either crate::SHPLONK
or crate::GWC
(for original PLONK multi-open scheme)
§Assumptions
pool
andrange
reference the sameSharedCopyConstraintManager
.