pub trait R1CSToQAP {
    // Required methods
    fn instance_map_with_evaluation<F: PrimeField, D: EvaluationDomain<F>>(
        cs: ConstraintSystemRef<F>,
        t: &F
    ) -> Result<(Vec<F>, Vec<F>, Vec<F>, F, usize, usize), SynthesisError>;
    fn witness_map_from_matrices<F: PrimeField, D: EvaluationDomain<F>>(
        matrices: &ConstraintMatrices<F>,
        num_inputs: usize,
        num_constraints: usize,
        full_assignment: &[F]
    ) -> R1CSResult<Vec<F>>;
    fn h_query_scalars<F: PrimeField, D: EvaluationDomain<F>>(
        max_power: usize,
        t: F,
        zt: F,
        delta_inverse: F
    ) -> Result<Vec<F>, SynthesisError>;

    // Provided method
    fn witness_map<F: PrimeField, D: EvaluationDomain<F>>(
        prover: ConstraintSystemRef<F>
    ) -> Result<Vec<F>, SynthesisError> { ... }
}
Expand description

Computes instance and witness reductions from R1CS to Quadratic Arithmetic Programs (QAPs).

Required Methods§

source

fn instance_map_with_evaluation<F: PrimeField, D: EvaluationDomain<F>>( cs: ConstraintSystemRef<F>, t: &F ) -> Result<(Vec<F>, Vec<F>, Vec<F>, F, usize, usize), SynthesisError>

Computes a QAP instance corresponding to the R1CS instance defined by cs.

source

fn witness_map_from_matrices<F: PrimeField, D: EvaluationDomain<F>>( matrices: &ConstraintMatrices<F>, num_inputs: usize, num_constraints: usize, full_assignment: &[F] ) -> R1CSResult<Vec<F>>

Computes a QAP witness corresponding to the R1CS witness defined by cs.

source

fn h_query_scalars<F: PrimeField, D: EvaluationDomain<F>>( max_power: usize, t: F, zt: F, delta_inverse: F ) -> Result<Vec<F>, SynthesisError>

Computes the exponents that the generator uses to calculate base elements which the prover later uses to compute h(x)t(x)/delta.

Provided Methods§

source

fn witness_map<F: PrimeField, D: EvaluationDomain<F>>( prover: ConstraintSystemRef<F> ) -> Result<Vec<F>, SynthesisError>

Computes a QAP witness corresponding to the R1CS witness defined by cs.

Implementors§