From e0877bb99fc2230795ff441805d2abfbc616443f Mon Sep 17 00:00:00 2001 From: Ivan Oleynikov Date: Tue, 6 Feb 2024 14:21:41 +0100 Subject: [PATCH 1/5] add rust-toolchain --- rust-toolchain | 1 + 1 file changed, 1 insertion(+) create mode 100644 rust-toolchain diff --git a/rust-toolchain b/rust-toolchain new file mode 100644 index 0000000..2f95ad6 --- /dev/null +++ b/rust-toolchain @@ -0,0 +1 @@ +nightly-2022-12-12 From 28d065a25ab669199653d9c6182b11aee3863b60 Mon Sep 17 00:00:00 2001 From: Ivan Oleynikov Date: Tue, 6 Feb 2024 14:14:27 +0100 Subject: [PATCH 2/5] Use more recent versions of Plonk/Halo2 libraries This commit makes fawkes-crypto use more recent library versions compatible with our new verifier optimized for NEAR [1] and its use in ZeroPool implementation [2]. For some libraries, we just use a different tag, for others we move to (slightly modifed) forks. [1]: https://github.com/zeropoolnetwork/near-halo2-verifier [2]: https://github.com/zeropoolnetwork/zeropool-near/ --- Cargo.toml | 5 ++++- fawkes-crypto/Cargo.toml | 14 ++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4730a42..9081338 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,4 +5,7 @@ members = [ "ff-uint", "ff-uint_derive", "seedbox" -] \ No newline at end of file +] + +[patch."https://github.com/privacy-scaling-explorations/halo2curves"] +halo2curves = { git = "https://github.com/zeropoolnetwork/halo2curves", branch = "zeropool-near" } diff --git a/fawkes-crypto/Cargo.toml b/fawkes-crypto/Cargo.toml index e74154c..7f359ba 100644 --- a/fawkes-crypto/Cargo.toml +++ b/fawkes-crypto/Cargo.toml @@ -27,13 +27,15 @@ bit-vec = "0.6.3" itertools = "0.10.0" brotli = "3.3.2" -halo2_curves = { git = "https://github.com/privacy-scaling-explorations/halo2curves", tag = "0.2.1", package = "halo2curves", optional = true } -halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2", tag = "v2022_09_10", optional = true } -halo2_wrong_ecc = { git = "https://github.com/privacy-scaling-explorations/halo2wrong", tag = "v2022_09_09", package = "ecc", optional = true } -halo2_wrong_transcript = { git = "https://github.com/privacy-scaling-explorations/halo2wrong", tag = "v2022_09_09", package = "transcript", optional = true} -halo2_kzg_srs = { git = "https://github.com/han0110/halo2-kzg-srs", rev="ff65429", optional = true } +halo2_curves = { git = "https://github.com/zeropoolnetwork/halo2curves", branch = "zeropool-near", package = "halo2curves", optional = true } +ff = "0.13.0" +halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2", tag = "v2023_04_20", optional = true } +halo2_wrong_ecc = { git = "https://github.com/privacy-scaling-explorations/halo2wrong", tag = "v2023_04_20", package = "ecc", optional = true } +halo2_wrong_transcript = { git = "https://github.com/privacy-scaling-explorations/halo2wrong", tag = "v2023_04_20", package = "transcript", optional = true} +halo2_kzg_srs = { git = "https://github.com/zeropoolnetwork/halo2-kzg-srs", branch="main", optional = true } halo2_rand = {package="rand", version="0.8", optional = true} -plonk_verifier = {git = "https://github.com/Janmajayamall/plonk-verifier.git", branch="feature/system-circom-cli", optional = true} +plonk_verifier = { git = "https://github.com/zeropoolnetwork/snark-verifier", package = "snark-verifier", branch ="zeropool-near", features = [], optional = true } +# near-halo2-verifier = { git = "https://github.com/zeropoolnetwork/near-halo2-verifier", branch = "master", optional = true } [dependencies.blake2_rfc] version = "0.0.1" From 9838a1e32aa9fbc10689dcb7edc9af6f3ab4ad3b Mon Sep 17 00:00:00 2001 From: Ivan Oleynikov Date: Tue, 6 Feb 2024 14:18:00 +0100 Subject: [PATCH 3/5] Make Plonk backend build with newer versions of Halo2-related libraries The previous commit has updated versions of Halo2-related libraries we use. This technical commit accomodates the API changes that those libraries brought. We fix the PrimeField conversions to work with new types and inline the use of gen_proof function since its use was introducing ambiguity in types. --- fawkes-crypto/src/backend/plonk/mod.rs | 21 +++-- .../src/backend/plonk/plonk_config.rs | 4 +- fawkes-crypto/src/backend/plonk/prover.rs | 91 +++++-------------- 3 files changed, 39 insertions(+), 77 deletions(-) diff --git a/fawkes-crypto/src/backend/plonk/mod.rs b/fawkes-crypto/src/backend/plonk/mod.rs index 03af1bb..7a42bc3 100644 --- a/fawkes-crypto/src/backend/plonk/mod.rs +++ b/fawkes-crypto/src/backend/plonk/mod.rs @@ -12,8 +12,9 @@ use crate::{ ff_uint::{Num, PrimeField, NumRepr}, }; +use halo2_curves::ff::PrimeField as HaloPrimeField; + use halo2_proofs::{ - arithmetic::{FieldExt}, circuit::{AssignedCell, Layouter, Region, SimpleFloorPlanner, Value}, plonk::{Advice, Circuit, Column, ConstraintSystem, Error, Instance}, poly::kzg::commitment::ParamsKZG, @@ -25,7 +26,7 @@ use halo2_rand::rngs::OsRng; -pub fn num_to_halo_fp( +pub fn num_to_halo_fp( from: Num, ) -> Fy { let buff = from.to_uint().into_inner(); @@ -43,7 +44,7 @@ pub fn num_to_halo_fp( Fy::from_repr_vartime(to).unwrap() } -pub fn halo_fp_to_num( +pub fn halo_fp_to_num( from: Fy, ) -> Num { let repr = from.to_repr(); @@ -61,7 +62,7 @@ pub fn halo_fp_to_num( Num::from_uint(to).unwrap() } -pub fn num_to_halo_fp_value( +pub fn num_to_halo_fp_value( from: Option>, ) -> Value { match from { @@ -81,7 +82,7 @@ impl HaloCS { } #[derive(Clone, Debug)] -enum Halo2Cell { +enum Halo2Cell { Input(usize), Aux(AssignedCell), } @@ -95,7 +96,7 @@ enum Halo2Cell { /// cells. fn assign_advice_ex< Fr:PrimeField, - F:FieldExt, + F:HaloPrimeField, AnR: Into, An:Fn()->AnR, Val:Fn() -> Option> >( @@ -128,7 +129,7 @@ fn assign_advice_ex< } -impl Circuit for HaloCS { +impl Circuit for HaloCS { type Config = plonk_config::PlonkConfig; type FloorPlanner = SimpleFloorPlanner; @@ -195,9 +196,11 @@ impl Circuit for HaloCS { #[derive(Clone, Debug)] pub struct Parameters(pub ParamsKZG); -impl Parameters { +impl Parameters where + <::BE as halo2_curves::pairing::Engine>::Scalar: HaloPrimeField, +{ pub fn setup(k:usize) -> Self { - let params = ParamsKZG::::setup(k as u32, OsRng); + let params = ParamsKZG::<::BE>::setup(k as u32, OsRng); Self(params) } } diff --git a/fawkes-crypto/src/backend/plonk/plonk_config.rs b/fawkes-crypto/src/backend/plonk/plonk_config.rs index e503bf6..aa921f8 100644 --- a/fawkes-crypto/src/backend/plonk/plonk_config.rs +++ b/fawkes-crypto/src/backend/plonk/plonk_config.rs @@ -1,5 +1,5 @@ +use halo2_curves::ff::PrimeField; use halo2_proofs::{ - arithmetic::FieldExt, plonk::{Advice, Any, Column, ConstraintSystem, Fixed, Instance}, poly::Rotation, }; @@ -19,7 +19,7 @@ pub struct PlonkConfig { } impl PlonkConfig { - pub fn configure(meta: &mut ConstraintSystem) -> Self { + pub fn configure(meta: &mut ConstraintSystem) -> Self { let a = meta.advice_column(); let b = meta.advice_column(); let c = meta.advice_column(); diff --git a/fawkes-crypto/src/backend/plonk/prover.rs b/fawkes-crypto/src/backend/plonk/prover.rs index 2d6d27e..e6b05f1 100644 --- a/fawkes-crypto/src/backend/plonk/prover.rs +++ b/fawkes-crypto/src/backend/plonk/prover.rs @@ -40,60 +40,6 @@ use super::setup::{ProvingKey}; #[derive(Clone, Debug, BorshDeserialize, BorshSerialize)] pub struct Proof(pub Vec); -fn gen_proof< - E: MultiMillerLoop+std::fmt::Debug, - C: Circuit, - EC: EncodedChallenge, - TR: TranscriptReadBuffer>, E::G1Affine, EC>, - TW: TranscriptWriterBuffer, E::G1Affine, EC>, ->( - params: &ParamsKZG, - pk: &PlonkProvingKey, - circuit: C, - instances: Vec>, -) -> Vec { - // MockProver::run(params.k(), &circuit, instances.clone()) - // .unwrap() - // .assert_satisfied(); - - let instances = instances - .iter() - .map(|instances| instances.as_slice()) - .collect_vec(); - - let proof = { - let mut transcript = TW::init(Vec::new()); - create_proof::, ProverGWC<_>, _, _, TW, _>( - params, - pk, - &[circuit], - &[instances.as_slice()], - OsRng, - &mut transcript, - ) - .unwrap(); - transcript.finalize() - }; - proof - - // let accept = { - // let mut transcript = TR::init(Cursor::new(proof.clone())); - // VerificationStrategy::<_, VerifierGWC<_>>::finalize( - // verify_proof::<_, VerifierGWC<_>, _, TR, _>( - // params.verifier_params(), - // pk.get_vk(), - // AccumulatorStrategy::new(params.verifier_params()), - // &[instances.as_slice()], - // &mut transcript, - // ) - // .unwrap(), - // ) - // }; - - // (proof, accept) -} - - pub fn prove< Pub: Signal>, Sec: Signal>, @@ -128,18 +74,31 @@ pub fn prove< let inputs_converted = inputs.iter().cloned().map(num_to_halo_fp).collect_vec(); - let proof = gen_proof::< - halo2_curves::bn256::Bn256, - _, - _, - EvmTranscript, - EvmTranscript - >( - ¶ms.0, - &pk.0, - bcs, - vec![inputs_converted], - ); + let proof = { + let params = ¶ms.0; + let pk = &pk.0; + let instances = vec![inputs_converted]; + // MockProver::run(params.k(), &circuit, instances.clone()) + // .unwrap() + // .assert_satisfied(); + + let instances = instances + .iter() + .map(|instances| instances.as_slice()) + .collect_vec(); + + let mut transcript = as TranscriptWriterBuffer<_, _, _>>::init(Vec::new()); + create_proof::, ProverGWC<_>, _, _, EvmTranscript, _>( + params, + pk, + &[bcs], + &[instances.as_slice()], + OsRng, + &mut transcript, + ) + .unwrap(); + transcript.finalize() + }; (inputs, Proof(proof)) } From cd872ca453d762cda8f68d0152c24744ee93354e Mon Sep 17 00:00:00 2001 From: Dmitry Vdovin Date: Tue, 26 Dec 2023 22:19:13 +0400 Subject: [PATCH 4/5] Add write and read methods to Parameters --- fawkes-crypto/src/backend/plonk/mod.rs | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/fawkes-crypto/src/backend/plonk/mod.rs b/fawkes-crypto/src/backend/plonk/mod.rs index 7a42bc3..3d69f1d 100644 --- a/fawkes-crypto/src/backend/plonk/mod.rs +++ b/fawkes-crypto/src/backend/plonk/mod.rs @@ -4,6 +4,7 @@ pub mod plonk_config; pub mod engines; pub mod setup; +use std::fmt::Debug; use crate::{ circuit::{ cs::{RCS, CS} @@ -12,12 +13,18 @@ use crate::{ ff_uint::{Num, PrimeField, NumRepr}, }; -use halo2_curves::ff::PrimeField as HaloPrimeField; +use halo2_curves::{ + ff::PrimeField as HaloPrimeField, + serde::SerdeObject +}; use halo2_proofs::{ circuit::{AssignedCell, Layouter, Region, SimpleFloorPlanner, Value}, plonk::{Advice, Circuit, Column, ConstraintSystem, Error, Instance}, - poly::kzg::commitment::ParamsKZG, + poly::{ + kzg::commitment::ParamsKZG, + commitment::Params + }, }; use self::plonk_config::PlonkConfig; @@ -25,7 +32,6 @@ use engines::Engine; use halo2_rand::rngs::OsRng; - pub fn num_to_halo_fp( from: Num, ) -> Fy { @@ -193,14 +199,26 @@ impl Circuit for HaloCS { } } + #[derive(Clone, Debug)] pub struct Parameters(pub ParamsKZG); impl Parameters where <::BE as halo2_curves::pairing::Engine>::Scalar: HaloPrimeField, + <::BE as halo2_curves::pairing::Engine>::G1Affine: SerdeObject, + <::BE as halo2_curves::pairing::Engine>::G2Affine: SerdeObject, + { pub fn setup(k:usize) -> Self { let params = ParamsKZG::<::BE>::setup(k as u32, OsRng); Self(params) } + + pub fn write(&self, writer: &mut W) -> std::io::Result<()> { + self.0.write(writer) + } + + pub fn read(reader: &mut R) -> std::io::Result { + Ok(Self(ParamsKZG::::read(reader)?)) + } } From aea56b607f09d13e9e3395e727933bb58783f33a Mon Sep 17 00:00:00 2001 From: Ivan Oleynikov Date: Tue, 6 Feb 2024 14:21:59 +0100 Subject: [PATCH 5/5] update Cargo.lock --- Cargo.lock | 762 +++++++++++++++++++++++++++-------------------------- 1 file changed, 384 insertions(+), 378 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6da55ed..b4f3930 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,30 +4,35 @@ version = 3 [[package]] name = "ahash" -version = "0.4.7" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" +dependencies = [ + "getrandom 0.2.11", + "once_cell", + "version_check", +] [[package]] name = "aho-corasick" -version = "0.7.15" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] [[package]] name = "alloc-no-stdlib" -version = "2.0.3" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ef4730490ad1c4eae5c4325b2a95f521d023e5c885853ff7aca0a6a1631db3" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" [[package]] name = "alloc-stdlib" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "697ed7edc0f1711de49ce108c541623a0af97c6c60b2f6e2b65229847ac843c2" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" dependencies = [ "alloc-no-stdlib", ] @@ -55,15 +60,15 @@ dependencies = [ [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bit-vec" @@ -96,13 +101,13 @@ dependencies = [ [[package]] name = "blake2b_simd" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", - "arrayvec 0.7.2", - "constant_time_eq 0.2.5", + "arrayvec 0.7.4", + "constant_time_eq 0.3.0", ] [[package]] @@ -132,54 +137,54 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "borsh" -version = "0.9.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18dda7dc709193c0d86a1a51050a926dc3df1cf262ec46a23a25dba421ea1924" +checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" dependencies = [ "borsh-derive", - "hashbrown", + "hashbrown 0.11.2", ] [[package]] name = "borsh-derive" -version = "0.9.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "684155372435f578c0fa1acd13ebbb182cc19d6b38b64ae7901da4393217d264" +checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" dependencies = [ "borsh-derive-internal", "borsh-schema-derive-internal", "proc-macro-crate 0.1.5", - "proc-macro2 1.0.53", + "proc-macro2 1.0.70", "syn 1.0.109", ] [[package]] name = "borsh-derive-internal" -version = "0.9.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2102f62f8b6d3edeab871830782285b64cc1830168094db05c8e458f209bc5c3" +checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.9", + "proc-macro2 1.0.70", + "quote 1.0.33", "syn 1.0.109", ] [[package]] name = "borsh-schema-derive-internal" -version = "0.9.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196c978c4c9b0b142d446ef3240690bf5a8a33497074a113ff9a337ccb750483" +checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.9", + "proc-macro2 1.0.70", + "quote 1.0.33", "syn 1.0.109", ] [[package]] name = "brotli" -version = "3.3.2" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71cb90ade945043d3d53597b2fc359bb063db8ade2bcffe7997351d0756e9d50" +checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -188,9 +193,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "2.3.2" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ad2d4653bf5ca36ae797b1f4bb4dbddb60ce49ca4aed8a2ce4829f60425b80" +checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -198,21 +203,27 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.6.1" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byte-slice-cast" -version = "1.2.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d30c751592b77c499e7bce34d99d67c2c11bdc0574e9a488ddade14150a4698" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cfg-if" @@ -228,12 +239,12 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "concat-idents" -version = "1.1.2" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f29bafee6d91a80db18bcd41dbdbb8d1d117ea31676b22e7370061ccea5f76c" +checksum = "f76990911f2267d837d9d0ad060aa63aaad170af40904b29461734c339030d4d" dependencies = [ - "quote 1.0.9", - "syn 1.0.109", + "quote 1.0.33", + "syn 2.0.41", ] [[package]] @@ -244,25 +255,24 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "constant_time_eq" -version = "0.2.5" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] -name = "crossbeam-channel" -version = "0.5.7" +name = "cpufeatures" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils", + "libc", ] [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" dependencies = [ "cfg-if 1.0.0", "crossbeam-epoch", @@ -271,22 +281,21 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.14" +version = "0.9.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa" dependencies = [ "autocfg", "cfg-if 1.0.0", "crossbeam-utils", "memoffset", - "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f" dependencies = [ "cfg-if 1.0.0", ] @@ -313,8 +322,8 @@ version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.9", + "proc-macro2 1.0.70", + "quote 1.0.33", "syn 1.0.109", ] @@ -329,9 +338,9 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", "crypto-common", @@ -340,11 +349,10 @@ dependencies = [ [[package]] name = "ecc" version = "0.1.0" -source = "git+https://github.com/privacy-scaling-explorations/halo2wrong?tag=v2022_09_09#2d708b4453387f03059aad68d6d87441db112a2f" +source = "git+https://github.com/privacy-scaling-explorations/halo2wrong?tag=v2023_04_20#f72db265aa3cebe297c9b9816e940d0e1d400886" dependencies = [ - "group", "integer", - "num-bigint 0.4.3", + "num-bigint 0.4.4", "num-integer", "num-traits", "rand 0.8.5", @@ -353,9 +361,9 @@ dependencies = [ [[package]] name = "either" -version = "1.6.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "env_logger" @@ -368,27 +376,10 @@ dependencies = [ ] [[package]] -name = "ethbloom" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" -dependencies = [ - "crunchy", - "fixed-hash", - "tiny-keccak", -] - -[[package]] -name = "ethereum-types" -version = "0.14.1" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" -dependencies = [ - "ethbloom", - "fixed-hash", - "primitive-types", - "uint", -] +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "fawkes-crypto" @@ -402,26 +393,27 @@ dependencies = [ "ecc", "fawkes-crypto-bellman_ce", "fawkes-crypto_derive", + "ff", "ff-uint", - "getrandom 0.2.2", + "getrandom 0.2.11", "halo2_kzg_srs", "halo2_proofs", - "halo2curves 0.2.1", + "halo2curves", "impl-trait-for-tuples 0.1.3", "itertools", "linked-list", - "plonk_verifier", "rand 0.7.3", "rand 0.8.5", "serde", + "snark-verifier", "transcript", ] [[package]] name = "fawkes-crypto-bellman_ce" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4113289418eaef77657736cd9bc81665fb4a189f914a2ca32880e267bd378e67" +checksum = "5a67c2c34da49cae5a38cfd872bb35b634f72716ea73c1a9a1426af8ae740981" dependencies = [ "bit-vec", "byteorder", @@ -447,19 +439,19 @@ dependencies = [ name = "fawkes-crypto_derive" version = "4.3.0" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.9", + "proc-macro2 1.0.70", + "quote 1.0.33", "syn 1.0.109", ] [[package]] name = "ff" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "bitvec", - "rand_core 0.6.3", + "rand_core 0.6.4", "subtle", ] @@ -490,12 +482,12 @@ dependencies = [ name = "ff-uint_derive" version = "0.2.4" dependencies = [ - "num-bigint 0.3.2", + "num-bigint 0.3.3", "num-integer", "num-traits", "proc-macro-crate 0.1.5", - "proc-macro2 1.0.53", - "quote 1.0.9", + "proc-macro2 1.0.70", + "quote 1.0.33", "syn 1.0.109", ] @@ -557,9 +549,9 @@ checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -578,84 +570,71 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.2" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if 1.0.0", "js-sys", "libc", - "wasi 0.10.2+wasi-snapshot-preview1", + "wasi 0.11.0+wasi-snapshot-preview1", "wasm-bindgen", ] [[package]] name = "group" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", - "rand_core 0.6.3", + "rand_core 0.6.4", "subtle", ] [[package]] name = "halo2_kzg_srs" version = "0.1.0" -source = "git+https://github.com/han0110/halo2-kzg-srs?rev=ff65429#ff65429d69db3bf5575a3f011da34932af7a0325" +source = "git+https://github.com/zeropoolnetwork/halo2-kzg-srs?branch=main#d743fcbc5a48db31773a703909ef9c9a13a4a1e6" dependencies = [ "byteorder", - "halo2curves 0.2.1", - "num-bigint 0.4.3", - "rand_core 0.6.3", + "halo2curves", + "num-bigint 0.4.4", + "rand_core 0.6.4", "rayon", ] [[package]] name = "halo2_proofs" version = "0.2.0" -source = "git+https://github.com/privacy-scaling-explorations/halo2?tag=v2022_09_10#a9e99a72a65d7c98e8a4258c2c94269c834d1c10" +source = "git+https://github.com/privacy-scaling-explorations/halo2?tag=v2023_04_20#be955686f86eb618f55d2320c0e042485b313d22" dependencies = [ "blake2b_simd", "ff", "group", - "halo2curves 0.2.1", - "rand_core 0.6.3", + "halo2curves", + "rand_chacha 0.3.1", + "rand_core 0.6.4", "rayon", + "sha3 0.9.1", "tracing", ] [[package]] name = "halo2curves" -version = "0.2.0" -source = "git+https://github.com/privacy-scaling-explorations/halo2curves?tag=v0.2.0#bbd4cee10dbf9c51e0456ea67ec2b894b49f688c" -dependencies = [ - "ff", - "group", - "lazy_static", - "num-bigint 0.4.3", - "num-traits", - "pasta_curves", - "rand 0.8.5", - "rand_core 0.6.3", - "static_assertions", - "subtle", -] - -[[package]] -name = "halo2curves" -version = "0.2.1" -source = "git+https://github.com/privacy-scaling-explorations/halo2curves?tag=0.2.1#f75ed26c961179186e9cec02cc3f841ca9e3fec1" +version = "0.3.2" +source = "git+https://github.com/zeropoolnetwork/halo2curves?branch=zeropool-near#b1998472628f052dbf53dfab6a4c2b84be3ba7b3" dependencies = [ + "borsh", "ff", "group", "lazy_static", - "num-bigint 0.4.3", + "num-bigint 0.4.4", "num-traits", "pasta_curves", + "paste", "rand 0.8.5", - "rand_core 0.6.3", + "rand_core 0.6.4", "static_assertions", "subtle", ] @@ -663,32 +642,28 @@ dependencies = [ [[package]] name = "halo2wrong" version = "0.1.0" -source = "git+https://github.com/privacy-scaling-explorations/halo2wrong?tag=v2022_09_09#2d708b4453387f03059aad68d6d87441db112a2f" +source = "git+https://github.com/privacy-scaling-explorations/halo2wrong?tag=v2023_04_20#f72db265aa3cebe297c9b9816e940d0e1d400886" dependencies = [ - "group", "halo2_proofs", - "num-bigint 0.4.3", + "num-bigint 0.4.4", "num-integer", "num-traits", ] [[package]] name = "hashbrown" -version = "0.9.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ "ahash", ] [[package]] -name = "hermit-abi" -version = "0.2.6" +name = "hashbrown" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "hex" @@ -708,7 +683,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "parity-scale-codec 3.1.5", + "parity-scale-codec 3.6.9", ] [[package]] @@ -717,30 +692,39 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.9", + "proc-macro2 1.0.70", + "quote 1.0.33", "syn 1.0.109", ] [[package]] name = "impl-trait-for-tuples" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5dacb10c5b3bb92d46ba347505a9041e676bb20ad220101326bffb0c93031ee" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.9", + "proc-macro2 1.0.70", + "quote 1.0.33", "syn 1.0.109", ] +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", +] + [[package]] name = "integer" version = "0.1.0" -source = "git+https://github.com/privacy-scaling-explorations/halo2wrong?tag=v2022_09_09#2d708b4453387f03059aad68d6d87441db112a2f" +source = "git+https://github.com/privacy-scaling-explorations/halo2wrong?tag=v2023_04_20#f72db265aa3cebe297c9b9816e940d0e1d400886" dependencies = [ - "group", "maingate", - "num-bigint 0.4.3", + "num-bigint 0.4.4", "num-integer", "num-traits", "rand 0.8.5", @@ -756,38 +740,38 @@ dependencies = [ "either", ] -[[package]] -name = "itoa" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" - [[package]] name = "js-sys" -version = "0.3.50" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d99f9e3e84b8f67f846ef5b4cbbc3b1c29f6c759fcbce6f01aa0e73d932a24c" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] [[package]] name = "keccak" -version = "0.1.0" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +dependencies = [ + "cpufeatures", +] [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin", +] [[package]] name = "libc" -version = "0.2.93" +version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9385f66bf6105b241aa65a61cb923ef20efc665cb9f9bb50ac2f0c4b7f378d41" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" [[package]] name = "linked-list" @@ -797,21 +781,17 @@ checksum = "a4dacf969043dc69f1f731b5042eb05e030d264bcf34f2242889fcbdc7a65f06" [[package]] name = "log" -version = "0.4.14" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" -dependencies = [ - "cfg-if 1.0.0", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "maingate" version = "0.1.0" -source = "git+https://github.com/privacy-scaling-explorations/halo2wrong?tag=v2022_09_09#2d708b4453387f03059aad68d6d87441db112a2f" +source = "git+https://github.com/privacy-scaling-explorations/halo2wrong?tag=v2023_04_20#f72db265aa3cebe297c9b9816e940d0e1d400886" dependencies = [ - "group", "halo2wrong", - "num-bigint 0.4.3", + "num-bigint 0.4.4", "num-integer", "num-traits", "rand 0.8.5", @@ -820,15 +800,15 @@ dependencies = [ [[package]] name = "memchr" -version = "2.3.4" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memoffset" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] @@ -852,9 +832,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d0a3d5e207573f948a9e5376662aa743a2ea13f7c50a554d7af443a73fbfeba" +checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" dependencies = [ "autocfg", "num-integer", @@ -863,9 +843,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -875,9 +855,9 @@ dependencies = [ [[package]] name = "num-integer" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ "autocfg", "num-traits", @@ -885,28 +865,18 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] -[[package]] -name = "num_cpus" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "once_cell" -version = "1.17.1" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" @@ -920,23 +890,23 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "byte-slice-cast", - "impl-trait-for-tuples 0.2.1", + "impl-trait-for-tuples 0.2.2", "parity-scale-codec-derive 2.3.1", ] [[package]] name = "parity-scale-codec" -version = "3.1.5" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9182e4a71cae089267ab03e67c99368db7cd877baf50f931e5d6d4b71e195ac0" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "bitvec", "byte-slice-cast", - "impl-trait-for-tuples 0.2.1", - "parity-scale-codec-derive 3.1.4", + "impl-trait-for-tuples 0.2.2", + "parity-scale-codec-derive 3.6.9", "serde", ] @@ -946,29 +916,29 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" dependencies = [ - "proc-macro-crate 1.1.0", - "proc-macro2 1.0.53", - "quote 1.0.9", + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.70", + "quote 1.0.33", "syn 1.0.109", ] [[package]] name = "parity-scale-codec-derive" -version = "3.1.4" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b26a931f824dd4eca30b3e43bb4f31cd5f0d3a403c5f5ff27106b805bfde7b" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "proc-macro-crate 1.1.0", - "proc-macro2 1.0.53", - "quote 1.0.9", + "proc-macro-crate 2.0.1", + "proc-macro2 1.0.70", + "quote 1.0.33", "syn 1.0.109", ] [[package]] name = "pasta_curves" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc65faf8e7313b4b1fbaa9f7ca917a0eed499a9663be71477f87993604341d8" +checksum = "d3e57598f73cc7e1b2ac63c79c517b31a0877cd7c402cdcaa311b5208de7a095" dependencies = [ "blake2b_simd", "ff", @@ -980,54 +950,37 @@ dependencies = [ ] [[package]] -name = "pin-project-lite" -version = "0.2.9" +name = "paste" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] -name = "plonk_verifier" -version = "0.1.0" -source = "git+https://github.com/Janmajayamall/plonk-verifier.git?branch=feature/system-circom-cli#9b5d0a3312a2bd0ca031ad6c9250b8109c675f77" -dependencies = [ - "ecc", - "ethereum-types", - "halo2_proofs", - "halo2curves 0.2.1", - "itertools", - "lazy_static", - "num-bigint 0.4.3", - "num-traits", - "poseidon", - "rand 0.8.5", - "rand_chacha 0.3.1", - "serde", - "serde_json", - "sha3 0.10.6", - "transcript", -] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "poseidon" version = "0.2.0" -source = "git+https://github.com/privacy-scaling-explorations/poseidon.git?branch=padding#6a305ac124810a1eaf83ae7fafd520b19bfa304e" +source = "git+https://github.com/privacy-scaling-explorations/poseidon?tag=v2023_04_20#807f8f555313f726ca03bdf941f798098f488ba4" dependencies = [ - "group", - "halo2curves 0.2.0", + "halo2curves", "subtle", ] [[package]] name = "ppv-lite86" -version = "0.2.10" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "primitive-types" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", @@ -1045,12 +998,22 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.1.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebace6889caf889b4d3f76becee12e90353f2b8c7d875534a71e5742f8f6f83" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ - "thiserror", - "toml", + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" +dependencies = [ + "toml_datetime", + "toml_edit 0.20.2", ] [[package]] @@ -1064,9 +1027,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.53" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] @@ -1094,11 +1057,11 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.9" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ - "proc-macro2 1.0.53", + "proc-macro2 1.0.70", ] [[package]] @@ -1141,7 +1104,7 @@ checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha 0.3.1", - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] @@ -1161,7 +1124,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] @@ -1190,11 +1153,11 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.2", + "getrandom 0.2.11", ] [[package]] @@ -1208,9 +1171,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ "either", "rayon-core", @@ -1218,14 +1181,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] @@ -1239,29 +1200,41 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.6" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300f2a835d808734ee295d45007adacb9ebb29dd3ae2424acfa17930cae541da" +checksum = "53313ec9f12686aeeffb43462c3ac77aa25f590a5f630eb2cde0de59417b29c7" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.6" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c38e3aecd2b21cb3959637b883bb3714bc7e43f0268b9a29d3743ee3e55cdd2" +checksum = "2566c4bf6845f2c2e83b27043c3f5dfcd5ba8f2937d6c00dc009bfb51a079dc4" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.9", - "syn 1.0.109", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.41", ] [[package]] name = "regex" -version = "1.4.5" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957056ecddbeba1b26965114e191d2e8589ce74db242b6ea25fc4062427a5c19" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", @@ -1270,21 +1243,25 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.23" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5f089152e60f62d28b835fbff2cd2e8dc0baf1ac13343bef92ab7eed84548" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] -name = "rustc-hex" -version = "2.1.0" +name = "rlp" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rustc-hex", +] [[package]] -name = "ryu" -version = "1.0.13" +name = "rustc-hex" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "scale-info" @@ -1304,56 +1281,39 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baeb2780690380592f86205aa4ee49815feb2acad8c2f59e6dd207148c3f1fcd" dependencies = [ - "proc-macro-crate 1.1.0", - "proc-macro2 1.0.53", - "quote 1.0.9", + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.70", + "quote 1.0.33", "syn 1.0.109", ] -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - [[package]] name = "seedbox" version = "0.2.0" dependencies = [ "rand_chacha 0.3.1", - "rand_core 0.6.3", + "rand_core 0.6.4", "sha3 0.9.1", ] [[package]] name = "serde" -version = "1.0.125" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "558dc50e1a5a5fa7112ca2ce4effcb321b0300c0d4ccf0776a9f60cd89031171" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.125" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b093b7a2bb58203b5da3056c05b4ec1fed827dcfdb37347a8841695263b3d06d" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.9", - "syn 1.0.109", -] - -[[package]] -name = "serde_json" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" -dependencies = [ - "itoa", - "ryu", - "serde", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.41", ] [[package]] @@ -1370,14 +1330,43 @@ dependencies = [ [[package]] name = "sha3" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", "keccak", ] +[[package]] +name = "snark-verifier" +version = "0.1.0" +source = "git+https://github.com/zeropoolnetwork/snark-verifier?branch=zeropool-near#611f3c4ef81eccfaaf50046fbc5f057d61fb35b7" +dependencies = [ + "borsh", + "bytes", + "ecc", + "halo2_proofs", + "halo2curves", + "hex 0.4.3", + "itertools", + "lazy_static", + "num-bigint 0.4.4", + "num-integer", + "num-traits", + "poseidon", + "primitive-types", + "rand 0.8.5", + "rlp", + "sha3 0.10.8", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "static_assertions" version = "1.1.0" @@ -1407,8 +1396,19 @@ version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.9", + "proc-macro2 1.0.70", + "quote 1.0.33", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c8b28c477cc3bf0e7966561e3460130e1255f7a1cf71931075f1c5e7a7e269" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", "unicode-ident", ] @@ -1419,50 +1419,48 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] -name = "thiserror" -version = "1.0.30" +name = "toml" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ - "thiserror-impl", + "serde", ] [[package]] -name = "thiserror-impl" -version = "1.0.30" +name = "toml_datetime" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" -dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.9", - "syn 1.0.109", -] +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" [[package]] -name = "tiny-keccak" -version = "2.0.2" +name = "toml_edit" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "crunchy", + "indexmap", + "toml_datetime", + "winnow", ] [[package]] -name = "toml" -version = "0.5.8" +name = "toml_edit" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "serde", + "indexmap", + "toml_datetime", + "winnow", ] [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if 1.0.0", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -1470,20 +1468,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.9", - "syn 1.0.109", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.41", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", ] @@ -1491,19 +1489,18 @@ dependencies = [ [[package]] name = "transcript" version = "0.1.0" -source = "git+https://github.com/privacy-scaling-explorations/halo2wrong?tag=v2022_09_09#2d708b4453387f03059aad68d6d87441db112a2f" +source = "git+https://github.com/privacy-scaling-explorations/halo2wrong?tag=v2023_04_20#f72db265aa3cebe297c9b9816e940d0e1d400886" dependencies = [ "ecc", - "group", "poseidon", "subtle", ] [[package]] name = "typenum" -version = "1.14.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "uint" @@ -1519,9 +1516,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-xid" @@ -1531,9 +1528,9 @@ checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" [[package]] name = "version_check" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasi" @@ -1543,15 +1540,15 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.73" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83240549659d187488f91f33c0f8547cbfef0b2088bc470c116d1d260ef623d9" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -1559,53 +1556,53 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.73" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae70622411ca953215ca6d06d3ebeb1e915f0f6613e3b495122878d7ebec7dae" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", - "lazy_static", "log", - "proc-macro2 1.0.53", - "quote 1.0.9", - "syn 1.0.109", + "once_cell", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.41", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.73" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e734d91443f177bfdb41969de821e15c516931c3c3db3d318fa1b68975d0f6f" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ - "quote 1.0.9", + "quote 1.0.33", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.73" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53739ff08c8a68b0fdbcd54c372b8ab800b1449ab3c9d706503bc7dd1621b2c" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.9", - "syn 1.0.109", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.41", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.73" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9a543ae66aa233d14bb765ed9af4a33e81b8b58d1584cf1b47ff8cd0b9e4489" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "web-sys" -version = "0.3.50" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a905d57e488fec8861446d3393670fb50d27a262344013181c2cdf9fff5481be" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" dependencies = [ "js-sys", "wasm-bindgen", @@ -1633,6 +1630,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "winnow" +version = "0.5.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b5c3db89721d50d0e2a673f5043fc4722f76dcc352d7b1ab8b8288bed4ed2c5" +dependencies = [ + "memchr", +] + [[package]] name = "wyz" version = "0.5.1"