From 221599bdc82c5b04f92b0617fa1af875161c9e18 Mon Sep 17 00:00:00 2001 From: Ho Date: Wed, 6 Aug 2025 09:51:29 +0900 Subject: [PATCH 01/22] update dep and renaming modules --- Cargo.lock | 17 ++- Cargo.toml | 6 +- crates/libzkp/Cargo.toml | 2 +- crates/libzkp/src/lib.rs | 2 +- crates/libzkp/src/proofs.rs | 2 +- crates/libzkp/src/tasks/batch/utils.rs | 2 +- crates/libzkp/src/verifier.rs | 6 +- .../verifier/{euclidv2.rs => universal.rs} | 8 +- crates/prover-bin/Cargo.toml | 2 +- crates/prover-bin/src/prover.rs | 8 +- crates/prover-bin/src/zk_circuits_handler.rs | 4 +- .../src/zk_circuits_handler/euclid.rs | 144 ------------------ .../{euclidV2.rs => universal.rs} | 10 +- 13 files changed, 36 insertions(+), 177 deletions(-) rename crates/libzkp/src/verifier/{euclidv2.rs => universal.rs} (93%) delete mode 100644 crates/prover-bin/src/zk_circuits_handler/euclid.rs rename crates/prover-bin/src/zk_circuits_handler/{euclidV2.rs => universal.rs} (94%) diff --git a/Cargo.lock b/Cargo.lock index 33476e9fad..ba891852c2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8395,7 +8395,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-prover" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?branch=feat%2F0.5.1#8f29f60cc73495e8586338a67433a812097427c4" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=2ec1303#2ec13036f4cdbbb20d311c4ae379749dfc1da03b" dependencies = [ "alloy-primitives", "base64 0.22.1", @@ -8433,15 +8433,17 @@ dependencies = [ [[package]] name = "scroll-zkvm-types" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?branch=feat%2F0.5.1#8f29f60cc73495e8586338a67433a812097427c4" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=2ec1303#2ec13036f4cdbbb20d311c4ae379749dfc1da03b" dependencies = [ "base64 0.22.1", "bincode", + "c-kzg", "openvm-continuations", "openvm-native-recursion", "openvm-sdk", "openvm-stark-sdk", "rkyv", + "sbv-primitives", "scroll-zkvm-types-base", "scroll-zkvm-types-batch", "scroll-zkvm-types-bundle", @@ -8453,7 +8455,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-types-base" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?branch=feat%2F0.5.1#8f29f60cc73495e8586338a67433a812097427c4" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=2ec1303#2ec13036f4cdbbb20d311c4ae379749dfc1da03b" dependencies = [ "alloy-primitives", "alloy-serde 1.0.16", @@ -8468,7 +8470,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-types-batch" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?branch=feat%2F0.5.1#8f29f60cc73495e8586338a67433a812097427c4" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=2ec1303#2ec13036f4cdbbb20d311c4ae379749dfc1da03b" dependencies = [ "alloy-primitives", "halo2curves-axiom", @@ -8488,7 +8490,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-types-bundle" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?branch=feat%2F0.5.1#8f29f60cc73495e8586338a67433a812097427c4" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=2ec1303#2ec13036f4cdbbb20d311c4ae379749dfc1da03b" dependencies = [ "alloy-primitives", "itertools 0.14.0", @@ -8501,7 +8503,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-types-chunk" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?branch=feat%2F0.5.1#8f29f60cc73495e8586338a67433a812097427c4" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=2ec1303#2ec13036f4cdbbb20d311c4ae379749dfc1da03b" dependencies = [ "alloy-primitives", "itertools 0.14.0", @@ -8521,7 +8523,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-verifier" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?branch=feat%2F0.5.1#8f29f60cc73495e8586338a67433a812097427c4" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=2ec1303#2ec13036f4cdbbb20d311c4ae379749dfc1da03b" dependencies = [ "bincode", "eyre", @@ -8535,6 +8537,7 @@ dependencies = [ "revm 24.0.0", "scroll-zkvm-types", "serde", + "serde_json", "snark-verifier-sdk", ] diff --git a/Cargo.toml b/Cargo.toml index adc6765da7..a9630f5b09 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,9 +17,9 @@ repository = "https://github.com/scroll-tech/scroll" version = "4.5.8" [workspace.dependencies] -scroll-zkvm-prover-euclid = { git = "https://github.com/scroll-tech/zkvm-prover", branch = "feat/0.5.1", package = "scroll-zkvm-prover" } -scroll-zkvm-verifier-euclid = { git = "https://github.com/scroll-tech/zkvm-prover", branch = "feat/0.5.1", package = "scroll-zkvm-verifier" } -scroll-zkvm-types = { git = "https://github.com/scroll-tech/zkvm-prover", branch = "feat/0.5.1" } +scroll-zkvm-prover = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "2ec1303" } +scroll-zkvm-verifier = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "2ec1303" } +scroll-zkvm-types = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "2ec1303" } sbv-primitives = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "chore/openvm-1.3", features = ["scroll"] } sbv-utils = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "chore/openvm-1.3" } diff --git a/crates/libzkp/Cargo.toml b/crates/libzkp/Cargo.toml index 6a195a6dff..305974c47a 100644 --- a/crates/libzkp/Cargo.toml +++ b/crates/libzkp/Cargo.toml @@ -6,7 +6,7 @@ edition.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] scroll-zkvm-types.workspace = true -scroll-zkvm-verifier-euclid.workspace = true +scroll-zkvm-verifier.workspace = true alloy-primitives.workspace = true #depress the effect of "native-keccak" sbv-primitives = {workspace = true, features = ["scroll-compress-ratio", "scroll"]} diff --git a/crates/libzkp/src/lib.rs b/crates/libzkp/src/lib.rs index c2902210f9..1fbb3673b8 100644 --- a/crates/libzkp/src/lib.rs +++ b/crates/libzkp/src/lib.rs @@ -5,7 +5,7 @@ pub use verifier::{TaskType, VerifierConfig}; mod utils; use sbv_primitives::B256; -use scroll_zkvm_types::util::vec_as_base64; +use scroll_zkvm_types::utils::vec_as_base64; use serde::{Deserialize, Serialize}; use serde_json::value::RawValue; use std::path::Path; diff --git a/crates/libzkp/src/proofs.rs b/crates/libzkp/src/proofs.rs index c9a09a9ebc..eaa5f0f3f2 100644 --- a/crates/libzkp/src/proofs.rs +++ b/crates/libzkp/src/proofs.rs @@ -10,7 +10,7 @@ use scroll_zkvm_types::{ proof::{EvmProof, OpenVmEvmProof, ProofEnum, RootProof}, public_inputs::{ForkName, MultiVersionPublicInputs}, types_agg::{AggregationInput, ProgramCommitment}, - util::vec_as_base64, + utils::vec_as_base64, }; use serde::{de::DeserializeOwned, Deserialize, Serialize}; diff --git a/crates/libzkp/src/tasks/batch/utils.rs b/crates/libzkp/src/tasks/batch/utils.rs index 260bd4b828..31a7a2f26d 100644 --- a/crates/libzkp/src/tasks/batch/utils.rs +++ b/crates/libzkp/src/tasks/batch/utils.rs @@ -18,7 +18,7 @@ pub mod base64 { pub mod point_eval { use c_kzg; use sbv_primitives::{types::eips::eip4844::BLS_MODULUS, B256 as H256, U256}; - use scroll_zkvm_types::util::sha256_rv32; + use scroll_zkvm_types::utils::sha256_rv32; /// Given the blob-envelope, translate it to a fixed size EIP-4844 blob. /// diff --git a/crates/libzkp/src/verifier.rs b/crates/libzkp/src/verifier.rs index 753a77277c..080c1c93c6 100644 --- a/crates/libzkp/src/verifier.rs +++ b/crates/libzkp/src/verifier.rs @@ -1,7 +1,7 @@ #![allow(static_mut_refs)] -mod euclidv2; -use euclidv2::EuclidV2Verifier; +mod universal; +use universal::Verifier; use eyre::Result; use serde::{Deserialize, Serialize}; use std::{ @@ -61,7 +61,7 @@ pub fn init(config: VerifierConfig) { for cfg in &config.circuits { let canonical_fork_name = cfg.fork_name.to_lowercase(); - let verifier = EuclidV2Verifier::new(&cfg.assets_path, canonical_fork_name.as_str().into()); + let verifier = Verifier::new(&cfg.assets_path, canonical_fork_name.as_str().into()); let ret = verifiers.insert(canonical_fork_name, Arc::new(Mutex::new(verifier))); assert!( ret.is_none(), diff --git a/crates/libzkp/src/verifier/euclidv2.rs b/crates/libzkp/src/verifier/universal.rs similarity index 93% rename from crates/libzkp/src/verifier/euclidv2.rs rename to crates/libzkp/src/verifier/universal.rs index 332cb2ccee..fc625a463b 100644 --- a/crates/libzkp/src/verifier/euclidv2.rs +++ b/crates/libzkp/src/verifier/universal.rs @@ -7,15 +7,15 @@ use crate::{ utils::panic_catch, }; use scroll_zkvm_types::public_inputs::ForkName; -use scroll_zkvm_verifier_euclid::verifier::UniversalVerifier; +use scroll_zkvm_verifier::verifier::UniversalVerifier; use std::path::Path; -pub struct EuclidV2Verifier { +pub struct Verifier { verifier: UniversalVerifier, fork: ForkName, } -impl EuclidV2Verifier { +impl Verifier { pub fn new(assets_dir: &str, fork: ForkName) -> Self { let verifier_bin = Path::new(assets_dir).join("verifier.bin"); let config = Path::new(assets_dir).join("root-verifier-vm-config"); @@ -29,7 +29,7 @@ impl EuclidV2Verifier { } } -impl ProofVerifier for EuclidV2Verifier { +impl ProofVerifier for Verifier { fn verify(&self, task_type: super::TaskType, proof: &[u8]) -> Result { panic_catch(|| match task_type { TaskType::Chunk => { diff --git a/crates/prover-bin/Cargo.toml b/crates/prover-bin/Cargo.toml index 4075ce855e..f56d2d30fc 100644 --- a/crates/prover-bin/Cargo.toml +++ b/crates/prover-bin/Cargo.toml @@ -7,7 +7,7 @@ edition.workspace = true [dependencies] scroll-zkvm-types.workspace = true -scroll-zkvm-prover-euclid.workspace = true +scroll-zkvm-prover.workspace = true scroll-proving-sdk = { git = "https://github.com/scroll-tech/scroll-proving-sdk.git", branch = "refactor/scroll" } serde.workspace = true serde_json.workspace = true diff --git a/crates/prover-bin/src/prover.rs b/crates/prover-bin/src/prover.rs index 412ab8bc4e..8a8db87cf5 100644 --- a/crates/prover-bin/src/prover.rs +++ b/crates/prover-bin/src/prover.rs @@ -1,4 +1,4 @@ -use crate::zk_circuits_handler::{euclidV2::EuclidV2Handler, CircuitsHandler}; +use crate::zk_circuits_handler::{universal::UniversalHandler, CircuitsHandler}; use async_trait::async_trait; use eyre::Result; use scroll_proving_sdk::{ @@ -188,10 +188,10 @@ impl LocalProver { let config = self.config.circuits.get(hard_fork_name).unwrap(); match hard_fork_name { - // The new EuclidV2Handler is a universal handler + // The new Handler is a universal handler // We can add other handler implements if needed "some future forkname" => unreachable!(), - _ => Arc::new(Arc::new(Mutex::new(EuclidV2Handler::new(config)))) + _ => Arc::new(Arc::new(Mutex::new(UniversalHandler::new(config)))) as Arc, } } @@ -208,7 +208,7 @@ impl LocalProver { } let workspace_path = &config.workspace_path; - let universal_prover = EuclidV2Handler::new(config); + let universal_prover = UniversalHandler::new(config); let _ = universal_prover .get_prover() .dump_universal_verifier(Some(out_path))?; diff --git a/crates/prover-bin/src/zk_circuits_handler.rs b/crates/prover-bin/src/zk_circuits_handler.rs index f4c84b5a12..ee109dbf72 100644 --- a/crates/prover-bin/src/zk_circuits_handler.rs +++ b/crates/prover-bin/src/zk_circuits_handler.rs @@ -1,12 +1,12 @@ //pub mod euclid; #[allow(non_snake_case)] -pub mod euclidV2; +pub mod universal; use async_trait::async_trait; use eyre::Result; use scroll_proving_sdk::prover::{proving_service::ProveRequest, ProofType}; -use scroll_zkvm_prover_euclid::ProverConfig; +use scroll_zkvm_prover::ProverConfig; use std::path::Path; #[async_trait] diff --git a/crates/prover-bin/src/zk_circuits_handler/euclid.rs b/crates/prover-bin/src/zk_circuits_handler/euclid.rs deleted file mode 100644 index 1235da4fc3..0000000000 --- a/crates/prover-bin/src/zk_circuits_handler/euclid.rs +++ /dev/null @@ -1,144 +0,0 @@ -use std::{path::Path, sync::Arc}; - -use super::CircuitsHandler; -use anyhow::{anyhow, Result}; -use async_trait::async_trait; -use scroll_proving_sdk::prover::{proving_service::ProveRequest, ProofType}; -use scroll_zkvm_prover_euclid::{ - task::{batch::BatchProvingTask, bundle::BundleProvingTask, chunk::ChunkProvingTask}, - BatchProver, BundleProverEuclidV1, ChunkProver, ProverConfig, -}; -use tokio::sync::Mutex; -pub struct EuclidHandler { - chunk_prover: ChunkProver, - batch_prover: BatchProver, - bundle_prover: BundleProverEuclidV1, -} - -#[derive(Clone, Copy)] -pub(crate) enum Phase { - EuclidV1, - EuclidV2, -} - -impl Phase { - pub fn as_str(&self) -> &str { - match self { - Phase::EuclidV1 => "euclidv1", - Phase::EuclidV2 => "euclidv2", - } - } - - pub fn phase_spec_chunk(&self, workspace_path: &Path) -> ProverConfig { - let dir_cache = Some(workspace_path.join("cache")); - let path_app_exe = workspace_path.join("chunk/app.vmexe"); - let path_app_config = workspace_path.join("chunk/openvm.toml"); - let segment_len = Some((1 << 22) - 100); - ProverConfig { - dir_cache, - path_app_config, - path_app_exe, - segment_len, - ..Default::default() - } - } - - pub fn phase_spec_batch(&self, workspace_path: &Path) -> ProverConfig { - let dir_cache = Some(workspace_path.join("cache")); - let path_app_exe = workspace_path.join("batch/app.vmexe"); - let path_app_config = workspace_path.join("batch/openvm.toml"); - let segment_len = Some((1 << 22) - 100); - ProverConfig { - dir_cache, - path_app_config, - path_app_exe, - segment_len, - ..Default::default() - } - } - - pub fn phase_spec_bundle(&self, workspace_path: &Path) -> ProverConfig { - let dir_cache = Some(workspace_path.join("cache")); - let path_app_config = workspace_path.join("bundle/openvm.toml"); - let segment_len = Some((1 << 22) - 100); - match self { - Phase::EuclidV1 => ProverConfig { - dir_cache, - path_app_config, - segment_len, - path_app_exe: workspace_path.join("bundle/app_euclidv1.vmexe"), - ..Default::default() - }, - Phase::EuclidV2 => ProverConfig { - dir_cache, - path_app_config, - segment_len, - path_app_exe: workspace_path.join("bundle/app.vmexe"), - ..Default::default() - }, - } - } -} - -unsafe impl Send for EuclidHandler {} - -impl EuclidHandler { - pub fn new(workspace_path: &str) -> Self { - let p = Phase::EuclidV1; - let workspace_path = Path::new(workspace_path); - let chunk_prover = ChunkProver::setup(p.phase_spec_chunk(workspace_path)) - .expect("Failed to setup chunk prover"); - - let batch_prover = BatchProver::setup(p.phase_spec_batch(workspace_path)) - .expect("Failed to setup batch prover"); - - let bundle_prover = BundleProverEuclidV1::setup(p.phase_spec_bundle(workspace_path)) - .expect("Failed to setup bundle prover"); - - Self { - chunk_prover, - batch_prover, - bundle_prover, - } - } -} - -#[async_trait] -impl CircuitsHandler for Arc> { - async fn get_vk(&self, task_type: ProofType) -> Option> { - Some(match task_type { - ProofType::Chunk => self.try_lock().unwrap().chunk_prover.get_app_vk(), - ProofType::Batch => self.try_lock().unwrap().batch_prover.get_app_vk(), - ProofType::Bundle => self.try_lock().unwrap().bundle_prover.get_app_vk(), - _ => unreachable!("Unsupported proof type"), - }) - } - - async fn get_proof_data(&self, prove_request: ProveRequest) -> Result { - match prove_request.proof_type { - ProofType::Chunk => { - let task: ChunkProvingTask = serde_json::from_str(&prove_request.input)?; - let proof = self.try_lock().unwrap().chunk_prover.gen_proof(&task)?; - - Ok(serde_json::to_string(&proof)?) - } - ProofType::Batch => { - let task: BatchProvingTask = serde_json::from_str(&prove_request.input)?; - let proof = self.try_lock().unwrap().batch_prover.gen_proof(&task)?; - - Ok(serde_json::to_string(&proof)?) - } - ProofType::Bundle => { - let batch_proofs: BundleProvingTask = serde_json::from_str(&prove_request.input)?; - let proof = self - .try_lock() - .unwrap() - .bundle_prover - .gen_proof_evm(&batch_proofs)?; - - Ok(serde_json::to_string(&proof)?) - } - _ => Err(anyhow!("Unsupported proof type")), - } - } -} diff --git a/crates/prover-bin/src/zk_circuits_handler/euclidV2.rs b/crates/prover-bin/src/zk_circuits_handler/universal.rs similarity index 94% rename from crates/prover-bin/src/zk_circuits_handler/euclidV2.rs rename to crates/prover-bin/src/zk_circuits_handler/universal.rs index 79df0fc276..6a2cd77eef 100644 --- a/crates/prover-bin/src/zk_circuits_handler/euclidV2.rs +++ b/crates/prover-bin/src/zk_circuits_handler/universal.rs @@ -10,19 +10,19 @@ use async_trait::async_trait; use base64::{prelude::BASE64_STANDARD, Engine}; use eyre::Result; use scroll_proving_sdk::prover::{proving_service::ProveRequest, ProofType}; -use scroll_zkvm_prover_euclid::{BatchProver, BundleProverEuclidV2, ChunkProver}; +use scroll_zkvm_prover::{BatchProver, BundleProverEuclidV2, ChunkProver}; use scroll_zkvm_types::ProvingTask; use tokio::sync::Mutex; -pub struct EuclidV2Handler { +pub struct UniversalHandler { chunk_prover: ChunkProver, batch_prover: BatchProver, bundle_prover: BundleProverEuclidV2, cached_vks: HashMap>, } -unsafe impl Send for EuclidV2Handler {} +unsafe impl Send for UniversalHandler {} -impl EuclidV2Handler { +impl UniversalHandler { pub fn new(cfg: &CircuitConfig) -> Self { let workspace_path = &cfg.workspace_path; let p = Phase::EuclidV2; @@ -78,7 +78,7 @@ impl EuclidV2Handler { } #[async_trait] -impl CircuitsHandler for Arc> { +impl CircuitsHandler for Arc> { async fn get_vk(&self, task_type: ProofType) -> String { self.lock().await.get_vk_and_cache(task_type) } From 897029957407695aacef1756ec1d3a902333b2f0 Mon Sep 17 00:00:00 2001 From: Ho Date: Fri, 8 Aug 2025 17:43:33 +0900 Subject: [PATCH 02/22] refactor for dynamic loading --- Cargo.lock | 16 ++ crates/prover-bin/Cargo.toml | 5 +- crates/prover-bin/src/prover.rs | 139 +++++++++++++----- crates/prover-bin/src/zk_circuits_handler.rs | 4 +- .../src/zk_circuits_handler/assets.rs | 71 +++++++++ .../src/zk_circuits_handler/universal.rs | 110 +++++--------- 6 files changed, 232 insertions(+), 113 deletions(-) create mode 100644 crates/prover-bin/src/zk_circuits_handler/assets.rs diff --git a/Cargo.lock b/Cargo.lock index ba891852c2..8fe170ea13 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6340,6 +6340,7 @@ dependencies = [ "ctor", "eyre", "futures", + "futures-util", "hex", "http 1.3.1", "once_cell", @@ -6761,6 +6762,7 @@ dependencies = [ "url", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", "webpki-roots 1.0.0", ] @@ -9934,6 +9936,7 @@ dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] [[package]] @@ -10099,6 +10102,19 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "wasm-streams" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "wasm-timer" version = "0.2.5" diff --git a/crates/prover-bin/Cargo.toml b/crates/prover-bin/Cargo.toml index f56d2d30fc..e7612666a6 100644 --- a/crates/prover-bin/Cargo.toml +++ b/crates/prover-bin/Cargo.toml @@ -17,8 +17,9 @@ tiny-keccak = { workspace = true, features = ["sha3", "keccak"] } eyre.workspace = true futures = "0.3.30" +futures-util = "0.3" -reqwest = { version = "0.12.4", features = ["gzip"] } +reqwest = { version = "0.12.4", features = ["gzip", "stream"] } reqwest-middleware = "0.3" reqwest-retry = "0.5" hex = "0.4.3" @@ -30,5 +31,5 @@ sled = "0.34.7" http = "1.1.0" clap = { version = "4.5", features = ["derive"] } ctor = "0.2.8" -url = "2.5.4" +url = { version = "2.5.4", features = ["serde",] } serde_bytes = "0.11.15" diff --git a/crates/prover-bin/src/prover.rs b/crates/prover-bin/src/prover.rs index 8a8db87cf5..13999811a4 100644 --- a/crates/prover-bin/src/prover.rs +++ b/crates/prover-bin/src/prover.rs @@ -1,4 +1,4 @@ -use crate::zk_circuits_handler::{universal::UniversalHandler, CircuitsHandler}; +use crate::zk_circuits_handler::{universal::UniversalHandler, assets::AssetsHandler, CircuitsHandler}; use async_trait::async_trait; use eyre::Result; use scroll_proving_sdk::{ @@ -16,12 +16,100 @@ use serde::{Deserialize, Serialize}; use std::{ collections::HashMap, fs::File, - path::Path, + path::{Path, PathBuf}, sync::{Arc, OnceLock}, time::{SystemTime, UNIX_EPOCH}, }; use tokio::{runtime::Handle, sync::Mutex, task::JoinHandle}; +#[derive(Clone, Serialize, Deserialize)] +pub struct AssetsLocationData { + /// the base url to form a general downloading url for an asset, MUST HAVE A TRAILING SLASH + pub base_url: url::Url, + /// a altered url for specififed vk + pub asset_detours: HashMap, +} + +impl AssetsLocationData { + + fn gen_asset_url(&self, vk: &str, proof_type: ProofType) -> Result { + if let Some(url) = self.asset_detours.get(vk) { + Ok(url.clone()) + } else { + Ok(self.base_url + .join(match proof_type { + ProofType::Chunk => format!("chunk/{vk}/"), + ProofType::Batch => format!("batch/{vk}/"), + ProofType::Bundle => format!("bundle/{vk}/"), + _ => unreachable!("unreconginzed type"), + }.as_str())?) + } + } + + pub fn validate(self) -> Result { + if !self.base_url.path().ends_with('/') { + eyre::bail!("base_url must have a trailing slash, got: {}", self.base_url); + } + Ok(self) + } + + pub async fn get_asset(&self, vk: &str, proof_type: ProofType, base_path: impl AsRef) -> Result { + let download_files = ["app.vmexe", "openvm.toml"]; + + // Step 1: Create a local path for storage + let storage_path = base_path.as_ref().join(vk); + std::fs::create_dir_all(&storage_path)?; + + // Step 2 & 3: Download each file if needed + let url_base = self.gen_asset_url(vk, proof_type)?; + let client = reqwest::Client::new(); + + for filename in download_files.iter() { + let local_file_path = storage_path.join(filename); + let download_url = url_base.join(filename)?; + + // Check if file already exists + if local_file_path.exists() { + // Get file metadata to check size + if let Ok(metadata) = std::fs::metadata(&local_file_path) { + // Make a HEAD request to get remote file size + + if let Ok(head_resp) = client.head(download_url.clone()).send().await { + if let Some(content_length) = head_resp.headers().get("content-length") { + if let Ok(remote_size) = content_length.to_str().unwrap_or("0").parse::() { + // If sizes match, skip download + if metadata.len() == remote_size { + println!("File {} already exists with matching size, skipping download", filename); + continue; + } + } + } + } + } + } + + println!("Downloading {} from {}", filename, download_url); + + let response = client.get(download_url).send().await?; + if !response.status().is_success() { + eyre::bail!("Failed to download {}: HTTP status {}", filename, response.status()); + } + + // Stream the content directly to file instead of loading into memory + let mut file = std::fs::File::create(&local_file_path)?; + let mut stream = response.bytes_stream(); + + use futures_util::StreamExt; + while let Some(chunk) = stream.next().await { + std::io::Write::write_all(&mut file, &chunk?)?; + } + } + + // Step 4: Return the storage path + Ok(storage_path) + } +} + #[derive(Clone, Serialize, Deserialize)] pub struct LocalProverConfig { pub sdk_config: SdkConfig, @@ -45,6 +133,7 @@ impl LocalProverConfig { #[derive(Clone, Serialize, Deserialize)] pub struct CircuitConfig { pub hard_fork_name: String, + /// The path to save assets for a specified hard fork phase pub workspace_path: String, /// cached vk value to save some initial cost, for debugging only #[serde(default)] @@ -64,23 +153,12 @@ impl ProvingService for LocalProver { fn is_local(&self) -> bool { true } - async fn get_vks(&self, req: GetVkRequest) -> GetVkResponse { - let mut vks = vec![]; - for (hard_fork_name, cfg) in self.config.circuits.iter() { - for proof_type in &req.proof_types { - if let Some(vk) = cfg.vks.get(proof_type) { - vks.push(vk.clone()) - } else { - let handler = self.get_or_init_handler(hard_fork_name); - vks.push(handler.get_vk(*proof_type).await); - } - } - } - - GetVkResponse { vks, error: None } + async fn get_vks(&self, _: GetVkRequest) -> GetVkResponse { + // get vk has been deprecated in new prover with dynamic asset loading scheme + GetVkResponse { vks: vec![], error: None } } async fn prove(&mut self, req: ProveRequest) -> ProveResponse { - let handler = self.get_or_init_handler(&req.hard_fork_name); + let handler = self.get_or_init_handler(&req.hard_fork_name, req.proof_type); match self.do_prove(req, handler).await { Ok(resp) => resp, Err(e) => ProveResponse { @@ -174,26 +252,19 @@ impl LocalProver { }) } - fn get_or_init_handler(&self, hard_fork_name: &str) -> Arc { + fn get_or_init_handler(&self, hard_fork_name: &str, proof_type: ProofType) -> Arc { let lk = self .handlers .get(hard_fork_name) .expect("coordinator should never sent unexpected forkname"); - lk.get_or_init(|| self.new_handler(hard_fork_name)).clone() - } - pub fn new_handler(&self, hard_fork_name: &str) -> Arc { - // if we got assigned a task for an unknown hard fork, there is something wrong in the - // coordinator - let config = self.config.circuits.get(hard_fork_name).unwrap(); - - match hard_fork_name { - // The new Handler is a universal handler - // We can add other handler implements if needed - "some future forkname" => unreachable!(), - _ => Arc::new(Arc::new(Mutex::new(UniversalHandler::new(config)))) - as Arc, - } + lk.get_or_init(||{ + // if we got assigned a task for an unknown hard fork, there is something wrong in the + // coordinator + let config = self.config.circuits.get(hard_fork_name).unwrap(); + let circuits_handler = Mutex::new(UniversalHandler::new(config, proof_type).unwrap()); + Arc::new(circuits_handler) + }).clone() } pub fn dump_verifier_assets(&self, hard_fork_name: &str, out_path: &Path) -> Result<()> { @@ -208,9 +279,9 @@ impl LocalProver { } let workspace_path = &config.workspace_path; - let universal_prover = UniversalHandler::new(config); + let universal_prover = AssetsHandler::new(config); let _ = universal_prover - .get_prover() + .get_evm_prover() .dump_universal_verifier(Some(out_path))?; #[derive(Debug, serde::Serialize)] diff --git a/crates/prover-bin/src/zk_circuits_handler.rs b/crates/prover-bin/src/zk_circuits_handler.rs index ee109dbf72..51b44bf671 100644 --- a/crates/prover-bin/src/zk_circuits_handler.rs +++ b/crates/prover-bin/src/zk_circuits_handler.rs @@ -2,6 +2,8 @@ #[allow(non_snake_case)] pub mod universal; +// keep an old handler for utilities on assets +pub mod assets; use async_trait::async_trait; use eyre::Result; @@ -11,7 +13,7 @@ use std::path::Path; #[async_trait] pub trait CircuitsHandler: Sync + Send { - async fn get_vk(&self, task_type: ProofType) -> String; + async fn get_vk(&self) -> String; async fn get_proof_data(&self, prove_request: ProveRequest) -> Result; } diff --git a/crates/prover-bin/src/zk_circuits_handler/assets.rs b/crates/prover-bin/src/zk_circuits_handler/assets.rs new file mode 100644 index 0000000000..04670ff111 --- /dev/null +++ b/crates/prover-bin/src/zk_circuits_handler/assets.rs @@ -0,0 +1,71 @@ +use std::{ + collections::HashMap, + path::Path, + sync::OnceLock, +}; + +use super::Phase; +use crate::prover::CircuitConfig; +use base64::{prelude::BASE64_STANDARD, Engine}; +use scroll_proving_sdk::prover::ProofType; +use scroll_zkvm_prover::Prover; +pub struct AssetsHandler { + chunk_prover: Prover, + batch_prover: Prover, + bundle_prover: Prover, + cached_vks: HashMap>, +} + +impl AssetsHandler { + pub fn new(cfg: &CircuitConfig) -> Self { + let workspace_path = &cfg.workspace_path; + let p = Phase::EuclidV2; + let workspace_path = Path::new(workspace_path); + let chunk_prover = Prover::setup(p.phase_spec_chunk(workspace_path), false, None) + .expect("Failed to setup chunk prover"); + + let batch_prover = Prover::setup(p.phase_spec_batch(workspace_path), false, None) + .expect("Failed to setup batch prover"); + + let bundle_prover = Prover::setup(p.phase_spec_bundle(workspace_path), true, None) + .expect("Failed to setup bundle prover"); + + let build_vk_cache = |proof_type: ProofType| { + let vk = if let Some(vk) = cfg.vks.get(&proof_type) { + OnceLock::from(vk.clone()) + } else { + OnceLock::new() + }; + (proof_type, vk) + }; + + Self { + chunk_prover, + batch_prover, + bundle_prover, + cached_vks: HashMap::from([ + build_vk_cache(ProofType::Chunk), + build_vk_cache(ProofType::Batch), + build_vk_cache(ProofType::Bundle), + ]), + } + } + + /// get the inner prover for evm + pub fn get_evm_prover(&self) -> &Prover { + &self.bundle_prover + } + + pub fn get_vk_and_cache(&self, task_type: ProofType) -> String { + match task_type { + ProofType::Chunk => self.cached_vks[&ProofType::Chunk] + .get_or_init(|| BASE64_STANDARD.encode(self.chunk_prover.get_app_vk())), + ProofType::Batch => self.cached_vks[&ProofType::Batch] + .get_or_init(|| BASE64_STANDARD.encode(self.batch_prover.get_app_vk())), + ProofType::Bundle => self.cached_vks[&ProofType::Bundle] + .get_or_init(|| BASE64_STANDARD.encode(self.bundle_prover.get_app_vk())), + _ => unreachable!("Unsupported proof type {:?}", task_type), + } + .clone() + } +} diff --git a/crates/prover-bin/src/zk_circuits_handler/universal.rs b/crates/prover-bin/src/zk_circuits_handler/universal.rs index 6a2cd77eef..fa76cc37dd 100644 --- a/crates/prover-bin/src/zk_circuits_handler/universal.rs +++ b/crates/prover-bin/src/zk_circuits_handler/universal.rs @@ -1,118 +1,76 @@ use std::{ - collections::HashMap, path::Path, - sync::{Arc, OnceLock}, + sync::Arc, }; -use super::{CircuitsHandler, Phase}; +use super::CircuitsHandler; use crate::prover::CircuitConfig; use async_trait::async_trait; use base64::{prelude::BASE64_STANDARD, Engine}; use eyre::Result; use scroll_proving_sdk::prover::{proving_service::ProveRequest, ProofType}; -use scroll_zkvm_prover::{BatchProver, BundleProverEuclidV2, ChunkProver}; +use scroll_zkvm_prover::{Prover, ProverConfig}; use scroll_zkvm_types::ProvingTask; use tokio::sync::Mutex; pub struct UniversalHandler { - chunk_prover: ChunkProver, - batch_prover: BatchProver, - bundle_prover: BundleProverEuclidV2, - cached_vks: HashMap>, + prover: Prover, } unsafe impl Send for UniversalHandler {} impl UniversalHandler { - pub fn new(cfg: &CircuitConfig) -> Self { - let workspace_path = &cfg.workspace_path; - let p = Phase::EuclidV2; - let workspace_path = Path::new(workspace_path); - let chunk_prover = ChunkProver::setup(p.phase_spec_chunk(workspace_path)) - .expect("Failed to setup chunk prover"); - - let batch_prover = BatchProver::setup(p.phase_spec_batch(workspace_path)) - .expect("Failed to setup batch prover"); - - let bundle_prover = BundleProverEuclidV2::setup(p.phase_spec_bundle(workspace_path)) - .expect("Failed to setup bundle prover"); - - let build_vk_cache = |proof_type: ProofType| { - let vk = if let Some(vk) = cfg.vks.get(&proof_type) { - OnceLock::from(vk.clone()) - } else { - OnceLock::new() - }; - (proof_type, vk) + pub fn new(cfg: &CircuitConfig, proof_type: ProofType) -> Result { + let workspace_path = Path::new(&cfg.workspace_path); + let dir_cache = Some(workspace_path.join("cache")); + let path_app_exe = workspace_path.join("app.vmexe"); + let path_app_config = workspace_path.join("openvm.toml"); + let segment_len = Some((1 << 22) - 100); + let config = ProverConfig { + dir_cache, + path_app_config, + path_app_exe, + segment_len, + ..Default::default() }; - Self { - chunk_prover, - batch_prover, - bundle_prover, - cached_vks: HashMap::from([ - build_vk_cache(ProofType::Chunk), - build_vk_cache(ProofType::Batch), - build_vk_cache(ProofType::Bundle), - ]), - } + let use_evm = proof_type == ProofType::Bundle; + + let prover = Prover::setup(config, use_evm, None)?; + Ok(Self { + prover, + }) } /// get_prover get the inner prover, later we would replace chunk/batch/bundle_prover with /// universal prover, before that, use bundle_prover as the represent one - pub fn get_prover(&self) -> &BundleProverEuclidV2 { - &self.bundle_prover + pub fn get_prover(&self) -> &Prover { + &self.prover } - pub fn get_vk_and_cache(&self, task_type: ProofType) -> String { - match task_type { - ProofType::Chunk => self.cached_vks[&ProofType::Chunk] - .get_or_init(|| BASE64_STANDARD.encode(self.chunk_prover.get_app_vk())), - ProofType::Batch => self.cached_vks[&ProofType::Batch] - .get_or_init(|| BASE64_STANDARD.encode(self.batch_prover.get_app_vk())), - ProofType::Bundle => self.cached_vks[&ProofType::Bundle] - .get_or_init(|| BASE64_STANDARD.encode(self.bundle_prover.get_app_vk())), - _ => unreachable!("Unsupported proof type {:?}", task_type), - } - .clone() - } } #[async_trait] -impl CircuitsHandler for Arc> { - async fn get_vk(&self, task_type: ProofType) -> String { - self.lock().await.get_vk_and_cache(task_type) +impl CircuitsHandler for Mutex { + async fn get_vk(&self) -> String { + BASE64_STANDARD.encode(self.lock().await.get_prover().get_app_vk()) } async fn get_proof_data(&self, prove_request: ProveRequest) -> Result { let handler_self = self.lock().await; let u_task: ProvingTask = serde_json::from_str(&prove_request.input)?; - let expected_vk = handler_self.get_vk_and_cache(prove_request.proof_type); - if BASE64_STANDARD.encode(&u_task.vk) != expected_vk { + let expected_vk = handler_self.get_prover().get_app_vk(); + if u_task.vk != expected_vk { eyre::bail!( "vk is not match!, prove type {:?}, expected {}, get {}", prove_request.proof_type, - expected_vk, - BASE64_STANDARD.encode(&u_task.vk), + BASE64_STANDARD.encode(expected_vk), + BASE64_STANDARD.encode(u_task.vk), ); } - let proof = match prove_request.proof_type { - ProofType::Chunk => handler_self - .chunk_prover - .gen_proof_universal(&u_task, false)?, - ProofType::Batch => handler_self - .batch_prover - .gen_proof_universal(&u_task, false)?, - ProofType::Bundle => handler_self - .bundle_prover - .gen_proof_universal(&u_task, true)?, - _ => { - return Err(eyre::eyre!( - "Unsupported proof type {:?}", - prove_request.proof_type - )) - } - }; + let use_evm = prove_request.proof_type == ProofType::Bundle; + let proof = handler_self.get_prover().gen_proof_universal(&u_task, use_evm)?; + //TODO: check expected PI Ok(serde_json::to_string(&proof)?) } From 8e8da95d3fb7746dab118c106c1a48e8a108a09a Mon Sep 17 00:00:00 2001 From: Ho Date: Fri, 8 Aug 2025 19:51:41 +0900 Subject: [PATCH 03/22] dynamic asset loading --- crates/prover-bin/src/prover.rs | 85 ++++++++++++------- crates/prover-bin/src/zk_circuits_handler.rs | 5 +- .../src/zk_circuits_handler/universal.rs | 49 ++++++----- 3 files changed, 83 insertions(+), 56 deletions(-) diff --git a/crates/prover-bin/src/prover.rs b/crates/prover-bin/src/prover.rs index 13999811a4..6437a1a7c5 100644 --- a/crates/prover-bin/src/prover.rs +++ b/crates/prover-bin/src/prover.rs @@ -17,7 +17,7 @@ use std::{ collections::HashMap, fs::File, path::{Path, PathBuf}, - sync::{Arc, OnceLock}, + sync::{Arc, LazyLock}, time::{SystemTime, UNIX_EPOCH}, }; use tokio::{runtime::Handle, sync::Mutex, task::JoinHandle}; @@ -26,6 +26,7 @@ use tokio::{runtime::Handle, sync::Mutex, task::JoinHandle}; pub struct AssetsLocationData { /// the base url to form a general downloading url for an asset, MUST HAVE A TRAILING SLASH pub base_url: url::Url, + #[serde(default)] /// a altered url for specififed vk pub asset_detours: HashMap, } @@ -46,11 +47,11 @@ impl AssetsLocationData { } } - pub fn validate(self) -> Result { + pub fn validate(&self) -> Result<()> { if !self.base_url.path().ends_with('/') { eyre::bail!("base_url must have a trailing slash, got: {}", self.base_url); } - Ok(self) + Ok(()) } pub async fn get_asset(&self, vk: &str, proof_type: ProofType, base_path: impl AsRef) -> Result { @@ -135,9 +136,13 @@ pub struct CircuitConfig { pub hard_fork_name: String, /// The path to save assets for a specified hard fork phase pub workspace_path: String, + #[serde(flatten)] + /// The location data for dynamic loading + pub location_data: AssetsLocationData, /// cached vk value to save some initial cost, for debugging only #[serde(default)] pub vks: HashMap, + } pub struct LocalProver { @@ -145,7 +150,7 @@ pub struct LocalProver { next_task_id: u64, current_task: Option>>, - handlers: HashMap>>, + handlers: HashMap>, } #[async_trait] @@ -158,8 +163,7 @@ impl ProvingService for LocalProver { GetVkResponse { vks: vec![], error: None } } async fn prove(&mut self, req: ProveRequest) -> ProveResponse { - let handler = self.get_or_init_handler(&req.hard_fork_name, req.proof_type); - match self.do_prove(req, handler).await { + match self.do_prove(req).await { Ok(resp) => resp, Err(e) => ProveResponse { status: TaskStatus::Failed, @@ -210,34 +214,68 @@ impl ProvingService for LocalProver { } } +static GLOBAL_ASSET_URLS_FEYNMAN: LazyLock> = LazyLock::new(|| { + HashMap::from( + [ + ("".to_string(), url::Url::parse("https://assets.example.com/chunk/default/").unwrap()), + ], + ) +}); + impl LocalProver { - pub fn new(config: LocalProverConfig) -> Self { - let handlers = config - .circuits - .keys() - .map(|k| (k.clone(), OnceLock::new())) - .collect(); + pub fn new(mut config: LocalProverConfig) -> Self { + + for (fork_name, circuit_config) in config.circuits.iter_mut() { + // validate each base url + circuit_config.location_data.validate().unwrap(); + let mut template_url_mapping = match fork_name.to_lowercase().as_str() { + "feynman" => GLOBAL_ASSET_URLS_FEYNMAN.clone(), + _ => HashMap::new(), + }; + + // apply default settings in template + for (key, url) in circuit_config.location_data.asset_detours.drain() { + template_url_mapping.insert(key, url); + } + circuit_config.location_data.asset_detours = template_url_mapping; + } + Self { config, next_task_id: 0, current_task: None, - handlers, + handlers: HashMap::new(), } } async fn do_prove( &mut self, req: ProveRequest, - handler: Arc, ) -> Result { + use base64::{prelude::BASE64_STANDARD, Engine}; + self.next_task_id += 1; let duration = SystemTime::now().duration_since(UNIX_EPOCH).unwrap(); let created_at = duration.as_secs() as f64 + duration.subsec_nanos() as f64 * 1e-9; - let req_clone = req.clone(); + let prover_task = UniversalHandler::get_task_from_input(&req.input)?; + let vk = BASE64_STANDARD.encode(&prover_task.vk); + let handler = if let Some(handler) = self.handlers.get(&vk){ + handler.clone() + } else { + let base_config = self.config.circuits + .get(&req.hard_fork_name) + .ok_or_else(||eyre::eyre!("coordinator sent unexpected forkname {}", req.hard_fork_name))?; + let asset_path = base_config.location_data.get_asset(&vk, req.proof_type, &base_config.workspace_path).await?; + let circuits_handler = Arc::new(Mutex::new(UniversalHandler::new(&asset_path, req.proof_type)?)); + self.handlers.insert(vk, circuits_handler.clone()); + circuits_handler + }; + let handle = Handle::current(); + let is_evm = req.proof_type == ProofType::Bundle; let task_handle = - tokio::task::spawn_blocking(move || handle.block_on(handler.get_proof_data(req_clone))); + tokio::task::spawn_blocking(move || handle.block_on(handler.get_proof_data(&prover_task, is_evm))); self.current_task = Some(task_handle); Ok(ProveResponse { @@ -252,21 +290,6 @@ impl LocalProver { }) } - fn get_or_init_handler(&self, hard_fork_name: &str, proof_type: ProofType) -> Arc { - let lk = self - .handlers - .get(hard_fork_name) - .expect("coordinator should never sent unexpected forkname"); - - lk.get_or_init(||{ - // if we got assigned a task for an unknown hard fork, there is something wrong in the - // coordinator - let config = self.config.circuits.get(hard_fork_name).unwrap(); - let circuits_handler = Mutex::new(UniversalHandler::new(config, proof_type).unwrap()); - Arc::new(circuits_handler) - }).clone() - } - pub fn dump_verifier_assets(&self, hard_fork_name: &str, out_path: &Path) -> Result<()> { let config = self .config diff --git a/crates/prover-bin/src/zk_circuits_handler.rs b/crates/prover-bin/src/zk_circuits_handler.rs index 51b44bf671..2f5ab02b0d 100644 --- a/crates/prover-bin/src/zk_circuits_handler.rs +++ b/crates/prover-bin/src/zk_circuits_handler.rs @@ -7,15 +7,16 @@ pub mod assets; use async_trait::async_trait; use eyre::Result; -use scroll_proving_sdk::prover::{proving_service::ProveRequest, ProofType}; +use scroll_zkvm_types::ProvingTask; use scroll_zkvm_prover::ProverConfig; use std::path::Path; #[async_trait] pub trait CircuitsHandler: Sync + Send { + #[allow(dead_code)] async fn get_vk(&self) -> String; - async fn get_proof_data(&self, prove_request: ProveRequest) -> Result; + async fn get_proof_data(&self, u_task: &ProvingTask, need_snark: bool) -> Result; } #[derive(Clone, Copy)] diff --git a/crates/prover-bin/src/zk_circuits_handler/universal.rs b/crates/prover-bin/src/zk_circuits_handler/universal.rs index fa76cc37dd..6f6b2ce51c 100644 --- a/crates/prover-bin/src/zk_circuits_handler/universal.rs +++ b/crates/prover-bin/src/zk_circuits_handler/universal.rs @@ -1,14 +1,10 @@ -use std::{ - path::Path, - sync::Arc, -}; +use std::path::Path; use super::CircuitsHandler; -use crate::prover::CircuitConfig; use async_trait::async_trait; use base64::{prelude::BASE64_STANDARD, Engine}; use eyre::Result; -use scroll_proving_sdk::prover::{proving_service::ProveRequest, ProofType}; +use scroll_proving_sdk::prover::ProofType; use scroll_zkvm_prover::{Prover, ProverConfig}; use scroll_zkvm_types::ProvingTask; use tokio::sync::Mutex; @@ -19,11 +15,10 @@ pub struct UniversalHandler { unsafe impl Send for UniversalHandler {} impl UniversalHandler { - pub fn new(cfg: &CircuitConfig, proof_type: ProofType) -> Result { - let workspace_path = Path::new(&cfg.workspace_path); - let dir_cache = Some(workspace_path.join("cache")); - let path_app_exe = workspace_path.join("app.vmexe"); - let path_app_config = workspace_path.join("openvm.toml"); + pub fn new(workspace_path: impl AsRef, proof_type: ProofType) -> Result { + let dir_cache = Some(workspace_path.as_ref().join("cache")); + let path_app_exe = workspace_path.as_ref().join("app.vmexe"); + let path_app_config = workspace_path.as_ref().join("openvm.toml"); let segment_len = Some((1 << 22) - 100); let config = ProverConfig { dir_cache, @@ -47,6 +42,10 @@ impl UniversalHandler { &self.prover } + pub fn get_task_from_input(input: &str) -> Result { + Ok(serde_json::from_str(input)?) + } + } #[async_trait] @@ -55,21 +54,25 @@ impl CircuitsHandler for Mutex { BASE64_STANDARD.encode(self.lock().await.get_prover().get_app_vk()) } - async fn get_proof_data(&self, prove_request: ProveRequest) -> Result { + async fn get_proof_data(&self, u_task: &ProvingTask, need_snark: bool) -> Result { let handler_self = self.lock().await; - let u_task: ProvingTask = serde_json::from_str(&prove_request.input)?; - let expected_vk = handler_self.get_prover().get_app_vk(); - if u_task.vk != expected_vk { - eyre::bail!( - "vk is not match!, prove type {:?}, expected {}, get {}", - prove_request.proof_type, - BASE64_STANDARD.encode(expected_vk), - BASE64_STANDARD.encode(u_task.vk), - ); + // let u_task: ProvingTask = serde_json::from_str(&prove_request.input)?; + // let expected_vk = handler_self.get_prover().get_app_vk(); + // if u_task.vk != expected_vk { + // eyre::bail!( + // "vk is not match!, prove type {:?}, expected {}, get {}", + // prove_request.proof_type, + // BASE64_STANDARD.encode(expected_vk), + // BASE64_STANDARD.encode(u_task.vk), + // ); + // } + if need_snark && handler_self.prover.evm_prover.is_none() { + eyre::bail!("do not init prover for evm (vk: {})", + BASE64_STANDARD.encode(handler_self.get_prover().get_app_vk())) } - let use_evm = prove_request.proof_type == ProofType::Bundle; - let proof = handler_self.get_prover().gen_proof_universal(&u_task, use_evm)?; + // let use_evm = prove_request.proof_type == ProofType::Bundle; + let proof = handler_self.get_prover().gen_proof_universal(u_task, need_snark)?; //TODO: check expected PI Ok(serde_json::to_string(&proof)?) From 86071627ce4e5fc7cb5207c9101314f1700c1c1d Mon Sep 17 00:00:00 2001 From: Ho Date: Fri, 8 Aug 2025 21:39:14 +0900 Subject: [PATCH 04/22] fmt --- crates/libzkp/src/verifier.rs | 2 +- crates/prover-bin/src/prover.rs | 114 +++++++++++------- crates/prover-bin/src/zk_circuits_handler.rs | 2 +- .../src/zk_circuits_handler/assets.rs | 6 +- .../src/zk_circuits_handler/universal.rs | 15 +-- 5 files changed, 82 insertions(+), 57 deletions(-) diff --git a/crates/libzkp/src/verifier.rs b/crates/libzkp/src/verifier.rs index 080c1c93c6..5f6168798d 100644 --- a/crates/libzkp/src/verifier.rs +++ b/crates/libzkp/src/verifier.rs @@ -1,7 +1,6 @@ #![allow(static_mut_refs)] mod universal; -use universal::Verifier; use eyre::Result; use serde::{Deserialize, Serialize}; use std::{ @@ -9,6 +8,7 @@ use std::{ path::Path, sync::{Arc, Mutex, OnceLock}, }; +use universal::Verifier; #[derive(Debug, Clone, Copy, PartialEq)] pub enum TaskType { diff --git a/crates/prover-bin/src/prover.rs b/crates/prover-bin/src/prover.rs index 6437a1a7c5..4fc3189629 100644 --- a/crates/prover-bin/src/prover.rs +++ b/crates/prover-bin/src/prover.rs @@ -1,4 +1,6 @@ -use crate::zk_circuits_handler::{universal::UniversalHandler, assets::AssetsHandler, CircuitsHandler}; +use crate::zk_circuits_handler::{ + assets::AssetsHandler, universal::UniversalHandler, CircuitsHandler, +}; use async_trait::async_trait; use eyre::Result; use scroll_proving_sdk::{ @@ -32,39 +34,48 @@ pub struct AssetsLocationData { } impl AssetsLocationData { - fn gen_asset_url(&self, vk: &str, proof_type: ProofType) -> Result { if let Some(url) = self.asset_detours.get(vk) { Ok(url.clone()) } else { - Ok(self.base_url - .join(match proof_type { - ProofType::Chunk => format!("chunk/{vk}/"), - ProofType::Batch => format!("batch/{vk}/"), - ProofType::Bundle => format!("bundle/{vk}/"), - _ => unreachable!("unreconginzed type"), - }.as_str())?) + Ok(self.base_url.join( + match proof_type { + ProofType::Chunk => format!("chunk/{vk}/"), + ProofType::Batch => format!("batch/{vk}/"), + ProofType::Bundle => format!("bundle/{vk}/"), + _ => unreachable!("unreconginzed type"), + } + .as_str(), + )?) } } pub fn validate(&self) -> Result<()> { if !self.base_url.path().ends_with('/') { - eyre::bail!("base_url must have a trailing slash, got: {}", self.base_url); + eyre::bail!( + "base_url must have a trailing slash, got: {}", + self.base_url + ); } Ok(()) } - pub async fn get_asset(&self, vk: &str, proof_type: ProofType, base_path: impl AsRef) -> Result { + pub async fn get_asset( + &self, + vk: &str, + proof_type: ProofType, + base_path: impl AsRef, + ) -> Result { let download_files = ["app.vmexe", "openvm.toml"]; - + // Step 1: Create a local path for storage let storage_path = base_path.as_ref().join(vk); std::fs::create_dir_all(&storage_path)?; - + // Step 2 & 3: Download each file if needed let url_base = self.gen_asset_url(vk, proof_type)?; let client = reqwest::Client::new(); - + for filename in download_files.iter() { let local_file_path = storage_path.join(filename); let download_url = url_base.join(filename)?; @@ -74,10 +85,12 @@ impl AssetsLocationData { // Get file metadata to check size if let Ok(metadata) = std::fs::metadata(&local_file_path) { // Make a HEAD request to get remote file size - + if let Ok(head_resp) = client.head(download_url.clone()).send().await { if let Some(content_length) = head_resp.headers().get("content-length") { - if let Ok(remote_size) = content_length.to_str().unwrap_or("0").parse::() { + if let Ok(remote_size) = + content_length.to_str().unwrap_or("0").parse::() + { // If sizes match, skip download if metadata.len() == remote_size { println!("File {} already exists with matching size, skipping download", filename); @@ -88,24 +101,28 @@ impl AssetsLocationData { } } } - + println!("Downloading {} from {}", filename, download_url); - + let response = client.get(download_url).send().await?; if !response.status().is_success() { - eyre::bail!("Failed to download {}: HTTP status {}", filename, response.status()); + eyre::bail!( + "Failed to download {}: HTTP status {}", + filename, + response.status() + ); } - + // Stream the content directly to file instead of loading into memory let mut file = std::fs::File::create(&local_file_path)?; let mut stream = response.bytes_stream(); - + use futures_util::StreamExt; while let Some(chunk) = stream.next().await { std::io::Write::write_all(&mut file, &chunk?)?; } } - + // Step 4: Return the storage path Ok(storage_path) } @@ -142,7 +159,6 @@ pub struct CircuitConfig { /// cached vk value to save some initial cost, for debugging only #[serde(default)] pub vks: HashMap, - } pub struct LocalProver { @@ -160,7 +176,10 @@ impl ProvingService for LocalProver { } async fn get_vks(&self, _: GetVkRequest) -> GetVkResponse { // get vk has been deprecated in new prover with dynamic asset loading scheme - GetVkResponse { vks: vec![], error: None } + GetVkResponse { + vks: vec![], + error: None, + } } async fn prove(&mut self, req: ProveRequest) -> ProveResponse { match self.do_prove(req).await { @@ -215,16 +234,14 @@ impl ProvingService for LocalProver { } static GLOBAL_ASSET_URLS_FEYNMAN: LazyLock> = LazyLock::new(|| { - HashMap::from( - [ - ("".to_string(), url::Url::parse("https://assets.example.com/chunk/default/").unwrap()), - ], - ) + HashMap::from([( + "".to_string(), + url::Url::parse("https://assets.example.com/chunk/default/").unwrap(), + )]) }); impl LocalProver { pub fn new(mut config: LocalProverConfig) -> Self { - for (fork_name, circuit_config) in config.circuits.iter_mut() { // validate each base url circuit_config.location_data.validate().unwrap(); @@ -236,8 +253,8 @@ impl LocalProver { // apply default settings in template for (key, url) in circuit_config.location_data.asset_detours.drain() { template_url_mapping.insert(key, url); - } - circuit_config.location_data.asset_detours = template_url_mapping; + } + circuit_config.location_data.asset_detours = template_url_mapping; } Self { @@ -248,10 +265,7 @@ impl LocalProver { } } - async fn do_prove( - &mut self, - req: ProveRequest, - ) -> Result { + async fn do_prove(&mut self, req: ProveRequest) -> Result { use base64::{prelude::BASE64_STANDARD, Engine}; self.next_task_id += 1; @@ -260,22 +274,36 @@ impl LocalProver { let prover_task = UniversalHandler::get_task_from_input(&req.input)?; let vk = BASE64_STANDARD.encode(&prover_task.vk); - let handler = if let Some(handler) = self.handlers.get(&vk){ + let handler = if let Some(handler) = self.handlers.get(&vk) { handler.clone() } else { - let base_config = self.config.circuits + let base_config = self + .config + .circuits .get(&req.hard_fork_name) - .ok_or_else(||eyre::eyre!("coordinator sent unexpected forkname {}", req.hard_fork_name))?; - let asset_path = base_config.location_data.get_asset(&vk, req.proof_type, &base_config.workspace_path).await?; - let circuits_handler = Arc::new(Mutex::new(UniversalHandler::new(&asset_path, req.proof_type)?)); + .ok_or_else(|| { + eyre::eyre!( + "coordinator sent unexpected forkname {}", + req.hard_fork_name + ) + })?; + let asset_path = base_config + .location_data + .get_asset(&vk, req.proof_type, &base_config.workspace_path) + .await?; + let circuits_handler = Arc::new(Mutex::new(UniversalHandler::new( + &asset_path, + req.proof_type, + )?)); self.handlers.insert(vk, circuits_handler.clone()); circuits_handler }; let handle = Handle::current(); let is_evm = req.proof_type == ProofType::Bundle; - let task_handle = - tokio::task::spawn_blocking(move || handle.block_on(handler.get_proof_data(&prover_task, is_evm))); + let task_handle = tokio::task::spawn_blocking(move || { + handle.block_on(handler.get_proof_data(&prover_task, is_evm)) + }); self.current_task = Some(task_handle); Ok(ProveResponse { diff --git a/crates/prover-bin/src/zk_circuits_handler.rs b/crates/prover-bin/src/zk_circuits_handler.rs index 2f5ab02b0d..1ff16b5659 100644 --- a/crates/prover-bin/src/zk_circuits_handler.rs +++ b/crates/prover-bin/src/zk_circuits_handler.rs @@ -7,8 +7,8 @@ pub mod assets; use async_trait::async_trait; use eyre::Result; -use scroll_zkvm_types::ProvingTask; use scroll_zkvm_prover::ProverConfig; +use scroll_zkvm_types::ProvingTask; use std::path::Path; #[async_trait] diff --git a/crates/prover-bin/src/zk_circuits_handler/assets.rs b/crates/prover-bin/src/zk_circuits_handler/assets.rs index 04670ff111..6d4415d7e9 100644 --- a/crates/prover-bin/src/zk_circuits_handler/assets.rs +++ b/crates/prover-bin/src/zk_circuits_handler/assets.rs @@ -1,8 +1,4 @@ -use std::{ - collections::HashMap, - path::Path, - sync::OnceLock, -}; +use std::{collections::HashMap, path::Path, sync::OnceLock}; use super::Phase; use crate::prover::CircuitConfig; diff --git a/crates/prover-bin/src/zk_circuits_handler/universal.rs b/crates/prover-bin/src/zk_circuits_handler/universal.rs index 6f6b2ce51c..c417d8cf2c 100644 --- a/crates/prover-bin/src/zk_circuits_handler/universal.rs +++ b/crates/prover-bin/src/zk_circuits_handler/universal.rs @@ -31,9 +31,7 @@ impl UniversalHandler { let use_evm = proof_type == ProofType::Bundle; let prover = Prover::setup(config, use_evm, None)?; - Ok(Self { - prover, - }) + Ok(Self { prover }) } /// get_prover get the inner prover, later we would replace chunk/batch/bundle_prover with @@ -45,7 +43,6 @@ impl UniversalHandler { pub fn get_task_from_input(input: &str) -> Result { Ok(serde_json::from_str(input)?) } - } #[async_trait] @@ -67,12 +64,16 @@ impl CircuitsHandler for Mutex { // ); // } if need_snark && handler_self.prover.evm_prover.is_none() { - eyre::bail!("do not init prover for evm (vk: {})", - BASE64_STANDARD.encode(handler_self.get_prover().get_app_vk())) + eyre::bail!( + "do not init prover for evm (vk: {})", + BASE64_STANDARD.encode(handler_self.get_prover().get_app_vk()) + ) } // let use_evm = prove_request.proof_type == ProofType::Bundle; - let proof = handler_self.get_prover().gen_proof_universal(u_task, need_snark)?; + let proof = handler_self + .get_prover() + .gen_proof_universal(u_task, need_snark)?; //TODO: check expected PI Ok(serde_json::to_string(&proof)?) From 52db8ad267317b87910dfc53dd6d2c6b0a8e6cb2 Mon Sep 17 00:00:00 2001 From: Ho Date: Sat, 9 Aug 2025 11:45:16 +0900 Subject: [PATCH 05/22] fix base64 issue for url safe --- crates/prover-bin/src/prover.rs | 60 ++++++++++++++++++++------------ zkvm-prover/config.json.template | 7 ++-- 2 files changed, 40 insertions(+), 27 deletions(-) diff --git a/crates/prover-bin/src/prover.rs b/crates/prover-bin/src/prover.rs index 4fc3189629..5a22c8a126 100644 --- a/crates/prover-bin/src/prover.rs +++ b/crates/prover-bin/src/prover.rs @@ -34,20 +34,16 @@ pub struct AssetsLocationData { } impl AssetsLocationData { - fn gen_asset_url(&self, vk: &str, proof_type: ProofType) -> Result { - if let Some(url) = self.asset_detours.get(vk) { - Ok(url.clone()) - } else { - Ok(self.base_url.join( - match proof_type { - ProofType::Chunk => format!("chunk/{vk}/"), - ProofType::Batch => format!("batch/{vk}/"), - ProofType::Bundle => format!("bundle/{vk}/"), - _ => unreachable!("unreconginzed type"), - } - .as_str(), - )?) - } + pub fn gen_asset_url(&self, vk_as_path: &str, proof_type: ProofType) -> Result { + Ok(self.base_url.join( + match proof_type { + ProofType::Chunk => format!("chunk/{vk_as_path}/"), + ProofType::Batch => format!("batch/{vk_as_path}/"), + ProofType::Bundle => format!("bundle/{vk_as_path}/"), + _ => unreachable!("unreconginzed type"), + } + .as_str(), + )?) } pub fn validate(&self) -> Result<()> { @@ -63,7 +59,7 @@ impl AssetsLocationData { pub async fn get_asset( &self, vk: &str, - proof_type: ProofType, + url_base: &url::Url, base_path: impl AsRef, ) -> Result { let download_files = ["app.vmexe", "openvm.toml"]; @@ -73,7 +69,6 @@ impl AssetsLocationData { std::fs::create_dir_all(&storage_path)?; // Step 2 & 3: Download each file if needed - let url_base = self.gen_asset_url(vk, proof_type)?; let client = reqwest::Client::new(); for filename in download_files.iter() { @@ -234,10 +229,20 @@ impl ProvingService for LocalProver { } static GLOBAL_ASSET_URLS_FEYNMAN: LazyLock> = LazyLock::new(|| { - HashMap::from([( - "".to_string(), - url::Url::parse("https://assets.example.com/chunk/default/").unwrap(), - )]) + HashMap::from([ + ( + "to/cPyilzgBigJgN9wzTRH5WkT5bymBUYDuoXweUwjpmGOolp5kYRbvF/VcWcO5HN5ujGs6S00W8pZcCoNQRLQ==".to_string(), + url::Url::parse("https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/0.5.2/chunk/").unwrap(), + ), + ( + "mj9mNw8R4zA/GhJIkhAlEE6DJT7+pDpw0iHPThX8FFvyvi9EaNGsSnDnaCurscYEF+IcdjPUtVtY9EcD7IKwWg==".to_string(), + url::Url::parse("https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/0.5.2/batch/").unwrap(), + ), + ( + "H4YnJ34cH24cxwwD5v3gaSnl6ifKWx1W4jsjXf7aKC4iwOUpS8sbOp3vg2+NDxhhKphgYpuUlykpdsoRhEt+cw==".to_string(), + url::Url::parse("https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/0.5.2/bundle/").unwrap(), + ), + ]) }); impl LocalProver { @@ -266,7 +271,10 @@ impl LocalProver { } async fn do_prove(&mut self, req: ProveRequest) -> Result { - use base64::{prelude::BASE64_STANDARD, Engine}; + use base64::{ + prelude::{BASE64_STANDARD, BASE64_URL_SAFE}, + Engine, + }; self.next_task_id += 1; let duration = SystemTime::now().duration_since(UNIX_EPOCH).unwrap(); @@ -287,9 +295,17 @@ impl LocalProver { req.hard_fork_name ) })?; + let vk_as_path = BASE64_URL_SAFE.encode(&prover_task.vk); + let url_base = if let Some(url) = base_config.location_data.asset_detours.get(&vk) { + url.clone() + } else { + base_config + .location_data + .gen_asset_url(&vk_as_path, req.proof_type)? + }; let asset_path = base_config .location_data - .get_asset(&vk, req.proof_type, &base_config.workspace_path) + .get_asset(&vk_as_path, &url_base, &base_config.workspace_path) .await?; let circuits_handler = Arc::new(Mutex::new(UniversalHandler::new( &asset_path, diff --git a/zkvm-prover/config.json.template b/zkvm-prover/config.json.template index 529e1a9075..4425bdb7b3 100644 --- a/zkvm-prover/config.json.template +++ b/zkvm-prover/config.json.template @@ -24,13 +24,10 @@ "db_path": ".work/db" }, "circuits": { - "euclidV2": { - "hard_fork_name": "euclidV2", - "workspace_path": ".work/euclid" - }, "feynman": { "hard_fork_name": "feynman", - "workspace_path": ".work/feynman1" + "base_url": "https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/feynman/", + "workspace_path": ".work/feynman" }, } } \ No newline at end of file From 617271a45ba49abca3e9eb2c11248974a0f6cee8 Mon Sep 17 00:00:00 2001 From: Ho Date: Mon, 18 Aug 2025 21:09:22 +0900 Subject: [PATCH 06/22] update zkvm-prover dep and fix --- Cargo.lock | 421 ++++++------------ Cargo.toml | 6 +- crates/libzkp/src/proofs.rs | 12 +- crates/libzkp/src/tasks/batch.rs | 2 +- crates/libzkp/src/tasks/bundle.rs | 2 +- crates/libzkp/src/verifier/universal.rs | 25 +- crates/prover-bin/Cargo.toml | 2 +- crates/prover-bin/src/zk_circuits_handler.rs | 6 - .../src/zk_circuits_handler/universal.rs | 3 - 9 files changed, 157 insertions(+), 322 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8fe170ea13..10a76716a7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4408,19 +4408,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "openvm" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" -dependencies = [ - "bytemuck", - "num-bigint 0.4.6", - "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1)", - "openvm-platform 1.2.1-rc.0", - "openvm-rv32im-guest 1.2.1-rc.0", - "serde", -] - [[package]] name = "openvm" version = "1.3.0" @@ -4430,16 +4417,16 @@ dependencies = [ "getrandom 0.2.16", "getrandom 0.3.3", "num-bigint 0.4.6", - "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", - "openvm-platform 1.3.0", - "openvm-rv32im-guest 1.3.0", + "openvm-custom-insn", + "openvm-platform", + "openvm-rv32im-guest", "serde", ] [[package]] name = "openvm-algebra-circuit" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -4465,42 +4452,16 @@ dependencies = [ "strum 0.26.3", ] -[[package]] -name = "openvm-algebra-complex-macros" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" -dependencies = [ - "openvm-macros-common 1.2.1-rc.0", - "quote", - "syn 2.0.101", -] - [[package]] name = "openvm-algebra-complex-macros" version = "1.3.0" source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ - "openvm-macros-common 1.3.0", + "openvm-macros-common", "quote", "syn 2.0.101", ] -[[package]] -name = "openvm-algebra-guest" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" -dependencies = [ - "halo2curves-axiom", - "num-bigint 0.4.6", - "once_cell", - "openvm-algebra-complex-macros 1.2.1-rc.0", - "openvm-algebra-moduli-macros 1.2.1-rc.0", - "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1)", - "openvm-rv32im-guest 1.2.1-rc.0", - "serde-big-array", - "strum_macros 0.26.4", -] - [[package]] name = "openvm-algebra-guest" version = "1.3.0" @@ -4509,26 +4470,14 @@ dependencies = [ "halo2curves-axiom", "num-bigint 0.4.6", "once_cell", - "openvm-algebra-complex-macros 1.3.0", - "openvm-algebra-moduli-macros 1.3.0", - "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", - "openvm-rv32im-guest 1.3.0", + "openvm-algebra-complex-macros", + "openvm-algebra-moduli-macros", + "openvm-custom-insn", + "openvm-rv32im-guest", "serde-big-array", "strum_macros 0.26.4", ] -[[package]] -name = "openvm-algebra-moduli-macros" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" -dependencies = [ - "num-bigint 0.4.6", - "num-prime", - "openvm-macros-common 1.2.1-rc.0", - "quote", - "syn 2.0.101", -] - [[package]] name = "openvm-algebra-moduli-macros" version = "1.3.0" @@ -4536,17 +4485,17 @@ source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092 dependencies = [ "num-bigint 0.4.6", "num-prime", - "openvm-macros-common 1.3.0", + "openvm-macros-common", "quote", "syn 2.0.101", ] [[package]] name = "openvm-algebra-transpiler" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ - "openvm-algebra-guest 1.2.1-rc.0", + "openvm-algebra-guest", "openvm-instructions", "openvm-instructions-derive", "openvm-stark-backend", @@ -4557,8 +4506,8 @@ dependencies = [ [[package]] name = "openvm-bigint-circuit" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -4579,17 +4528,17 @@ dependencies = [ [[package]] name = "openvm-bigint-guest" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ - "openvm-platform 1.2.1-rc.0", + "openvm-platform", "strum_macros 0.26.4", ] [[package]] name = "openvm-bigint-transpiler" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "openvm-bigint-guest", "openvm-instructions", @@ -4603,20 +4552,20 @@ dependencies = [ [[package]] name = "openvm-build" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "cargo_metadata", "eyre", - "openvm-platform 1.2.1-rc.0", + "openvm-platform", "serde", "serde_json", ] [[package]] name = "openvm-circuit" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "backtrace", "cfg-if", @@ -4646,8 +4595,8 @@ dependencies = [ [[package]] name = "openvm-circuit-derive" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "itertools 0.14.0", "quote", @@ -4656,8 +4605,8 @@ dependencies = [ [[package]] name = "openvm-circuit-primitives" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "derive-new 0.6.0", "itertools 0.14.0", @@ -4671,8 +4620,8 @@ dependencies = [ [[package]] name = "openvm-circuit-primitives-derive" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "itertools 0.14.0", "quote", @@ -4681,8 +4630,8 @@ dependencies = [ [[package]] name = "openvm-continuations" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "derivative", "openvm-circuit", @@ -4694,16 +4643,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "openvm-custom-insn" -version = "0.1.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - [[package]] name = "openvm-custom-insn" version = "0.1.0" @@ -4716,16 +4655,14 @@ dependencies = [ [[package]] name = "openvm-ecc-circuit" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", - "eyre", "hex-literal", "lazy_static", "num-bigint 0.4.6", - "num-integer", "num-traits", "once_cell", "openvm-algebra-circuit", @@ -4744,25 +4681,6 @@ dependencies = [ "strum 0.26.3", ] -[[package]] -name = "openvm-ecc-guest" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" -dependencies = [ - "ecdsa", - "elliptic-curve", - "group 0.13.0", - "halo2curves-axiom", - "once_cell", - "openvm 1.2.1-rc.0", - "openvm-algebra-guest 1.2.1-rc.0", - "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1)", - "openvm-ecc-sw-macros 1.2.1-rc.0", - "openvm-rv32im-guest 1.2.1-rc.0", - "serde", - "strum_macros 0.26.4", -] - [[package]] name = "openvm-ecc-guest" version = "1.3.0" @@ -4773,41 +4691,31 @@ dependencies = [ "group 0.13.0", "halo2curves-axiom", "once_cell", - "openvm 1.3.0", - "openvm-algebra-guest 1.3.0", - "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", - "openvm-ecc-sw-macros 1.3.0", - "openvm-rv32im-guest 1.3.0", + "openvm", + "openvm-algebra-guest", + "openvm-custom-insn", + "openvm-ecc-sw-macros", + "openvm-rv32im-guest", "serde", "strum_macros 0.26.4", ] -[[package]] -name = "openvm-ecc-sw-macros" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" -dependencies = [ - "openvm-macros-common 1.2.1-rc.0", - "quote", - "syn 2.0.101", -] - [[package]] name = "openvm-ecc-sw-macros" version = "1.3.0" source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ - "openvm-macros-common 1.3.0", + "openvm-macros-common", "quote", "syn 2.0.101", ] [[package]] name = "openvm-ecc-transpiler" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ - "openvm-ecc-guest 1.2.1-rc.0", + "openvm-ecc-guest", "openvm-instructions", "openvm-instructions-derive", "openvm-stark-backend", @@ -4818,8 +4726,8 @@ dependencies = [ [[package]] name = "openvm-instructions" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "backtrace", "derive-new 0.6.0", @@ -4835,8 +4743,8 @@ dependencies = [ [[package]] name = "openvm-instructions-derive" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "quote", "syn 2.0.101", @@ -4844,8 +4752,8 @@ dependencies = [ [[package]] name = "openvm-keccak256-circuit" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -4870,16 +4778,16 @@ dependencies = [ [[package]] name = "openvm-keccak256-guest" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ - "openvm-platform 1.2.1-rc.0", + "openvm-platform", ] [[package]] name = "openvm-keccak256-transpiler" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "openvm-instructions", "openvm-instructions-derive", @@ -4890,14 +4798,6 @@ dependencies = [ "strum 0.26.3", ] -[[package]] -name = "openvm-macros-common" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" -dependencies = [ - "syn 2.0.101", -] - [[package]] name = "openvm-macros-common" version = "1.3.0" @@ -4908,8 +4808,8 @@ dependencies = [ [[package]] name = "openvm-mod-circuit-builder" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "itertools 0.14.0", "num-bigint 0.4.6", @@ -4927,8 +4827,8 @@ dependencies = [ [[package]] name = "openvm-native-circuit" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -4954,8 +4854,8 @@ dependencies = [ [[package]] name = "openvm-native-compiler" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "backtrace", "itertools 0.14.0", @@ -4978,8 +4878,8 @@ dependencies = [ [[package]] name = "openvm-native-compiler-derive" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "quote", "syn 2.0.101", @@ -4987,8 +4887,8 @@ dependencies = [ [[package]] name = "openvm-native-recursion" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "cfg-if", "itertools 0.14.0", @@ -5015,8 +4915,8 @@ dependencies = [ [[package]] name = "openvm-native-transpiler" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "openvm-instructions", "openvm-transpiler", @@ -5034,24 +4934,24 @@ dependencies = [ "itertools 0.14.0", "num-bigint 0.4.6", "num-traits", - "openvm 1.3.0", - "openvm-algebra-complex-macros 1.3.0", - "openvm-algebra-guest 1.3.0", - "openvm-algebra-moduli-macros 1.3.0", - "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", - "openvm-ecc-guest 1.3.0", - "openvm-ecc-sw-macros 1.3.0", - "openvm-pairing-guest 1.3.0", - "openvm-platform 1.3.0", - "openvm-rv32im-guest 1.3.0", + "openvm", + "openvm-algebra-complex-macros", + "openvm-algebra-guest", + "openvm-algebra-moduli-macros", + "openvm-custom-insn", + "openvm-ecc-guest", + "openvm-ecc-sw-macros", + "openvm-pairing-guest", + "openvm-platform", + "openvm-rv32im-guest", "rand 0.8.5", "serde", ] [[package]] name = "openvm-pairing-circuit" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -5066,10 +4966,10 @@ dependencies = [ "openvm-circuit-primitives", "openvm-circuit-primitives-derive", "openvm-ecc-circuit", - "openvm-ecc-guest 1.2.1-rc.0", + "openvm-ecc-guest", "openvm-instructions", "openvm-mod-circuit-builder", - "openvm-pairing-guest 1.2.1-rc.0", + "openvm-pairing-guest", "openvm-pairing-transpiler", "openvm-rv32-adapters", "openvm-rv32im-circuit", @@ -5079,27 +4979,6 @@ dependencies = [ "strum 0.26.3", ] -[[package]] -name = "openvm-pairing-guest" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" -dependencies = [ - "halo2curves-axiom", - "hex-literal", - "itertools 0.14.0", - "lazy_static", - "num-bigint 0.4.6", - "num-traits", - "openvm 1.2.1-rc.0", - "openvm-algebra-guest 1.2.1-rc.0", - "openvm-algebra-moduli-macros 1.2.1-rc.0", - "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1)", - "openvm-ecc-guest 1.2.1-rc.0", - "rand 0.8.5", - "serde", - "strum_macros 0.26.4", -] - [[package]] name = "openvm-pairing-guest" version = "1.3.0" @@ -5111,11 +4990,11 @@ dependencies = [ "lazy_static", "num-bigint 0.4.6", "num-traits", - "openvm 1.3.0", - "openvm-algebra-guest 1.3.0", - "openvm-algebra-moduli-macros 1.3.0", - "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", - "openvm-ecc-guest 1.3.0", + "openvm", + "openvm-algebra-guest", + "openvm-algebra-moduli-macros", + "openvm-custom-insn", + "openvm-ecc-guest", "rand 0.8.5", "serde", "strum_macros 0.26.4", @@ -5123,42 +5002,32 @@ dependencies = [ [[package]] name = "openvm-pairing-transpiler" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "openvm-instructions", "openvm-instructions-derive", - "openvm-pairing-guest 1.2.1-rc.0", + "openvm-pairing-guest", "openvm-stark-backend", "openvm-transpiler", "rrs-lib", "strum 0.26.3", ] -[[package]] -name = "openvm-platform" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" -dependencies = [ - "libm", - "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1)", - "openvm-rv32im-guest 1.2.1-rc.0", -] - [[package]] name = "openvm-platform" version = "1.3.0" source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "libm", - "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", - "openvm-rv32im-guest 1.3.0", + "openvm-custom-insn", + "openvm-rv32im-guest", ] [[package]] name = "openvm-poseidon2-air" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "derivative", "lazy_static", @@ -5174,8 +5043,8 @@ dependencies = [ [[package]] name = "openvm-rv32-adapters" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "derive-new 0.6.0", "itertools 0.14.0", @@ -5194,8 +5063,8 @@ dependencies = [ [[package]] name = "openvm-rv32im-circuit" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -5215,34 +5084,24 @@ dependencies = [ "strum 0.26.3", ] -[[package]] -name = "openvm-rv32im-guest" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" -dependencies = [ - "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1)", - "p3-field 0.1.0", - "strum_macros 0.26.4", -] - [[package]] name = "openvm-rv32im-guest" version = "1.3.0" source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ - "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-custom-insn", "p3-field 0.1.0", "strum_macros 0.26.4", ] [[package]] name = "openvm-rv32im-transpiler" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "openvm-instructions", "openvm-instructions-derive", - "openvm-rv32im-guest 1.2.1-rc.0", + "openvm-rv32im-guest", "openvm-stark-backend", "openvm-transpiler", "rrs-lib", @@ -5253,8 +5112,8 @@ dependencies = [ [[package]] name = "openvm-sdk" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "async-trait", "bitcode", @@ -5268,7 +5127,7 @@ dependencies = [ "itertools 0.14.0", "metrics", "num-bigint 0.4.6", - "openvm 1.2.1-rc.0", + "openvm", "openvm-algebra-circuit", "openvm-algebra-transpiler", "openvm-bigint-circuit", @@ -5310,14 +5169,14 @@ name = "openvm-sha2" version = "1.3.0" source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ - "openvm-sha256-guest 1.3.0", + "openvm-sha256-guest", "sha2 0.10.9", ] [[package]] name = "openvm-sha256-air" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "openvm-circuit-primitives", "openvm-stark-backend", @@ -5327,8 +5186,8 @@ dependencies = [ [[package]] name = "openvm-sha256-circuit" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -5348,30 +5207,22 @@ dependencies = [ "strum 0.26.3", ] -[[package]] -name = "openvm-sha256-guest" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" -dependencies = [ - "openvm-platform 1.2.1-rc.0", -] - [[package]] name = "openvm-sha256-guest" version = "1.3.0" source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ - "openvm-platform 1.3.0", + "openvm-platform", ] [[package]] name = "openvm-sha256-transpiler" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "openvm-instructions", "openvm-instructions-derive", - "openvm-sha256-guest 1.2.1-rc.0", + "openvm-sha256-guest", "openvm-stark-backend", "openvm-transpiler", "rrs-lib", @@ -5381,7 +5232,7 @@ dependencies = [ [[package]] name = "openvm-stark-backend" version = "1.1.1" -source = "git+https://github.com/openvm-org/stark-backend.git?rev=f48090c9febd021f8ee0349bc929a775fb1fa3ad#f48090c9febd021f8ee0349bc929a775fb1fa3ad" +source = "git+https://github.com/openvm-org/stark-backend.git?tag=v1.1.1#0879de162658b797b8dd6b6ee4429cbb8dd78ba1" dependencies = [ "bitcode", "cfg-if", @@ -5407,7 +5258,7 @@ dependencies = [ [[package]] name = "openvm-stark-sdk" version = "1.1.1" -source = "git+https://github.com/openvm-org/stark-backend.git?rev=f48090c9febd021f8ee0349bc929a775fb1fa3ad#f48090c9febd021f8ee0349bc929a775fb1fa3ad" +source = "git+https://github.com/openvm-org/stark-backend.git?tag=v1.1.1#0879de162658b797b8dd6b6ee4429cbb8dd78ba1" dependencies = [ "derivative", "derive_more 0.99.20", @@ -5442,13 +5293,13 @@ dependencies = [ [[package]] name = "openvm-transpiler" -version = "1.2.1-rc.0" -source = "git+https://github.com/openvm-org/openvm.git?tag=v1.2.1-rc.1#152b6b6c85eda34b367ec261f2f65b0457b9b2d9" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "elf", "eyre", "openvm-instructions", - "openvm-platform 1.2.1-rc.0", + "openvm-platform", "openvm-stark-backend", "rrs-lib", "thiserror 1.0.69", @@ -8367,7 +8218,7 @@ dependencies = [ [[package]] name = "scroll-proving-sdk" version = "0.1.0" -source = "git+https://github.com/scroll-tech/scroll-proving-sdk.git?branch=refactor%2Fscroll#c144015870771db14b1b5d6071e4d3c4e9b48b9c" +source = "git+https://github.com/scroll-tech/scroll-proving-sdk.git?rev=4c36ab2#4c36ab29255481c34beb08ee7c3d8d4f5d7390c2" dependencies = [ "anyhow", "async-trait", @@ -8397,7 +8248,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-prover" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?rev=2ec1303#2ec13036f4cdbbb20d311c4ae379749dfc1da03b" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" dependencies = [ "alloy-primitives", "base64 0.22.1", @@ -8419,8 +8270,8 @@ dependencies = [ "revm 24.0.0", "rkyv", "sbv-primitives", - "scroll-alloy-evm", "scroll-zkvm-types", + "scroll-zkvm-types-batch", "scroll-zkvm-types-chunk", "scroll-zkvm-verifier", "serde", @@ -8435,7 +8286,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-types" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?rev=2ec1303#2ec13036f4cdbbb20d311c4ae379749dfc1da03b" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" dependencies = [ "base64 0.22.1", "bincode", @@ -8457,7 +8308,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-types-base" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?rev=2ec1303#2ec13036f4cdbbb20d311c4ae379749dfc1da03b" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" dependencies = [ "alloy-primitives", "alloy-serde 1.0.16", @@ -8472,17 +8323,17 @@ dependencies = [ [[package]] name = "scroll-zkvm-types-batch" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?rev=2ec1303#2ec13036f4cdbbb20d311c4ae379749dfc1da03b" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" dependencies = [ "alloy-primitives", "halo2curves-axiom", "itertools 0.14.0", - "openvm 1.3.0", - "openvm-ecc-guest 1.3.0", + "openvm", + "openvm-ecc-guest", "openvm-pairing", - "openvm-pairing-guest 1.3.0", + "openvm-pairing-guest", "openvm-sha2", - "openvm-sha256-guest 1.3.0", + "openvm-sha256-guest", "rkyv", "scroll-zkvm-types-base", "serde", @@ -8492,7 +8343,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-types-bundle" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?rev=2ec1303#2ec13036f4cdbbb20d311c4ae379749dfc1da03b" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" dependencies = [ "alloy-primitives", "itertools 0.14.0", @@ -8505,13 +8356,13 @@ dependencies = [ [[package]] name = "scroll-zkvm-types-chunk" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?rev=2ec1303#2ec13036f4cdbbb20d311c4ae379749dfc1da03b" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" dependencies = [ "alloy-primitives", "itertools 0.14.0", - "openvm 1.3.0", - "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", - "openvm-rv32im-guest 1.3.0", + "openvm", + "openvm-custom-insn", + "openvm-rv32im-guest", "revm-precompile 21.0.0 (git+https://github.com/scroll-tech/revm?branch=feat%2Freth-v74)", "rkyv", "sbv-core", @@ -8525,11 +8376,12 @@ dependencies = [ [[package]] name = "scroll-zkvm-verifier" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?rev=2ec1303#2ec13036f4cdbbb20d311c4ae379749dfc1da03b" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" dependencies = [ "bincode", "eyre", "itertools 0.14.0", + "once_cell", "openvm-circuit", "openvm-continuations", "openvm-native-circuit", @@ -8541,6 +8393,7 @@ dependencies = [ "serde", "serde_json", "snark-verifier-sdk", + "tracing", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index a9630f5b09..956550ee79 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,9 +17,9 @@ repository = "https://github.com/scroll-tech/scroll" version = "4.5.8" [workspace.dependencies] -scroll-zkvm-prover = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "2ec1303" } -scroll-zkvm-verifier = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "2ec1303" } -scroll-zkvm-types = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "2ec1303" } +scroll-zkvm-prover = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "d871af1" } +scroll-zkvm-verifier = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "d871af1" } +scroll-zkvm-types = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "d871af1" } sbv-primitives = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "chore/openvm-1.3", features = ["scroll"] } sbv-utils = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "chore/openvm-1.3" } diff --git a/crates/libzkp/src/proofs.rs b/crates/libzkp/src/proofs.rs index eaa5f0f3f2..5311360a38 100644 --- a/crates/libzkp/src/proofs.rs +++ b/crates/libzkp/src/proofs.rs @@ -7,7 +7,7 @@ use scroll_zkvm_types::{ batch::BatchInfo, bundle::BundleInfo, chunk::ChunkInfo, - proof::{EvmProof, OpenVmEvmProof, ProofEnum, RootProof}, + proof::{EvmProof, OpenVmEvmProof, ProofEnum, StarkProof}, public_inputs::{ForkName, MultiVersionPublicInputs}, types_agg::{AggregationInput, ProgramCommitment}, utils::vec_as_base64, @@ -40,7 +40,7 @@ pub struct WrappedProof { } pub trait AsRootProof { - fn as_root_proof(&self) -> &RootProof; + fn as_root_proof(&self) -> &StarkProof; } pub trait AsEvmProof { @@ -61,17 +61,17 @@ pub type BatchProof = WrappedProof; pub type BundleProof = WrappedProof; impl AsRootProof for ChunkProof { - fn as_root_proof(&self) -> &RootProof { + fn as_root_proof(&self) -> &StarkProof { self.proof - .as_root_proof() + .as_stark_proof() .expect("batch proof use root proof") } } impl AsRootProof for BatchProof { - fn as_root_proof(&self) -> &RootProof { + fn as_root_proof(&self) -> &StarkProof { self.proof - .as_root_proof() + .as_stark_proof() .expect("batch proof use root proof") } } diff --git a/crates/libzkp/src/tasks/batch.rs b/crates/libzkp/src/tasks/batch.rs index 7945464201..1e55d6b988 100644 --- a/crates/libzkp/src/tasks/batch.rs +++ b/crates/libzkp/src/tasks/batch.rs @@ -91,7 +91,7 @@ impl TryFrom for ProvingTask { aggregated_proofs: value .chunk_proofs .into_iter() - .map(|w_proof| w_proof.proof.into_root_proof().expect("expect root proof")) + .map(|w_proof| w_proof.proof.into_stark_proof().expect("expect root proof")) .collect(), serialized_witness: vec![to_rkyv_bytes::(&witness)?.into_vec()], vk: Vec::new(), diff --git a/crates/libzkp/src/tasks/bundle.rs b/crates/libzkp/src/tasks/bundle.rs index 66aceaf3e2..a70d767f86 100644 --- a/crates/libzkp/src/tasks/bundle.rs +++ b/crates/libzkp/src/tasks/bundle.rs @@ -81,7 +81,7 @@ impl TryFrom for ProvingTask { aggregated_proofs: value .batch_proofs .into_iter() - .map(|w_proof| w_proof.proof.into_root_proof().expect("expect root proof")) + .map(|w_proof| w_proof.proof.into_stark_proof().expect("expect root proof")) .collect(), serialized_witness: vec![witness.rkyv_serialize(None)?.to_vec()], vk: Vec::new(), diff --git a/crates/libzkp/src/verifier/universal.rs b/crates/libzkp/src/verifier/universal.rs index fc625a463b..fb9311be04 100644 --- a/crates/libzkp/src/verifier/universal.rs +++ b/crates/libzkp/src/verifier/universal.rs @@ -18,11 +18,9 @@ pub struct Verifier { impl Verifier { pub fn new(assets_dir: &str, fork: ForkName) -> Self { let verifier_bin = Path::new(assets_dir).join("verifier.bin"); - let config = Path::new(assets_dir).join("root-verifier-vm-config"); - let exe = Path::new(assets_dir).join("root-verifier-committed-exe"); Self { - verifier: UniversalVerifier::setup(&config, &exe, &verifier_bin) + verifier: UniversalVerifier::setup(&verifier_bin) .expect("Setting up chunk verifier"), fork, } @@ -34,32 +32,25 @@ impl ProofVerifier for Verifier { panic_catch(|| match task_type { TaskType::Chunk => { let proof = serde_json::from_slice::(proof).unwrap(); - if !proof.pi_hash_check(self.fork) { - return false; - } - self.verifier - .verify_proof(proof.as_root_proof(), &proof.vk) + assert!(proof.pi_hash_check(self.fork)); + UniversalVerifier::verify_stark_proof(proof.as_root_proof(), &proof.vk) .unwrap() } TaskType::Batch => { let proof = serde_json::from_slice::(proof).unwrap(); - if !proof.pi_hash_check(self.fork) { - return false; - } - self.verifier - .verify_proof(proof.as_root_proof(), &proof.vk) + assert!(proof.pi_hash_check(self.fork)); + UniversalVerifier::verify_stark_proof(proof.as_root_proof(), &proof.vk) .unwrap() } TaskType::Bundle => { let proof = serde_json::from_slice::(proof).unwrap(); - if !proof.pi_hash_check(self.fork) { - return false; - } + assert!(proof.pi_hash_check(self.fork)); let vk = proof.vk.clone(); let evm_proof = proof.into_evm_proof(); - self.verifier.verify_proof_evm(&evm_proof, &vk).unwrap() + self.verifier.verify_evm_proof(&evm_proof, &vk).unwrap() } }) + .map(|_|true) .map_err(|err_str: String| eyre::eyre!("{err_str}")) } diff --git a/crates/prover-bin/Cargo.toml b/crates/prover-bin/Cargo.toml index e7612666a6..3d5abe5856 100644 --- a/crates/prover-bin/Cargo.toml +++ b/crates/prover-bin/Cargo.toml @@ -8,7 +8,7 @@ edition.workspace = true [dependencies] scroll-zkvm-types.workspace = true scroll-zkvm-prover.workspace = true -scroll-proving-sdk = { git = "https://github.com/scroll-tech/scroll-proving-sdk.git", branch = "refactor/scroll" } +scroll-proving-sdk = { git = "https://github.com/scroll-tech/scroll-proving-sdk.git", rev = "4c36ab2" } serde.workspace = true serde_json.workspace = true once_cell.workspace =true diff --git a/crates/prover-bin/src/zk_circuits_handler.rs b/crates/prover-bin/src/zk_circuits_handler.rs index 1ff16b5659..78c6b4c0da 100644 --- a/crates/prover-bin/src/zk_circuits_handler.rs +++ b/crates/prover-bin/src/zk_circuits_handler.rs @@ -26,12 +26,10 @@ pub(crate) enum Phase { impl Phase { pub fn phase_spec_chunk(&self, workspace_path: &Path) -> ProverConfig { - let dir_cache = Some(workspace_path.join("cache")); let path_app_exe = workspace_path.join("chunk/app.vmexe"); let path_app_config = workspace_path.join("chunk/openvm.toml"); let segment_len = Some((1 << 22) - 100); ProverConfig { - dir_cache, path_app_config, path_app_exe, segment_len, @@ -40,12 +38,10 @@ impl Phase { } pub fn phase_spec_batch(&self, workspace_path: &Path) -> ProverConfig { - let dir_cache = Some(workspace_path.join("cache")); let path_app_exe = workspace_path.join("batch/app.vmexe"); let path_app_config = workspace_path.join("batch/openvm.toml"); let segment_len = Some((1 << 22) - 100); ProverConfig { - dir_cache, path_app_config, path_app_exe, segment_len, @@ -54,11 +50,9 @@ impl Phase { } pub fn phase_spec_bundle(&self, workspace_path: &Path) -> ProverConfig { - let dir_cache = Some(workspace_path.join("cache")); let path_app_config = workspace_path.join("bundle/openvm.toml"); let segment_len = Some((1 << 22) - 100); ProverConfig { - dir_cache, path_app_config, segment_len, path_app_exe: workspace_path.join("bundle/app.vmexe"), diff --git a/crates/prover-bin/src/zk_circuits_handler/universal.rs b/crates/prover-bin/src/zk_circuits_handler/universal.rs index c417d8cf2c..0ba54bd9e2 100644 --- a/crates/prover-bin/src/zk_circuits_handler/universal.rs +++ b/crates/prover-bin/src/zk_circuits_handler/universal.rs @@ -16,12 +16,10 @@ unsafe impl Send for UniversalHandler {} impl UniversalHandler { pub fn new(workspace_path: impl AsRef, proof_type: ProofType) -> Result { - let dir_cache = Some(workspace_path.as_ref().join("cache")); let path_app_exe = workspace_path.as_ref().join("app.vmexe"); let path_app_config = workspace_path.as_ref().join("openvm.toml"); let segment_len = Some((1 << 22) - 100); let config = ProverConfig { - dir_cache, path_app_config, path_app_exe, segment_len, @@ -70,7 +68,6 @@ impl CircuitsHandler for Mutex { ) } - // let use_evm = prove_request.proof_type == ProofType::Bundle; let proof = handler_self .get_prover() .gen_proof_universal(u_task, need_snark)?; From e4bd639565628c8cfd700f86dc85107a7a0996ae Mon Sep 17 00:00:00 2001 From: Ho Date: Mon, 18 Aug 2025 22:36:25 +0900 Subject: [PATCH 07/22] remove "dump" util, fmt and clippy --- crates/libzkp/src/verifier/universal.rs | 11 ++- crates/prover-bin/src/main.rs | 11 --- crates/prover-bin/src/prover.rs | 55 +-------------- crates/prover-bin/src/zk_circuits_handler.rs | 46 ------------- .../src/zk_circuits_handler/assets.rs | 67 ------------------- .../src/zk_circuits_handler/universal.rs | 1 - 6 files changed, 5 insertions(+), 186 deletions(-) delete mode 100644 crates/prover-bin/src/zk_circuits_handler/assets.rs diff --git a/crates/libzkp/src/verifier/universal.rs b/crates/libzkp/src/verifier/universal.rs index fb9311be04..07e7c54cd9 100644 --- a/crates/libzkp/src/verifier/universal.rs +++ b/crates/libzkp/src/verifier/universal.rs @@ -20,8 +20,7 @@ impl Verifier { let verifier_bin = Path::new(assets_dir).join("verifier.bin"); Self { - verifier: UniversalVerifier::setup(&verifier_bin) - .expect("Setting up chunk verifier"), + verifier: UniversalVerifier::setup(&verifier_bin).expect("Setting up chunk verifier"), fork, } } @@ -33,14 +32,12 @@ impl ProofVerifier for Verifier { TaskType::Chunk => { let proof = serde_json::from_slice::(proof).unwrap(); assert!(proof.pi_hash_check(self.fork)); - UniversalVerifier::verify_stark_proof(proof.as_root_proof(), &proof.vk) - .unwrap() + UniversalVerifier::verify_stark_proof(proof.as_root_proof(), &proof.vk).unwrap() } TaskType::Batch => { let proof = serde_json::from_slice::(proof).unwrap(); assert!(proof.pi_hash_check(self.fork)); - UniversalVerifier::verify_stark_proof(proof.as_root_proof(), &proof.vk) - .unwrap() + UniversalVerifier::verify_stark_proof(proof.as_root_proof(), &proof.vk).unwrap() } TaskType::Bundle => { let proof = serde_json::from_slice::(proof).unwrap(); @@ -50,7 +47,7 @@ impl ProofVerifier for Verifier { self.verifier.verify_evm_proof(&evm_proof, &vk).unwrap() } }) - .map(|_|true) + .map(|_| true) .map_err(|err_str: String| eyre::eyre!("{err_str}")) } diff --git a/crates/prover-bin/src/main.rs b/crates/prover-bin/src/main.rs index 1fb13e7590..07c299a1e6 100644 --- a/crates/prover-bin/src/main.rs +++ b/crates/prover-bin/src/main.rs @@ -34,11 +34,6 @@ struct Args { #[derive(Subcommand, Debug)] enum Commands { - /// Dump vk of this prover - Dump { - /// path to save the verifier's asset - asset_path: String, - }, Handle { /// path to save the verifier's asset task_path: String, @@ -64,16 +59,10 @@ async fn main() -> eyre::Result<()> { } let cfg = LocalProverConfig::from_file(args.config_file)?; - let default_fork_name = cfg.circuits.keys().next().unwrap().clone(); let sdk_config = cfg.sdk_config.clone(); let local_prover = LocalProver::new(cfg.clone()); match args.command { - Some(Commands::Dump { asset_path }) => { - let fork_name = args.fork_name.unwrap_or(default_fork_name); - println!("dump assets for {fork_name} into {asset_path}"); - local_prover.dump_verifier_assets(&fork_name, asset_path.as_ref())?; - } Some(Commands::Handle { task_path }) => { let file = File::open(Path::new(&task_path))?; let reader = BufReader::new(file); diff --git a/crates/prover-bin/src/prover.rs b/crates/prover-bin/src/prover.rs index 5a22c8a126..170277bb76 100644 --- a/crates/prover-bin/src/prover.rs +++ b/crates/prover-bin/src/prover.rs @@ -1,6 +1,4 @@ -use crate::zk_circuits_handler::{ - assets::AssetsHandler, universal::UniversalHandler, CircuitsHandler, -}; +use crate::zk_circuits_handler::{universal::UniversalHandler, CircuitsHandler}; use async_trait::async_trait; use eyre::Result; use scroll_proving_sdk::{ @@ -333,55 +331,4 @@ impl LocalProver { ..Default::default() }) } - - pub fn dump_verifier_assets(&self, hard_fork_name: &str, out_path: &Path) -> Result<()> { - let config = self - .config - .circuits - .get(hard_fork_name) - .ok_or_else(|| eyre::eyre!("no corresponding config for fork {hard_fork_name}"))?; - - if !config.vks.is_empty() { - eyre::bail!("clean vks cache first or we will have wrong dumped vk"); - } - - let workspace_path = &config.workspace_path; - let universal_prover = AssetsHandler::new(config); - let _ = universal_prover - .get_evm_prover() - .dump_universal_verifier(Some(out_path))?; - - #[derive(Debug, serde::Serialize)] - struct VKDump { - pub chunk_vk: String, - pub batch_vk: String, - pub bundle_vk: String, - } - - let dump = VKDump { - chunk_vk: universal_prover.get_vk_and_cache(ProofType::Chunk), - batch_vk: universal_prover.get_vk_and_cache(ProofType::Batch), - bundle_vk: universal_prover.get_vk_and_cache(ProofType::Bundle), - }; - - let f = File::create(out_path.join("openVmVk.json"))?; - serde_json::to_writer(f, &dump)?; - - // Copy verifier.bin from workspace bundle directory to output path - let bundle_verifier_path = Path::new(workspace_path) - .join("bundle") - .join("verifier.bin"); - if bundle_verifier_path.exists() { - let dest_path = out_path.join("verifier.bin"); - std::fs::copy(&bundle_verifier_path, &dest_path) - .map_err(|e| eyre::eyre!("Failed to copy verifier.bin: {}", e))?; - } else { - eprintln!( - "Warning: verifier.bin not found at {:?}", - bundle_verifier_path - ); - } - - Ok(()) - } } diff --git a/crates/prover-bin/src/zk_circuits_handler.rs b/crates/prover-bin/src/zk_circuits_handler.rs index 78c6b4c0da..494a5a4fbd 100644 --- a/crates/prover-bin/src/zk_circuits_handler.rs +++ b/crates/prover-bin/src/zk_circuits_handler.rs @@ -2,14 +2,10 @@ #[allow(non_snake_case)] pub mod universal; -// keep an old handler for utilities on assets -pub mod assets; use async_trait::async_trait; use eyre::Result; -use scroll_zkvm_prover::ProverConfig; use scroll_zkvm_types::ProvingTask; -use std::path::Path; #[async_trait] pub trait CircuitsHandler: Sync + Send { @@ -18,45 +14,3 @@ pub trait CircuitsHandler: Sync + Send { async fn get_proof_data(&self, u_task: &ProvingTask, need_snark: bool) -> Result; } - -#[derive(Clone, Copy)] -pub(crate) enum Phase { - EuclidV2, -} - -impl Phase { - pub fn phase_spec_chunk(&self, workspace_path: &Path) -> ProverConfig { - let path_app_exe = workspace_path.join("chunk/app.vmexe"); - let path_app_config = workspace_path.join("chunk/openvm.toml"); - let segment_len = Some((1 << 22) - 100); - ProverConfig { - path_app_config, - path_app_exe, - segment_len, - ..Default::default() - } - } - - pub fn phase_spec_batch(&self, workspace_path: &Path) -> ProverConfig { - let path_app_exe = workspace_path.join("batch/app.vmexe"); - let path_app_config = workspace_path.join("batch/openvm.toml"); - let segment_len = Some((1 << 22) - 100); - ProverConfig { - path_app_config, - path_app_exe, - segment_len, - ..Default::default() - } - } - - pub fn phase_spec_bundle(&self, workspace_path: &Path) -> ProverConfig { - let path_app_config = workspace_path.join("bundle/openvm.toml"); - let segment_len = Some((1 << 22) - 100); - ProverConfig { - path_app_config, - segment_len, - path_app_exe: workspace_path.join("bundle/app.vmexe"), - ..Default::default() - } - } -} diff --git a/crates/prover-bin/src/zk_circuits_handler/assets.rs b/crates/prover-bin/src/zk_circuits_handler/assets.rs deleted file mode 100644 index 6d4415d7e9..0000000000 --- a/crates/prover-bin/src/zk_circuits_handler/assets.rs +++ /dev/null @@ -1,67 +0,0 @@ -use std::{collections::HashMap, path::Path, sync::OnceLock}; - -use super::Phase; -use crate::prover::CircuitConfig; -use base64::{prelude::BASE64_STANDARD, Engine}; -use scroll_proving_sdk::prover::ProofType; -use scroll_zkvm_prover::Prover; -pub struct AssetsHandler { - chunk_prover: Prover, - batch_prover: Prover, - bundle_prover: Prover, - cached_vks: HashMap>, -} - -impl AssetsHandler { - pub fn new(cfg: &CircuitConfig) -> Self { - let workspace_path = &cfg.workspace_path; - let p = Phase::EuclidV2; - let workspace_path = Path::new(workspace_path); - let chunk_prover = Prover::setup(p.phase_spec_chunk(workspace_path), false, None) - .expect("Failed to setup chunk prover"); - - let batch_prover = Prover::setup(p.phase_spec_batch(workspace_path), false, None) - .expect("Failed to setup batch prover"); - - let bundle_prover = Prover::setup(p.phase_spec_bundle(workspace_path), true, None) - .expect("Failed to setup bundle prover"); - - let build_vk_cache = |proof_type: ProofType| { - let vk = if let Some(vk) = cfg.vks.get(&proof_type) { - OnceLock::from(vk.clone()) - } else { - OnceLock::new() - }; - (proof_type, vk) - }; - - Self { - chunk_prover, - batch_prover, - bundle_prover, - cached_vks: HashMap::from([ - build_vk_cache(ProofType::Chunk), - build_vk_cache(ProofType::Batch), - build_vk_cache(ProofType::Bundle), - ]), - } - } - - /// get the inner prover for evm - pub fn get_evm_prover(&self) -> &Prover { - &self.bundle_prover - } - - pub fn get_vk_and_cache(&self, task_type: ProofType) -> String { - match task_type { - ProofType::Chunk => self.cached_vks[&ProofType::Chunk] - .get_or_init(|| BASE64_STANDARD.encode(self.chunk_prover.get_app_vk())), - ProofType::Batch => self.cached_vks[&ProofType::Batch] - .get_or_init(|| BASE64_STANDARD.encode(self.batch_prover.get_app_vk())), - ProofType::Bundle => self.cached_vks[&ProofType::Bundle] - .get_or_init(|| BASE64_STANDARD.encode(self.bundle_prover.get_app_vk())), - _ => unreachable!("Unsupported proof type {:?}", task_type), - } - .clone() - } -} diff --git a/crates/prover-bin/src/zk_circuits_handler/universal.rs b/crates/prover-bin/src/zk_circuits_handler/universal.rs index 0ba54bd9e2..240ba766cd 100644 --- a/crates/prover-bin/src/zk_circuits_handler/universal.rs +++ b/crates/prover-bin/src/zk_circuits_handler/universal.rs @@ -23,7 +23,6 @@ impl UniversalHandler { path_app_config, path_app_exe, segment_len, - ..Default::default() }; let use_evm = proof_type == ProofType::Bundle; From 47bcca34e8c37f0698b2f040ad32f242b0c5a854 Mon Sep 17 00:00:00 2001 From: Ho Date: Mon, 18 Aug 2025 22:37:56 +0900 Subject: [PATCH 08/22] purge deprecated entry --- zkvm-prover/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/zkvm-prover/Makefile b/zkvm-prover/Makefile index 412d6bee97..3479743edf 100644 --- a/zkvm-prover/Makefile +++ b/zkvm-prover/Makefile @@ -63,6 +63,4 @@ test_run: $(CIRCUIT_STUFF) test_e2e_run: $(CIRCUIT_STUFF) ${E2E_HANDLE_SET} GO_TAG=${GO_TAG} GIT_REV=${GIT_REV} ZK_VERSION=${ZK_VERSION} cargo run --release -p prover -- --config ./config.json handle ${E2E_HANDLE_SET} -gen_verifier_stuff: - mkdir -p ${DUMP_DIR} - GO_TAG=${GO_TAG} GIT_REV=${GIT_REV} ZK_VERSION=${ZK_VERSION} cargo run --release -p prover -- --config ./config.json --forkname feynman dump ${DUMP_DIR} + From 072475a00f02780e0c599be72948a25d82186156 Mon Sep 17 00:00:00 2001 From: Ho Date: Mon, 18 Aug 2025 22:39:04 +0900 Subject: [PATCH 09/22] update gpu build lock --- crates/gpu_override/Cargo.lock | 83 +++++++++++++++++++++------------- 1 file changed, 52 insertions(+), 31 deletions(-) diff --git a/crates/gpu_override/Cargo.lock b/crates/gpu_override/Cargo.lock index fb54a1bf1e..e0a8023019 100644 --- a/crates/gpu_override/Cargo.lock +++ b/crates/gpu_override/Cargo.lock @@ -4587,13 +4587,13 @@ dependencies = [ [[package]] name = "openvm" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=4973d38cb3f2e14ebdd59e03802e65bb657ee422#4973d38cb3f2e14ebdd59e03802e65bb657ee422" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "bytemuck", "getrandom 0.2.16", "getrandom 0.3.3", "num-bigint 0.4.6", - "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=4973d38cb3f2e14ebdd59e03802e65bb657ee422)", + "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "openvm-platform 1.3.0", "openvm-rv32im-guest 1.3.0", "serde", @@ -4641,7 +4641,7 @@ dependencies = [ [[package]] name = "openvm-algebra-complex-macros" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=4973d38cb3f2e14ebdd59e03802e65bb657ee422#4973d38cb3f2e14ebdd59e03802e65bb657ee422" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "openvm-macros-common 1.3.0", "quote", @@ -4667,14 +4667,14 @@ dependencies = [ [[package]] name = "openvm-algebra-guest" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=4973d38cb3f2e14ebdd59e03802e65bb657ee422#4973d38cb3f2e14ebdd59e03802e65bb657ee422" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "halo2curves-axiom", "num-bigint 0.4.6", "once_cell", "openvm-algebra-complex-macros 1.3.0", "openvm-algebra-moduli-macros 1.3.0", - "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=4973d38cb3f2e14ebdd59e03802e65bb657ee422)", + "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "openvm-rv32im-guest 1.3.0", "serde-big-array", "strum_macros 0.26.4", @@ -4695,7 +4695,7 @@ dependencies = [ [[package]] name = "openvm-algebra-moduli-macros" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=4973d38cb3f2e14ebdd59e03802e65bb657ee422#4973d38cb3f2e14ebdd59e03802e65bb657ee422" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "num-bigint 0.4.6", "num-prime", @@ -4870,7 +4870,7 @@ dependencies = [ [[package]] name = "openvm-custom-insn" version = "0.1.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=4973d38cb3f2e14ebdd59e03802e65bb657ee422#4973d38cb3f2e14ebdd59e03802e65bb657ee422" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "proc-macro2", "quote", @@ -4929,7 +4929,7 @@ dependencies = [ [[package]] name = "openvm-ecc-guest" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=4973d38cb3f2e14ebdd59e03802e65bb657ee422#4973d38cb3f2e14ebdd59e03802e65bb657ee422" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "ecdsa", "elliptic-curve", @@ -4938,7 +4938,7 @@ dependencies = [ "once_cell", "openvm 1.3.0", "openvm-algebra-guest 1.3.0", - "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=4973d38cb3f2e14ebdd59e03802e65bb657ee422)", + "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "openvm-ecc-sw-macros 1.3.0", "openvm-rv32im-guest 1.3.0", "serde", @@ -4958,7 +4958,7 @@ dependencies = [ [[package]] name = "openvm-ecc-sw-macros" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=4973d38cb3f2e14ebdd59e03802e65bb657ee422#4973d38cb3f2e14ebdd59e03802e65bb657ee422" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "openvm-macros-common 1.3.0", "quote", @@ -5064,7 +5064,7 @@ dependencies = [ [[package]] name = "openvm-macros-common" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=4973d38cb3f2e14ebdd59e03802e65bb657ee422#4973d38cb3f2e14ebdd59e03802e65bb657ee422" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "syn 2.0.101", ] @@ -5189,7 +5189,7 @@ dependencies = [ [[package]] name = "openvm-pairing" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=4973d38cb3f2e14ebdd59e03802e65bb657ee422#4973d38cb3f2e14ebdd59e03802e65bb657ee422" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "group 0.13.0", "halo2curves-axiom", @@ -5201,7 +5201,7 @@ dependencies = [ "openvm-algebra-complex-macros 1.3.0", "openvm-algebra-guest 1.3.0", "openvm-algebra-moduli-macros 1.3.0", - "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=4973d38cb3f2e14ebdd59e03802e65bb657ee422)", + "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "openvm-ecc-guest 1.3.0", "openvm-ecc-sw-macros 1.3.0", "openvm-pairing-guest 1.3.0", @@ -5266,7 +5266,7 @@ dependencies = [ [[package]] name = "openvm-pairing-guest" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=4973d38cb3f2e14ebdd59e03802e65bb657ee422#4973d38cb3f2e14ebdd59e03802e65bb657ee422" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "halo2curves-axiom", "hex-literal", @@ -5277,7 +5277,7 @@ dependencies = [ "openvm 1.3.0", "openvm-algebra-guest 1.3.0", "openvm-algebra-moduli-macros 1.3.0", - "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=4973d38cb3f2e14ebdd59e03802e65bb657ee422)", + "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "openvm-ecc-guest 1.3.0", "rand 0.8.5", "serde", @@ -5311,10 +5311,10 @@ dependencies = [ [[package]] name = "openvm-platform" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=4973d38cb3f2e14ebdd59e03802e65bb657ee422#4973d38cb3f2e14ebdd59e03802e65bb657ee422" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "libm", - "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=4973d38cb3f2e14ebdd59e03802e65bb657ee422)", + "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "openvm-rv32im-guest 1.3.0", ] @@ -5391,9 +5391,9 @@ dependencies = [ [[package]] name = "openvm-rv32im-guest" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=4973d38cb3f2e14ebdd59e03802e65bb657ee422#4973d38cb3f2e14ebdd59e03802e65bb657ee422" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ - "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=4973d38cb3f2e14ebdd59e03802e65bb657ee422)", + "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "p3-field 0.1.0", "strum_macros 0.26.4", ] @@ -5471,7 +5471,7 @@ dependencies = [ [[package]] name = "openvm-sha2" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=4973d38cb3f2e14ebdd59e03802e65bb657ee422#4973d38cb3f2e14ebdd59e03802e65bb657ee422" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "openvm-sha256-guest 1.3.0", "sha2 0.10.9", @@ -5522,7 +5522,7 @@ dependencies = [ [[package]] name = "openvm-sha256-guest" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=4973d38cb3f2e14ebdd59e03802e65bb657ee422#4973d38cb3f2e14ebdd59e03802e65bb657ee422" +source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "openvm-platform 1.3.0", ] @@ -6609,6 +6609,7 @@ dependencies = [ "ctor", "eyre", "futures", + "futures-util", "hex", "http 1.3.1", "once_cell", @@ -7047,6 +7048,7 @@ dependencies = [ "url", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", "webpki-roots 1.0.0", ] @@ -8662,7 +8664,7 @@ dependencies = [ [[package]] name = "scroll-proving-sdk" version = "0.1.0" -source = "git+https://github.com/scroll-tech/scroll-proving-sdk.git?branch=refactor%2Fscroll#c144015870771db14b1b5d6071e4d3c4e9b48b9c" +source = "git+https://github.com/scroll-tech/scroll-proving-sdk.git?rev=4c36ab2#4c36ab29255481c34beb08ee7c3d8d4f5d7390c2" dependencies = [ "anyhow", "async-trait", @@ -8692,7 +8694,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-prover" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?tag=v0.5.0rc1#0eb4c11df4909dc6096dfc98875038385578264a" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" dependencies = [ "alloy-primitives", "base64 0.22.1", @@ -8714,8 +8716,8 @@ dependencies = [ "revm 24.0.0", "rkyv", "sbv-primitives", - "scroll-alloy-evm", "scroll-zkvm-types", + "scroll-zkvm-types-batch", "scroll-zkvm-types-chunk", "scroll-zkvm-verifier", "serde", @@ -8730,15 +8732,17 @@ dependencies = [ [[package]] name = "scroll-zkvm-types" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?tag=v0.5.0rc1#0eb4c11df4909dc6096dfc98875038385578264a" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" dependencies = [ "base64 0.22.1", "bincode", + "c-kzg", "openvm-continuations", "openvm-native-recursion", "openvm-sdk", "openvm-stark-sdk", "rkyv", + "sbv-primitives", "scroll-zkvm-types-base", "scroll-zkvm-types-batch", "scroll-zkvm-types-bundle", @@ -8750,7 +8754,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-types-base" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?tag=v0.5.0rc1#0eb4c11df4909dc6096dfc98875038385578264a" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" dependencies = [ "alloy-primitives", "alloy-serde 1.0.16", @@ -8765,7 +8769,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-types-batch" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?tag=v0.5.0rc1#0eb4c11df4909dc6096dfc98875038385578264a" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" dependencies = [ "alloy-primitives", "halo2curves-axiom", @@ -8785,7 +8789,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-types-bundle" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?tag=v0.5.0rc1#0eb4c11df4909dc6096dfc98875038385578264a" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" dependencies = [ "alloy-primitives", "itertools 0.14.0", @@ -8798,12 +8802,12 @@ dependencies = [ [[package]] name = "scroll-zkvm-types-chunk" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?tag=v0.5.0rc1#0eb4c11df4909dc6096dfc98875038385578264a" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" dependencies = [ "alloy-primitives", "itertools 0.14.0", "openvm 1.3.0", - "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=4973d38cb3f2e14ebdd59e03802e65bb657ee422)", + "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "openvm-rv32im-guest 1.3.0", "revm-precompile 21.0.0 (git+https://github.com/scroll-tech/revm?branch=feat%2Freth-v74)", "rkyv", @@ -8818,11 +8822,12 @@ dependencies = [ [[package]] name = "scroll-zkvm-verifier" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?tag=v0.5.0rc1#0eb4c11df4909dc6096dfc98875038385578264a" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" dependencies = [ "bincode", "eyre", "itertools 0.14.0", + "once_cell", "openvm-circuit", "openvm-continuations", "openvm-native-circuit", @@ -8832,7 +8837,9 @@ dependencies = [ "revm 24.0.0", "scroll-zkvm-types", "serde", + "serde_json", "snark-verifier-sdk", + "tracing", ] [[package]] @@ -10237,6 +10244,7 @@ dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] [[package]] @@ -10414,6 +10422,19 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "wasm-streams" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "wasm-timer" version = "0.2.5" From e325b829b9b6e3bd62b1630d93f4cafc54bd1551 Mon Sep 17 00:00:00 2001 From: Ho Date: Tue, 19 Aug 2025 19:37:19 +0900 Subject: [PATCH 10/22] fixings for updating vk to hexstring --- .../internal/logic/verifier/verifier.go | 24 ++++++++++++++++--- crates/prover-bin/src/prover.rs | 17 +++++-------- crates/prover-bin/src/zk_circuits_handler.rs | 2 -- .../src/zk_circuits_handler/universal.rs | 3 --- zkvm-prover/Makefile | 10 ++------ 5 files changed, 29 insertions(+), 27 deletions(-) diff --git a/coordinator/internal/logic/verifier/verifier.go b/coordinator/internal/logic/verifier/verifier.go index c2ad5d7db0..05800fb538 100644 --- a/coordinator/internal/logic/verifier/verifier.go +++ b/coordinator/internal/logic/verifier/verifier.go @@ -4,6 +4,7 @@ package verifier import ( "encoding/base64" + "encoding/hex" "encoding/json" "fmt" "io" @@ -129,6 +130,23 @@ const blocked_vks = ` D6YFHwTLZF/U2zpYJPQ3LwJZRm85yA5Vq2iFBqd3Mk4iwOUpS8sbOp3vg2+NDxhhKphgYpuUlykpdsoRhEt+cw==, ` +// tries to decode s as hex, and if that fails, as base64. +func decodeVkString(s string) ([]byte, error) { + // Try hex decoding first + if b, err := hex.DecodeString(s); err == nil { + return b, nil + } + // Fallback to base64 decoding + b, err := base64.StdEncoding.DecodeString(s) + if err != nil { + return nil, err + } + if len(b) == 0 { + return nil, fmt.Errorf("decode vk string %s fail (empty bytes)", s) + } + return b, nil +} + func (v *Verifier) loadOpenVMVks(cfg config.AssetConfig) error { vkFileName := cfg.Vkfile @@ -165,17 +183,17 @@ func (v *Verifier) loadOpenVMVks(cfg config.AssetConfig) error { v.OpenVMVkMap[dump.Bundle] = struct{}{} log.Info("Load vks", "from", cfg.AssetsPath, "chunk", dump.Chunk, "batch", dump.Batch, "bundle", dump.Bundle) - decodedBytes, err := base64.StdEncoding.DecodeString(dump.Chunk) + decodedBytes, err := decodeVkString(dump.Chunk) if err != nil { return err } v.ChunkVk[cfg.ForkName] = decodedBytes - decodedBytes, err = base64.StdEncoding.DecodeString(dump.Batch) + decodedBytes, err = decodeVkString(dump.Batch) if err != nil { return err } v.BatchVk[cfg.ForkName] = decodedBytes - decodedBytes, err = base64.StdEncoding.DecodeString(dump.Bundle) + decodedBytes, err = decodeVkString(dump.Bundle) if err != nil { return err } diff --git a/crates/prover-bin/src/prover.rs b/crates/prover-bin/src/prover.rs index 170277bb76..24030313b2 100644 --- a/crates/prover-bin/src/prover.rs +++ b/crates/prover-bin/src/prover.rs @@ -229,15 +229,15 @@ impl ProvingService for LocalProver { static GLOBAL_ASSET_URLS_FEYNMAN: LazyLock> = LazyLock::new(|| { HashMap::from([ ( - "to/cPyilzgBigJgN9wzTRH5WkT5bymBUYDuoXweUwjpmGOolp5kYRbvF/VcWcO5HN5ujGs6S00W8pZcCoNQRLQ==".to_string(), + "b68fdc3f28a5ce006280980df70cd3447e56913e5bca6054603ba85f0794c23a6618ea25a7991845bbc5fd571670ee47379ba31ace92d345bca59702a0d4112d".to_string(), url::Url::parse("https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/0.5.2/chunk/").unwrap(), ), ( - "mj9mNw8R4zA/GhJIkhAlEE6DJT7+pDpw0iHPThX8FFvyvi9EaNGsSnDnaCurscYEF+IcdjPUtVtY9EcD7IKwWg==".to_string(), + "9a3f66370f11e3303f1a1248921025104e83253efea43a70d221cf4e15fc145bf2be2f4468d1ac4a70e7682babb1c60417e21c7633d4b55b58f44703ec82b05a".to_string(), url::Url::parse("https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/0.5.2/batch/").unwrap(), ), ( - "H4YnJ34cH24cxwwD5v3gaSnl6ifKWx1W4jsjXf7aKC4iwOUpS8sbOp3vg2+NDxhhKphgYpuUlykpdsoRhEt+cw==".to_string(), + "1f8627277e1c1f6e1cc70c03e6fde06929e5ea27ca5b1d56e23b235dfeda282e22c0e5294bcb1b3a9def836f8d0f18612a9860629b9497292976ca11844b7e73".to_string(), url::Url::parse("https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/0.5.2/bundle/").unwrap(), ), ]) @@ -269,17 +269,13 @@ impl LocalProver { } async fn do_prove(&mut self, req: ProveRequest) -> Result { - use base64::{ - prelude::{BASE64_STANDARD, BASE64_URL_SAFE}, - Engine, - }; self.next_task_id += 1; let duration = SystemTime::now().duration_since(UNIX_EPOCH).unwrap(); let created_at = duration.as_secs() as f64 + duration.subsec_nanos() as f64 * 1e-9; let prover_task = UniversalHandler::get_task_from_input(&req.input)?; - let vk = BASE64_STANDARD.encode(&prover_task.vk); + let vk = hex::encode(&prover_task.vk); let handler = if let Some(handler) = self.handlers.get(&vk) { handler.clone() } else { @@ -293,17 +289,16 @@ impl LocalProver { req.hard_fork_name ) })?; - let vk_as_path = BASE64_URL_SAFE.encode(&prover_task.vk); let url_base = if let Some(url) = base_config.location_data.asset_detours.get(&vk) { url.clone() } else { base_config .location_data - .gen_asset_url(&vk_as_path, req.proof_type)? + .gen_asset_url(&vk, req.proof_type)? }; let asset_path = base_config .location_data - .get_asset(&vk_as_path, &url_base, &base_config.workspace_path) + .get_asset(&vk, &url_base, &base_config.workspace_path) .await?; let circuits_handler = Arc::new(Mutex::new(UniversalHandler::new( &asset_path, diff --git a/crates/prover-bin/src/zk_circuits_handler.rs b/crates/prover-bin/src/zk_circuits_handler.rs index 494a5a4fbd..44434bd8c9 100644 --- a/crates/prover-bin/src/zk_circuits_handler.rs +++ b/crates/prover-bin/src/zk_circuits_handler.rs @@ -9,8 +9,6 @@ use scroll_zkvm_types::ProvingTask; #[async_trait] pub trait CircuitsHandler: Sync + Send { - #[allow(dead_code)] - async fn get_vk(&self) -> String; async fn get_proof_data(&self, u_task: &ProvingTask, need_snark: bool) -> Result; } diff --git a/crates/prover-bin/src/zk_circuits_handler/universal.rs b/crates/prover-bin/src/zk_circuits_handler/universal.rs index 240ba766cd..867187f45d 100644 --- a/crates/prover-bin/src/zk_circuits_handler/universal.rs +++ b/crates/prover-bin/src/zk_circuits_handler/universal.rs @@ -44,9 +44,6 @@ impl UniversalHandler { #[async_trait] impl CircuitsHandler for Mutex { - async fn get_vk(&self) -> String { - BASE64_STANDARD.encode(self.lock().await.get_prover().get_app_vk()) - } async fn get_proof_data(&self, u_task: &ProvingTask, need_snark: bool) -> Result { let handler_self = self.lock().await; diff --git a/zkvm-prover/Makefile b/zkvm-prover/Makefile index 3479743edf..ba5eacb1f3 100644 --- a/zkvm-prover/Makefile +++ b/zkvm-prover/Makefile @@ -3,8 +3,6 @@ RUST_MIN_STACK ?= 16777216 export RUST_MIN_STACK -CIRCUIT_STUFF = .work/euclid/chunk/app.vmexe .work/feynman/chunk/app.vmexe - ifeq (4.3,$(firstword $(sort $(MAKE_VERSION) 4.3))) PLONKY3_VERSION=$(shell grep -m 1 "Plonky3.git" ../Cargo.lock | cut -d "#" -f2 | cut -c-7) else @@ -53,14 +51,10 @@ lint: cargo clippy --all-features --all-targets -- -D warnings cargo fmt --all -$(CIRCUIT_STUFF): - @echo "Download stuff with download-release.sh, and put them into correct directory"; - @exit 1; - -test_run: $(CIRCUIT_STUFF) +test_run: GO_TAG=${GO_TAG} GIT_REV=${GIT_REV} ZK_VERSION=${ZK_VERSION} cargo run --release -p prover -- --config ./config.json -test_e2e_run: $(CIRCUIT_STUFF) ${E2E_HANDLE_SET} +test_e2e_run: ${E2E_HANDLE_SET} GO_TAG=${GO_TAG} GIT_REV=${GIT_REV} ZK_VERSION=${ZK_VERSION} cargo run --release -p prover -- --config ./config.json handle ${E2E_HANDLE_SET} From c681446734c2b8b54205f31627352751251cee22 Mon Sep 17 00:00:00 2001 From: Ho Date: Tue, 19 Aug 2025 19:38:34 +0900 Subject: [PATCH 11/22] lint --- crates/prover-bin/src/prover.rs | 1 - crates/prover-bin/src/zk_circuits_handler.rs | 1 - crates/prover-bin/src/zk_circuits_handler/universal.rs | 1 - 3 files changed, 3 deletions(-) diff --git a/crates/prover-bin/src/prover.rs b/crates/prover-bin/src/prover.rs index 24030313b2..e48a8e5f8a 100644 --- a/crates/prover-bin/src/prover.rs +++ b/crates/prover-bin/src/prover.rs @@ -269,7 +269,6 @@ impl LocalProver { } async fn do_prove(&mut self, req: ProveRequest) -> Result { - self.next_task_id += 1; let duration = SystemTime::now().duration_since(UNIX_EPOCH).unwrap(); let created_at = duration.as_secs() as f64 + duration.subsec_nanos() as f64 * 1e-9; diff --git a/crates/prover-bin/src/zk_circuits_handler.rs b/crates/prover-bin/src/zk_circuits_handler.rs index 44434bd8c9..f6b9f0086c 100644 --- a/crates/prover-bin/src/zk_circuits_handler.rs +++ b/crates/prover-bin/src/zk_circuits_handler.rs @@ -9,6 +9,5 @@ use scroll_zkvm_types::ProvingTask; #[async_trait] pub trait CircuitsHandler: Sync + Send { - async fn get_proof_data(&self, u_task: &ProvingTask, need_snark: bool) -> Result; } diff --git a/crates/prover-bin/src/zk_circuits_handler/universal.rs b/crates/prover-bin/src/zk_circuits_handler/universal.rs index 867187f45d..d0f828f987 100644 --- a/crates/prover-bin/src/zk_circuits_handler/universal.rs +++ b/crates/prover-bin/src/zk_circuits_handler/universal.rs @@ -44,7 +44,6 @@ impl UniversalHandler { #[async_trait] impl CircuitsHandler for Mutex { - async fn get_proof_data(&self, u_task: &ProvingTask, need_snark: bool) -> Result { let handler_self = self.lock().await; // let u_task: ProvingTask = serde_json::from_str(&prove_request.input)?; From 8ef21f009a5d7c2240c96bdb305b035d289e86b2 Mon Sep 17 00:00:00 2001 From: Ho Date: Fri, 22 Aug 2025 09:57:58 +0900 Subject: [PATCH 12/22] update according to reviews --- crates/prover-bin/assets_url_preset.json | 7 ++++ crates/prover-bin/src/prover.rs | 41 +++++++++---------- .../src/zk_circuits_handler/universal.rs | 11 +---- 3 files changed, 28 insertions(+), 31 deletions(-) create mode 100644 crates/prover-bin/assets_url_preset.json diff --git a/crates/prover-bin/assets_url_preset.json b/crates/prover-bin/assets_url_preset.json new file mode 100644 index 0000000000..177be0bfbe --- /dev/null +++ b/crates/prover-bin/assets_url_preset.json @@ -0,0 +1,7 @@ +{ + "feynman": { + "b68fdc3f28a5ce006280980df70cd3447e56913e5bca6054603ba85f0794c23a6618ea25a7991845bbc5fd571670ee47379ba31ace92d345bca59702a0d4112d": "https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/0.5.2/chunk/", + "9a3f66370f11e3303f1a1248921025104e83253efea43a70d221cf4e15fc145bf2be2f4468d1ac4a70e7682babb1c60417e21c7633d4b55b58f44703ec82b05a": "https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/0.5.2/batch/", + "1f8627277e1c1f6e1cc70c03e6fde06929e5ea27ca5b1d56e23b235dfeda282e22c0e5294bcb1b3a9def836f8d0f18612a9860629b9497292976ca11844b7e73": "https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/0.5.2/bundle/" + } +} diff --git a/crates/prover-bin/src/prover.rs b/crates/prover-bin/src/prover.rs index e48a8e5f8a..95b644eb90 100644 --- a/crates/prover-bin/src/prover.rs +++ b/crates/prover-bin/src/prover.rs @@ -38,7 +38,7 @@ impl AssetsLocationData { ProofType::Chunk => format!("chunk/{vk_as_path}/"), ProofType::Batch => format!("batch/{vk_as_path}/"), ProofType::Bundle => format!("bundle/{vk_as_path}/"), - _ => unreachable!("unreconginzed type"), + t => eyre::bail!("unrecognized proof type: {}", t as u8), } .as_str(), )?) @@ -226,38 +226,37 @@ impl ProvingService for LocalProver { } } -static GLOBAL_ASSET_URLS_FEYNMAN: LazyLock> = LazyLock::new(|| { - HashMap::from([ - ( - "b68fdc3f28a5ce006280980df70cd3447e56913e5bca6054603ba85f0794c23a6618ea25a7991845bbc5fd571670ee47379ba31ace92d345bca59702a0d4112d".to_string(), - url::Url::parse("https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/0.5.2/chunk/").unwrap(), - ), - ( - "9a3f66370f11e3303f1a1248921025104e83253efea43a70d221cf4e15fc145bf2be2f4468d1ac4a70e7682babb1c60417e21c7633d4b55b58f44703ec82b05a".to_string(), - url::Url::parse("https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/0.5.2/batch/").unwrap(), - ), - ( - "1f8627277e1c1f6e1cc70c03e6fde06929e5ea27ca5b1d56e23b235dfeda282e22c0e5294bcb1b3a9def836f8d0f18612a9860629b9497292976ca11844b7e73".to_string(), - url::Url::parse("https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/0.5.2/bundle/").unwrap(), - ), - ]) -}); +static GLOBAL_ASSET_URLS: LazyLock>> = + LazyLock::new(|| { + const ASSETS_JSON: &str = include_str!("../assets_url_preset.json"); + serde_json::from_str(ASSETS_JSON).expect("Failed to parse assets_url_preset.json") + }); impl LocalProver { pub fn new(mut config: LocalProverConfig) -> Self { for (fork_name, circuit_config) in config.circuits.iter_mut() { // validate each base url circuit_config.location_data.validate().unwrap(); - let mut template_url_mapping = match fork_name.to_lowercase().as_str() { - "feynman" => GLOBAL_ASSET_URLS_FEYNMAN.clone(), - _ => HashMap::new(), - }; + let mut template_url_mapping = GLOBAL_ASSET_URLS + .get(&fork_name.to_lowercase()) + .cloned() + .unwrap_or_default(); // apply default settings in template for (key, url) in circuit_config.location_data.asset_detours.drain() { template_url_mapping.insert(key, url); } + circuit_config.location_data.asset_detours = template_url_mapping; + + // validate each detours url + for url in circuit_config.location_data.asset_detours.values() { + assert!( + url.path().ends_with('/'), + "url {} must be end with /", + url.as_str() + ); + } } Self { diff --git a/crates/prover-bin/src/zk_circuits_handler/universal.rs b/crates/prover-bin/src/zk_circuits_handler/universal.rs index d0f828f987..f95098780a 100644 --- a/crates/prover-bin/src/zk_circuits_handler/universal.rs +++ b/crates/prover-bin/src/zk_circuits_handler/universal.rs @@ -46,16 +46,7 @@ impl UniversalHandler { impl CircuitsHandler for Mutex { async fn get_proof_data(&self, u_task: &ProvingTask, need_snark: bool) -> Result { let handler_self = self.lock().await; - // let u_task: ProvingTask = serde_json::from_str(&prove_request.input)?; - // let expected_vk = handler_self.get_prover().get_app_vk(); - // if u_task.vk != expected_vk { - // eyre::bail!( - // "vk is not match!, prove type {:?}, expected {}, get {}", - // prove_request.proof_type, - // BASE64_STANDARD.encode(expected_vk), - // BASE64_STANDARD.encode(u_task.vk), - // ); - // } + if need_snark && handler_self.prover.evm_prover.is_none() { eyre::bail!( "do not init prover for evm (vk: {})", From a75f857bd8ffcfafbeac83205117a78d2be0c3aa Mon Sep 17 00:00:00 2001 From: Ho Date: Fri, 22 Aug 2025 10:01:32 +0900 Subject: [PATCH 13/22] purge out-dated comment --- crates/prover-bin/src/zk_circuits_handler/universal.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/prover-bin/src/zk_circuits_handler/universal.rs b/crates/prover-bin/src/zk_circuits_handler/universal.rs index f95098780a..12038d4511 100644 --- a/crates/prover-bin/src/zk_circuits_handler/universal.rs +++ b/crates/prover-bin/src/zk_circuits_handler/universal.rs @@ -58,7 +58,6 @@ impl CircuitsHandler for Mutex { .get_prover() .gen_proof_universal(u_task, need_snark)?; - //TODO: check expected PI Ok(serde_json::to_string(&proof)?) } } From 7999f0d1d522e92406fa6fa06cda3e8b36abc8e7 Mon Sep 17 00:00:00 2001 From: Ho Date: Fri, 22 Aug 2025 13:07:42 +0900 Subject: [PATCH 14/22] update gpu for 0.5.6 --- crates/gpu_override/.cargo/config.toml | 24 +- crates/gpu_override/Cargo.lock | 328 ++++++++++++------------- 2 files changed, 175 insertions(+), 177 deletions(-) diff --git a/crates/gpu_override/.cargo/config.toml b/crates/gpu_override/.cargo/config.toml index 0fa02b3a4a..90a52f1a93 100644 --- a/crates/gpu_override/.cargo/config.toml +++ b/crates/gpu_override/.cargo/config.toml @@ -1,16 +1,16 @@ [patch."https://github.com/openvm-org/openvm.git"] -openvm-build = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.2.1-rc.1-pipe", default-features = false } -openvm-circuit = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.2.1-rc.1-pipe", default-features = false } -openvm-continuations = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.2.1-rc.1-pipe", default-features = false } -openvm-instructions ={ git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.2.1-rc.1-pipe", default-features = false } -openvm-native-circuit = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.2.1-rc.1-pipe", default-features = false } -openvm-native-compiler = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.2.1-rc.1-pipe", default-features = false } -openvm-native-recursion = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.2.1-rc.1-pipe", default-features = false } -openvm-native-transpiler = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.2.1-rc.1-pipe", default-features = false } -openvm-rv32im-transpiler = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.2.1-rc.1-pipe", default-features = false } -openvm-sdk = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.2.1-rc.1-pipe", default-features = false, features = ["parallel", "bench-metrics", "evm-prove"] } -openvm-transpiler = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.2.1-rc.1-pipe", default-features = false } +openvm-build = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.3.0-pipe", default-features = false } +openvm-circuit = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.3.0-pipe", default-features = false } +openvm-continuations = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.3.0-pipe", default-features = false } +openvm-instructions ={ git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.3.0-pipe", default-features = false } +openvm-native-circuit = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.3.0-pipe", default-features = false } +openvm-native-compiler = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.3.0-pipe", default-features = false } +openvm-native-recursion = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.3.0-pipe", default-features = false } +openvm-native-transpiler = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.3.0-pipe", default-features = false } +openvm-rv32im-transpiler = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.3.0-pipe", default-features = false } +openvm-sdk = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.3.0-pipe", default-features = false, features = ["parallel", "bench-metrics", "evm-prove"] } +openvm-transpiler = { git = "ssh://git@github.com/scroll-tech/openvm-gpu.git", branch = "patch-v1.3.0-pipe", default-features = false } [patch."https://github.com/openvm-org/stark-backend.git"] openvm-stark-backend = { git = "ssh://git@github.com/scroll-tech/openvm-stark-gpu.git", branch = "main", features = ["gpu"] } @@ -42,4 +42,4 @@ p3-poseidon2-air = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", t p3-symmetric = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" } p3-uni-stark = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" } p3-maybe-rayon = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" } # the "parallel" feature is NOT on by default to allow single-threaded benchmarking -p3-bn254-fr = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" } +p3-bn254-fr = { git = "ssh://git@github.com/scroll-tech/plonky3-gpu.git", tag = "v0.2.1" } \ No newline at end of file diff --git a/crates/gpu_override/Cargo.lock b/crates/gpu_override/Cargo.lock index e0a8023019..5550fe8a05 100644 --- a/crates/gpu_override/Cargo.lock +++ b/crates/gpu_override/Cargo.lock @@ -4573,14 +4573,14 @@ dependencies = [ [[package]] name = "openvm" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "bytemuck", "num-bigint 0.4.6", - "openvm-custom-insn 0.1.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe)", - "openvm-platform 1.2.1-rc.0", - "openvm-rv32im-guest 1.2.1-rc.0", + "openvm-custom-insn 0.1.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", + "openvm-platform 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", + "openvm-rv32im-guest 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", "serde", ] @@ -4594,15 +4594,15 @@ dependencies = [ "getrandom 0.3.3", "num-bigint 0.4.6", "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", - "openvm-platform 1.3.0", - "openvm-rv32im-guest 1.3.0", + "openvm-platform 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-rv32im-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "serde", ] [[package]] name = "openvm-algebra-circuit" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -4630,10 +4630,10 @@ dependencies = [ [[package]] name = "openvm-algebra-complex-macros" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ - "openvm-macros-common 1.2.1-rc.0", + "openvm-macros-common 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", "quote", "syn 2.0.101", ] @@ -4643,23 +4643,23 @@ name = "openvm-algebra-complex-macros" version = "1.3.0" source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ - "openvm-macros-common 1.3.0", + "openvm-macros-common 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "quote", "syn 2.0.101", ] [[package]] name = "openvm-algebra-guest" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "halo2curves-axiom", "num-bigint 0.4.6", "once_cell", - "openvm-algebra-complex-macros 1.2.1-rc.0", - "openvm-algebra-moduli-macros 1.2.1-rc.0", - "openvm-custom-insn 0.1.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe)", - "openvm-rv32im-guest 1.2.1-rc.0", + "openvm-algebra-complex-macros 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", + "openvm-algebra-moduli-macros 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", + "openvm-custom-insn 0.1.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", + "openvm-rv32im-guest 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", "serde-big-array", "strum_macros 0.26.4", ] @@ -4672,22 +4672,22 @@ dependencies = [ "halo2curves-axiom", "num-bigint 0.4.6", "once_cell", - "openvm-algebra-complex-macros 1.3.0", - "openvm-algebra-moduli-macros 1.3.0", + "openvm-algebra-complex-macros 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-algebra-moduli-macros 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", - "openvm-rv32im-guest 1.3.0", + "openvm-rv32im-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "serde-big-array", "strum_macros 0.26.4", ] [[package]] name = "openvm-algebra-moduli-macros" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "num-bigint 0.4.6", "num-prime", - "openvm-macros-common 1.2.1-rc.0", + "openvm-macros-common 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", "quote", "syn 2.0.101", ] @@ -4699,17 +4699,17 @@ source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092 dependencies = [ "num-bigint 0.4.6", "num-prime", - "openvm-macros-common 1.3.0", + "openvm-macros-common 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "quote", "syn 2.0.101", ] [[package]] name = "openvm-algebra-transpiler" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ - "openvm-algebra-guest 1.2.1-rc.0", + "openvm-algebra-guest 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", "openvm-instructions", "openvm-instructions-derive", "openvm-stark-backend", @@ -4720,8 +4720,8 @@ dependencies = [ [[package]] name = "openvm-bigint-circuit" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -4742,17 +4742,17 @@ dependencies = [ [[package]] name = "openvm-bigint-guest" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ - "openvm-platform 1.2.1-rc.0", + "openvm-platform 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", "strum_macros 0.26.4", ] [[package]] name = "openvm-bigint-transpiler" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "openvm-bigint-guest", "openvm-instructions", @@ -4766,20 +4766,20 @@ dependencies = [ [[package]] name = "openvm-build" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "cargo_metadata", "eyre", - "openvm-platform 1.2.1-rc.0", + "openvm-platform 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", "serde", "serde_json", ] [[package]] name = "openvm-circuit" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "backtrace", "cfg-if", @@ -4809,8 +4809,8 @@ dependencies = [ [[package]] name = "openvm-circuit-derive" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "itertools 0.14.0", "quote", @@ -4819,8 +4819,8 @@ dependencies = [ [[package]] name = "openvm-circuit-primitives" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "derive-new 0.6.0", "itertools 0.14.0", @@ -4834,8 +4834,8 @@ dependencies = [ [[package]] name = "openvm-circuit-primitives-derive" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "itertools 0.14.0", "quote", @@ -4844,8 +4844,8 @@ dependencies = [ [[package]] name = "openvm-continuations" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "derivative", "openvm-circuit", @@ -4860,7 +4860,7 @@ dependencies = [ [[package]] name = "openvm-custom-insn" version = "0.1.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "proc-macro2", "quote", @@ -4879,16 +4879,14 @@ dependencies = [ [[package]] name = "openvm-ecc-circuit" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", - "eyre", "hex-literal", "lazy_static", "num-bigint 0.4.6", - "num-integer", "num-traits", "once_cell", "openvm-algebra-circuit", @@ -4909,19 +4907,19 @@ dependencies = [ [[package]] name = "openvm-ecc-guest" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "ecdsa", "elliptic-curve", "group 0.13.0", "halo2curves-axiom", "once_cell", - "openvm 1.2.1-rc.0", - "openvm-algebra-guest 1.2.1-rc.0", - "openvm-custom-insn 0.1.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe)", - "openvm-ecc-sw-macros 1.2.1-rc.0", - "openvm-rv32im-guest 1.2.1-rc.0", + "openvm 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", + "openvm-algebra-guest 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", + "openvm-custom-insn 0.1.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", + "openvm-ecc-sw-macros 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", + "openvm-rv32im-guest 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", "serde", "strum_macros 0.26.4", ] @@ -4936,21 +4934,21 @@ dependencies = [ "group 0.13.0", "halo2curves-axiom", "once_cell", - "openvm 1.3.0", - "openvm-algebra-guest 1.3.0", + "openvm 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-algebra-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", - "openvm-ecc-sw-macros 1.3.0", - "openvm-rv32im-guest 1.3.0", + "openvm-ecc-sw-macros 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-rv32im-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "serde", "strum_macros 0.26.4", ] [[package]] name = "openvm-ecc-sw-macros" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ - "openvm-macros-common 1.2.1-rc.0", + "openvm-macros-common 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", "quote", "syn 2.0.101", ] @@ -4960,17 +4958,17 @@ name = "openvm-ecc-sw-macros" version = "1.3.0" source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ - "openvm-macros-common 1.3.0", + "openvm-macros-common 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "quote", "syn 2.0.101", ] [[package]] name = "openvm-ecc-transpiler" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ - "openvm-ecc-guest 1.2.1-rc.0", + "openvm-ecc-guest 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", "openvm-instructions", "openvm-instructions-derive", "openvm-stark-backend", @@ -4981,8 +4979,8 @@ dependencies = [ [[package]] name = "openvm-instructions" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "backtrace", "derive-new 0.6.0", @@ -4998,8 +4996,8 @@ dependencies = [ [[package]] name = "openvm-instructions-derive" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "quote", "syn 2.0.101", @@ -5007,8 +5005,8 @@ dependencies = [ [[package]] name = "openvm-keccak256-circuit" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -5033,16 +5031,16 @@ dependencies = [ [[package]] name = "openvm-keccak256-guest" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ - "openvm-platform 1.2.1-rc.0", + "openvm-platform 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", ] [[package]] name = "openvm-keccak256-transpiler" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "openvm-instructions", "openvm-instructions-derive", @@ -5055,8 +5053,8 @@ dependencies = [ [[package]] name = "openvm-macros-common" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "syn 2.0.101", ] @@ -5071,8 +5069,8 @@ dependencies = [ [[package]] name = "openvm-mod-circuit-builder" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "itertools 0.14.0", "num-bigint 0.4.6", @@ -5090,8 +5088,8 @@ dependencies = [ [[package]] name = "openvm-native-circuit" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -5117,8 +5115,8 @@ dependencies = [ [[package]] name = "openvm-native-compiler" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "backtrace", "itertools 0.14.0", @@ -5141,8 +5139,8 @@ dependencies = [ [[package]] name = "openvm-native-compiler-derive" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "quote", "syn 2.0.101", @@ -5150,8 +5148,8 @@ dependencies = [ [[package]] name = "openvm-native-recursion" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "cfg-if", "itertools 0.14.0", @@ -5178,8 +5176,8 @@ dependencies = [ [[package]] name = "openvm-native-transpiler" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "openvm-instructions", "openvm-transpiler", @@ -5197,24 +5195,24 @@ dependencies = [ "itertools 0.14.0", "num-bigint 0.4.6", "num-traits", - "openvm 1.3.0", - "openvm-algebra-complex-macros 1.3.0", - "openvm-algebra-guest 1.3.0", - "openvm-algebra-moduli-macros 1.3.0", + "openvm 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-algebra-complex-macros 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-algebra-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-algebra-moduli-macros 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", - "openvm-ecc-guest 1.3.0", - "openvm-ecc-sw-macros 1.3.0", - "openvm-pairing-guest 1.3.0", - "openvm-platform 1.3.0", - "openvm-rv32im-guest 1.3.0", + "openvm-ecc-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-ecc-sw-macros 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-pairing-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-platform 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-rv32im-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "rand 0.8.5", "serde", ] [[package]] name = "openvm-pairing-circuit" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -5229,10 +5227,10 @@ dependencies = [ "openvm-circuit-primitives", "openvm-circuit-primitives-derive", "openvm-ecc-circuit", - "openvm-ecc-guest 1.2.1-rc.0", + "openvm-ecc-guest 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", "openvm-instructions", "openvm-mod-circuit-builder", - "openvm-pairing-guest 1.2.1-rc.0", + "openvm-pairing-guest 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", "openvm-pairing-transpiler", "openvm-rv32-adapters", "openvm-rv32im-circuit", @@ -5244,8 +5242,8 @@ dependencies = [ [[package]] name = "openvm-pairing-guest" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "halo2curves-axiom", "hex-literal", @@ -5253,11 +5251,11 @@ dependencies = [ "lazy_static", "num-bigint 0.4.6", "num-traits", - "openvm 1.2.1-rc.0", - "openvm-algebra-guest 1.2.1-rc.0", - "openvm-algebra-moduli-macros 1.2.1-rc.0", - "openvm-custom-insn 0.1.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe)", - "openvm-ecc-guest 1.2.1-rc.0", + "openvm 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", + "openvm-algebra-guest 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", + "openvm-algebra-moduli-macros 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", + "openvm-custom-insn 0.1.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", + "openvm-ecc-guest 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", "rand 0.8.5", "serde", "strum_macros 0.26.4", @@ -5274,11 +5272,11 @@ dependencies = [ "lazy_static", "num-bigint 0.4.6", "num-traits", - "openvm 1.3.0", - "openvm-algebra-guest 1.3.0", - "openvm-algebra-moduli-macros 1.3.0", + "openvm 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-algebra-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-algebra-moduli-macros 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", - "openvm-ecc-guest 1.3.0", + "openvm-ecc-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "rand 0.8.5", "serde", "strum_macros 0.26.4", @@ -5286,12 +5284,12 @@ dependencies = [ [[package]] name = "openvm-pairing-transpiler" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "openvm-instructions", "openvm-instructions-derive", - "openvm-pairing-guest 1.2.1-rc.0", + "openvm-pairing-guest 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", "openvm-stark-backend", "openvm-transpiler", "rrs-lib", @@ -5300,12 +5298,12 @@ dependencies = [ [[package]] name = "openvm-platform" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "libm", - "openvm-custom-insn 0.1.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe)", - "openvm-rv32im-guest 1.2.1-rc.0", + "openvm-custom-insn 0.1.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", + "openvm-rv32im-guest 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", ] [[package]] @@ -5315,13 +5313,13 @@ source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092 dependencies = [ "libm", "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", - "openvm-rv32im-guest 1.3.0", + "openvm-rv32im-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", ] [[package]] name = "openvm-poseidon2-air" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "derivative", "lazy_static", @@ -5337,8 +5335,8 @@ dependencies = [ [[package]] name = "openvm-rv32-adapters" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "derive-new 0.6.0", "itertools 0.14.0", @@ -5357,8 +5355,8 @@ dependencies = [ [[package]] name = "openvm-rv32im-circuit" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -5380,10 +5378,10 @@ dependencies = [ [[package]] name = "openvm-rv32im-guest" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ - "openvm-custom-insn 0.1.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe)", + "openvm-custom-insn 0.1.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", "p3-field 0.1.0", "strum_macros 0.26.4", ] @@ -5400,12 +5398,12 @@ dependencies = [ [[package]] name = "openvm-rv32im-transpiler" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "openvm-instructions", "openvm-instructions-derive", - "openvm-rv32im-guest 1.2.1-rc.0", + "openvm-rv32im-guest 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", "openvm-stark-backend", "openvm-transpiler", "rrs-lib", @@ -5416,8 +5414,8 @@ dependencies = [ [[package]] name = "openvm-sdk" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "async-trait", "bitcode", @@ -5431,7 +5429,7 @@ dependencies = [ "itertools 0.14.0", "metrics", "num-bigint 0.4.6", - "openvm 1.2.1-rc.0", + "openvm 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", "openvm-algebra-circuit", "openvm-algebra-transpiler", "openvm-bigint-circuit", @@ -5473,14 +5471,14 @@ name = "openvm-sha2" version = "1.3.0" source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ - "openvm-sha256-guest 1.3.0", + "openvm-sha256-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "sha2 0.10.9", ] [[package]] name = "openvm-sha256-air" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "openvm-circuit-primitives", "openvm-stark-backend", @@ -5490,8 +5488,8 @@ dependencies = [ [[package]] name = "openvm-sha256-circuit" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -5513,10 +5511,10 @@ dependencies = [ [[package]] name = "openvm-sha256-guest" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ - "openvm-platform 1.2.1-rc.0", + "openvm-platform 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", ] [[package]] @@ -5524,17 +5522,17 @@ name = "openvm-sha256-guest" version = "1.3.0" source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ - "openvm-platform 1.3.0", + "openvm-platform 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", ] [[package]] name = "openvm-sha256-transpiler" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "openvm-instructions", "openvm-instructions-derive", - "openvm-sha256-guest 1.2.1-rc.0", + "openvm-sha256-guest 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", "openvm-stark-backend", "openvm-transpiler", "rrs-lib", @@ -5609,13 +5607,13 @@ dependencies = [ [[package]] name = "openvm-transpiler" -version = "1.2.1-rc.0" -source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.2.1-rc.1-pipe#7dd6d1620d07c2c3faa5b91105cbb3d19ff0c9b0" +version = "1.3.0" +source = "git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe#07e2731a2afd8bcb05b76566331e68e1e4ef00d0" dependencies = [ "elf", "eyre", "openvm-instructions", - "openvm-platform 1.2.1-rc.0", + "openvm-platform 1.3.0 (git+ssh://git@github.com/scroll-tech/openvm-gpu.git?branch=patch-v1.3.0-pipe)", "openvm-stark-backend", "rrs-lib", "thiserror 1.0.69", @@ -8774,12 +8772,12 @@ dependencies = [ "alloy-primitives", "halo2curves-axiom", "itertools 0.14.0", - "openvm 1.3.0", - "openvm-ecc-guest 1.3.0", + "openvm 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-ecc-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "openvm-pairing", - "openvm-pairing-guest 1.3.0", + "openvm-pairing-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "openvm-sha2", - "openvm-sha256-guest 1.3.0", + "openvm-sha256-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "rkyv", "scroll-zkvm-types-base", "serde", @@ -8806,9 +8804,9 @@ source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af16219 dependencies = [ "alloy-primitives", "itertools 0.14.0", - "openvm 1.3.0", + "openvm 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", - "openvm-rv32im-guest 1.3.0", + "openvm-rv32im-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "revm-precompile 21.0.0 (git+https://github.com/scroll-tech/revm?branch=feat%2Freth-v74)", "rkyv", "sbv-core", From 77d8b5b6f42d45aee31f2eb7d59b085c7759f99c Mon Sep 17 00:00:00 2001 From: Ho Date: Fri, 22 Aug 2025 13:11:04 +0900 Subject: [PATCH 15/22] fix issue in config template --- zkvm-prover/config.json.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zkvm-prover/config.json.template b/zkvm-prover/config.json.template index 4425bdb7b3..9f804c5226 100644 --- a/zkvm-prover/config.json.template +++ b/zkvm-prover/config.json.template @@ -28,6 +28,6 @@ "hard_fork_name": "feynman", "base_url": "https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/feynman/", "workspace_path": ".work/feynman" - }, + } } } \ No newline at end of file From 65fa2495989f1079bbb81c45a87aa146489f2f93 Mon Sep 17 00:00:00 2001 From: Ho Date: Mon, 25 Aug 2025 19:18:05 +0900 Subject: [PATCH 16/22] bump dep of zkvm-prover --- Cargo.lock | 339 +++++++++++++++++++++++---------- Cargo.toml | 6 +- crates/gpu_override/Cargo.lock | 14 +- 3 files changed, 253 insertions(+), 106 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 10a76716a7..321e4b231a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4417,16 +4417,29 @@ dependencies = [ "getrandom 0.2.16", "getrandom 0.3.3", "num-bigint 0.4.6", - "openvm-custom-insn", - "openvm-platform", - "openvm-rv32im-guest", + "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-platform 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-rv32im-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "serde", +] + +[[package]] +name = "openvm" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" +dependencies = [ + "bytemuck", + "num-bigint 0.4.6", + "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", + "openvm-platform 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", + "openvm-rv32im-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", "serde", ] [[package]] name = "openvm-algebra-circuit" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -4457,7 +4470,17 @@ name = "openvm-algebra-complex-macros" version = "1.3.0" source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ - "openvm-macros-common", + "openvm-macros-common 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "openvm-algebra-complex-macros" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" +dependencies = [ + "openvm-macros-common 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", "quote", "syn 2.0.101", ] @@ -4470,10 +4493,26 @@ dependencies = [ "halo2curves-axiom", "num-bigint 0.4.6", "once_cell", - "openvm-algebra-complex-macros", - "openvm-algebra-moduli-macros", - "openvm-custom-insn", - "openvm-rv32im-guest", + "openvm-algebra-complex-macros 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-algebra-moduli-macros 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-rv32im-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "serde-big-array", + "strum_macros 0.26.4", +] + +[[package]] +name = "openvm-algebra-guest" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" +dependencies = [ + "halo2curves-axiom", + "num-bigint 0.4.6", + "once_cell", + "openvm-algebra-complex-macros 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", + "openvm-algebra-moduli-macros 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", + "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", + "openvm-rv32im-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", "serde-big-array", "strum_macros 0.26.4", ] @@ -4485,7 +4524,19 @@ source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092 dependencies = [ "num-bigint 0.4.6", "num-prime", - "openvm-macros-common", + "openvm-macros-common 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "openvm-algebra-moduli-macros" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" +dependencies = [ + "num-bigint 0.4.6", + "num-prime", + "openvm-macros-common 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", "quote", "syn 2.0.101", ] @@ -4493,9 +4544,9 @@ dependencies = [ [[package]] name = "openvm-algebra-transpiler" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ - "openvm-algebra-guest", + "openvm-algebra-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", "openvm-instructions", "openvm-instructions-derive", "openvm-stark-backend", @@ -4507,7 +4558,7 @@ dependencies = [ [[package]] name = "openvm-bigint-circuit" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -4529,16 +4580,16 @@ dependencies = [ [[package]] name = "openvm-bigint-guest" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ - "openvm-platform", + "openvm-platform 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", "strum_macros 0.26.4", ] [[package]] name = "openvm-bigint-transpiler" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "openvm-bigint-guest", "openvm-instructions", @@ -4553,11 +4604,11 @@ dependencies = [ [[package]] name = "openvm-build" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "cargo_metadata", "eyre", - "openvm-platform", + "openvm-platform 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", "serde", "serde_json", ] @@ -4565,7 +4616,7 @@ dependencies = [ [[package]] name = "openvm-circuit" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "backtrace", "cfg-if", @@ -4596,7 +4647,7 @@ dependencies = [ [[package]] name = "openvm-circuit-derive" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "itertools 0.14.0", "quote", @@ -4606,7 +4657,7 @@ dependencies = [ [[package]] name = "openvm-circuit-primitives" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "derive-new 0.6.0", "itertools 0.14.0", @@ -4621,7 +4672,7 @@ dependencies = [ [[package]] name = "openvm-circuit-primitives-derive" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "itertools 0.14.0", "quote", @@ -4631,7 +4682,7 @@ dependencies = [ [[package]] name = "openvm-continuations" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "derivative", "openvm-circuit", @@ -4653,10 +4704,20 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "openvm-custom-insn" +version = "0.1.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + [[package]] name = "openvm-ecc-circuit" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -4691,11 +4752,30 @@ dependencies = [ "group 0.13.0", "halo2curves-axiom", "once_cell", - "openvm", - "openvm-algebra-guest", - "openvm-custom-insn", - "openvm-ecc-sw-macros", - "openvm-rv32im-guest", + "openvm 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-algebra-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-ecc-sw-macros 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-rv32im-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "serde", + "strum_macros 0.26.4", +] + +[[package]] +name = "openvm-ecc-guest" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" +dependencies = [ + "ecdsa", + "elliptic-curve", + "group 0.13.0", + "halo2curves-axiom", + "once_cell", + "openvm 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", + "openvm-algebra-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", + "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", + "openvm-ecc-sw-macros 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", + "openvm-rv32im-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", "serde", "strum_macros 0.26.4", ] @@ -4705,7 +4785,17 @@ name = "openvm-ecc-sw-macros" version = "1.3.0" source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ - "openvm-macros-common", + "openvm-macros-common 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "openvm-ecc-sw-macros" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" +dependencies = [ + "openvm-macros-common 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", "quote", "syn 2.0.101", ] @@ -4713,9 +4803,9 @@ dependencies = [ [[package]] name = "openvm-ecc-transpiler" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ - "openvm-ecc-guest", + "openvm-ecc-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", "openvm-instructions", "openvm-instructions-derive", "openvm-stark-backend", @@ -4727,7 +4817,7 @@ dependencies = [ [[package]] name = "openvm-instructions" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "backtrace", "derive-new 0.6.0", @@ -4744,7 +4834,7 @@ dependencies = [ [[package]] name = "openvm-instructions-derive" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "quote", "syn 2.0.101", @@ -4753,7 +4843,7 @@ dependencies = [ [[package]] name = "openvm-keccak256-circuit" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -4779,15 +4869,15 @@ dependencies = [ [[package]] name = "openvm-keccak256-guest" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ - "openvm-platform", + "openvm-platform 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", ] [[package]] name = "openvm-keccak256-transpiler" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "openvm-instructions", "openvm-instructions-derive", @@ -4806,10 +4896,18 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "openvm-macros-common" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" +dependencies = [ + "syn 2.0.101", +] + [[package]] name = "openvm-mod-circuit-builder" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "itertools 0.14.0", "num-bigint 0.4.6", @@ -4828,7 +4926,7 @@ dependencies = [ [[package]] name = "openvm-native-circuit" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -4855,7 +4953,7 @@ dependencies = [ [[package]] name = "openvm-native-compiler" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "backtrace", "itertools 0.14.0", @@ -4879,7 +4977,7 @@ dependencies = [ [[package]] name = "openvm-native-compiler-derive" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "quote", "syn 2.0.101", @@ -4888,7 +4986,7 @@ dependencies = [ [[package]] name = "openvm-native-recursion" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "cfg-if", "itertools 0.14.0", @@ -4916,7 +5014,7 @@ dependencies = [ [[package]] name = "openvm-native-transpiler" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "openvm-instructions", "openvm-transpiler", @@ -4934,16 +5032,16 @@ dependencies = [ "itertools 0.14.0", "num-bigint 0.4.6", "num-traits", - "openvm", - "openvm-algebra-complex-macros", - "openvm-algebra-guest", - "openvm-algebra-moduli-macros", - "openvm-custom-insn", - "openvm-ecc-guest", - "openvm-ecc-sw-macros", - "openvm-pairing-guest", - "openvm-platform", - "openvm-rv32im-guest", + "openvm 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-algebra-complex-macros 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-algebra-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-algebra-moduli-macros 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-ecc-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-ecc-sw-macros 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-pairing-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-platform 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-rv32im-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "rand 0.8.5", "serde", ] @@ -4951,7 +5049,7 @@ dependencies = [ [[package]] name = "openvm-pairing-circuit" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -4966,10 +5064,10 @@ dependencies = [ "openvm-circuit-primitives", "openvm-circuit-primitives-derive", "openvm-ecc-circuit", - "openvm-ecc-guest", + "openvm-ecc-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", "openvm-instructions", "openvm-mod-circuit-builder", - "openvm-pairing-guest", + "openvm-pairing-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", "openvm-pairing-transpiler", "openvm-rv32-adapters", "openvm-rv32im-circuit", @@ -4990,11 +5088,32 @@ dependencies = [ "lazy_static", "num-bigint 0.4.6", "num-traits", - "openvm", - "openvm-algebra-guest", - "openvm-algebra-moduli-macros", - "openvm-custom-insn", - "openvm-ecc-guest", + "openvm 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-algebra-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-algebra-moduli-macros 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-ecc-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "rand 0.8.5", + "serde", + "strum_macros 0.26.4", +] + +[[package]] +name = "openvm-pairing-guest" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" +dependencies = [ + "halo2curves-axiom", + "hex-literal", + "itertools 0.14.0", + "lazy_static", + "num-bigint 0.4.6", + "num-traits", + "openvm 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", + "openvm-algebra-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", + "openvm-algebra-moduli-macros 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", + "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", + "openvm-ecc-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", "rand 0.8.5", "serde", "strum_macros 0.26.4", @@ -5003,11 +5122,11 @@ dependencies = [ [[package]] name = "openvm-pairing-transpiler" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "openvm-instructions", "openvm-instructions-derive", - "openvm-pairing-guest", + "openvm-pairing-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", "openvm-stark-backend", "openvm-transpiler", "rrs-lib", @@ -5020,14 +5139,24 @@ version = "1.3.0" source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ "libm", - "openvm-custom-insn", - "openvm-rv32im-guest", + "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-rv32im-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", +] + +[[package]] +name = "openvm-platform" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" +dependencies = [ + "libm", + "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", + "openvm-rv32im-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", ] [[package]] name = "openvm-poseidon2-air" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "derivative", "lazy_static", @@ -5044,7 +5173,7 @@ dependencies = [ [[package]] name = "openvm-rv32-adapters" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "derive-new 0.6.0", "itertools 0.14.0", @@ -5064,7 +5193,7 @@ dependencies = [ [[package]] name = "openvm-rv32im-circuit" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -5089,7 +5218,17 @@ name = "openvm-rv32im-guest" version = "1.3.0" source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ - "openvm-custom-insn", + "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "p3-field 0.1.0", + "strum_macros 0.26.4", +] + +[[package]] +name = "openvm-rv32im-guest" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" +dependencies = [ + "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", "p3-field 0.1.0", "strum_macros 0.26.4", ] @@ -5097,11 +5236,11 @@ dependencies = [ [[package]] name = "openvm-rv32im-transpiler" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "openvm-instructions", "openvm-instructions-derive", - "openvm-rv32im-guest", + "openvm-rv32im-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", "openvm-stark-backend", "openvm-transpiler", "rrs-lib", @@ -5113,7 +5252,7 @@ dependencies = [ [[package]] name = "openvm-sdk" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "async-trait", "bitcode", @@ -5127,7 +5266,7 @@ dependencies = [ "itertools 0.14.0", "metrics", "num-bigint 0.4.6", - "openvm", + "openvm 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", "openvm-algebra-circuit", "openvm-algebra-transpiler", "openvm-bigint-circuit", @@ -5169,14 +5308,14 @@ name = "openvm-sha2" version = "1.3.0" source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ - "openvm-sha256-guest", + "openvm-sha256-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "sha2 0.10.9", ] [[package]] name = "openvm-sha256-air" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "openvm-circuit-primitives", "openvm-stark-backend", @@ -5187,7 +5326,7 @@ dependencies = [ [[package]] name = "openvm-sha256-circuit" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "derive-new 0.6.0", "derive_more 1.0.0", @@ -5212,17 +5351,25 @@ name = "openvm-sha256-guest" version = "1.3.0" source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" dependencies = [ - "openvm-platform", + "openvm-platform 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", +] + +[[package]] +name = "openvm-sha256-guest" +version = "1.3.0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" +dependencies = [ + "openvm-platform 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", ] [[package]] name = "openvm-sha256-transpiler" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "openvm-instructions", "openvm-instructions-derive", - "openvm-sha256-guest", + "openvm-sha256-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", "openvm-stark-backend", "openvm-transpiler", "rrs-lib", @@ -5294,12 +5441,12 @@ dependencies = [ [[package]] name = "openvm-transpiler" version = "1.3.0" -source = "git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0#5368d4756993fc1e51092499a816867cf4808de0" +source = "git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c#c033e184cdb04a5bfdbd95ca5651c44f5a355c0c" dependencies = [ "elf", "eyre", "openvm-instructions", - "openvm-platform", + "openvm-platform 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=c033e184cdb04a5bfdbd95ca5651c44f5a355c0c)", "openvm-stark-backend", "rrs-lib", "thiserror 1.0.69", @@ -8248,7 +8395,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-prover" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=89a2dc1#89a2dc19633f0e0de390177a7ba142bfdea164cc" dependencies = [ "alloy-primitives", "base64 0.22.1", @@ -8286,7 +8433,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-types" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=89a2dc1#89a2dc19633f0e0de390177a7ba142bfdea164cc" dependencies = [ "base64 0.22.1", "bincode", @@ -8308,7 +8455,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-types-base" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=89a2dc1#89a2dc19633f0e0de390177a7ba142bfdea164cc" dependencies = [ "alloy-primitives", "alloy-serde 1.0.16", @@ -8323,17 +8470,17 @@ dependencies = [ [[package]] name = "scroll-zkvm-types-batch" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=89a2dc1#89a2dc19633f0e0de390177a7ba142bfdea164cc" dependencies = [ "alloy-primitives", "halo2curves-axiom", "itertools 0.14.0", - "openvm", - "openvm-ecc-guest", + "openvm 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-ecc-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "openvm-pairing", - "openvm-pairing-guest", + "openvm-pairing-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "openvm-sha2", - "openvm-sha256-guest", + "openvm-sha256-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "rkyv", "scroll-zkvm-types-base", "serde", @@ -8343,7 +8490,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-types-bundle" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=89a2dc1#89a2dc19633f0e0de390177a7ba142bfdea164cc" dependencies = [ "alloy-primitives", "itertools 0.14.0", @@ -8356,13 +8503,13 @@ dependencies = [ [[package]] name = "scroll-zkvm-types-chunk" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=89a2dc1#89a2dc19633f0e0de390177a7ba142bfdea164cc" dependencies = [ "alloy-primitives", "itertools 0.14.0", - "openvm", - "openvm-custom-insn", - "openvm-rv32im-guest", + "openvm 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-custom-insn 0.1.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", + "openvm-rv32im-guest 1.3.0 (git+https://github.com/openvm-org/openvm.git?rev=5368d4756993fc1e51092499a816867cf4808de0)", "revm-precompile 21.0.0 (git+https://github.com/scroll-tech/revm?branch=feat%2Freth-v74)", "rkyv", "sbv-core", @@ -8376,7 +8523,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-verifier" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=89a2dc1#89a2dc19633f0e0de390177a7ba142bfdea164cc" dependencies = [ "bincode", "eyre", diff --git a/Cargo.toml b/Cargo.toml index 956550ee79..8068345910 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,9 +17,9 @@ repository = "https://github.com/scroll-tech/scroll" version = "4.5.8" [workspace.dependencies] -scroll-zkvm-prover = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "d871af1" } -scroll-zkvm-verifier = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "d871af1" } -scroll-zkvm-types = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "d871af1" } +scroll-zkvm-prover = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "89a2dc1" } +scroll-zkvm-verifier = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "89a2dc1" } +scroll-zkvm-types = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "89a2dc1" } sbv-primitives = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "chore/openvm-1.3", features = ["scroll"] } sbv-utils = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "chore/openvm-1.3" } diff --git a/crates/gpu_override/Cargo.lock b/crates/gpu_override/Cargo.lock index 5550fe8a05..b99730e238 100644 --- a/crates/gpu_override/Cargo.lock +++ b/crates/gpu_override/Cargo.lock @@ -8692,7 +8692,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-prover" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=89a2dc1#89a2dc19633f0e0de390177a7ba142bfdea164cc" dependencies = [ "alloy-primitives", "base64 0.22.1", @@ -8730,7 +8730,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-types" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=89a2dc1#89a2dc19633f0e0de390177a7ba142bfdea164cc" dependencies = [ "base64 0.22.1", "bincode", @@ -8752,7 +8752,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-types-base" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=89a2dc1#89a2dc19633f0e0de390177a7ba142bfdea164cc" dependencies = [ "alloy-primitives", "alloy-serde 1.0.16", @@ -8767,7 +8767,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-types-batch" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=89a2dc1#89a2dc19633f0e0de390177a7ba142bfdea164cc" dependencies = [ "alloy-primitives", "halo2curves-axiom", @@ -8787,7 +8787,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-types-bundle" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=89a2dc1#89a2dc19633f0e0de390177a7ba142bfdea164cc" dependencies = [ "alloy-primitives", "itertools 0.14.0", @@ -8800,7 +8800,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-types-chunk" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=89a2dc1#89a2dc19633f0e0de390177a7ba142bfdea164cc" dependencies = [ "alloy-primitives", "itertools 0.14.0", @@ -8820,7 +8820,7 @@ dependencies = [ [[package]] name = "scroll-zkvm-verifier" version = "0.5.0" -source = "git+https://github.com/scroll-tech/zkvm-prover?rev=d871af1#d871af1621965eae04ce097044958b7454103b71" +source = "git+https://github.com/scroll-tech/zkvm-prover?rev=89a2dc1#89a2dc19633f0e0de390177a7ba142bfdea164cc" dependencies = [ "bincode", "eyre", From 2afa27d424648d2b10082fc7838b3da8146039ab Mon Sep 17 00:00:00 2001 From: Ho Date: Mon, 25 Aug 2025 21:10:31 +0900 Subject: [PATCH 17/22] new metrics for proof stat --- common/types/message/message.go | 15 ++++++++-- .../logic/submitproof/proof_receiver.go | 30 +++++++++++++++++++ coordinator/test/api_test.go | 3 +- crates/libzkp/src/proofs.rs | 2 ++ crates/libzkp/src/tasks.rs | 6 +++- 5 files changed, 51 insertions(+), 5 deletions(-) diff --git a/common/types/message/message.go b/common/types/message/message.go index c7db53704a..acc7e63702 100644 --- a/common/types/message/message.go +++ b/common/types/message/message.go @@ -135,10 +135,18 @@ type BlockContextV2 struct { NumL1Msgs uint16 `json:"num_l1_msgs"` } +// Metric data carried with OpenVMProof +type OpenVMProofStat struct { + TotalCycle uint64 `json:"total_cycles"` + ExecutionTimeMills uint64 `json:"execution_time_mills"` + ProvingTimeMills uint64 `json:"proving_time_mills"` +} + // Proof for flatten VM proof type OpenVMProof struct { - Proof []byte `json:"proofs"` - PublicValues []byte `json:"public_values"` + Proof []byte `json:"proofs"` + PublicValues []byte `json:"public_values"` + Stat *OpenVMProofStat `json:"stat,omitempty"` } // Proof for flatten EVM proof @@ -150,7 +158,8 @@ type OpenVMEvmProof struct { // OpenVMChunkProof includes the proof info that are required for chunk verification and rollup. type OpenVMChunkProof struct { MetaData struct { - ChunkInfo *ChunkInfo `json:"chunk_info"` + ChunkInfo *ChunkInfo `json:"chunk_info"` + TotalGasUsed uint64 `json:"chunk_total_gas"` } `json:"metadata"` VmProof *OpenVMProof `json:"proof"` diff --git a/coordinator/internal/logic/submitproof/proof_receiver.go b/coordinator/internal/logic/submitproof/proof_receiver.go index e35b7aa98a..e138839944 100644 --- a/coordinator/internal/logic/submitproof/proof_receiver.go +++ b/coordinator/internal/logic/submitproof/proof_receiver.go @@ -71,6 +71,8 @@ type ProofReceiverLogic struct { validateFailureProverTaskStatusNotOk prometheus.Counter validateFailureProverTaskTimeout prometheus.Counter validateFailureProverTaskHaveVerifier prometheus.Counter + proofTime *prometheus.GaugeVec + evm_cycle_per_gas prometheus.Gauge ChunkTask provertask.ProverTask BundleTask provertask.ProverTask @@ -79,6 +81,7 @@ type ProofReceiverLogic struct { // NewSubmitProofReceiverLogic create a proof receiver logic func NewSubmitProofReceiverLogic(cfg *config.ProverManager, chainCfg *params.ChainConfig, db *gorm.DB, vf *verifier.Verifier, reg prometheus.Registerer) *ProofReceiverLogic { + return &ProofReceiverLogic{ chunkOrm: orm.NewChunk(db), batchOrm: orm.NewBatch(db), @@ -133,6 +136,14 @@ func NewSubmitProofReceiverLogic(cfg *config.ProverManager, chainCfg *params.Cha Name: "coordinator_validate_failure_submit_have_been_verifier", Help: "Total number of submit proof validate failure proof have been verifier.", }), + evm_cycle_per_gas: promauto.With(reg).NewGauge(prometheus.GaugeOpts{ + Name: "evm_circuit_cycle_per_gas", + Help: "VM cycles cost for a gas unit cost in evm execution", + }), + proofTime: promauto.With(reg).NewGaugeVec(prometheus.GaugeOpts{ + Name: "prover_proving_time", + Help: "Time of prover cost for a proof", + }, []string{"type", "phase"}), } } @@ -204,12 +215,31 @@ func (m *ProofReceiverLogic) HandleZkProof(ctx *gin.Context, proofParameter coor return unmarshalErr } success, verifyErr = m.verifier.VerifyChunkProof(chunkProof, hardForkName) + if stat := chunkProof.VmProof.Stat; stat != nil { + if g, _ := m.proofTime.GetMetricWithLabelValues("chunk", "exec"); g != nil { + g.Set(float64(stat.ExecutionTimeMills) / 1000) + } + if g, _ := m.proofTime.GetMetricWithLabelValues("chunk", "proving"); g != nil { + g.Set(float64(stat.ProvingTimeMills) / 1000) + } + cycle_per_gas := float64(stat.TotalCycle) / float64(chunkProof.MetaData.TotalGasUsed) + m.evm_cycle_per_gas.Set(cycle_per_gas) + } + case message.ProofTypeBatch: batchProof := &message.OpenVMBatchProof{} if unmarshalErr := json.Unmarshal([]byte(proofParameter.Proof), &batchProof); unmarshalErr != nil { return unmarshalErr } success, verifyErr = m.verifier.VerifyBatchProof(batchProof, hardForkName) + if stat := batchProof.VmProof.Stat; stat != nil { + if g, _ := m.proofTime.GetMetricWithLabelValues("batch", "exec"); g != nil { + g.Set(float64(stat.ExecutionTimeMills) / 1000) + } + if g, _ := m.proofTime.GetMetricWithLabelValues("batch", "proving"); g != nil { + g.Set(float64(stat.ProvingTimeMills) / 1000) + } + } case message.ProofTypeBundle: bundleProof := &message.OpenVMBundleProof{} if unmarshalErr := json.Unmarshal([]byte(proofParameter.Proof), &bundleProof); unmarshalErr != nil { diff --git a/coordinator/test/api_test.go b/coordinator/test/api_test.go index 88d5b6081e..053f6b715e 100644 --- a/coordinator/test/api_test.go +++ b/coordinator/test/api_test.go @@ -584,7 +584,8 @@ func testTimeoutProof(t *testing.T) { err = chunkOrm.UpdateBatchHashInRange(context.Background(), 0, 100, batch.Hash) assert.NoError(t, err) encodeData, err := json.Marshal(message.OpenVMChunkProof{VmProof: &message.OpenVMProof{}, MetaData: struct { - ChunkInfo *message.ChunkInfo `json:"chunk_info"` + ChunkInfo *message.ChunkInfo `json:"chunk_info"` + TotalGasUsed uint64 `json:"chunk_total_gas"` }{ChunkInfo: &message.ChunkInfo{}}}) assert.NoError(t, err) assert.NotEmpty(t, encodeData) diff --git a/crates/libzkp/src/proofs.rs b/crates/libzkp/src/proofs.rs index 5311360a38..8f2687d660 100644 --- a/crates/libzkp/src/proofs.rs +++ b/crates/libzkp/src/proofs.rs @@ -122,6 +122,8 @@ pub trait PersistableProof: Sized { pub struct ChunkProofMetadata { /// The chunk information describing the list of blocks contained within the chunk. pub chunk_info: ChunkInfo, + /// Additional data for stat + pub chunk_total_gas: u64, } impl ProofMetadata for ChunkProofMetadata { diff --git a/crates/libzkp/src/tasks.rs b/crates/libzkp/src/tasks.rs index 51bde1f94b..ae937416b2 100644 --- a/crates/libzkp/src/tasks.rs +++ b/crates/libzkp/src/tasks.rs @@ -44,12 +44,16 @@ pub fn gen_universal_chunk_task( if let Some(interpreter) = interpreter { task.prepare_task_via_interpret(interpreter)?; } + let chunk_total_gas = task.stats().total_gas_used; let chunk_info = task.precheck_and_build_metadata()?; let proving_task = task.try_into()?; let expected_pi_hash = chunk_info.pi_hash_by_fork(fork_name); Ok(( expected_pi_hash, - ChunkProofMetadata { chunk_info }, + ChunkProofMetadata { + chunk_info, + chunk_total_gas, + }, proving_task, )) } From 6a9a34bbce921972cbe499f2b5cb141aee3d9157 Mon Sep 17 00:00:00 2001 From: Ho Date: Tue, 26 Aug 2025 11:17:39 +0900 Subject: [PATCH 18/22] update metrics --- .../logic/submitproof/proof_receiver.go | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/coordinator/internal/logic/submitproof/proof_receiver.go b/coordinator/internal/logic/submitproof/proof_receiver.go index e138839944..92912e523b 100644 --- a/coordinator/internal/logic/submitproof/proof_receiver.go +++ b/coordinator/internal/logic/submitproof/proof_receiver.go @@ -71,7 +71,8 @@ type ProofReceiverLogic struct { validateFailureProverTaskStatusNotOk prometheus.Counter validateFailureProverTaskTimeout prometheus.Counter validateFailureProverTaskHaveVerifier prometheus.Counter - proofTime *prometheus.GaugeVec + proverSpeed *prometheus.GaugeVec + provingTime prometheus.Gauge evm_cycle_per_gas prometheus.Gauge ChunkTask provertask.ProverTask @@ -140,9 +141,13 @@ func NewSubmitProofReceiverLogic(cfg *config.ProverManager, chainCfg *params.Cha Name: "evm_circuit_cycle_per_gas", Help: "VM cycles cost for a gas unit cost in evm execution", }), - proofTime: promauto.With(reg).NewGaugeVec(prometheus.GaugeOpts{ - Name: "prover_proving_time", - Help: "Time of prover cost for a proof", + provingTime: promauto.With(reg).NewGauge(prometheus.GaugeOpts{ + Name: "chunk_proving_time", + Help: "Wall clock time for chunk proving in second", + }), + proverSpeed: promauto.With(reg).NewGaugeVec(prometheus.GaugeOpts{ + Name: "prover_speed", + Help: "Cycle against running time of prover (in mhz)", }, []string{"type", "phase"}), } } @@ -216,14 +221,15 @@ func (m *ProofReceiverLogic) HandleZkProof(ctx *gin.Context, proofParameter coor } success, verifyErr = m.verifier.VerifyChunkProof(chunkProof, hardForkName) if stat := chunkProof.VmProof.Stat; stat != nil { - if g, _ := m.proofTime.GetMetricWithLabelValues("chunk", "exec"); g != nil { - g.Set(float64(stat.ExecutionTimeMills) / 1000) + if g, _ := m.proverSpeed.GetMetricWithLabelValues("chunk", "exec"); g != nil { + g.Set(float64(stat.TotalCycle) / float64(stat.ExecutionTimeMills*1000)) } - if g, _ := m.proofTime.GetMetricWithLabelValues("chunk", "proving"); g != nil { - g.Set(float64(stat.ProvingTimeMills) / 1000) + if g, _ := m.proverSpeed.GetMetricWithLabelValues("chunk", "proving"); g != nil { + g.Set(float64(stat.TotalCycle) / float64(stat.ProvingTimeMills*1000)) } cycle_per_gas := float64(stat.TotalCycle) / float64(chunkProof.MetaData.TotalGasUsed) m.evm_cycle_per_gas.Set(cycle_per_gas) + m.provingTime.Set(float64(stat.ProvingTimeMills) / 1000) } case message.ProofTypeBatch: @@ -233,11 +239,11 @@ func (m *ProofReceiverLogic) HandleZkProof(ctx *gin.Context, proofParameter coor } success, verifyErr = m.verifier.VerifyBatchProof(batchProof, hardForkName) if stat := batchProof.VmProof.Stat; stat != nil { - if g, _ := m.proofTime.GetMetricWithLabelValues("batch", "exec"); g != nil { - g.Set(float64(stat.ExecutionTimeMills) / 1000) + if g, _ := m.proverSpeed.GetMetricWithLabelValues("batch", "exec"); g != nil { + g.Set(float64(stat.TotalCycle) / float64(stat.ExecutionTimeMills*1000)) } - if g, _ := m.proofTime.GetMetricWithLabelValues("batch", "proving"); g != nil { - g.Set(float64(stat.ProvingTimeMills) / 1000) + if g, _ := m.proverSpeed.GetMetricWithLabelValues("batch", "proving"); g != nil { + g.Set(float64(stat.TotalCycle) / float64(stat.ProvingTimeMills*1000)) } } case message.ProofTypeBundle: From 3cbd07cb55538502f74c164fc1ff3b0881dea00d Mon Sep 17 00:00:00 2001 From: Ho Date: Wed, 27 Aug 2025 08:57:09 +0900 Subject: [PATCH 19/22] one line command to setup coordinator configurations --- coordinator/Makefile | 7 ++++ coordinator/build/setup_releases.sh | 62 +++++++++++++++++++++++++++++ coordinator/conf/config.json | 4 -- 3 files changed, 69 insertions(+), 4 deletions(-) create mode 100644 coordinator/build/setup_releases.sh diff --git a/coordinator/Makefile b/coordinator/Makefile index f4630f6ad9..dce6556840 100644 --- a/coordinator/Makefile +++ b/coordinator/Makefile @@ -34,6 +34,13 @@ coordinator_cron: coordinator_tool: go build -ldflags "-X scroll-tech/common/version.ZkVersion=${ZK_VERSION}" -o $(PWD)/build/bin/coordinator_tool ./cmd/tool +localsetup: coordinator_api ## Local setup: build coordinator_api, copy config, and setup releases + @echo "Copying configuration files..." + cp -r $(PWD)/conf $(PWD)/build/bin/ + @echo "Setting up releases..." + cd $(PWD)/build && bash setup_releases.sh + + #coordinator_api_skip_libzkp: # go build -ldflags "-X scroll-tech/common/version.ZkVersion=${ZK_VERSION}" -o $(PWD)/build/bin/coordinator_api ./cmd/api diff --git a/coordinator/build/setup_releases.sh b/coordinator/build/setup_releases.sh new file mode 100644 index 0000000000..256bdfa3cd --- /dev/null +++ b/coordinator/build/setup_releases.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +# release version +if [ -z "${SCROLL_ZKVM_VERSION}" ]; then + echo "SCROLL_ZKVM_VERSION not set" + exit 1 +fi + +# set ASSET_DIR by reading from config.json +CONFIG_FILE="bin/conf/config.json" +if [ ! -f "$CONFIG_FILE" ]; then + echo "Config file $CONFIG_FILE not found" + exit 1 +fi + +# get the number of verifiers in the array +VERIFIER_COUNT=$(jq -r '.prover_manager.verifier.verifiers | length' "$CONFIG_FILE") + +if [ "$VERIFIER_COUNT" = "null" ] || [ "$VERIFIER_COUNT" -eq 0 ]; then + echo "No verifiers found in config file" + exit 1 +fi + +echo "Found $VERIFIER_COUNT verifier(s) in config" + +# iterate through each verifier entry +for ((i=0; i<$VERIFIER_COUNT; i++)); do + # extract assets_path for current verifier + ASSETS_PATH=$(jq -r ".prover_manager.verifier.verifiers[$i].assets_path" "$CONFIG_FILE") + FORK_NAME=$(jq -r ".prover_manager.verifier.verifiers[$i].fork_name" "$CONFIG_FILE") + + if [ "$ASSETS_PATH" = "null" ]; then + echo "Warning: Could not find assets_path for verifier $i, skipping..." + continue + fi + + echo "Processing verifier $i ($FORK_NAME): assets_path=$ASSETS_PATH" + + # check if it's an absolute path (starts with /) + if [[ "$ASSETS_PATH" = /* ]]; then + # absolute path, use as is + ASSET_DIR="$ASSETS_PATH" + else + # relative path, prefix with "bin/" + ASSET_DIR="bin/$ASSETS_PATH" + fi + + echo "Using ASSET_DIR: $ASSET_DIR" + + # create directory if it doesn't exist + mkdir -p "$ASSET_DIR" + + # assets for verifier-only mode + echo "Downloading assets for $FORK_NAME to $ASSET_DIR..." + wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/verifier/verifier.bin -O ${ASSET_DIR}/verifier.bin + wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/verifier/openVmVk.json -O ${ASSET_DIR}/openVmVk.json + + echo "Completed downloading assets for $FORK_NAME" + echo "---" +done + +echo "All verifier assets downloaded successfully" \ No newline at end of file diff --git a/coordinator/conf/config.json b/coordinator/conf/config.json index 7e07c039fd..5e4da562c8 100644 --- a/coordinator/conf/config.json +++ b/coordinator/conf/config.json @@ -9,10 +9,6 @@ "verifier": { "min_prover_version": "v4.4.45", "verifiers": [ - { - "assets_path": "assets", - "fork_name": "euclidV2" - }, { "assets_path": "assets", "fork_name": "feynman" From ce7dcafdb531252d34c857db5d50ae66052e39d1 Mon Sep 17 00:00:00 2001 From: Ho Date: Wed, 27 Aug 2025 11:28:35 +0900 Subject: [PATCH 20/22] Fix hardfork min version check --- coordinator/internal/config/config.go | 7 ++++--- coordinator/internal/logic/auth/login.go | 20 ++++++++++++-------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/coordinator/internal/config/config.go b/coordinator/internal/config/config.go index 4cb91ab57b..1156230f26 100644 --- a/coordinator/internal/config/config.go +++ b/coordinator/internal/config/config.go @@ -57,9 +57,10 @@ type Config struct { // AssetConfig contain assets configurated for each fork, the defaul vkfile name is "OpenVmVk.json". type AssetConfig struct { - AssetsPath string `json:"assets_path"` - ForkName string `json:"fork_name"` - Vkfile string `json:"vk_file,omitempty"` + AssetsPath string `json:"assets_path"` + ForkName string `json:"fork_name"` + Vkfile string `json:"vk_file,omitempty"` + MinProverVersion string `json:"min_prover_version,omitempty"` } // VerifierConfig load zk verifier config. diff --git a/coordinator/internal/logic/auth/login.go b/coordinator/internal/logic/auth/login.go index f5c01a2dfe..28cb3b8a18 100644 --- a/coordinator/internal/logic/auth/login.go +++ b/coordinator/internal/logic/auth/login.go @@ -24,18 +24,16 @@ type LoginLogic struct { openVmVks map[string]struct{} - proverVersionHardForkMap map[string][]string + proverVersionHardForkMap map[string]string } // NewLoginLogic new a LoginLogic func NewLoginLogic(db *gorm.DB, cfg *config.Config, vf *verifier.Verifier) *LoginLogic { - proverVersionHardForkMap := make(map[string][]string) + proverVersionHardForkMap := make(map[string]string) - var hardForks []string for _, cfg := range cfg.ProverManager.Verifier.Verifiers { - hardForks = append(hardForks, cfg.ForkName) + proverVersionHardForkMap[cfg.ForkName] = cfg.MinProverVersion } - proverVersionHardForkMap[cfg.ProverManager.Verifier.MinProverVersion] = hardForks return &LoginLogic{ cfg: cfg, @@ -101,9 +99,15 @@ func (l *LoginLogic) ProverHardForkName(login *types.LoginParameter) (string, er } proverVersion := proverVersionSplits[0] - if hardForkNames, ok := l.proverVersionHardForkMap[proverVersion]; ok { - return strings.Join(hardForkNames, ","), nil + var hardForkNames []string + for n, minVersion := range l.proverVersionHardForkMap { + if minVersion == "" || version.CheckScrollRepoVersion(proverVersion, minVersion) { + hardForkNames = append(hardForkNames, n) + } + } + if len(hardForkNames) == 0 { + return "", fmt.Errorf("invalid prover prover_version:%s", login.Message.ProverVersion) } - return "", fmt.Errorf("invalid prover prover_version:%s", login.Message.ProverVersion) + return strings.Join(hardForkNames, ","), nil } From 6f60a8d32bda4df2eba491f7be58583e48f065c8 Mon Sep 17 00:00:00 2001 From: Ho Date: Wed, 27 Aug 2025 11:39:14 +0900 Subject: [PATCH 21/22] fix according to AI review --- .../logic/submitproof/proof_receiver.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/coordinator/internal/logic/submitproof/proof_receiver.go b/coordinator/internal/logic/submitproof/proof_receiver.go index 92912e523b..3d1693affa 100644 --- a/coordinator/internal/logic/submitproof/proof_receiver.go +++ b/coordinator/internal/logic/submitproof/proof_receiver.go @@ -73,7 +73,7 @@ type ProofReceiverLogic struct { validateFailureProverTaskHaveVerifier prometheus.Counter proverSpeed *prometheus.GaugeVec provingTime prometheus.Gauge - evm_cycle_per_gas prometheus.Gauge + evmCyclePerGas prometheus.Gauge ChunkTask provertask.ProverTask BundleTask provertask.ProverTask @@ -137,7 +137,7 @@ func NewSubmitProofReceiverLogic(cfg *config.ProverManager, chainCfg *params.Cha Name: "coordinator_validate_failure_submit_have_been_verifier", Help: "Total number of submit proof validate failure proof have been verifier.", }), - evm_cycle_per_gas: promauto.With(reg).NewGauge(prometheus.GaugeOpts{ + evmCyclePerGas: promauto.With(reg).NewGauge(prometheus.GaugeOpts{ Name: "evm_circuit_cycle_per_gas", Help: "VM cycles cost for a gas unit cost in evm execution", }), @@ -221,14 +221,16 @@ func (m *ProofReceiverLogic) HandleZkProof(ctx *gin.Context, proofParameter coor } success, verifyErr = m.verifier.VerifyChunkProof(chunkProof, hardForkName) if stat := chunkProof.VmProof.Stat; stat != nil { - if g, _ := m.proverSpeed.GetMetricWithLabelValues("chunk", "exec"); g != nil { + if g, _ := m.proverSpeed.GetMetricWithLabelValues("chunk", "exec"); g != nil && stat.ExecutionTimeMills > 0 { g.Set(float64(stat.TotalCycle) / float64(stat.ExecutionTimeMills*1000)) } - if g, _ := m.proverSpeed.GetMetricWithLabelValues("chunk", "proving"); g != nil { + if g, _ := m.proverSpeed.GetMetricWithLabelValues("chunk", "proving"); g != nil && stat.ProvingTimeMills > 0 { g.Set(float64(stat.TotalCycle) / float64(stat.ProvingTimeMills*1000)) } - cycle_per_gas := float64(stat.TotalCycle) / float64(chunkProof.MetaData.TotalGasUsed) - m.evm_cycle_per_gas.Set(cycle_per_gas) + if chunkProof.MetaData.TotalGasUsed > 0 { + cycle_per_gas := float64(stat.TotalCycle) / float64(chunkProof.MetaData.TotalGasUsed) + m.evmCyclePerGas.Set(cycle_per_gas) + } m.provingTime.Set(float64(stat.ProvingTimeMills) / 1000) } @@ -239,10 +241,10 @@ func (m *ProofReceiverLogic) HandleZkProof(ctx *gin.Context, proofParameter coor } success, verifyErr = m.verifier.VerifyBatchProof(batchProof, hardForkName) if stat := batchProof.VmProof.Stat; stat != nil { - if g, _ := m.proverSpeed.GetMetricWithLabelValues("batch", "exec"); g != nil { + if g, _ := m.proverSpeed.GetMetricWithLabelValues("batch", "exec"); g != nil && stat.ExecutionTimeMills > 0 { g.Set(float64(stat.TotalCycle) / float64(stat.ExecutionTimeMills*1000)) } - if g, _ := m.proverSpeed.GetMetricWithLabelValues("batch", "proving"); g != nil { + if g, _ := m.proverSpeed.GetMetricWithLabelValues("batch", "proving"); g != nil && stat.ProvingTimeMills > 0 { g.Set(float64(stat.TotalCycle) / float64(stat.ProvingTimeMills*1000)) } } From e1286da9262d8400b8936eb670e267fb30f3273e Mon Sep 17 00:00:00 2001 From: Ho Date: Thu, 28 Aug 2025 21:31:20 +0900 Subject: [PATCH 22/22] Revert config.json --- coordinator/conf/config.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/coordinator/conf/config.json b/coordinator/conf/config.json index 5e4da562c8..02acb2fa74 100644 --- a/coordinator/conf/config.json +++ b/coordinator/conf/config.json @@ -9,6 +9,10 @@ "verifier": { "min_prover_version": "v4.4.45", "verifiers": [ + { + "assets_path": "assets", + "fork_name": "euclidV2" + }, { "assets_path": "assets", "fork_name": "feynman"