Trait snarkvm_wasm::PCCheckVar[][src]

pub trait PCCheckVar<PCF, PC, ConstraintF>: Clone where
    PC: PolynomialCommitment<PCF>,
    PCF: PrimeField,
    ConstraintF: PrimeField
{ type VerifierKeyVar: AllocGadget<<PC as PolynomialCommitment<PCF>>::VerifierKey, ConstraintF> + Clone + ToBytesGadget<ConstraintF>; type PreparedVerifierKeyVar: AllocGadget<<PC as PolynomialCommitment<PCF>>::PreparedVerifierKey, ConstraintF> + Clone + PrepareGadget<Self::VerifierKeyVar, ConstraintF> + Into<Self::VerifierKeyVar>; type CommitmentVar: AllocGadget<<PC as PolynomialCommitment<PCF>>::Commitment, ConstraintF> + Clone + ToBytesGadget<ConstraintF>; type PreparedCommitmentVar: AllocGadget<<PC as PolynomialCommitment<PCF>>::PreparedCommitment, ConstraintF> + PrepareGadget<Self::CommitmentVar, ConstraintF> + Clone; type LabeledCommitmentVar: AllocGadget<LabeledCommitment<<PC as PolynomialCommitment<PCF>>::Commitment>, ConstraintF> + Clone; type PreparedLabeledCommitmentVar: Clone; type ProofVar: AllocGadget<<PC as PolynomialCommitment<PCF>>::Proof, ConstraintF> + Clone; type BatchLCProofVar: AllocGadget<BatchLCProof<PCF, PC>, ConstraintF> + Clone; fn batch_check_evaluations<CS>(
        cs: CS,
        verification_key: &Self::VerifierKeyVar,
        commitments: &[Self::LabeledCommitmentVar],
        query_set: &QuerySetVar<PCF, ConstraintF>,
        evaluations: &EvaluationsVar<PCF, ConstraintF>,
        proofs: &[Self::ProofVar],
        rand_data: &PCCheckRandomDataVar<PCF, ConstraintF>
    ) -> Result<Boolean, SynthesisError>
    where
        CS: ConstraintSystem<ConstraintF>
;
fn prepared_check_combinations<CS>(
        cs: CS,
        prepared_verification_key: &Self::PreparedVerifierKeyVar,
        linear_combinations: &[LinearCombinationVar<PCF, ConstraintF>],
        prepared_commitments: &[Self::PreparedLabeledCommitmentVar],
        query_set: &QuerySetVar<PCF, ConstraintF>,
        evaluations: &EvaluationsVar<PCF, ConstraintF>,
        proof: &Self::BatchLCProofVar,
        rand_data: &PCCheckRandomDataVar<PCF, ConstraintF>
    ) -> Result<Boolean, SynthesisError>
    where
        CS: ConstraintSystem<ConstraintF>
;
fn create_labeled_commitment(
        label: String,
        commitment: Self::CommitmentVar,
        degree_bound: Option<FpGadget<ConstraintF>>
    ) -> Self::LabeledCommitmentVar;
fn create_prepared_labeled_commitment(
        label: String,
        commitment: Self::PreparedCommitmentVar,
        degree_bound: Option<FpGadget<ConstraintF>>
    ) -> Self::PreparedLabeledCommitmentVar; }
Expand description

Describes the interface for a gadget for a PolynomialCommitment verifier.

Associated Types

An allocated version of PC::VerifierKey.

An allocated version of PC::PreparedVerifierKey.

An allocated version of PC::Commitment.

An allocated version of PC::PreparedCommitment.

An allocated version of LabeledCommitment<PC::Commitment>.

A prepared, allocated version of LabeledCommitment<PC::Commitment>.

An allocated version of PC::Proof.

An allocated version of PC::BatchLCProof.

Required methods

Add to ConstraintSystem<ConstraintF> new constraints that check that proof_i is a valid evaluation proof at point_i for the polynomial in commitment_i.

Add to ConstraintSystem<ConstraintF> new constraints that conditionally check that proof is a valid evaluation proof at the points in query_set for the combinations linear_combinations.

Create the labeled commitment gadget from the commitment gadget

Create the prepared labeled commitment gadget from the commitment gadget

Implementors