diff --git a/poly-commit/src/linear_codes/mod.rs b/poly-commit/src/linear_codes/mod.rs index 2626adec..e6cd655b 100644 --- a/poly-commit/src/linear_codes/mod.rs +++ b/poly-commit/src/linear_codes/mod.rs @@ -160,7 +160,7 @@ where C: Config + 'static, Vec: Borrow<::Input>, H::Output: Into + Send, - C::Leaf: Sized + Clone + Default + Send, + C::Leaf: Sized + Clone + Default + Send + AsRef, H: CRHScheme + 'static, { type UniversalParams = L::LinCodePCParams; @@ -302,7 +302,7 @@ where _labeled_polynomials: impl IntoIterator>, commitments: impl IntoIterator>, point: &'a P::Point, - _challenge_generator: &mut crate::challenge::ChallengeGenerator, + _sponge: &mut S, states: impl IntoIterator, _rng: Option<&mut dyn RngCore>, ) -> Result @@ -395,7 +395,7 @@ where point: &'a P::Point, values: impl IntoIterator, proof_array: &Self::Proof, - _challenge_generator: &mut crate::challenge::ChallengeGenerator, + _sponge: &mut S, _rng: Option<&mut dyn RngCore>, ) -> Result where @@ -545,7 +545,7 @@ fn create_merkle_tree( ) -> Result, Error> where C: Config, - C::Leaf: Default + Clone + Send, + C::Leaf: Default + Clone + Send + AsRef, { // pad the column hashes with zeroes let next_pow_of_two = leaves.len().next_power_of_two(); diff --git a/poly-commit/src/linear_codes/multilinear_brakedown/tests.rs b/poly-commit/src/linear_codes/multilinear_brakedown/tests.rs index 8af84e5b..e4be256f 100644 --- a/poly-commit/src/linear_codes/multilinear_brakedown/tests.rs +++ b/poly-commit/src/linear_codes/multilinear_brakedown/tests.rs @@ -4,7 +4,6 @@ mod tests { use crate::linear_codes::LinearCodePCS; use crate::utils::test_sponge; use crate::{ - challenge::ChallengeGenerator, linear_codes::{utils::*, BrakedownPCParams, MultilinearBrakedown, PolynomialCommitment}, LabeledPolynomial, }; @@ -114,22 +113,19 @@ mod tests { ); let mut test_sponge = test_sponge::(); - let (c, rands) = BrakedownPCS::::commit(&ck, &[labeled_poly.clone()], None).unwrap(); + let (c, states) = BrakedownPCS::::commit(&ck, &[labeled_poly.clone()], None).unwrap(); let point = rand_point(Some(num_vars), rand_chacha); let value = labeled_poly.evaluate(&point); - let mut challenge_generator: ChallengeGenerator> = - ChallengeGenerator::new_univariate(&mut test_sponge); - let proof = BrakedownPCS::::open( &ck, &[labeled_poly], &c, &point, - &mut (challenge_generator.clone()), - &rands, + &mut (test_sponge.clone()), + &states, None, ) .unwrap(); @@ -139,7 +135,7 @@ mod tests { &point, [value], &proof, - &mut challenge_generator, + &mut test_sponge, None ) .unwrap());