Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] update rust toolchain to 1.76 nightly #26

Merged
merged 2 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
241 changes: 167 additions & 74 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ members = [
"snark-verifier",
"snark-verifier-sdk",
]
resolver = "2"

[profile.dev]
opt-level = 3
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2022-12-10
nightly-2023-12-03
3 changes: 1 addition & 2 deletions snark-verifier-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ edition = "2021"

[dependencies]
log = "0.4"
itertools = "0.10.3"
lazy_static = "1.4.0"
itertools = "0.12"
num-bigint = "0.4.3"
num-integer = "0.1.45"
num-traits = "0.2.15"
Expand Down
2 changes: 2 additions & 0 deletions snark-verifier-sdk/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![feature(lazy_cell)]

#[cfg(feature = "loader_evm")]
mod evm_api;
#[cfg(feature = "loader_halo2")]
Expand Down
7 changes: 3 additions & 4 deletions snark-verifier-sdk/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@

use super::{BITS, LIMBS};
use halo2_base::halo2_proofs::halo2curves::bn256::{Bn256, Fr, G1Affine};
use lazy_static::lazy_static;
use snark_verifier::{
loader::halo2::{halo2_ecc::ecc::BaseFieldEccChip as EccChip, Halo2Loader as Loader},
pcs::kzg::{
Bdfg21, Kzg, KzgAs as KzgAccumulationScheme, KzgSuccinctVerifyingKey, LimbsEncoding,
},
verifier, PoseidonSpec,
};
use std::sync::LazyLock;

use crate::param::{RATE, R_F, R_P, T};

lazy_static! {
pub static ref POSEIDON_SPEC: PoseidonSpec<Fr, T, RATE> = PoseidonSpec::new(R_F, R_P);
}
pub static POSEIDON_SPEC: LazyLock<PoseidonSpec<Fr, T, RATE>> =
LazyLock::new(|| PoseidonSpec::new(R_F, R_P));

/// Transcript instantiated with Poseidon
pub type PoseidonTranscript<L, S> =
Expand Down
5 changes: 2 additions & 3 deletions snark-verifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
itertools = "0.10.3"
lazy_static = "1.4.0"
itertools = "0.12"
num-bigint = "0.4.3"
num-integer = "0.1.45"
num-traits = "0.2.15"
Expand All @@ -21,7 +20,7 @@ poseidon-axiom = { git = "https://github.com/axiom-crypto/halo2.git", branch = "
poseidon = { git = "https://github.com/privacy-scaling-explorations/poseidon", optional = true }

# parallel
rayon = { version = "1.5.3", optional = true }
rayon = { version = "1.8", optional = true }

# loader_evm
ethereum-types = { version = "0.14", default-features = false, features = ["std"], optional = true }
Expand Down
1 change: 1 addition & 0 deletions snark-verifier/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![feature(lazy_cell)]
//! Generic (S)NARK verifier.
#![allow(clippy::type_complexity)]
#![allow(clippy::too_many_arguments)]
Expand Down
10 changes: 4 additions & 6 deletions snark-verifier/src/loader/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ use crate::{
util::arithmetic::{Curve, CurveAffine, FieldOps, PrimeField},
Error,
};
use lazy_static::lazy_static;
use std::fmt::Debug;
use std::sync::LazyLock;

lazy_static! {
/// NativeLoader instance for [`LoadedEcPoint::loader`] and
/// [`LoadedScalar::loader`] referencing.
pub static ref LOADER: NativeLoader = NativeLoader;
}
/// NativeLoader instance for [`LoadedEcPoint::loader`] and
/// [`LoadedScalar::loader`] referencing.
pub static LOADER: LazyLock<NativeLoader> = LazyLock::new(|| NativeLoader);

/// `Loader` implementation in native rust.
#[derive(Clone, Debug)]
Expand Down