Trait KeygenAggregationCircuitIntent

Source
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§

Source

type AggregationCircuit: Circuit<Fr>

Concrete circuit type. Defaults to [AggregationCircuit].

Required Methods§

Source

fn intent_of_dependencies(&self) -> Vec<AggregationDependencyIntent<'_>>

The ordered list of VerifyingKeys of the circuits to be aggregated.

Source

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 Snarks, where the ith snark corresponds to the ith 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§

Source

fn build_keygen_circuit_shplonk(self) -> Self::AggregationCircuit
where 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.

Implementors§