From 2351ae5a65f950ad24918775731e89d93c040ade Mon Sep 17 00:00:00 2001 From: Zhang Zhuo Date: Mon, 26 Aug 2024 16:12:51 +0800 Subject: [PATCH 1/4] opt(libzkp): share params between versions --- common/libzkp/impl/Cargo.lock | 40 ++++++++++---------- common/libzkp/impl/Cargo.toml | 4 +- common/libzkp/impl/src/verifier.rs | 33 ++++++++++++++-- common/libzkp/impl/src/verifier/darwin.rs | 20 +++++----- common/libzkp/impl/src/verifier/darwin_v2.rs | 20 +++++----- 5 files changed, 72 insertions(+), 45 deletions(-) diff --git a/common/libzkp/impl/Cargo.lock b/common/libzkp/impl/Cargo.lock index 2df231e2b..f8ba56c55 100644 --- a/common/libzkp/impl/Cargo.lock +++ b/common/libzkp/impl/Cargo.lock @@ -31,7 +31,7 @@ dependencies = [ [[package]] name = "aggregator" version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.0#6a1f65a1f99429f3725ef4d6788f5643bb61aa6f" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.12-params#87e0bfa8869e91f16a380f5f24ee66bf1c951d69" dependencies = [ "ark-std 0.3.0", "bitstream-io", @@ -65,7 +65,7 @@ dependencies = [ [[package]] name = "aggregator" version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.0#cf71a0e324d42f7895363f4f3e8575d79bb7ea97" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.13-params#e846ba7247181d906e873228bd8f95d81acf52d3" dependencies = [ "ark-std 0.3.0", "bitstream-io", @@ -571,7 +571,7 @@ checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "bus-mapping" version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.0#6a1f65a1f99429f3725ef4d6788f5643bb61aa6f" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.12-params#87e0bfa8869e91f16a380f5f24ee66bf1c951d69" dependencies = [ "eth-types 0.12.0", "ethers-core", @@ -596,7 +596,7 @@ dependencies = [ [[package]] name = "bus-mapping" version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.0#cf71a0e324d42f7895363f4f3e8575d79bb7ea97" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.13-params#e846ba7247181d906e873228bd8f95d81acf52d3" dependencies = [ "eth-types 0.13.0", "ethers-core", @@ -1183,7 +1183,7 @@ dependencies = [ [[package]] name = "eth-types" version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.0#6a1f65a1f99429f3725ef4d6788f5643bb61aa6f" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.12-params#87e0bfa8869e91f16a380f5f24ee66bf1c951d69" dependencies = [ "base64 0.13.1", "ethers-core", @@ -1211,7 +1211,7 @@ dependencies = [ [[package]] name = "eth-types" version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.0#cf71a0e324d42f7895363f4f3e8575d79bb7ea97" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.13-params#e846ba7247181d906e873228bd8f95d81acf52d3" dependencies = [ "base64 0.13.1", "ethers-core", @@ -1367,7 +1367,7 @@ dependencies = [ [[package]] name = "external-tracer" version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.0#6a1f65a1f99429f3725ef4d6788f5643bb61aa6f" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.12-params#87e0bfa8869e91f16a380f5f24ee66bf1c951d69" dependencies = [ "eth-types 0.12.0", "geth-utils 0.12.0", @@ -1380,7 +1380,7 @@ dependencies = [ [[package]] name = "external-tracer" version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.0#cf71a0e324d42f7895363f4f3e8575d79bb7ea97" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.13-params#e846ba7247181d906e873228bd8f95d81acf52d3" dependencies = [ "eth-types 0.13.0", "geth-utils 0.13.0", @@ -1562,7 +1562,7 @@ dependencies = [ [[package]] name = "gadgets" version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.0#6a1f65a1f99429f3725ef4d6788f5643bb61aa6f" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.12-params#87e0bfa8869e91f16a380f5f24ee66bf1c951d69" dependencies = [ "eth-types 0.12.0", "halo2_proofs", @@ -1574,7 +1574,7 @@ dependencies = [ [[package]] name = "gadgets" version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.0#cf71a0e324d42f7895363f4f3e8575d79bb7ea97" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.13-params#e846ba7247181d906e873228bd8f95d81acf52d3" dependencies = [ "eth-types 0.13.0", "halo2_proofs", @@ -1597,7 +1597,7 @@ dependencies = [ [[package]] name = "geth-utils" version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.0#6a1f65a1f99429f3725ef4d6788f5643bb61aa6f" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.12-params#87e0bfa8869e91f16a380f5f24ee66bf1c951d69" dependencies = [ "env_logger 0.10.0", "gobuild", @@ -1607,7 +1607,7 @@ dependencies = [ [[package]] name = "geth-utils" version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.0#cf71a0e324d42f7895363f4f3e8575d79bb7ea97" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.13-params#e846ba7247181d906e873228bd8f95d81acf52d3" dependencies = [ "env_logger 0.10.0", "gobuild", @@ -2356,7 +2356,7 @@ dependencies = [ [[package]] name = "mock" version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.0#6a1f65a1f99429f3725ef4d6788f5643bb61aa6f" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.12-params#87e0bfa8869e91f16a380f5f24ee66bf1c951d69" dependencies = [ "eth-types 0.12.0", "ethers-core", @@ -2371,7 +2371,7 @@ dependencies = [ [[package]] name = "mock" version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.0#cf71a0e324d42f7895363f4f3e8575d79bb7ea97" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.13-params#e846ba7247181d906e873228bd8f95d81acf52d3" dependencies = [ "eth-types 0.13.0", "ethers-core", @@ -2386,7 +2386,7 @@ dependencies = [ [[package]] name = "mpt-zktrie" version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.0#6a1f65a1f99429f3725ef4d6788f5643bb61aa6f" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.12-params#87e0bfa8869e91f16a380f5f24ee66bf1c951d69" dependencies = [ "eth-types 0.12.0", "halo2curves", @@ -2400,7 +2400,7 @@ dependencies = [ [[package]] name = "mpt-zktrie" version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.0#cf71a0e324d42f7895363f4f3e8575d79bb7ea97" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.13-params#e846ba7247181d906e873228bd8f95d81acf52d3" dependencies = [ "eth-types 0.13.0", "halo2curves", @@ -2872,7 +2872,7 @@ dependencies = [ [[package]] name = "prover" version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.0#6a1f65a1f99429f3725ef4d6788f5643bb61aa6f" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.12-params#87e0bfa8869e91f16a380f5f24ee66bf1c951d69" dependencies = [ "aggregator 0.12.0", "anyhow", @@ -2906,7 +2906,7 @@ dependencies = [ [[package]] name = "prover" version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.0#cf71a0e324d42f7895363f4f3e8575d79bb7ea97" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.13-params#e846ba7247181d906e873228bd8f95d81acf52d3" dependencies = [ "aggregator 0.13.0", "anyhow", @@ -4543,7 +4543,7 @@ dependencies = [ [[package]] name = "zkevm-circuits" version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.0#6a1f65a1f99429f3725ef4d6788f5643bb61aa6f" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.12-params#87e0bfa8869e91f16a380f5f24ee66bf1c951d69" dependencies = [ "array-init", "bus-mapping 0.12.0", @@ -4585,7 +4585,7 @@ dependencies = [ [[package]] name = "zkevm-circuits" version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.0#cf71a0e324d42f7895363f4f3e8575d79bb7ea97" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.13-params#e846ba7247181d906e873228bd8f95d81acf52d3" dependencies = [ "array-init", "bus-mapping 0.13.0", diff --git a/common/libzkp/impl/Cargo.toml b/common/libzkp/impl/Cargo.toml index 6d4447bb5..1c69c12d6 100644 --- a/common/libzkp/impl/Cargo.toml +++ b/common/libzkp/impl/Cargo.toml @@ -25,9 +25,9 @@ halo2_proofs = { git = "https://github.com/scroll-tech/halo2.git", branch = "v1. snark-verifier-sdk = { git = "https://github.com/scroll-tech/snark-verifier", branch = "develop", default-features = false, features = ["loader_halo2", "loader_evm", "halo2-pse"] } # darwin -prover_v4 = { git = "https://github.com/scroll-tech/zkevm-circuits.git", tag = "v0.12.0", package = "prover", default-features = false, features = ["parallel_syn", "scroll"] } +prover_v4 = { git = "https://github.com/scroll-tech/zkevm-circuits.git", branch = "v0.12-params", package = "prover", default-features = false, features = ["parallel_syn", "scroll"] } # darwin_v2 -prover_v5 = { git = "https://github.com/scroll-tech/zkevm-circuits.git", tag = "v0.13.0", package = "prover", default-features = false, features = ["parallel_syn", "scroll"] } +prover_v5 = { git = "https://github.com/scroll-tech/zkevm-circuits.git", branch = "v0.13-params", package = "prover", default-features = false, features = ["parallel_syn", "scroll"] } base64 = "0.13.0" env_logger = "0.9.0" diff --git a/common/libzkp/impl/src/verifier.rs b/common/libzkp/impl/src/verifier.rs index a25e42123..7cdc7384f 100644 --- a/common/libzkp/impl/src/verifier.rs +++ b/common/libzkp/impl/src/verifier.rs @@ -4,8 +4,10 @@ mod darwin_v2; use anyhow::{bail, Result}; use darwin::DarwinVerifier; use darwin_v2::DarwinV2Verifier; +use halo2_proofs::{halo2curves::bn256::Bn256, poly::kzg::commitment::ParamsKZG}; +use prover_v4::utils::load_params; use serde::{Deserialize, Serialize}; -use std::{cell::OnceCell, rc::Rc}; +use std::{cell::OnceCell, collections::BTreeMap, rc::Rc}; #[derive(Debug, Clone, Copy, PartialEq)] pub enum TaskType { @@ -37,10 +39,34 @@ struct VerifierPair(HardForkName, Rc>); static mut VERIFIER_HIGH: OnceCell = OnceCell::new(); static mut VERIFIER_LOW: OnceCell = OnceCell::new(); +static mut PARAMS_MAP: OnceCell>> = OnceCell::new(); pub fn init(config: VerifierConfig) { let low_conf = config.low_version_circuit; - let verifier = DarwinVerifier::new(&low_conf.params_path, &low_conf.assets_path); + + // params should be shared between low and high + let mut params_map = BTreeMap::new(); + for degree in [ + *prover_v4::config::LAYER2_DEGREE, + *prover_v4::config::LAYER4_DEGREE, + ] { + if let std::collections::btree_map::Entry::Vacant(e) = params_map.entry(degree) { + match load_params(&low_conf.params_path, degree, None) { + Ok(params) => { + e.insert(params); + } + Err(e) => panic!( + "failed to load params, degree {}, dir {}, err {}", + degree, low_conf.params_path, e + ), + } + } + } + unsafe { + PARAMS_MAP.set(params_map).unwrap_unchecked(); + } + + let verifier = DarwinVerifier::new(unsafe { PARAMS_MAP.get().unwrap() }, &low_conf.assets_path); unsafe { VERIFIER_LOW @@ -51,7 +77,8 @@ pub fn init(config: VerifierConfig) { .unwrap_unchecked(); } let high_conf = config.high_version_circuit; - let verifier = DarwinV2Verifier::new(&high_conf.params_path, &high_conf.assets_path); + let verifier = + DarwinV2Verifier::new(unsafe { PARAMS_MAP.get().unwrap() }, &high_conf.assets_path); unsafe { VERIFIER_HIGH .set(VerifierPair( diff --git a/common/libzkp/impl/src/verifier/darwin.rs b/common/libzkp/impl/src/verifier/darwin.rs index 9119b9b03..941b1b33d 100644 --- a/common/libzkp/impl/src/verifier/darwin.rs +++ b/common/libzkp/impl/src/verifier/darwin.rs @@ -1,24 +1,24 @@ use super::{ProofVerifier, TaskType}; use anyhow::Result; +use halo2_proofs::{halo2curves::bn256::Bn256, poly::kzg::commitment::ParamsKZG}; use crate::utils::panic_catch; use prover_v4::{ aggregator::Verifier as AggVerifier, zkevm::Verifier, BatchProof, BundleProof, ChunkProof, }; -use std::env; +use std::{collections::BTreeMap, env}; -pub struct DarwinVerifier { - verifier: Verifier, - agg_verifier: AggVerifier, +pub struct DarwinVerifier<'params> { + verifier: Verifier<'params>, + agg_verifier: AggVerifier<'params>, } -impl DarwinVerifier { - pub fn new(params_dir: &str, assets_dir: &str) -> Self { +impl<'params> DarwinVerifier<'params> { + pub fn new(params_map: &'params BTreeMap>, assets_dir: &str) -> Self { env::set_var("SCROLL_PROVER_ASSETS_DIR", assets_dir); - let verifier = Verifier::from_dirs(params_dir, assets_dir); - - let agg_verifier = AggVerifier::from_dirs(params_dir, assets_dir); + let verifier = Verifier::from_params_and_assets(params_map, assets_dir); + let agg_verifier = AggVerifier::from_params_and_assets(params_map, assets_dir); Self { verifier, @@ -27,7 +27,7 @@ impl DarwinVerifier { } } -impl ProofVerifier for DarwinVerifier { +impl<'params> ProofVerifier for DarwinVerifier<'params> { fn verify(&self, task_type: super::TaskType, proof: Vec) -> Result { let result = panic_catch(|| match task_type { TaskType::Chunk => { diff --git a/common/libzkp/impl/src/verifier/darwin_v2.rs b/common/libzkp/impl/src/verifier/darwin_v2.rs index dadc07589..fa36fce4f 100644 --- a/common/libzkp/impl/src/verifier/darwin_v2.rs +++ b/common/libzkp/impl/src/verifier/darwin_v2.rs @@ -1,24 +1,24 @@ use super::{ProofVerifier, TaskType}; use anyhow::Result; +use halo2_proofs::{halo2curves::bn256::Bn256, poly::kzg::commitment::ParamsKZG}; use crate::utils::panic_catch; use prover_v5::{ aggregator::Verifier as AggVerifier, zkevm::Verifier, BatchProof, BundleProof, ChunkProof, }; -use std::env; +use std::{collections::BTreeMap, env}; -pub struct DarwinV2Verifier { - verifier: Verifier, - agg_verifier: AggVerifier, +pub struct DarwinV2Verifier<'params> { + verifier: Verifier<'params>, + agg_verifier: AggVerifier<'params>, } -impl DarwinV2Verifier { - pub fn new(params_dir: &str, assets_dir: &str) -> Self { +impl<'params> DarwinV2Verifier<'params> { + pub fn new(params_map: &'params BTreeMap>, assets_dir: &str) -> Self { env::set_var("SCROLL_PROVER_ASSETS_DIR", assets_dir); - let verifier = Verifier::from_dirs(params_dir, assets_dir); - - let agg_verifier = AggVerifier::from_dirs(params_dir, assets_dir); + let verifier = Verifier::from_params_and_assets(params_map, assets_dir); + let agg_verifier = AggVerifier::from_params_and_assets(params_map, assets_dir); Self { verifier, @@ -27,7 +27,7 @@ impl DarwinV2Verifier { } } -impl ProofVerifier for DarwinV2Verifier { +impl<'params> ProofVerifier for DarwinV2Verifier<'params> { fn verify(&self, task_type: super::TaskType, proof: Vec) -> Result { let result = panic_catch(|| match task_type { TaskType::Chunk => { From cd6a6634a837f1e4b0f9c6f8207f36b19c390bc6 Mon Sep 17 00:00:00 2001 From: Zhang Zhuo Date: Mon, 26 Aug 2024 16:15:50 +0800 Subject: [PATCH 2/4] fix merge conflicts --- common/libzkp/impl/src/verifier.rs | 24 +++++++++---------- common/version/version.go | 2 +- .../internal/logic/verifier/verifier.go | 2 ++ 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/common/libzkp/impl/src/verifier.rs b/common/libzkp/impl/src/verifier.rs index a35b4c3c6..7cdc7384f 100644 --- a/common/libzkp/impl/src/verifier.rs +++ b/common/libzkp/impl/src/verifier.rs @@ -2,7 +2,7 @@ mod darwin; mod darwin_v2; use anyhow::{bail, Result}; -// use darwin::DarwinVerifier; +use darwin::DarwinVerifier; use darwin_v2::DarwinV2Verifier; use halo2_proofs::{halo2curves::bn256::Bn256, poly::kzg::commitment::ParamsKZG}; use prover_v4::utils::load_params; @@ -38,11 +38,11 @@ type HardForkName = String; struct VerifierPair(HardForkName, Rc>); static mut VERIFIER_HIGH: OnceCell = OnceCell::new(); -// static mut VERIFIER_LOW: OnceCell = OnceCell::new(); +static mut VERIFIER_LOW: OnceCell = OnceCell::new(); static mut PARAMS_MAP: OnceCell>> = OnceCell::new(); pub fn init(config: VerifierConfig) { - // let low_conf = config.low_version_circuit; + let low_conf = config.low_version_circuit; // params should be shared between low and high let mut params_map = BTreeMap::new(); @@ -68,14 +68,14 @@ pub fn init(config: VerifierConfig) { let verifier = DarwinVerifier::new(unsafe { PARAMS_MAP.get().unwrap() }, &low_conf.assets_path); - // unsafe { - // VERIFIER_LOW - // .set(VerifierPair( - // low_conf.fork_name, - // Rc::new(Box::new(verifier)), - // )) - // .unwrap_unchecked(); - // } + unsafe { + VERIFIER_LOW + .set(VerifierPair( + low_conf.fork_name, + Rc::new(Box::new(verifier)), + )) + .unwrap_unchecked(); + } let high_conf = config.high_version_circuit; let verifier = DarwinV2Verifier::new(unsafe { PARAMS_MAP.get().unwrap() }, &high_conf.assets_path); @@ -91,7 +91,7 @@ pub fn init(config: VerifierConfig) { pub fn get_verifier(fork_name: &str) -> Result>> { unsafe { - if let Some(verifier) = VERIFIER_HIGH.get() { + if let Some(verifier) = VERIFIER_LOW.get() { if verifier.0 == fork_name { return Ok(verifier.1.clone()); } diff --git a/common/version/version.go b/common/version/version.go index ee8175b41..36869e204 100644 --- a/common/version/version.go +++ b/common/version/version.go @@ -5,7 +5,7 @@ import ( "runtime/debug" ) -var tag = "v4.4.48" +var tag = "v4.4.47" var commit = func() string { if info, ok := debug.ReadBuildInfo(); ok { diff --git a/coordinator/internal/logic/verifier/verifier.go b/coordinator/internal/logic/verifier/verifier.go index 85510c136..af743f22a 100644 --- a/coordinator/internal/logic/verifier/verifier.go +++ b/coordinator/internal/logic/verifier/verifier.go @@ -72,8 +72,10 @@ func NewVerifier(cfg *config.VerifierConfig) (*Verifier, error) { } configStr := C.CString(string(configBytes)) + assetsPathHiStr := C.CString(cfg.HighVersionCircuit.AssetsPath) defer func() { C.free(unsafe.Pointer(configStr)) + C.free(unsafe.Pointer(assetsPathHiStr)) }() C.init(configStr) From 38f6ebecc5588bbfe946ecba22238e841d369f7a Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 26 Aug 2024 19:29:51 +0100 Subject: [PATCH 3/4] use tag instead of branch --- common/libzkp/impl/Cargo.lock | 40 +++++++++++++++++------------------ common/libzkp/impl/Cargo.toml | 4 ++-- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/common/libzkp/impl/Cargo.lock b/common/libzkp/impl/Cargo.lock index f8ba56c55..87d448379 100644 --- a/common/libzkp/impl/Cargo.lock +++ b/common/libzkp/impl/Cargo.lock @@ -31,7 +31,7 @@ dependencies = [ [[package]] name = "aggregator" version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.12-params#87e0bfa8869e91f16a380f5f24ee66bf1c951d69" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.2#6f7b46a3b1ccf9dc448735e8455e1ac6f9e30643" dependencies = [ "ark-std 0.3.0", "bitstream-io", @@ -65,7 +65,7 @@ dependencies = [ [[package]] name = "aggregator" version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.13-params#e846ba7247181d906e873228bd8f95d81acf52d3" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.1#4009e5593f13ba73f64f556011ee5ef47bc4ebf3" dependencies = [ "ark-std 0.3.0", "bitstream-io", @@ -571,7 +571,7 @@ checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "bus-mapping" version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.12-params#87e0bfa8869e91f16a380f5f24ee66bf1c951d69" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.2#6f7b46a3b1ccf9dc448735e8455e1ac6f9e30643" dependencies = [ "eth-types 0.12.0", "ethers-core", @@ -596,7 +596,7 @@ dependencies = [ [[package]] name = "bus-mapping" version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.13-params#e846ba7247181d906e873228bd8f95d81acf52d3" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.1#4009e5593f13ba73f64f556011ee5ef47bc4ebf3" dependencies = [ "eth-types 0.13.0", "ethers-core", @@ -1183,7 +1183,7 @@ dependencies = [ [[package]] name = "eth-types" version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.12-params#87e0bfa8869e91f16a380f5f24ee66bf1c951d69" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.2#6f7b46a3b1ccf9dc448735e8455e1ac6f9e30643" dependencies = [ "base64 0.13.1", "ethers-core", @@ -1211,7 +1211,7 @@ dependencies = [ [[package]] name = "eth-types" version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.13-params#e846ba7247181d906e873228bd8f95d81acf52d3" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.1#4009e5593f13ba73f64f556011ee5ef47bc4ebf3" dependencies = [ "base64 0.13.1", "ethers-core", @@ -1367,7 +1367,7 @@ dependencies = [ [[package]] name = "external-tracer" version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.12-params#87e0bfa8869e91f16a380f5f24ee66bf1c951d69" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.2#6f7b46a3b1ccf9dc448735e8455e1ac6f9e30643" dependencies = [ "eth-types 0.12.0", "geth-utils 0.12.0", @@ -1380,7 +1380,7 @@ dependencies = [ [[package]] name = "external-tracer" version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.13-params#e846ba7247181d906e873228bd8f95d81acf52d3" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.1#4009e5593f13ba73f64f556011ee5ef47bc4ebf3" dependencies = [ "eth-types 0.13.0", "geth-utils 0.13.0", @@ -1562,7 +1562,7 @@ dependencies = [ [[package]] name = "gadgets" version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.12-params#87e0bfa8869e91f16a380f5f24ee66bf1c951d69" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.2#6f7b46a3b1ccf9dc448735e8455e1ac6f9e30643" dependencies = [ "eth-types 0.12.0", "halo2_proofs", @@ -1574,7 +1574,7 @@ dependencies = [ [[package]] name = "gadgets" version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.13-params#e846ba7247181d906e873228bd8f95d81acf52d3" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.1#4009e5593f13ba73f64f556011ee5ef47bc4ebf3" dependencies = [ "eth-types 0.13.0", "halo2_proofs", @@ -1597,7 +1597,7 @@ dependencies = [ [[package]] name = "geth-utils" version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.12-params#87e0bfa8869e91f16a380f5f24ee66bf1c951d69" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.2#6f7b46a3b1ccf9dc448735e8455e1ac6f9e30643" dependencies = [ "env_logger 0.10.0", "gobuild", @@ -1607,7 +1607,7 @@ dependencies = [ [[package]] name = "geth-utils" version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.13-params#e846ba7247181d906e873228bd8f95d81acf52d3" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.1#4009e5593f13ba73f64f556011ee5ef47bc4ebf3" dependencies = [ "env_logger 0.10.0", "gobuild", @@ -2356,7 +2356,7 @@ dependencies = [ [[package]] name = "mock" version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.12-params#87e0bfa8869e91f16a380f5f24ee66bf1c951d69" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.2#6f7b46a3b1ccf9dc448735e8455e1ac6f9e30643" dependencies = [ "eth-types 0.12.0", "ethers-core", @@ -2371,7 +2371,7 @@ dependencies = [ [[package]] name = "mock" version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.13-params#e846ba7247181d906e873228bd8f95d81acf52d3" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.1#4009e5593f13ba73f64f556011ee5ef47bc4ebf3" dependencies = [ "eth-types 0.13.0", "ethers-core", @@ -2386,7 +2386,7 @@ dependencies = [ [[package]] name = "mpt-zktrie" version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.12-params#87e0bfa8869e91f16a380f5f24ee66bf1c951d69" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.2#6f7b46a3b1ccf9dc448735e8455e1ac6f9e30643" dependencies = [ "eth-types 0.12.0", "halo2curves", @@ -2400,7 +2400,7 @@ dependencies = [ [[package]] name = "mpt-zktrie" version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.13-params#e846ba7247181d906e873228bd8f95d81acf52d3" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.1#4009e5593f13ba73f64f556011ee5ef47bc4ebf3" dependencies = [ "eth-types 0.13.0", "halo2curves", @@ -2872,7 +2872,7 @@ dependencies = [ [[package]] name = "prover" version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.12-params#87e0bfa8869e91f16a380f5f24ee66bf1c951d69" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.2#6f7b46a3b1ccf9dc448735e8455e1ac6f9e30643" dependencies = [ "aggregator 0.12.0", "anyhow", @@ -2906,7 +2906,7 @@ dependencies = [ [[package]] name = "prover" version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.13-params#e846ba7247181d906e873228bd8f95d81acf52d3" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.1#4009e5593f13ba73f64f556011ee5ef47bc4ebf3" dependencies = [ "aggregator 0.13.0", "anyhow", @@ -4543,7 +4543,7 @@ dependencies = [ [[package]] name = "zkevm-circuits" version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.12-params#87e0bfa8869e91f16a380f5f24ee66bf1c951d69" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.2#6f7b46a3b1ccf9dc448735e8455e1ac6f9e30643" dependencies = [ "array-init", "bus-mapping 0.12.0", @@ -4585,7 +4585,7 @@ dependencies = [ [[package]] name = "zkevm-circuits" version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.13-params#e846ba7247181d906e873228bd8f95d81acf52d3" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.1#4009e5593f13ba73f64f556011ee5ef47bc4ebf3" dependencies = [ "array-init", "bus-mapping 0.13.0", diff --git a/common/libzkp/impl/Cargo.toml b/common/libzkp/impl/Cargo.toml index 1c69c12d6..2d4822f99 100644 --- a/common/libzkp/impl/Cargo.toml +++ b/common/libzkp/impl/Cargo.toml @@ -25,9 +25,9 @@ halo2_proofs = { git = "https://github.com/scroll-tech/halo2.git", branch = "v1. snark-verifier-sdk = { git = "https://github.com/scroll-tech/snark-verifier", branch = "develop", default-features = false, features = ["loader_halo2", "loader_evm", "halo2-pse"] } # darwin -prover_v4 = { git = "https://github.com/scroll-tech/zkevm-circuits.git", branch = "v0.12-params", package = "prover", default-features = false, features = ["parallel_syn", "scroll"] } +prover_v4 = { git = "https://github.com/scroll-tech/zkevm-circuits.git", tag = "v0.12.2", package = "prover", default-features = false, features = ["parallel_syn", "scroll"] } # darwin_v2 -prover_v5 = { git = "https://github.com/scroll-tech/zkevm-circuits.git", branch = "v0.13-params", package = "prover", default-features = false, features = ["parallel_syn", "scroll"] } +prover_v5 = { git = "https://github.com/scroll-tech/zkevm-circuits.git", tag = "v0.13.1", package = "prover", default-features = false, features = ["parallel_syn", "scroll"] } base64 = "0.13.0" env_logger = "0.9.0" From ce1d96765d8d74e9f1c9704f0dfc3d5d73b06750 Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 27 Aug 2024 09:17:08 +0800 Subject: [PATCH 4/4] remove unused code --- coordinator/internal/logic/verifier/verifier.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/coordinator/internal/logic/verifier/verifier.go b/coordinator/internal/logic/verifier/verifier.go index af743f22a..85510c136 100644 --- a/coordinator/internal/logic/verifier/verifier.go +++ b/coordinator/internal/logic/verifier/verifier.go @@ -72,10 +72,8 @@ func NewVerifier(cfg *config.VerifierConfig) (*Verifier, error) { } configStr := C.CString(string(configBytes)) - assetsPathHiStr := C.CString(cfg.HighVersionCircuit.AssetsPath) defer func() { C.free(unsafe.Pointer(configStr)) - C.free(unsafe.Pointer(assetsPathHiStr)) }() C.init(configStr)