Skip to content

Commit

Permalink
[chore] update rust toolchain to 1.76 nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
lightsing committed Dec 5, 2023
1 parent ecd6757 commit c223a95
Show file tree
Hide file tree
Showing 11 changed files with 1,136 additions and 601 deletions.
1,703 changes: 1,119 additions & 584 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 @@ -4,8 +4,7 @@ version = "0.0.1"
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 Down
2 changes: 1 addition & 1 deletion snark-verifier-sdk/src/halo2_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use halo2_base::halo2_proofs::{
VerificationStrategy,
},
transcript::TranscriptReadBuffer,
SerdeFormat, {self},
SerdeFormat,
};
use itertools::Itertools;
use rand::Rng;
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
1 change: 1 addition & 0 deletions snark-verifier/src/loader/halo2/shim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ pub trait EccInstructions<'a, C: CurveAffine>: Clone + Debug {
}

mod halo2_lib {
use crate::util::arithmetic::PrimeField as _;
use crate::{
halo2_proofs::{
circuit::{Cell, Value},
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

0 comments on commit c223a95

Please sign in to comment.