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
type VerifierKeyVar: AllocGadget<<PC as PolynomialCommitment<PCF>>::VerifierKey, ConstraintF> + Clone + ToBytesGadget<ConstraintF>
type VerifierKeyVar: AllocGadget<<PC as PolynomialCommitment<PCF>>::VerifierKey, ConstraintF> + Clone + ToBytesGadget<ConstraintF>
An allocated version of PC::VerifierKey
.
type PreparedVerifierKeyVar: AllocGadget<<PC as PolynomialCommitment<PCF>>::PreparedVerifierKey, ConstraintF> + Clone + PrepareGadget<Self::VerifierKeyVar, ConstraintF> + Into<Self::VerifierKeyVar>
type PreparedVerifierKeyVar: AllocGadget<<PC as PolynomialCommitment<PCF>>::PreparedVerifierKey, ConstraintF> + Clone + PrepareGadget<Self::VerifierKeyVar, ConstraintF> + Into<Self::VerifierKeyVar>
An allocated version of PC::PreparedVerifierKey
.
type CommitmentVar: AllocGadget<<PC as PolynomialCommitment<PCF>>::Commitment, ConstraintF> + Clone + ToBytesGadget<ConstraintF>
type CommitmentVar: AllocGadget<<PC as PolynomialCommitment<PCF>>::Commitment, ConstraintF> + Clone + ToBytesGadget<ConstraintF>
An allocated version of PC::Commitment
.
type PreparedCommitmentVar: AllocGadget<<PC as PolynomialCommitment<PCF>>::PreparedCommitment, ConstraintF> + PrepareGadget<Self::CommitmentVar, ConstraintF> + Clone
type PreparedCommitmentVar: AllocGadget<<PC as PolynomialCommitment<PCF>>::PreparedCommitment, ConstraintF> + PrepareGadget<Self::CommitmentVar, ConstraintF> + Clone
An allocated version of PC::PreparedCommitment
.
type LabeledCommitmentVar: AllocGadget<LabeledCommitment<<PC as PolynomialCommitment<PCF>>::Commitment>, ConstraintF> + Clone
type LabeledCommitmentVar: AllocGadget<LabeledCommitment<<PC as PolynomialCommitment<PCF>>::Commitment>, ConstraintF> + Clone
An allocated version of LabeledCommitment<PC::Commitment>
.
A prepared, allocated version of LabeledCommitment<PC::Commitment>
.
type ProofVar: AllocGadget<<PC as PolynomialCommitment<PCF>>::Proof, ConstraintF> + Clone
type ProofVar: AllocGadget<<PC as PolynomialCommitment<PCF>>::Proof, ConstraintF> + Clone
An allocated version of PC::Proof
.
type BatchLCProofVar: AllocGadget<BatchLCProof<PCF, PC>, ConstraintF> + Clone
type BatchLCProofVar: AllocGadget<BatchLCProof<PCF, PC>, ConstraintF> + Clone
An allocated version of PC::BatchLCProof
.
Required methods
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 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>,
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
.
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 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>,
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
.
fn create_labeled_commitment(
label: String,
commitment: Self::CommitmentVar,
degree_bound: Option<FpGadget<ConstraintF>>
) -> Self::LabeledCommitmentVar
fn create_labeled_commitment(
label: String,
commitment: Self::CommitmentVar,
degree_bound: Option<FpGadget<ConstraintF>>
) -> Self::LabeledCommitmentVar
Create the labeled commitment gadget from the commitment gadget
fn create_prepared_labeled_commitment(
label: String,
commitment: Self::PreparedCommitmentVar,
degree_bound: Option<FpGadget<ConstraintF>>
) -> Self::PreparedLabeledCommitmentVar
fn create_prepared_labeled_commitment(
label: String,
commitment: Self::PreparedCommitmentVar,
degree_bound: Option<FpGadget<ConstraintF>>
) -> Self::PreparedLabeledCommitmentVar
Create the prepared labeled commitment gadget from the commitment gadget
Implementors
impl<TargetCurve, BaseCurve, PG> PCCheckVar<<TargetCurve as PairingEngine>::Fr, MarlinKZG10<TargetCurve>, <BaseCurve as PairingEngine>::Fr> for MarlinKZG10Gadget<TargetCurve, BaseCurve, PG> where
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
<TargetCurve as PairingEngine>::G1Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>,
<TargetCurve as PairingEngine>::G2Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>,