pub trait IdealCheckProtocol: Uair {
// Required methods
fn prove_linear<F>(
transcript: &mut impl Transcript,
trace_matrix: &ColumnMajorTrace<F>,
projected_scalars: &HashMap<Self::Scalar, DynamicPolynomialF<F>>,
num_constraints: usize,
num_vars: usize,
field_cfg: &F::Config,
) -> Result<(Proof<F>, ProverState<F>), IdealCheckError<F, Self::Ideal>>
where F: InnerTransparentField,
F::Inner: ConstTranscribable,
F::Modulus: ConstTranscribable;
fn prove_combined<F>(
transcript: &mut impl Transcript,
trace_matrix: &RowMajorTrace<F>,
projected_scalars: &HashMap<Self::Scalar, DynamicPolynomialF<F>>,
num_constraints: usize,
num_vars: usize,
field_cfg: &F::Config,
) -> Result<(Proof<F>, ProverState<F>), IdealCheckError<F, Self::Ideal>>
where F: InnerTransparentField,
F::Inner: ConstTranscribable,
F::Modulus: ConstTranscribable;
fn verify_as_subprotocol<F, IdealOverF, IdealOverFFromRef>(
transcript: &mut impl Transcript,
proof: Proof<F>,
num_constraints: usize,
num_vars: usize,
ideal_over_f_from_ref: IdealOverFFromRef,
field_cfg: &F::Config,
) -> Result<VerifierSubclaim<F>, IdealCheckError<F, IdealOverF>>
where F: InnerTransparentField,
F::Inner: ConstTranscribable,
F::Modulus: ConstTranscribable,
IdealOverF: Ideal + IdealCheck<DynamicPolynomialF<F>>,
IdealOverFFromRef: Fn(&IdealOrZero<Self::Ideal>) -> IdealOverF;
}Expand description
Ideal-check subprotocol.
Required Methods§
Sourcefn prove_linear<F>(
transcript: &mut impl Transcript,
trace_matrix: &ColumnMajorTrace<F>,
projected_scalars: &HashMap<Self::Scalar, DynamicPolynomialF<F>>,
num_constraints: usize,
num_vars: usize,
field_cfg: &F::Config,
) -> Result<(Proof<F>, ProverState<F>), IdealCheckError<F, Self::Ideal>>
fn prove_linear<F>( transcript: &mut impl Transcript, trace_matrix: &ColumnMajorTrace<F>, projected_scalars: &HashMap<Self::Scalar, DynamicPolynomialF<F>>, num_constraints: usize, num_vars: usize, field_cfg: &F::Config, ) -> Result<(Proof<F>, ProverState<F>), IdealCheckError<F, Self::Ideal>>
Prover for linear-only UAIRs using MLE-first evaluation.
Uses column-indexed trace for efficient MLE evaluation: evaluates trace columns at the challenge point first, then applies constraints to the evaluated values.
§Parameters
transcript: the Fiat-Shamir transcript.trace_matrix: input trace for the UAIRUprojected toDynamicPolynomialF<F>, column-indexed:trace_matrix[col][row].projected_scalars: UAIR scalars projected toDynamicPolynomialF<F>.num_constraints: number of constraints this UAIR encodes.num_vars: number of variables in trace MLEs.field_cfg: random field configuration sampled on the previous steps of the overall protocol.
Sourcefn prove_combined<F>(
transcript: &mut impl Transcript,
trace_matrix: &RowMajorTrace<F>,
projected_scalars: &HashMap<Self::Scalar, DynamicPolynomialF<F>>,
num_constraints: usize,
num_vars: usize,
field_cfg: &F::Config,
) -> Result<(Proof<F>, ProverState<F>), IdealCheckError<F, Self::Ideal>>
fn prove_combined<F>( transcript: &mut impl Transcript, trace_matrix: &RowMajorTrace<F>, projected_scalars: &HashMap<Self::Scalar, DynamicPolynomialF<F>>, num_constraints: usize, num_vars: usize, field_cfg: &F::Config, ) -> Result<(Proof<F>, ProverState<F>), IdealCheckError<F, Self::Ideal>>
Prover for any UAIR using combined polynomial construction.
Uses row-indexed (transposed) trace for efficient row-by-row combined polynomial construction.
§Parameters
transcript: the Fiat-Shamir transcript.trace_matrix: input trace for the UAIRUprojected toDynamicPolynomialF<F>, row-indexed:trace_matrix[row][col].projected_scalars: UAIR scalars projected toDynamicPolynomialF<F>.num_constraints: number of constraints this UAIR encodes.num_vars: number of variables in trace MLEs.field_cfg: random field configuration sampled on the previous steps of the overall protocol.
Sourcefn verify_as_subprotocol<F, IdealOverF, IdealOverFFromRef>(
transcript: &mut impl Transcript,
proof: Proof<F>,
num_constraints: usize,
num_vars: usize,
ideal_over_f_from_ref: IdealOverFFromRef,
field_cfg: &F::Config,
) -> Result<VerifierSubclaim<F>, IdealCheckError<F, IdealOverF>>where
F: InnerTransparentField,
F::Inner: ConstTranscribable,
F::Modulus: ConstTranscribable,
IdealOverF: Ideal + IdealCheck<DynamicPolynomialF<F>>,
IdealOverFFromRef: Fn(&IdealOrZero<Self::Ideal>) -> IdealOverF,
fn verify_as_subprotocol<F, IdealOverF, IdealOverFFromRef>(
transcript: &mut impl Transcript,
proof: Proof<F>,
num_constraints: usize,
num_vars: usize,
ideal_over_f_from_ref: IdealOverFFromRef,
field_cfg: &F::Config,
) -> Result<VerifierSubclaim<F>, IdealCheckError<F, IdealOverF>>where
F: InnerTransparentField,
F::Inner: ConstTranscribable,
F::Modulus: ConstTranscribable,
IdealOverF: Ideal + IdealCheck<DynamicPolynomialF<F>>,
IdealOverFFromRef: Fn(&IdealOrZero<Self::Ideal>) -> IdealOverF,
The verifier part of the ideal-check subprotocol.
The verifier samples a random field element
the same way the prover sampled a random field
element for projecting coefficients but disregards it
as the verifier does not need to project anything.
Then it computes the ideals encoded by the UAIR U,
samples a random evaluation point and receives
the evaluations of the combined polynomials sent by the prover
and checks they belong to the corresponding ideals defined
by the UAIR U.
§Parameters
transcript: the Fiat-Shamir transcript.proof: a purported proof produced by the prover.num_constraints: the number of constraints the UAIRUencodes.num_vars: the number of variables the trace row MLEs have.ideal_over_f_from_ref: since the UAIRUis not aware of the field the ideal check is operating on it defines ideals over the ringIcTypes::Witness.ideal_over_f_from_refallows to convert the ideals overIcTypes::Witnessinto ideals over the fieldIcTypes::F. Think of this as a projection for ideals.field_cfg: random field configuration sampled on the previous steps of the overall protocol.
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.