Struct arrabbiata::setup::IndexedRelation
source · pub struct IndexedRelation<Fp: PrimeField, Fq: PrimeField, E1: ArrabbiataCurve<ScalarField = Fp, BaseField = Fq>, E2: ArrabbiataCurve<ScalarField = Fq, BaseField = Fp>>where
E1::BaseField: PrimeField,
E2::BaseField: PrimeField,{
pub domain_fp: EvaluationDomains<E1::ScalarField>,
pub domain_fq: EvaluationDomains<E2::ScalarField>,
pub srs_e1: SRS<E1>,
pub srs_e2: SRS<E2>,
pub constraints_fp: HashMap<Gadget, Vec<Sparse<Fp, { MV_POLYNOMIAL_ARITY }, { MAX_DEGREE }>>>,
pub constraints_fq: HashMap<Gadget, Vec<Sparse<Fq, { MV_POLYNOMIAL_ARITY }, { MAX_DEGREE }>>>,
}
Expand description
An indexed relation is a structure that contains all the information needed describing a specialised sub-class of the NP relation. It includes some (protocol) parameters like the SRS, the evaluation domains, and the constraints describing the computation.
The prover will be instantiated for a particular indexed relation, and the verifier will be instantiated with (relatively) the same indexed relation.
Fields§
§domain_fp: EvaluationDomains<E1::ScalarField>
Domain for Fp
domain_fq: EvaluationDomains<E2::ScalarField>
Domain for Fq
srs_e1: SRS<E1>
SRS for the first curve
srs_e2: SRS<E2>
SRS for the second curve
constraints_fp: HashMap<Gadget, Vec<Sparse<Fp, { MV_POLYNOMIAL_ARITY }, { MAX_DEGREE }>>>
The constraints given as multivariate polynomials using the mvpoly library, indexed by the gadget to ease the selection of the constraints while computing the cross-terms during the accumulation process.
When the accumulation scheme is implemented, this structure will probably be subject to changes as the SNARK used for the accumulation scheme will probably work over expressions used in [kimchi::circuits::expr]. We leave that for the future, and focus on the accumulation scheme implementation.
We keep two sets of constraints for the time being as we might want in the future to have different circuits for one of the curves, as inspired by CycleFold. In the current design, both circuits are the same and the prover will do the same job over both curves.
constraints_fq: HashMap<Gadget, Vec<Sparse<Fq, { MV_POLYNOMIAL_ARITY }, { MAX_DEGREE }>>>