Skip to content

Commit

Permalink
Merge pull request #2311 from AleoHQ/bump-rust-toolchain
Browse files Browse the repository at this point in the history
Update MSRV & CI to 1.72.1, fix clippy
  • Loading branch information
howardwu authored Jan 20, 2024
2 parents bcee29b + a95fb04 commit 329af73
Show file tree
Hide file tree
Showing 60 changed files with 437 additions and 537 deletions.
140 changes: 70 additions & 70 deletions .circleci/config.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .rusty-hook.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[hooks]
pre-commit = "cargo clippy --workspace --all-targets --all-features && cargo +nightly fmt --all -- --check"
pre-commit = "cargo +nightly fmt --all -- --check && cargo clippy --workspace --all-targets --all-features"

[logging]
verbose = true
12 changes: 0 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ categories = [
include = [ "Cargo.toml", "vm", "README.md", "LICENSE.md" ]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.70"
rust-version = "1.72.1"

[workspace]
members = [
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/fft/polynomial/sparse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl<F: Field> SparsePolynomial<F> {
*cur_coeff += *self_coeff * other_coeff;
}
}
SparsePolynomial::from_coefficients(result.into_iter())
SparsePolynomial::from_coefficients(result)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions algorithms/src/polycommit/test_templates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ where
let max_degree = max_degree.unwrap_or_else(|| distributions::Uniform::from(8..=64).sample(rng));
let pp = SonicKZG10::<E, S>::load_srs(max_degree)?;
let universal_prover = &pp.to_universal_prover().unwrap();
let supported_degree_bounds = vec![1 << 10, 1 << 15, 1 << 20, 1 << 25, 1 << 30];
let supported_degree_bounds = [1 << 10, 1 << 15, 1 << 20, 1 << 25, 1 << 30];

for _ in 0..num_iters {
let supported_degree =
Expand Down Expand Up @@ -391,7 +391,7 @@ fn equation_test_template<E: PairingEngine, S: AlgebraicSponge<E::Fq, 2>>(
let max_degree = max_degree.unwrap_or_else(|| distributions::Uniform::from(8..=64).sample(rng));
let pp = SonicKZG10::<E, S>::load_srs(max_degree)?;
let universal_prover = &pp.to_universal_prover().unwrap();
let supported_degree_bounds = vec![1 << 10, 1 << 15, 1 << 20, 1 << 25, 1 << 30];
let supported_degree_bounds = [1 << 10, 1 << 15, 1 << 20, 1 << 25, 1 << 30];

for _ in 0..num_iters {
let supported_degree =
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/snark/varuna/ahp/prover/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ pub(crate) use oracles::*;
mod round_functions;

mod state;
pub(self) use state::*;
use state::*;
2 changes: 1 addition & 1 deletion algorithms/src/snark/varuna/ahp/prover/oracles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl<F: PrimeField> FirstOracles<F> {

/// Iterate over the polynomials output by the prover in the first round.
pub fn into_iter(self) -> impl Iterator<Item = LabeledPolynomial<F>> {
self.batches.into_values().flat_map(|b| b.into_iter()).map(|b| b.0).chain(self.mask_poly.into_iter())
self.batches.into_values().flat_map(|b| b.into_iter()).map(|b| b.0).chain(self.mask_poly)
}

pub fn matches_info(&self, info: &BTreeMap<PolynomialLabel, PolynomialInfo>) -> bool {
Expand Down
6 changes: 1 addition & 5 deletions algorithms/src/snark/varuna/ahp/verifier/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,7 @@ pub struct FourthMessage<F> {

impl<F: PrimeField> FourthMessage<F> {
pub fn into_iter(self) -> impl Iterator<Item = F> {
self.delta_a
.into_iter()
.zip_eq(self.delta_b.into_iter())
.zip_eq(self.delta_c.into_iter())
.flat_map(|((r_a, r_b), r_c)| [r_a, r_b, r_c])
self.delta_a.into_iter().zip_eq(self.delta_b).zip_eq(self.delta_c).flat_map(|((r_a, r_b), r_c)| [r_a, r_b, r_c])
}
}

Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/snark/varuna/varuna.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ where
// (since the first coeff is 1), and so we squeeze out `num_polynomials` points.
let mut challenges = sponge.squeeze_nonnative_field_elements(verifying_key.circuit_commitments.len());
let point = challenges.pop().ok_or(anyhow!("Failed to squeeze random element"))?;
let combiners = core::iter::once(E::Fr::one()).chain(challenges.into_iter());
let combiners = core::iter::once(E::Fr::one()).chain(challenges);

// We will construct a linear combination and provide a proof of evaluation of the lc at `point`.
let (lc, evaluation) =
Expand Down
Loading

0 comments on commit 329af73

Please sign in to comment.