pub trait KeygenAggregationCircuitIntent {
type AggregationCircuit: Circuit<Fr>;
// Required methods
fn intent_of_dependencies(&self) -> Vec<AggregationDependencyIntent<'_>>;
fn build_keygen_circuit_from_snarks(
self,
snarks: Vec<Snark>,
) -> Self::AggregationCircuit;
// Provided method
fn build_keygen_circuit_shplonk(self) -> Self::AggregationCircuit
where Self: Sized { ... }
}
Expand description
This trait should be implemented on the minimal circuit configuration data necessary to
completely determine an aggregation circuit
(independent of circuit inputs or specific snarks to be aggregated).
This is used to generate a dummy instantiation of a concrete Circuit
type for the purposes of key generation.
This dummy instantiation just needs to have the correct arithmetization format, but the witnesses do not need to
satisfy constraints.
This trait is specialized for aggregation circuits, which need to aggregate dependency snarks. The aggregation circuit should only depend on the verifying key of each dependency snark.
Required Associated Types§
Sourcetype AggregationCircuit: Circuit<Fr>
type AggregationCircuit: Circuit<Fr>
Concrete circuit type. Defaults to [AggregationCircuit
].
Required Methods§
Sourcefn intent_of_dependencies(&self) -> Vec<AggregationDependencyIntent<'_>>
fn intent_of_dependencies(&self) -> Vec<AggregationDependencyIntent<'_>>
The ordered list of VerifyingKey
s of the circuits to be aggregated.
Sourcefn build_keygen_circuit_from_snarks(
self,
snarks: Vec<Snark>,
) -> Self::AggregationCircuit
fn build_keygen_circuit_from_snarks( self, snarks: Vec<Snark>, ) -> Self::AggregationCircuit
Builds a dummy instantiation of Self::AggregationCircuit
for the purposes of key generation.
Assumes that snarks
is an ordered list of Snark
s, where the i
th snark corresponds to the i
th VerifyingKey
in vk_of_dependencies
.
The snarks
only need to have the correct witness sizes (e.g., proof length) but the
snarks do not need to verify.
May specify additional custom logic for building the aggregation circuit from the snarks.
Provided Methods§
Sourcefn build_keygen_circuit_shplonk(self) -> Self::AggregationCircuitwhere
Self: Sized,
fn build_keygen_circuit_shplonk(self) -> Self::AggregationCircuitwhere
Self: Sized,
Builds a dummy instantiation of Self::AggregationCircuit
for the purposes of key generation.
Generates dummy snarks from the verifying keys in vk_of_dependencies
, assuming that SHPLONK is
used for the multi-open scheme.