pub fn aggregate<'a, AS>(
svk: &Svk,
loader: &Rc<Halo2Loader<'a>>,
snarks: &[Snark],
as_proof: &[u8],
universality: VerifierUniversality,
) -> SnarkAggregationWitness<'a>where
AS: PolynomialCommitmentScheme<G1Affine, Rc<Halo2Loader<'a>>, VerifyingKey = Svk, Output = KzgAccumulator<G1Affine, Rc<Halo2Loader<'a>>>> + AccumulationScheme<G1Affine, Rc<Halo2Loader<'a>>, Accumulator = KzgAccumulator<G1Affine, Rc<Halo2Loader<'a>>>, VerifyingKey = KzgAsVerifyingKey>,
Expand description
Core function used in synthesize
to aggregate multiple snarks
.
Returns the assigned instances of previous snarks and the new final pair that needs to be verified in a pairing check. For each previous snark, we concatenate all instances into a single vector. We return a vector of vectors, one vector per snark, for convenience.
preprocessed_as_witness
: flag for whether preprocessed digest (i.e., verifying key) should be loaded as witness (if false, loaded as constant)- If
preprocessed_as_witness
is true, number of circuit rowsdomain.n
is also loaded as a witness
- If
§Assumptions
snarks
is not empty