Skip to content

Commit

Permalink
Prod check (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
chancharles92 authored Aug 12, 2022
1 parent 066c370 commit 8281e7c
Show file tree
Hide file tree
Showing 9 changed files with 456 additions and 70 deletions.
2 changes: 1 addition & 1 deletion arithmetic/src/virtual_polynomial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub struct VirtualPolynomial<F: PrimeField> {
raw_pointers_lookup_table: HashMap<*const DenseMultilinearExtension<F>, usize>,
}

#[derive(Clone, Debug, Default, PartialEq, CanonicalSerialize)]
#[derive(Clone, Debug, Default, PartialEq, Eq, CanonicalSerialize)]
/// Auxiliary information about the multilinear polynomial
pub struct VPAuxInfo<F: PrimeField> {
/// max number of multiplicands in each product
Expand Down
2 changes: 1 addition & 1 deletion hyperplonk/src/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ pub struct HyperPlonkVerifyingKey<E: PairingEngine, PCS: PolynomialCommitmentSch
/// id_w2 = 1 // second witness
///
/// NOTE: here coeff is a signed integer, instead of a field element
#[derive(Clone, Debug, Default, PartialEq)]
#[derive(Clone, Debug, Default, PartialEq, Eq)]
pub struct CustomizedGates {
pub(crate) gates: Vec<(i64, Option<usize>, Vec<usize>)>,
}
2 changes: 1 addition & 1 deletion pcs/src/structs.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use ark_ec::PairingEngine;
use ark_serialize::{CanonicalDeserialize, CanonicalSerialize, Read, SerializationError, Write};

#[derive(CanonicalSerialize, CanonicalDeserialize, Clone, Debug, Default, PartialEq)]
#[derive(CanonicalSerialize, CanonicalDeserialize, Clone, Debug, Default, PartialEq, Eq)]
/// A commitment is an Affine point.
pub struct Commitment<E: PairingEngine> {
/// the actual commitment is an affine point.
Expand Down
5 changes: 4 additions & 1 deletion poly-iop/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
pcs = { path = "../pcs" }

ark-ff = { version = "^0.3.0", default-features = false }
ark-std = { version = "^0.3.0", default-features = false }
ark-poly = { version = "^0.3.0", default-features = false }
ark-serialize = { version = "^0.3.0", default-features = false }
ark-bls12-381 = { version = "0.3.0", default-features = false, features = [ "curve" ] }
ark-ec = { version = "^0.3.0", default-features = false }

rand_chacha = { version = "0.3.0", default-features = false }
displaydoc = { version = "0.2.3", default-features = false }
Expand All @@ -37,7 +39,8 @@ parallel = [
"arithmetic/parallel",
"ark-std/parallel",
"ark-ff/parallel",
"ark-poly/parallel"
"ark-poly/parallel",
"pcs/parallel",
]
print-trace = [
"arithmetic/print-trace",
Expand Down
9 changes: 9 additions & 0 deletions poly-iop/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use arithmetic::ArithErrors;
use ark_std::string::String;
use displaydoc::Display;
use pcs::prelude::PCSErrors;
use transcript::TranscriptErrors;

/// A `enum` specifying the possible failure modes of the PolyIOP.
Expand All @@ -26,6 +27,8 @@ pub enum PolyIOPErrors {
TranscriptErrors(TranscriptErrors),
/// Arithmetic Error: {0}
ArithmeticErrors(ArithErrors),
/// PCS error {0}
PCSErrors(PCSErrors),
}

impl From<ark_serialize::SerializationError> for PolyIOPErrors {
Expand All @@ -45,3 +48,9 @@ impl From<ArithErrors> for PolyIOPErrors {
Self::ArithmeticErrors(e)
}
}

impl From<PCSErrors> for PolyIOPErrors {
fn from(e: PCSErrors) -> Self {
Self::PCSErrors(e)
}
}
Loading

0 comments on commit 8281e7c

Please sign in to comment.