mirror of
https://github.com/arnaucube/hyperplonk.git
synced 2026-01-11 16:41:28 +01:00
impl KZG based multilinear pcs (#22)
This commit is contained in:
@@ -6,17 +6,17 @@ use displaydoc::Display;
|
||||
/// A `enum` specifying the possible failure modes of the PolyIOP.
|
||||
#[derive(Display, Debug)]
|
||||
pub enum PolyIOPErrors {
|
||||
/// Invalid Prover
|
||||
/// Invalid Prover: {0}
|
||||
InvalidProver(String),
|
||||
/// Invalid Verifier
|
||||
/// Invalid Verifier: {0}
|
||||
InvalidVerifier(String),
|
||||
/// Invalid Proof
|
||||
/// Invalid Proof: {0}
|
||||
InvalidProof(String),
|
||||
/// Invalid parameters
|
||||
/// Invalid parameters: {0}
|
||||
InvalidParameters(String),
|
||||
/// Invalid Transcript
|
||||
/// Invalid Transcript: {0}
|
||||
InvalidTranscript(String),
|
||||
/// An error during (de)serialization
|
||||
/// An error during (de)serialization: {0}
|
||||
SerializationError(ark_serialize::SerializationError),
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ mod zero_check;
|
||||
pub use errors::PolyIOPErrors;
|
||||
pub use sum_check::SumCheck;
|
||||
pub use virtual_poly::VirtualPolynomial;
|
||||
pub use zero_check::ZeroCheck;
|
||||
pub use zero_check::{build_eq_x_r, ZeroCheck};
|
||||
|
||||
/// Struct for PolyIOP protocol.
|
||||
/// It is instantiated with
|
||||
|
||||
@@ -137,7 +137,9 @@ fn build_f_hat<F: PrimeField>(
|
||||
// eq(x,y) = \prod_i=1^num_var (x_i * y_i + (1-x_i)*(1-y_i))
|
||||
// over r, which is
|
||||
// eq(x,y) = \prod_i=1^num_var (x_i * r_i + (1-x_i)*(1-r_i))
|
||||
fn build_eq_x_r<F: PrimeField>(r: &[F]) -> Result<Rc<DenseMultilinearExtension<F>>, PolyIOPErrors> {
|
||||
pub fn build_eq_x_r<F: PrimeField>(
|
||||
r: &[F],
|
||||
) -> Result<Rc<DenseMultilinearExtension<F>>, PolyIOPErrors> {
|
||||
let start = start_timer!(|| "zero check build eq_x_r");
|
||||
|
||||
// we build eq(x,r) from its evaluations
|
||||
|
||||
Reference in New Issue
Block a user