From 88db818d1e63c8be887e0cb77f941493fdde75bb Mon Sep 17 00:00:00 2001 From: yanziseeker <153156292+AdventureSeeker987@users.noreply.github.com> Date: Mon, 29 Jan 2024 23:02:34 +0800 Subject: [PATCH 1/6] chore: fix link (#256) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4946e344..b636aa86 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ Some tests read files from specific directories, so they will not work if you are in the `halo2-lib` root directory. For benchmarks below, you can symlink a `params` folder within `halo2-ecc` directory with previously generated universal trusted setup files. Otherwise, the benchmarks will generate a new random setup and save them in the `params` directory. **Warning:** These trusted setups are generated using a _known_ random seed, so they are not secure. They should NOT be used in production. -For more a production suitable trusted setup, see [KZG Trusted Setup](https://docs.axiom.xyz/axiom-architecture/how-axiom-works/kzg-trusted-setup). +For more a production suitable trusted setup, see [KZG Trusted Setup](https://docs.axiom.xyz/docs/transparency-and-security/kzg-trusted-setup). Tests can be run in the same way as in the previous [section](#halo2-base). The available commands are: From 2bbb7fd719eddb5cac7642638355dd0fac3ddeb5 Mon Sep 17 00:00:00 2001 From: Jonathan Wang <31040440+jonathanpwang@users.noreply.github.com> Date: Thu, 14 Mar 2024 17:39:45 -0400 Subject: [PATCH 2/6] chore: update `snark-verifier` git tag in `zkevm-hashes` --- hashes/zkevm/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hashes/zkevm/Cargo.toml b/hashes/zkevm/Cargo.toml index c4d5425e..bd1f8552 100644 --- a/hashes/zkevm/Cargo.toml +++ b/hashes/zkevm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zkevm-hashes" -version = "0.2.1" +version = "0.2.2" authors = ["Privacy Scaling Explorations Team", "Taiko Labs", "Intrinsic Technologies"] license = "MIT OR Apache-2.0" edition = "2021" @@ -23,7 +23,7 @@ rayon = "1.8" sha3 = "0.10.8" # always included but without features to use Native poseidon and get CircuitExt trait # snark-verifier-sdk = { version = "=0.1.7", default-features = false } -snark-verifier-sdk = { version = "=0.1.7", git = "https://github.com/axiom-crypto/snark-verifier.git", tag = "v0.1.7-git", default-features = false } +snark-verifier-sdk = { version = "=0.1.8", git = "https://github.com/axiom-crypto/snark-verifier.git", tag = "v0.1.8-git", default-features = false } getset = "0.1.2" type-map = "0.5.0" From 47edf05158fe765906c86db9cf0b2f1f69d0ee68 Mon Sep 17 00:00:00 2001 From: Jonathan Wang <31040440+jonathanpwang@users.noreply.github.com> Date: Thu, 14 Mar 2024 17:43:40 -0400 Subject: [PATCH 3/6] chore: update rust toolchain --- halo2-base/src/gates/flex_gate/mod.rs | 2 +- rust-toolchain | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/halo2-base/src/gates/flex_gate/mod.rs b/halo2-base/src/gates/flex_gate/mod.rs index 5dea4228..b025c23c 100644 --- a/halo2-base/src/gates/flex_gate/mod.rs +++ b/halo2-base/src/gates/flex_gate/mod.rs @@ -137,7 +137,7 @@ impl FlexGateConfig { Self { basic_gates, constants, - /// Warning: this needs to be updated if you create more advice columns after this `FlexGateConfig` is created + // Warning: this needs to be updated if you create more advice columns after this `FlexGateConfig` is created max_rows: (1 << params.k) - meta.minimum_rows(), } } diff --git a/rust-toolchain b/rust-toolchain index ee2d639b..36e57ce7 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2023-08-12 \ No newline at end of file +nightly-2024-02-08 From abcf1cc4eed609e0ff1aa4361d66b2eeff4c1ac4 Mon Sep 17 00:00:00 2001 From: Jonathan Wang <31040440+jonathanpwang@users.noreply.github.com> Date: Thu, 14 Mar 2024 17:49:44 -0400 Subject: [PATCH 4/6] chore: fix clippy --- halo2-base/src/poseidon/hasher/tests/mod.rs | 8 ++++---- hashes/zkevm/src/keccak/component/circuit/tests/shard.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/halo2-base/src/poseidon/hasher/tests/mod.rs b/halo2-base/src/poseidon/hasher/tests/mod.rs index a734f7d0..76087be2 100644 --- a/halo2-base/src/poseidon/hasher/tests/mod.rs +++ b/halo2-base/src/poseidon/hasher/tests/mod.rs @@ -11,18 +11,18 @@ mod state; fn test_mds() { let spec = OptimizedPoseidonSpec::::new::<8, 57, 0>(); - let mds = vec![ - vec![ + let mds = [ + [ "7511745149465107256748700652201246547602992235352608707588321460060273774987", "10370080108974718697676803824769673834027675643658433702224577712625900127200", "19705173408229649878903981084052839426532978878058043055305024233888854471533", ], - vec![ + [ "18732019378264290557468133440468564866454307626475683536618613112504878618481", "20870176810702568768751421378473869562658540583882454726129544628203806653987", "7266061498423634438633389053804536045105766754026813321943009179476902321146", ], - vec![ + [ "9131299761947733513298312097611845208338517739621853568979632113419485819303", "10595341252162738537912664445405114076324478519622938027420701542910180337937", "11597556804922396090267472882856054602429588299176362916247939723151043581408", diff --git a/hashes/zkevm/src/keccak/component/circuit/tests/shard.rs b/hashes/zkevm/src/keccak/component/circuit/tests/shard.rs index 17726327..c41f4d70 100644 --- a/hashes/zkevm/src/keccak/component/circuit/tests/shard.rs +++ b/hashes/zkevm/src/keccak/component/circuit/tests/shard.rs @@ -175,7 +175,7 @@ fn test_prove_shard_circuit_commit() { circuit.set_base_circuit_break_points(break_points); let circuit_outputs = multi_inputs_to_circuit_outputs::(&inputs, circuit_params.capacity()); - let instances = vec![vec![calculate_circuit_outputs_commit(&circuit_outputs)]]; + let instances = [[calculate_circuit_outputs_commit(&circuit_outputs)]]; let proof = gen_proof_with_instances( ¶ms, From f31ebe0dadce81038f42123ae239858d500df30b Mon Sep 17 00:00:00 2001 From: Jonathan Wang <31040440+jonathanpwang@users.noreply.github.com> Date: Thu, 14 Mar 2024 23:39:50 -0400 Subject: [PATCH 5/6] chore: update should_panic message --- halo2-ecc/src/secp256k1/tests/ecdsa_tests.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/halo2-ecc/src/secp256k1/tests/ecdsa_tests.rs b/halo2-ecc/src/secp256k1/tests/ecdsa_tests.rs index d3d47da7..c4002722 100644 --- a/halo2-ecc/src/secp256k1/tests/ecdsa_tests.rs +++ b/halo2-ecc/src/secp256k1/tests/ecdsa_tests.rs @@ -28,14 +28,18 @@ fn custom_parameters_ecdsa(sk: u64, msg_hash: u64, k: u64) -> ECDSAInput { } #[test] -#[should_panic(expected = "assertion failed: `(left == right)`")] +#[should_panic( + expected = "assertion `left == right` failed\n left: 0x0000000000000000000000000000000000000000000000000000000000000000\n right: 0x0000000000000000000000000000000000000000000000000000000000000001" +)] fn test_ecdsa_msg_hash_zero() { let input = custom_parameters_ecdsa(random::(), 0, random::()); run_test(input); } #[test] -#[should_panic(expected = "assertion failed: `(left == right)`")] +#[should_panic( + expected = "assertion `left == right` failed\n left: 0x0000000000000000000000000000000000000000000000000000000000000000\n right: 0x0000000000000000000000000000000000000000000000000000000000000001" +)] fn test_ecdsa_private_key_zero() { let input = custom_parameters_ecdsa(0, random::(), random::()); run_test(input); From 13ebe2dfe0c47538d0ec3be0916cf2b2c14ce022 Mon Sep 17 00:00:00 2001 From: Jonathan Wang <31040440+jonathanpwang@users.noreply.github.com> Date: Fri, 22 Mar 2024 13:07:49 -0700 Subject: [PATCH 6/6] chore: switch to community-edition --- hashes/zkevm/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hashes/zkevm/Cargo.toml b/hashes/zkevm/Cargo.toml index bd1f8552..22945267 100644 --- a/hashes/zkevm/Cargo.toml +++ b/hashes/zkevm/Cargo.toml @@ -23,7 +23,7 @@ rayon = "1.8" sha3 = "0.10.8" # always included but without features to use Native poseidon and get CircuitExt trait # snark-verifier-sdk = { version = "=0.1.7", default-features = false } -snark-verifier-sdk = { version = "=0.1.8", git = "https://github.com/axiom-crypto/snark-verifier.git", tag = "v0.1.8-git", default-features = false } +snark-verifier-sdk = { git = "https://github.com/axiom-crypto/snark-verifier.git", branch = "community-edition", default-features = false } getset = "0.1.2" type-map = "0.5.0"