mirror of https://github.com/zcash/halo2.git
Rename `OpeningProof` to just `Proof`.
This commit is contained in:
parent
5f6c382546
commit
2d1f69328f
|
@ -7,8 +7,7 @@
|
|||
|
||||
use crate::arithmetic::CurveAffine;
|
||||
use crate::poly::{
|
||||
commitment::OpeningProof, Coeff, EvaluationDomain, ExtendedLagrangeCoeff, LagrangeCoeff,
|
||||
Polynomial,
|
||||
commitment, Coeff, EvaluationDomain, ExtendedLagrangeCoeff, LagrangeCoeff, Polynomial,
|
||||
};
|
||||
use crate::transcript::Hasher;
|
||||
|
||||
|
@ -55,7 +54,7 @@ pub struct Proof<C: CurveAffine> {
|
|||
h_evals: Vec<C::Scalar>,
|
||||
f_commitment: C,
|
||||
q_evals: Vec<C::Scalar>,
|
||||
opening: OpeningProof<C>,
|
||||
opening: commitment::Proof<C>,
|
||||
}
|
||||
|
||||
/// This is an error that could occur during proving or circuit synthesis.
|
||||
|
|
|
@ -7,7 +7,7 @@ use crate::arithmetic::{
|
|||
Curve, CurveAffine, Field,
|
||||
};
|
||||
use crate::poly::{
|
||||
commitment::{Blind, OpeningProof, Params},
|
||||
commitment::{self, Blind, Params},
|
||||
Coeff, LagrangeCoeff, Polynomial, Rotation,
|
||||
};
|
||||
use crate::transcript::Hasher;
|
||||
|
@ -633,7 +633,7 @@ impl<C: CurveAffine> Proof<C> {
|
|||
}
|
||||
|
||||
if let Ok(opening) =
|
||||
OpeningProof::create(¶ms, &mut transcript, &f_poly, f_blind_dup, x_6)
|
||||
commitment::Proof::create(¶ms, &mut transcript, &f_poly, f_blind_dup, x_6)
|
||||
{
|
||||
break (opening, q_evals);
|
||||
} else {
|
||||
|
|
|
@ -15,7 +15,7 @@ mod verifier;
|
|||
|
||||
/// This is a proof object for the polynomial commitment scheme opening.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct OpeningProof<C: CurveAffine> {
|
||||
pub struct Proof<C: CurveAffine> {
|
||||
rounds: Vec<(C, C)>,
|
||||
delta: C,
|
||||
z1: C::Scalar,
|
||||
|
@ -434,7 +434,7 @@ fn test_opening_proof() {
|
|||
loop {
|
||||
let transcript_dup = transcript.clone();
|
||||
|
||||
let opening_proof = OpeningProof::create(¶ms, &mut transcript, &px, blind, x);
|
||||
let opening_proof = Proof::create(¶ms, &mut transcript, &px, blind, x);
|
||||
if opening_proof.is_err() {
|
||||
transcript = transcript_dup;
|
||||
transcript.absorb(Field::one());
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
use super::super::{Coeff, Error, Polynomial};
|
||||
use super::{Blind, OpeningProof, Params};
|
||||
use super::{Blind, Params, Proof};
|
||||
use crate::arithmetic::{
|
||||
best_multiexp, compute_inner_product, get_challenge_scalar, parallelize, small_multiexp,
|
||||
Challenge, Curve, CurveAffine, Field,
|
||||
};
|
||||
use crate::transcript::Hasher;
|
||||
|
||||
impl<C: CurveAffine> OpeningProof<C> {
|
||||
impl<C: CurveAffine> Proof<C> {
|
||||
/// Create a polynomial commitment opening proof for the polynomial defined
|
||||
/// by the coefficients `px`, the blinding factor `blind` used for the
|
||||
/// polynomial commitment, and the point `x` that the polynomial is
|
||||
|
@ -186,7 +186,7 @@ impl<C: CurveAffine> OpeningProof<C> {
|
|||
let z1 = a * &c + &d;
|
||||
let z2 = c * &blind + &s;
|
||||
|
||||
Ok(OpeningProof {
|
||||
Ok(Proof {
|
||||
rounds,
|
||||
delta,
|
||||
z1,
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
use super::super::Error;
|
||||
use super::{Guard, OpeningProof, Params, MSM};
|
||||
use super::{Guard, Params, Proof, MSM};
|
||||
use crate::transcript::Hasher;
|
||||
|
||||
use crate::arithmetic::{get_challenge_scalar, Challenge, CurveAffine, Field};
|
||||
|
||||
impl<C: CurveAffine> OpeningProof<C> {
|
||||
/// Checks to see if an [`OpeningProof`] is valid given the current
|
||||
/// `transcript`, and a point `x` that the polynomial commitment `p` opens
|
||||
/// purportedly to the value `v`.
|
||||
impl<C: CurveAffine> Proof<C> {
|
||||
/// Checks to see if an [`Proof`] is valid given the current `transcript`,
|
||||
/// and a point `x` that the polynomial commitment `p` opens purportedly to
|
||||
/// the value `v`.
|
||||
pub fn verify<'a, H: Hasher<C::Base>>(
|
||||
&self,
|
||||
params: &'a Params<C>,
|
||||
|
|
Loading…
Reference in New Issue