ark_groth16::r1cs_to_qap

Trait R1CSToQAP

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§