Function aggregate

Source
pub fn aggregate<'a, AS>(
    svk: &Svk,
    loader: &Rc<Halo2Loader<'a>>,
    snarks: &[Snark],
    as_proof: &[u8],
    universality: VerifierUniversality,
) -> SnarkAggregationWitness<'a>
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 rows domain.n is also loaded as a witness

§Assumptions

  • snarks is not empty