Skip to content

Commit

Permalink
Repo maintenance: catch up with changes in ark-poly; bump version (#77
Browse files Browse the repository at this point in the history
)
  • Loading branch information
mmagician authored Jan 25, 2024
1 parent 23341fe commit 956fdaa
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ark-linear-sumcheck"
version = "0.3.0"
version = "0.4.0"
authors = [
"Tom Shen <[email protected]>",
"arkworks contributors"
Expand Down
6 changes: 2 additions & 4 deletions src/gkr_round_sumcheck/data_structures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use crate::ml_sumcheck::protocol::prover::ProverMsg;
use ark_ff::Field;
use ark_poly::{DenseMultilinearExtension, MultilinearExtension, SparseMultilinearExtension};
use ark_poly::{DenseMultilinearExtension, Polynomial, SparseMultilinearExtension};
use ark_std::vec::Vec;

/// Proof for GKR Round Function
Expand Down Expand Up @@ -50,9 +50,7 @@ impl<F: Field> GKRRoundSumcheckSubClaim<F> {
.chain(self.v.iter())
.copied()
.collect();
let actual_evaluation = f1.evaluate(&guv).unwrap()
* f2.evaluate(&self.u).unwrap()
* f3.evaluate(&self.v).unwrap();
let actual_evaluation = f1.evaluate(&guv) * f2.evaluate(&self.u) * f3.evaluate(&self.v);

actual_evaluation == self.expected_evaluation
}
Expand Down
6 changes: 4 additions & 2 deletions src/gkr_round_sumcheck/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ use crate::ml_sumcheck::protocol::prover::ProverState;
use crate::ml_sumcheck::protocol::{IPForMLSumcheck, ListOfProductsOfPolynomials, PolynomialInfo};
use crate::rng::FeedableRNG;
use ark_ff::{Field, Zero};
use ark_poly::{DenseMultilinearExtension, MultilinearExtension, SparseMultilinearExtension};
use ark_poly::{
DenseMultilinearExtension, MultilinearExtension, Polynomial, SparseMultilinearExtension,
};
use ark_std::marker::PhantomData;
use ark_std::rc::Rc;
use ark_std::vec::Vec;
Expand Down Expand Up @@ -117,7 +119,7 @@ impl<F: Field> GKRRoundSumcheck<F> {
}

let f1_gu = initialize_phase_two(&f1_g, &u);
let mut phase2_ps = start_phase2_sumcheck(&f1_gu, f3, f2.evaluate(&u).unwrap());
let mut phase2_ps = start_phase2_sumcheck(&f1_gu, f3, f2.evaluate(&u));
let mut phase2_vm = None;
let mut phase2_prover_msgs = Vec::with_capacity(dim);
let mut v = Vec::with_capacity(dim);
Expand Down
4 changes: 2 additions & 2 deletions src/ml_sumcheck/data_structures.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Defines the data structures used by the `MLSumcheck` protocol.
use ark_ff::Field;
use ark_poly::{DenseMultilinearExtension, MultilinearExtension};
use ark_poly::{DenseMultilinearExtension, Polynomial};
use ark_serialize::{CanonicalDeserialize, CanonicalSerialize};
use ark_std::cmp::max;
use ark_std::rc::Rc;
Expand Down Expand Up @@ -102,7 +102,7 @@ impl<F: Field> ListOfProductsOfPolynomials<F> {
.map(|(c, p)| {
*c * p
.iter()
.map(|&i| self.flattened_ml_extensions[i].evaluate(point).unwrap())
.map(|&i| self.flattened_ml_extensions[i].evaluate(&point.to_vec()))
.product::<F>()
})
.sum()
Expand Down

0 comments on commit 956fdaa

Please sign in to comment.