From e4397cc9d20c6d1efb8bd35f8965d1a44681f1b3 Mon Sep 17 00:00:00 2001 From: Vladislav Volosnikov Date: Mon, 7 Oct 2024 14:03:04 +0300 Subject: [PATCH 1/7] Adapt for new witness generator --- Cargo.toml | 6 +- prover/Cargo.toml | 6 +- .../src/rounds/basic_circuits/utils.rs | 151 +++++------------- .../crates/bin/witness_generator/src/utils.rs | 51 +----- prover/crates/lib/keystore/Cargo.toml | 2 +- prover/crates/lib/keystore/src/keystore.rs | 1 + prover/crates/lib/prover_fri_types/Cargo.toml | 2 +- 7 files changed, 54 insertions(+), 165 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 94fadb25968a..81dde55bddb5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -217,15 +217,15 @@ circuit_sequencer_api_1_3_3 = { package = "circuit_sequencer_api", version = "0. circuit_sequencer_api_1_4_0 = { package = "circuit_sequencer_api", version = "0.140" } circuit_sequencer_api_1_4_1 = { package = "circuit_sequencer_api", version = "0.141" } circuit_sequencer_api_1_4_2 = { package = "circuit_sequencer_api", version = "0.142" } -circuit_sequencer_api_1_5_0 = { package = "circuit_sequencer_api", version = "=0.150.5" } +circuit_sequencer_api_1_5_0 = { git = "https://github.com/matter-labs/zksync-protocol.git", package = "circuit_sequencer_api" } crypto_codegen = { package = "zksync_solidity_vk_codegen", version = "=0.30.1" } -kzg = { package = "zksync_kzg", version = "=0.150.5" } +kzg = { git = "https://github.com/matter-labs/zksync-protocol.git", package = "zksync_kzg" } zk_evm = { version = "=0.133.0" } zk_evm_1_3_1 = { package = "zk_evm", version = "0.131.0-rc.2" } zk_evm_1_3_3 = { package = "zk_evm", version = "0.133" } zk_evm_1_4_0 = { package = "zk_evm", version = "0.140" } zk_evm_1_4_1 = { package = "zk_evm", version = "0.141" } -zk_evm_1_5_0 = { package = "zk_evm", version = "=0.150.5" } +zk_evm_1_5_0 = { git = "https://github.com/matter-labs/zksync-protocol.git", package = "zk_evm" } # New VM; pinned to a specific commit because of instability zksync_vm2 = { git = "https://github.com/matter-labs/vm2.git", rev = "74577d9be13b1bff9d1a712389731f669b179e47" } diff --git a/prover/Cargo.toml b/prover/Cargo.toml index e95bae3d4c16..d0f9190b04b9 100644 --- a/prover/Cargo.toml +++ b/prover/Cargo.toml @@ -58,9 +58,9 @@ tracing-subscriber = "0.3" vise = "0.2.0" # Proving dependencies -circuit_definitions = "=0.150.5" -circuit_sequencer_api = "=0.150.5" -zkevm_test_harness = "=0.150.5" +circuit_definitions = { git = "https://github.com/matter-labs/zksync-protocol.git", package = "circuit_definitions" } +circuit_sequencer_api = { git = "https://github.com/matter-labs/zksync-protocol.git", package = "circuit_sequencer_api" } +zkevm_test_harness = { git = "https://github.com/matter-labs/zksync-protocol.git", package = "zkevm_test_harness" } # GPU proving dependencies wrapper_prover = { package = "zksync-wrapper-prover", version = "=0.150.9" } diff --git a/prover/crates/bin/witness_generator/src/rounds/basic_circuits/utils.rs b/prover/crates/bin/witness_generator/src/rounds/basic_circuits/utils.rs index 23ae1b0f2afe..f10e4a651da9 100644 --- a/prover/crates/bin/witness_generator/src/rounds/basic_circuits/utils.rs +++ b/prover/crates/bin/witness_generator/src/rounds/basic_circuits/utils.rs @@ -5,7 +5,7 @@ use std::{ }; use circuit_definitions::{ - circuit_definitions::base_layer::{ZkSyncBaseLayerCircuit, ZkSyncBaseLayerStorage}, + circuit_definitions::base_layer::ZkSyncBaseLayerStorage, encodings::recursion_request::RecursionQueueSimulator, zkevm_circuits::fsm_input_output::ClosedFormInputCompactFormWitness, }; @@ -21,7 +21,7 @@ use zksync_multivm::{ zk_evm_latest::ethereum_types::Address, }; use zksync_object_store::ObjectStore; -use zksync_prover_fri_types::{keys::ClosedFormInputKey, CircuitAuxData}; +use zksync_prover_fri_types::keys::ClosedFormInputKey; use zksync_prover_interface::inputs::WitnessInputData; use zksync_system_constants::BOOTLOADER_ADDRESS; use zksync_types::L1BatchNumber; @@ -31,8 +31,7 @@ use crate::{ rounds::basic_circuits::Witness, storage_oracle::StorageOracle, utils::{ - expand_bootloader_contents, save_circuit, save_ram_premutation_queue_witness, - ClosedFormInputWrapper, KZG_TRUSTED_SETUP_FILE, + expand_bootloader_contents, save_circuit, ClosedFormInputWrapper, KZG_TRUSTED_SETUP_FILE, }, witness::WitnessStorage, }; @@ -64,17 +63,39 @@ pub(super) async fn generate_witness( let (circuit_sender, mut circuit_receiver) = tokio::sync::mpsc::channel(1); let (queue_sender, mut queue_receiver) = tokio::sync::mpsc::channel(1); - let (ram_permutation_queue_sender, mut ram_permutation_queue_receiver) = - tokio::sync::mpsc::channel(1); let make_circuits_span = tracing::info_span!("make_circuits"); let make_circuits_span_copy = make_circuits_span.clone(); + + use std::sync::mpsc::sync_channel; + use std::thread; + let (artifacts_sender, artifacts_receiver) = sync_channel(1); + + let artifacts_receiver_handle = thread::spawn(move || { + let span = tracing::info_span!(parent: make_circuits_span_copy, "make_circuits_blocking"); + + while let Ok(artifact) = artifacts_receiver.recv() { + match artifact { + WitnessGenerationArtifact::BaseLayerCircuit(circuit) => { + let parent_span = span.clone(); + tracing::info_span!(parent: parent_span, "send_circuit").in_scope(|| { + circuit_sender + .blocking_send(circuit) + .expect("failed to send circuit from harness"); + }); + } + WitnessGenerationArtifact::RecursionQueue((a, b, c)) => queue_sender + .blocking_send((a as u8, b, c)) + .expect("failed to send recursion queue from harness"), + _ => {} + } + } + }); + // Blocking call from harness that does the CPU heavy lifting. // Provides circuits and recursion queue via callback functions and returns scheduler witnesses. // Circuits are "streamed" one by one as they're being generated. let make_circuits_handle = tokio::task::spawn_blocking(move || { - let span = tracing::info_span!(parent: make_circuits_span_copy, "make_circuits_blocking"); - let witness_storage = WitnessStorage::new(input.vm_run_data.witness_block_state); let storage_view = StorageView::new(witness_storage).to_rc_ptr(); @@ -91,29 +112,6 @@ pub(super) async fn generate_witness( .to_str() .expect("Path to KZG trusted setup is not a UTF-8 string"); - let artifacts_callback = |artifact: WitnessGenerationArtifact| match artifact { - WitnessGenerationArtifact::BaseLayerCircuit(circuit) => { - let parent_span = span.clone(); - tracing::info_span!(parent: parent_span, "send_circuit").in_scope(|| { - circuit_sender - .blocking_send(circuit) - .expect("failed to send circuit from harness"); - }); - } - WitnessGenerationArtifact::RecursionQueue((a, b, c)) => queue_sender - .blocking_send((a as u8, b, c)) - .expect("failed to send recursion queue from harness"), - a @ WitnessGenerationArtifact::MemoryQueueWitness(_) => { - let parent_span = span.clone(); - tracing::info_span!(parent: parent_span, "send_ram_permutation_queue_witness") - .in_scope(|| { - ram_permutation_queue_sender - .blocking_send(a) - .expect("failed to send ram permutation queue sitness from harness"); - }); - } - }; - let (scheduler_witness, block_witness) = zkevm_test_harness::external_calls::run( Address::zero(), BOOTLOADER_ADDRESS, @@ -129,9 +127,9 @@ pub(super) async fn generate_witness( geometry_config, storage_oracle, tree, - path, + path.to_owned(), input.eip_4844_blobs.blobs(), - artifacts_callback, + artifacts_sender, ); (scheduler_witness, block_witness) }) @@ -150,8 +148,6 @@ pub(super) async fn generate_witness( // If the order is tampered with, proving will fail (as the proof would be computed for a different sequence of instruction). let mut circuit_sequence = 0; - let mut ram_circuit_sequence = 0; - while let Some(circuit) = circuit_receiver .recv() .instrument(tracing::info_span!("wait_for_circuit")) @@ -166,26 +162,9 @@ pub(super) async fn generate_witness( .await .expect("failed to get permit for running save circuit task"); - let partial_circuit_aux_data = match &circuit { - ZkSyncBaseLayerCircuit::RAMPermutation(_) => { - let circuit_subsequence_number = ram_circuit_sequence; - ram_circuit_sequence += 1; - Some(CircuitAuxData { - circuit_subsequence_number, - }) - } - _ => None, - }; - save_circuit_handles.push(tokio::task::spawn(async move { - let (circuit_id, circuit_url) = save_circuit( - block_number, - circuit, - sequence, - partial_circuit_aux_data, - object_store, - ) - .await; + let (circuit_id, circuit_url) = + save_circuit(block_number, circuit, sequence, object_store).await; drop(permit); (circuit_id, circuit_url) })); @@ -193,57 +172,6 @@ pub(super) async fn generate_witness( } .instrument(save_circuits_span); - let mut save_ram_queue_witness_handles = vec![]; - - let save_ram_queue_witness_span = tracing::info_span!("save_circuits"); - - // Future which receives part of RAM permutation circuits witnesses and saves them async. - // Uses semaphore because these artifacts are of significant size - let ram_queue_witness_receiver_handle = async { - let mut sorted_sequence = 0; - let mut unsorted_sequence = 0; - - while let Some(witness_artifact) = ram_permutation_queue_receiver - .recv() - .instrument(tracing::info_span!("wait_for_ram_witness")) - .await - { - let object_store = object_store.clone(); - let semaphore = semaphore.clone(); - let permit = semaphore - .acquire_owned() - .await - .expect("failed to get permit for running save ram permutation queue witness task"); - let (is_sorted, witness, sequence) = match witness_artifact { - WitnessGenerationArtifact::MemoryQueueWitness((witness, sorted)) => { - let sequence = if sorted { - let sequence = sorted_sequence; - sorted_sequence += 1; - sequence - } else { - let sequence = unsorted_sequence; - unsorted_sequence += 1; - sequence - }; - (sorted, witness, sequence) - } - _ => panic!("Invalid artifact received"), - }; - save_ram_queue_witness_handles.push(tokio::task::spawn(async move { - let _ = save_ram_premutation_queue_witness( - block_number, - sequence, - is_sorted, - witness, - object_store, - ) - .await; - drop(permit); - })); - } - } - .instrument(save_ram_queue_witness_span); - let mut save_queue_handles = vec![]; let save_queues_span = tracing::info_span!("save_queues"); @@ -260,7 +188,7 @@ pub(super) async fn generate_witness( let object_store = object_store.clone(); save_queue_handles.push(tokio::task::spawn(save_recursion_queue( block_number, - circuit_id, + circuit_id.try_into().unwrap(), queue, inputs, object_store, @@ -269,11 +197,10 @@ pub(super) async fn generate_witness( } .instrument(save_queues_span); - let (witnesses, _, _, _) = tokio::join!( + let (witnesses, _, _) = tokio::join!( make_circuits_handle, circuit_receiver_handle, - queue_receiver_handle, - ram_queue_witness_receiver_handle + queue_receiver_handle ); let (mut scheduler_witness, block_aux_witness) = witnesses.unwrap(); @@ -298,11 +225,7 @@ pub(super) async fn generate_witness( .filter(|(circuit_id, _, _)| circuits_present.contains(circuit_id)) .collect(); - let _: Vec<_> = futures::future::join_all(save_ram_queue_witness_handles) - .await - .into_iter() - .map(|result| result.expect("failed to save ram permutation queue witness")) - .collect(); + artifacts_receiver_handle.join().unwrap(); scheduler_witness.previous_block_meta_hash = input.previous_batch_metadata.meta_hash.0; scheduler_witness.previous_block_aux_hash = input.previous_batch_metadata.aux_hash.0; diff --git a/prover/crates/bin/witness_generator/src/utils.rs b/prover/crates/bin/witness_generator/src/utils.rs index 8524bdae9ff0..ea631f19cd85 100644 --- a/prover/crates/bin/witness_generator/src/utils.rs +++ b/prover/crates/bin/witness_generator/src/utils.rs @@ -3,10 +3,7 @@ use std::{ sync::Arc, }; -use circuit_definitions::{ - circuit_definitions::base_layer::ZkSyncBaseLayerCircuit, - encodings::memory_query::MemoryQueueStateWitnesses, -}; +use circuit_definitions::circuit_definitions::base_layer::ZkSyncBaseLayerCircuit; use once_cell::sync::Lazy; use zkevm_test_harness::boojum::field::goldilocks::GoldilocksField; use zksync_multivm::utils::get_used_bootloader_memory_bytes; @@ -24,8 +21,8 @@ use zksync_prover_fri_types::{ encodings::recursion_request::RecursionQueueSimulator, zkevm_circuits::scheduler::input::SchedulerCircuitInstanceWitness, }, - keys::{AggregationsKey, ClosedFormInputKey, FriCircuitKey, RamPermutationQueueWitnessKey}, - CircuitAuxData, CircuitWrapper, FriProofWrapper, RamPermutationQueueWitness, + keys::{AggregationsKey, ClosedFormInputKey, FriCircuitKey}, + CircuitWrapper, FriProofWrapper, }; use zksync_types::{basic_fri_types::AggregationRound, L1BatchNumber, ProtocolVersionId, U256}; @@ -121,7 +118,6 @@ pub async fn save_circuit( block_number: L1BatchNumber, circuit: ZkSyncBaseLayerCircuit, sequence_number: usize, - aux_data_for_partial_circuit: Option, object_store: Arc, ) -> (u8, String) { let circuit_id = circuit.numeric_circuit_type(); @@ -133,43 +129,12 @@ pub async fn save_circuit( depth: 0, }; - let blob_url = if let Some(aux_data_for_partial_circuit) = aux_data_for_partial_circuit { - object_store - .put( - circuit_key, - &CircuitWrapper::BasePartial((circuit, aux_data_for_partial_circuit)), - ) - .await - .unwrap() - } else { - object_store - .put(circuit_key, &CircuitWrapper::Base(circuit)) - .await - .unwrap() - }; - (circuit_id, blob_url) -} - -#[tracing::instrument( - skip_all, - fields(l1_batch = %block_number) -)] -pub async fn save_ram_premutation_queue_witness( - block_number: L1BatchNumber, - circuit_subsequence_number: usize, - is_sorted: bool, - witness: MemoryQueueStateWitnesses, - object_store: Arc, -) -> String { - let witness_key = RamPermutationQueueWitnessKey { - block_number, - circuit_subsequence_number, - is_sorted, - }; - object_store - .put(witness_key, &RamPermutationQueueWitness { witness }) + let blob_url = object_store + .put(circuit_key, &CircuitWrapper::Base(circuit)) .await - .unwrap() + .unwrap(); + + (circuit_id, blob_url) } #[tracing::instrument( diff --git a/prover/crates/lib/keystore/Cargo.toml b/prover/crates/lib/keystore/Cargo.toml index 4d9addc26bc0..d81e800b3036 100644 --- a/prover/crates/lib/keystore/Cargo.toml +++ b/prover/crates/lib/keystore/Cargo.toml @@ -15,7 +15,7 @@ zksync_basic_types.workspace = true zksync_utils.workspace = true zksync_prover_fri_types.workspace = true zkevm_test_harness.workspace = true -circuit_definitions = { workspace = true, features = ["log_tracing"] } +circuit_definitions = { git = "https://github.com/matter-labs/zksync-protocol.git", package = "circuit_definitions", features = [ "log_tracing" ] } shivini = { workspace = true, optional = true } anyhow.workspace = true diff --git a/prover/crates/lib/keystore/src/keystore.rs b/prover/crates/lib/keystore/src/keystore.rs index 6225943e3cd7..ab3b115bc635 100644 --- a/prover/crates/lib/keystore/src/keystore.rs +++ b/prover/crates/lib/keystore/src/keystore.rs @@ -470,6 +470,7 @@ impl Keystore { } /// Async loads mapping of all circuits to setup key, if successful + #[cfg(feature = "gpu")] pub async fn load_all_setup_key_mapping( &self, ) -> anyhow::Result>> { diff --git a/prover/crates/lib/prover_fri_types/Cargo.toml b/prover/crates/lib/prover_fri_types/Cargo.toml index 3b228b42ec40..30046aa0badf 100644 --- a/prover/crates/lib/prover_fri_types/Cargo.toml +++ b/prover/crates/lib/prover_fri_types/Cargo.toml @@ -13,5 +13,5 @@ categories.workspace = true [dependencies] zksync_object_store.workspace = true zksync_types.workspace = true -circuit_definitions = { workspace = true, features = [ "log_tracing" ] } +circuit_definitions = { git = "https://github.com/matter-labs/zksync-protocol.git", package = "circuit_definitions", features = [ "log_tracing" ] } serde = { workspace = true, features = ["derive"] } From e6c641a6077aa8279bb78aea88ea25de562bb6c1 Mon Sep 17 00:00:00 2001 From: Vladislav Volosnikov Date: Mon, 7 Oct 2024 14:06:49 +0300 Subject: [PATCH 2/7] Fmt --- .../bin/witness_generator/src/rounds/basic_circuits/utils.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/prover/crates/bin/witness_generator/src/rounds/basic_circuits/utils.rs b/prover/crates/bin/witness_generator/src/rounds/basic_circuits/utils.rs index f10e4a651da9..2bd262a02ea5 100644 --- a/prover/crates/bin/witness_generator/src/rounds/basic_circuits/utils.rs +++ b/prover/crates/bin/witness_generator/src/rounds/basic_circuits/utils.rs @@ -67,8 +67,7 @@ pub(super) async fn generate_witness( let make_circuits_span = tracing::info_span!("make_circuits"); let make_circuits_span_copy = make_circuits_span.clone(); - use std::sync::mpsc::sync_channel; - use std::thread; + use std::{sync::mpsc::sync_channel, thread}; let (artifacts_sender, artifacts_receiver) = sync_channel(1); let artifacts_receiver_handle = thread::spawn(move || { From b0b98ac32ee8d57423b60a6091368ee8bdada332 Mon Sep 17 00:00:00 2001 From: Vladislav Volosnikov Date: Wed, 16 Oct 2024 15:37:17 +0300 Subject: [PATCH 3/7] Update temp deps --- Cargo.lock | 53 +++++++++++++++------ prover/Cargo.lock | 119 ++++++++++++++++++++-------------------------- prover/Cargo.toml | 4 +- 3 files changed, 92 insertions(+), 84 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 127921ba3e9e..a4d7ec6125e6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1314,8 +1314,7 @@ dependencies = [ [[package]] name = "circuit_encodings" version = "0.150.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e67617688c66640c84f9b98ff26d48f7898dca4faeb45241a4f21ec333788e7b" +source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" dependencies = [ "derivative", "serde", @@ -1381,8 +1380,7 @@ dependencies = [ [[package]] name = "circuit_sequencer_api" version = "0.150.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21017310971d4a051e4a52ad70eed11d1ae69defeca8314f73a3a4bad16705a9" +source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" dependencies = [ "circuit_encodings 0.150.5", "derivative", @@ -9327,8 +9325,7 @@ dependencies = [ [[package]] name = "zk_evm" version = "0.150.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6e69931f24db5cf333b714721e8d80ff88bfdb7da8c3dc7882612ffddb8d27" +source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" dependencies = [ "anyhow", "lazy_static", @@ -9336,7 +9333,7 @@ dependencies = [ "serde", "serde_json", "static_assertions", - "zk_evm_abstractions 0.150.5", + "zk_evm_abstractions 0.150.5 (git+https://github.com/matter-labs/zksync-protocol.git)", ] [[package]] @@ -9375,7 +9372,19 @@ dependencies = [ "num_enum 0.6.1", "serde", "static_assertions", - "zkevm_opcode_defs 0.150.5", + "zkevm_opcode_defs 0.150.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "zk_evm_abstractions" +version = "0.150.5" +source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" +dependencies = [ + "anyhow", + "num_enum 0.6.1", + "serde", + "static_assertions", + "zkevm_opcode_defs 0.150.5 (git+https://github.com/matter-labs/zksync-protocol.git)", ] [[package]] @@ -9425,8 +9434,7 @@ dependencies = [ [[package]] name = "zkevm_circuits" version = "0.150.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784fa7cfb51e17c5ced112bca43da30b3468b2347b7af0427ad9638759fb140e" +source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" dependencies = [ "arrayvec 0.7.6", "boojum", @@ -9438,7 +9446,7 @@ dependencies = [ "seq-macro", "serde", "smallvec", - "zkevm_opcode_defs 0.150.5", + "zkevm_opcode_defs 0.150.5 (git+https://github.com/matter-labs/zksync-protocol.git)", "zksync_cs_derive", ] @@ -9501,6 +9509,22 @@ dependencies = [ "sha3 0.10.8", ] +[[package]] +name = "zkevm_opcode_defs" +version = "0.150.5" +source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" +dependencies = [ + "bitflags 2.6.0", + "blake2 0.10.6", + "ethereum-types", + "k256 0.13.4", + "lazy_static", + "p256", + "serde", + "sha2 0.10.8", + "sha3 0.10.8", +] + [[package]] name = "zksync_base_token_adjuster" version = "0.1.0" @@ -10330,8 +10354,7 @@ dependencies = [ [[package]] name = "zksync_kzg" version = "0.150.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb8a9c76c172a6d639855ee342b9a670e3ba472f5ae302f771b1c3ee777dc88" +source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" dependencies = [ "boojum", "derivative", @@ -11296,8 +11319,8 @@ source = "git+https://github.com/matter-labs/vm2.git?rev=74577d9be13b1bff9d1a712 dependencies = [ "enum_dispatch", "primitive-types", - "zk_evm_abstractions 0.150.5", - "zkevm_opcode_defs 0.150.5", + "zk_evm_abstractions 0.150.5 (registry+https://github.com/rust-lang/crates.io-index)", + "zkevm_opcode_defs 0.150.5 (registry+https://github.com/rust-lang/crates.io-index)", "zksync_vm2_interface", ] diff --git a/prover/Cargo.lock b/prover/Cargo.lock index 4ea83108a42e..77260fb89eb1 100644 --- a/prover/Cargo.lock +++ b/prover/Cargo.lock @@ -291,7 +291,7 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2927c7af777b460b7ccd95f8b67acd7b4c04ec8896bf0c8e80ba30523cffc057" dependencies = [ - "bindgen 0.69.4", + "bindgen", "cc", "cmake", "dunce", @@ -437,29 +437,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bindgen" -version = "0.59.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8" -dependencies = [ - "bitflags 1.3.2", - "cexpr", - "clang-sys", - "clap 2.34.0", - "env_logger 0.9.3", - "lazy_static", - "lazycell", - "log", - "peeking_take_while", - "proc-macro2 1.0.85", - "quote 1.0.36", - "regex", - "rustc-hash", - "shlex", - "which", -] - [[package]] name = "bindgen" version = "0.69.4" @@ -651,8 +628,7 @@ dependencies = [ [[package]] name = "boojum-cuda" version = "0.150.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f9a6d958dd58a0899737e5a1fc6597aefcf7980bf8be5be5329e701cbd45ca" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#5777d2934bf05cf80401aae33cc8acb1a14d2b49" dependencies = [ "boojum", "cmake", @@ -660,6 +636,7 @@ dependencies = [ "era_cudart_sys", "itertools 0.13.0", "lazy_static", + "snark_wrapper", ] [[package]] @@ -799,8 +776,7 @@ dependencies = [ [[package]] name = "circuit_definitions" version = "0.150.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b532214f063e5e0ee5c0fc1d3afd56dec541efa68b8985f14cc55cc324f4c48" +source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" dependencies = [ "circuit_encodings 0.150.5", "crossbeam", @@ -849,8 +825,7 @@ dependencies = [ [[package]] name = "circuit_encodings" version = "0.150.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e67617688c66640c84f9b98ff26d48f7898dca4faeb45241a4f21ec333788e7b" +source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" dependencies = [ "derivative", "serde", @@ -916,8 +891,7 @@ dependencies = [ [[package]] name = "circuit_sequencer_api" version = "0.150.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21017310971d4a051e4a52ad70eed11d1ae69defeca8314f73a3a4bad16705a9" +source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" dependencies = [ "circuit_encodings 0.150.5", "derivative", @@ -1691,8 +1665,7 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "era_cudart" version = "0.150.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f0d6e329b2c11d134c3140951209be968ef316ed64ddde75640eaed7f10264" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#5777d2934bf05cf80401aae33cc8acb1a14d2b49" dependencies = [ "bitflags 2.6.0", "era_cudart_sys", @@ -1702,8 +1675,7 @@ dependencies = [ [[package]] name = "era_cudart_sys" version = "0.150.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "060e8186234c7a281021fb95614e06e94e1fc7ab78938360a5c27af0f8fc6105" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#5777d2934bf05cf80401aae33cc8acb1a14d2b49" dependencies = [ "serde_json", ] @@ -3781,12 +3753,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "pem" version = "3.0.4" @@ -5302,8 +5268,7 @@ checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" [[package]] name = "shivini" version = "0.150.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebb6d928451f0779f14da02ee9d51d4bde560328edc6471f0d5c5c11954345c4" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#5777d2934bf05cf80401aae33cc8acb1a14d2b49" dependencies = [ "bincode", "blake2 0.10.6", @@ -5314,6 +5279,7 @@ dependencies = [ "era_cudart", "era_cudart_sys", "hex", + "itertools 0.13.0", "rand 0.8.5", "serde", "sha2 0.10.8", @@ -7044,8 +7010,7 @@ dependencies = [ [[package]] name = "zk_evm" version = "0.150.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6e69931f24db5cf333b714721e8d80ff88bfdb7da8c3dc7882612ffddb8d27" +source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" dependencies = [ "anyhow", "lazy_static", @@ -7053,7 +7018,7 @@ dependencies = [ "serde", "serde_json", "static_assertions", - "zk_evm_abstractions 0.150.5", + "zk_evm_abstractions 0.150.5 (git+https://github.com/matter-labs/zksync-protocol.git)", ] [[package]] @@ -7092,14 +7057,25 @@ dependencies = [ "num_enum 0.6.1", "serde", "static_assertions", - "zkevm_opcode_defs 0.150.5", + "zkevm_opcode_defs 0.150.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "zk_evm_abstractions" +version = "0.150.5" +source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" +dependencies = [ + "anyhow", + "num_enum 0.6.1", + "serde", + "static_assertions", + "zkevm_opcode_defs 0.150.5 (git+https://github.com/matter-labs/zksync-protocol.git)", ] [[package]] name = "zkevm-assembly" version = "0.150.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e99106038062537c05b4e6e7754d1bbba28ba16185a3e5ee5ad22e2f8be883bb" +source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" dependencies = [ "env_logger 0.9.3", "hex", @@ -7112,7 +7088,7 @@ dependencies = [ "smallvec", "structopt", "thiserror", - "zkevm_opcode_defs 0.150.5", + "zkevm_opcode_defs 0.150.5 (git+https://github.com/matter-labs/zksync-protocol.git)", ] [[package]] @@ -7162,8 +7138,7 @@ dependencies = [ [[package]] name = "zkevm_circuits" version = "0.150.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784fa7cfb51e17c5ced112bca43da30b3468b2347b7af0427ad9638759fb140e" +source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" dependencies = [ "arrayvec 0.7.4", "boojum", @@ -7175,7 +7150,7 @@ dependencies = [ "seq-macro", "serde", "smallvec", - "zkevm_opcode_defs 0.150.5", + "zkevm_opcode_defs 0.150.5 (git+https://github.com/matter-labs/zksync-protocol.git)", "zksync_cs_derive", ] @@ -7238,11 +7213,26 @@ dependencies = [ "sha3 0.10.8", ] +[[package]] +name = "zkevm_opcode_defs" +version = "0.150.5" +source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" +dependencies = [ + "bitflags 2.6.0", + "blake2 0.10.6", + "ethereum-types", + "k256 0.13.3", + "lazy_static", + "p256", + "serde", + "sha2 0.10.8", + "sha3 0.10.8", +] + [[package]] name = "zkevm_test_harness" version = "0.150.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "550f82d3b7448c35168dc13bfadbccd5fd306097b6e1ea01793151c1c9137a36" +source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" dependencies = [ "bincode", "circuit_definitions", @@ -7268,10 +7258,8 @@ dependencies = [ [[package]] name = "zksync-gpu-ffi" version = "0.150.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86511b3957adfe415ecdbd1ee01c51aa3ca131a607e61ca024976312f613b0f9" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#5777d2934bf05cf80401aae33cc8acb1a14d2b49" dependencies = [ - "bindgen 0.59.2", "cmake", "crossbeam", "derivative", @@ -7284,8 +7272,7 @@ dependencies = [ [[package]] name = "zksync-gpu-prover" version = "0.150.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e4c00f2db603d1b696bc2e9d822bb4c087050de5b65559067fc2232786cbc93" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#5777d2934bf05cf80401aae33cc8acb1a14d2b49" dependencies = [ "bit-vec", "cfg-if", @@ -7301,8 +7288,7 @@ dependencies = [ [[package]] name = "zksync-wrapper-prover" version = "0.150.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58df1ec10e0d5eb58563bb01abda5ed185c9b9621502e361848ca40eb7868ac" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#5777d2934bf05cf80401aae33cc8acb1a14d2b49" dependencies = [ "circuit_definitions", "zkevm_test_harness", @@ -7663,8 +7649,7 @@ dependencies = [ [[package]] name = "zksync_kzg" version = "0.150.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb8a9c76c172a6d639855ee342b9a670e3ba472f5ae302f771b1c3ee777dc88" +source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" dependencies = [ "boojum", "derivative", @@ -8127,8 +8112,8 @@ source = "git+https://github.com/matter-labs/vm2.git?rev=74577d9be13b1bff9d1a712 dependencies = [ "enum_dispatch", "primitive-types", - "zk_evm_abstractions 0.150.5", - "zkevm_opcode_defs 0.150.5", + "zk_evm_abstractions 0.150.5 (registry+https://github.com/rust-lang/crates.io-index)", + "zkevm_opcode_defs 0.150.5 (registry+https://github.com/rust-lang/crates.io-index)", "zksync_vm2_interface", ] diff --git a/prover/Cargo.toml b/prover/Cargo.toml index d0f9190b04b9..e0c95fcbea4d 100644 --- a/prover/Cargo.toml +++ b/prover/Cargo.toml @@ -63,8 +63,8 @@ circuit_sequencer_api = { git = "https://github.com/matter-labs/zksync-protocol. zkevm_test_harness = { git = "https://github.com/matter-labs/zksync-protocol.git", package = "zkevm_test_harness" } # GPU proving dependencies -wrapper_prover = { package = "zksync-wrapper-prover", version = "=0.150.9" } -shivini = "=0.150.9" +wrapper_prover = { git = "https://github.com/matter-labs/zksync-crypto-gpu.git", branch="vv-temp-harness-pin", package = "zksync-wrapper-prover" } +shivini = { git = "https://github.com/matter-labs/zksync-crypto-gpu.git", branch="vv-temp-harness-pin", package = "shivini" } # Core workspace dependencies zksync_multivm = { path = "../core/lib/multivm", version = "0.1.0" } From 7fdd445224cdf15ac0adab92df47141e92877670 Mon Sep 17 00:00:00 2001 From: Vladislav Volosnikov Date: Wed, 16 Oct 2024 17:36:17 +0300 Subject: [PATCH 4/7] Use zksync-protocol 1.5.6 --- Cargo.lock | 91 +++++-------- Cargo.toml | 6 +- prover/Cargo.lock | 124 +++++++----------- prover/Cargo.toml | 6 +- prover/crates/lib/keystore/Cargo.toml | 2 +- prover/crates/lib/prover_fri_types/Cargo.toml | 2 +- 6 files changed, 93 insertions(+), 138 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bbe21e2e6e38..26929be71957 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1313,13 +1313,14 @@ dependencies = [ [[package]] name = "circuit_encodings" -version = "0.150.5" -source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" +version = "0.150.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5128d4b8fbb27ac453f573a95601058e74487bdafd22a3168cded66bf340c28" dependencies = [ "derivative", "serde", - "zk_evm 0.150.5", - "zkevm_circuits 0.150.5", + "zk_evm 0.150.6", + "zkevm_circuits 0.150.6", ] [[package]] @@ -1379,10 +1380,11 @@ dependencies = [ [[package]] name = "circuit_sequencer_api" -version = "0.150.5" -source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" +version = "0.150.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "093d0c2c0b39144ddb4e1e88d73d95067ce34ec7750808b2eed01edbb510b88e" dependencies = [ - "circuit_encodings 0.150.5", + "circuit_encodings 0.150.6", "derivative", "rayon", "serde", @@ -9340,8 +9342,9 @@ dependencies = [ [[package]] name = "zk_evm" -version = "0.150.5" -source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" +version = "0.150.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c14bda6c101389145cd01fac900f1392876bc0284d98faf7f376237baa2cb19d" dependencies = [ "anyhow", "lazy_static", @@ -9349,7 +9352,7 @@ dependencies = [ "serde", "serde_json", "static_assertions", - "zk_evm_abstractions 0.150.5 (git+https://github.com/matter-labs/zksync-protocol.git)", + "zk_evm_abstractions 0.150.6", ] [[package]] @@ -9380,27 +9383,15 @@ dependencies = [ [[package]] name = "zk_evm_abstractions" -version = "0.150.5" +version = "0.150.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d6b0720261ab55490fe3a96e96de30d5d7b277940b52ea7f52dbf564eb1748" -dependencies = [ - "anyhow", - "num_enum 0.6.1", - "serde", - "static_assertions", - "zkevm_opcode_defs 0.150.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "zk_evm_abstractions" -version = "0.150.5" -source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" +checksum = "a008f2442fc6a508bdd1f902380242cb6ff11b8b27acdac2677c6d9f75cbb004" dependencies = [ "anyhow", "num_enum 0.6.1", "serde", "static_assertions", - "zkevm_opcode_defs 0.150.5 (git+https://github.com/matter-labs/zksync-protocol.git)", + "zkevm_opcode_defs 0.150.6", ] [[package]] @@ -9449,8 +9440,9 @@ dependencies = [ [[package]] name = "zkevm_circuits" -version = "0.150.5" -source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" +version = "0.150.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f68518aedd5358b17224771bb78bacd912cf66011aeda98b1f887cfb9e0972f" dependencies = [ "arrayvec 0.7.6", "boojum", @@ -9462,7 +9454,7 @@ dependencies = [ "seq-macro", "serde", "smallvec", - "zkevm_opcode_defs 0.150.5 (git+https://github.com/matter-labs/zksync-protocol.git)", + "zkevm_opcode_defs 0.150.6", "zksync_cs_derive", ] @@ -9510,25 +9502,9 @@ dependencies = [ [[package]] name = "zkevm_opcode_defs" -version = "0.150.5" +version = "0.150.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79055eae1b6c1ab80793ed9d77d2964c9c896afa4b5dfed278cf58cd10acfe8f" -dependencies = [ - "bitflags 2.6.0", - "blake2 0.10.6", - "ethereum-types", - "k256 0.13.4", - "lazy_static", - "p256", - "serde", - "sha2 0.10.8", - "sha3 0.10.8", -] - -[[package]] -name = "zkevm_opcode_defs" -version = "0.150.5" -source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" +checksum = "762b5f1c1b283c5388995a85d40a05aef1c14f50eb904998b7e9364739f5b899" dependencies = [ "bitflags 2.6.0", "blake2 0.10.6", @@ -9652,7 +9628,7 @@ dependencies = [ "anyhow", "circuit_sequencer_api 0.140.3", "circuit_sequencer_api 0.141.2", - "circuit_sequencer_api 0.150.5", + "circuit_sequencer_api 0.150.6", "futures 0.3.30", "itertools 0.10.5", "num_cpus", @@ -9664,7 +9640,7 @@ dependencies = [ "vise", "zk_evm 0.133.0", "zk_evm 0.141.0", - "zk_evm 0.150.5", + "zk_evm 0.150.6", "zksync_contracts", "zksync_dal", "zksync_eth_client", @@ -10379,8 +10355,9 @@ dependencies = [ [[package]] name = "zksync_kzg" -version = "0.150.5" -source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" +version = "0.150.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c006b6b7a27cc50ff0c515b6d0b197dbb907bbf65d1d2ea42fc3ed21b315642" dependencies = [ "boojum", "derivative", @@ -10390,7 +10367,7 @@ dependencies = [ "serde", "serde_json", "serde_with", - "zkevm_circuits 0.150.5", + "zkevm_circuits 0.150.6", ] [[package]] @@ -10517,7 +10494,7 @@ dependencies = [ "circuit_sequencer_api 0.140.3", "circuit_sequencer_api 0.141.2", "circuit_sequencer_api 0.142.2", - "circuit_sequencer_api 0.150.5", + "circuit_sequencer_api 0.150.6", "ethabi", "hex", "itertools 0.10.5", @@ -10531,7 +10508,7 @@ dependencies = [ "zk_evm 0.133.0", "zk_evm 0.140.0", "zk_evm 0.141.0", - "zk_evm 0.150.5", + "zk_evm 0.150.6", "zksync_contracts", "zksync_eth_signer", "zksync_system_constants", @@ -10572,7 +10549,7 @@ dependencies = [ "tower-http", "tracing", "vise", - "zk_evm 0.150.5", + "zk_evm 0.150.6", "zksync_config", "zksync_consensus_roles", "zksync_contracts", @@ -10967,7 +10944,7 @@ version = "0.1.0" dependencies = [ "bincode", "chrono", - "circuit_sequencer_api 0.150.5", + "circuit_sequencer_api 0.150.6", "serde", "serde_json", "serde_with", @@ -11349,8 +11326,8 @@ source = "git+https://github.com/matter-labs/vm2.git?rev=a233d44bbe61dc6a758a754 dependencies = [ "enum_dispatch", "primitive-types", - "zk_evm_abstractions 0.150.5 (registry+https://github.com/rust-lang/crates.io-index)", - "zkevm_opcode_defs 0.150.5 (registry+https://github.com/rust-lang/crates.io-index)", + "zk_evm_abstractions 0.150.6", + "zkevm_opcode_defs 0.150.6", "zksync_vm2_interface", ] diff --git a/Cargo.toml b/Cargo.toml index 52c2c18c8c03..e86d67a435ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -219,15 +219,15 @@ circuit_sequencer_api_1_3_3 = { package = "circuit_sequencer_api", version = "0. circuit_sequencer_api_1_4_0 = { package = "circuit_sequencer_api", version = "0.140" } circuit_sequencer_api_1_4_1 = { package = "circuit_sequencer_api", version = "0.141" } circuit_sequencer_api_1_4_2 = { package = "circuit_sequencer_api", version = "0.142" } -circuit_sequencer_api_1_5_0 = { git = "https://github.com/matter-labs/zksync-protocol.git", package = "circuit_sequencer_api" } +circuit_sequencer_api_1_5_0 = { package = "circuit_sequencer_api", version = "=0.150.6" } crypto_codegen = { package = "zksync_solidity_vk_codegen", version = "=0.30.1" } -kzg = { git = "https://github.com/matter-labs/zksync-protocol.git", package = "zksync_kzg" } +kzg = { package = "zksync_kzg", version = "=0.150.6" } zk_evm = { version = "=0.133.0" } zk_evm_1_3_1 = { package = "zk_evm", version = "0.131.0-rc.2" } zk_evm_1_3_3 = { package = "zk_evm", version = "0.133" } zk_evm_1_4_0 = { package = "zk_evm", version = "0.140" } zk_evm_1_4_1 = { package = "zk_evm", version = "0.141" } -zk_evm_1_5_0 = { git = "https://github.com/matter-labs/zksync-protocol.git", package = "zk_evm" } +zk_evm_1_5_0 = { package = "zk_evm", version = "=0.150.6" } # New VM; pinned to a specific commit because of instability zksync_vm2 = { git = "https://github.com/matter-labs/vm2.git", rev = "a233d44bbe61dc6a758a754c3b78fe4f83e56699" } diff --git a/prover/Cargo.lock b/prover/Cargo.lock index 2bd2cf0c4d42..6f2bf2575f00 100644 --- a/prover/Cargo.lock +++ b/prover/Cargo.lock @@ -652,7 +652,7 @@ dependencies = [ [[package]] name = "boojum-cuda" version = "0.150.9" -source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#5777d2934bf05cf80401aae33cc8acb1a14d2b49" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#1fa6d8b1c1ba6fc18bbfb09f91a71dc7a4572e23" dependencies = [ "boojum", "cmake", @@ -660,7 +660,6 @@ dependencies = [ "era_cudart_sys", "itertools 0.13.0", "lazy_static", - "snark_wrapper", ] [[package]] @@ -799,10 +798,11 @@ dependencies = [ [[package]] name = "circuit_definitions" -version = "0.150.5" -source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" +version = "0.150.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "492404ea63c934d8e894325f0a741723bf91cd035cb34a92fddd8617c4a00fd3" dependencies = [ - "circuit_encodings 0.150.5", + "circuit_encodings 0.150.6", "crossbeam", "derivative", "seq-macro", @@ -848,13 +848,14 @@ dependencies = [ [[package]] name = "circuit_encodings" -version = "0.150.5" -source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" +version = "0.150.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5128d4b8fbb27ac453f573a95601058e74487bdafd22a3168cded66bf340c28" dependencies = [ "derivative", "serde", - "zk_evm 0.150.5", - "zkevm_circuits 0.150.5", + "zk_evm 0.150.6", + "zkevm_circuits 0.150.6", ] [[package]] @@ -914,10 +915,11 @@ dependencies = [ [[package]] name = "circuit_sequencer_api" -version = "0.150.5" -source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" +version = "0.150.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "093d0c2c0b39144ddb4e1e88d73d95067ce34ec7750808b2eed01edbb510b88e" dependencies = [ - "circuit_encodings 0.150.5", + "circuit_encodings 0.150.6", "derivative", "rayon", "serde", @@ -1739,7 +1741,7 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "era_cudart" version = "0.150.9" -source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#5777d2934bf05cf80401aae33cc8acb1a14d2b49" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#1fa6d8b1c1ba6fc18bbfb09f91a71dc7a4572e23" dependencies = [ "bitflags 2.6.0", "era_cudart_sys", @@ -1749,7 +1751,7 @@ dependencies = [ [[package]] name = "era_cudart_sys" version = "0.150.9" -source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#5777d2934bf05cf80401aae33cc8acb1a14d2b49" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#1fa6d8b1c1ba6fc18bbfb09f91a71dc7a4572e23" dependencies = [ "serde_json", ] @@ -5678,7 +5680,7 @@ checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" [[package]] name = "shivini" version = "0.150.9" -source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#5777d2934bf05cf80401aae33cc8acb1a14d2b49" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#1fa6d8b1c1ba6fc18bbfb09f91a71dc7a4572e23" dependencies = [ "bincode", "blake2 0.10.6", @@ -5689,7 +5691,6 @@ dependencies = [ "era_cudart", "era_cudart_sys", "hex", - "itertools 0.13.0", "rand 0.8.5", "serde", "sha2 0.10.8", @@ -7445,8 +7446,9 @@ dependencies = [ [[package]] name = "zk_evm" -version = "0.150.5" -source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" +version = "0.150.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c14bda6c101389145cd01fac900f1392876bc0284d98faf7f376237baa2cb19d" dependencies = [ "anyhow", "lazy_static", @@ -7454,7 +7456,7 @@ dependencies = [ "serde", "serde_json", "static_assertions", - "zk_evm_abstractions 0.150.5 (git+https://github.com/matter-labs/zksync-protocol.git)", + "zk_evm_abstractions 0.150.6", ] [[package]] @@ -7485,33 +7487,22 @@ dependencies = [ [[package]] name = "zk_evm_abstractions" -version = "0.150.5" +version = "0.150.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d6b0720261ab55490fe3a96e96de30d5d7b277940b52ea7f52dbf564eb1748" +checksum = "a008f2442fc6a508bdd1f902380242cb6ff11b8b27acdac2677c6d9f75cbb004" dependencies = [ "anyhow", "num_enum 0.6.1", "serde", "static_assertions", - "zkevm_opcode_defs 0.150.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "zk_evm_abstractions" -version = "0.150.5" -source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" -dependencies = [ - "anyhow", - "num_enum 0.6.1", - "serde", - "static_assertions", - "zkevm_opcode_defs 0.150.5 (git+https://github.com/matter-labs/zksync-protocol.git)", + "zkevm_opcode_defs 0.150.6", ] [[package]] name = "zkevm-assembly" -version = "0.150.5" -source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" +version = "0.150.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dc743ac7b0d618536dc3ace798fd4b8af78b057884afda5785c7970e15d62d0" dependencies = [ "env_logger 0.9.3", "hex", @@ -7524,7 +7515,7 @@ dependencies = [ "smallvec", "structopt", "thiserror", - "zkevm_opcode_defs 0.150.5 (git+https://github.com/matter-labs/zksync-protocol.git)", + "zkevm_opcode_defs 0.150.6", ] [[package]] @@ -7573,8 +7564,9 @@ dependencies = [ [[package]] name = "zkevm_circuits" -version = "0.150.5" -source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" +version = "0.150.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f68518aedd5358b17224771bb78bacd912cf66011aeda98b1f887cfb9e0972f" dependencies = [ "arrayvec 0.7.4", "boojum", @@ -7586,7 +7578,7 @@ dependencies = [ "seq-macro", "serde", "smallvec", - "zkevm_opcode_defs 0.150.5 (git+https://github.com/matter-labs/zksync-protocol.git)", + "zkevm_opcode_defs 0.150.6", "zksync_cs_derive", ] @@ -7634,25 +7626,9 @@ dependencies = [ [[package]] name = "zkevm_opcode_defs" -version = "0.150.5" +version = "0.150.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79055eae1b6c1ab80793ed9d77d2964c9c896afa4b5dfed278cf58cd10acfe8f" -dependencies = [ - "bitflags 2.6.0", - "blake2 0.10.6", - "ethereum-types", - "k256 0.13.3", - "lazy_static", - "p256", - "serde", - "sha2 0.10.8", - "sha3 0.10.8", -] - -[[package]] -name = "zkevm_opcode_defs" -version = "0.150.5" -source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" +checksum = "762b5f1c1b283c5388995a85d40a05aef1c14f50eb904998b7e9364739f5b899" dependencies = [ "bitflags 2.6.0", "blake2 0.10.6", @@ -7667,12 +7643,13 @@ dependencies = [ [[package]] name = "zkevm_test_harness" -version = "0.150.5" -source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" +version = "0.150.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ad3e73d290a38a35dd245fd68cb6f498a8a8da4a52f846e88da3d3c31a34fd" dependencies = [ "bincode", "circuit_definitions", - "circuit_sequencer_api 0.150.5", + "circuit_sequencer_api 0.150.6", "codegen", "crossbeam", "derivative", @@ -7694,7 +7671,7 @@ dependencies = [ [[package]] name = "zksync-gpu-ffi" version = "0.150.9" -source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#5777d2934bf05cf80401aae33cc8acb1a14d2b49" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#1fa6d8b1c1ba6fc18bbfb09f91a71dc7a4572e23" dependencies = [ "cmake", "crossbeam", @@ -7708,7 +7685,7 @@ dependencies = [ [[package]] name = "zksync-gpu-prover" version = "0.150.9" -source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#5777d2934bf05cf80401aae33cc8acb1a14d2b49" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#1fa6d8b1c1ba6fc18bbfb09f91a71dc7a4572e23" dependencies = [ "bit-vec", "cfg-if", @@ -7724,7 +7701,7 @@ dependencies = [ [[package]] name = "zksync-wrapper-prover" version = "0.150.9" -source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#5777d2934bf05cf80401aae33cc8acb1a14d2b49" +source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#1fa6d8b1c1ba6fc18bbfb09f91a71dc7a4572e23" dependencies = [ "circuit_definitions", "zkevm_test_harness", @@ -8092,8 +8069,9 @@ dependencies = [ [[package]] name = "zksync_kzg" -version = "0.150.5" -source = "git+https://github.com/matter-labs/zksync-protocol.git#9bf5cf839f76a19f7c21981d8c56a7f8bbe03d7e" +version = "0.150.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c006b6b7a27cc50ff0c515b6d0b197dbb907bbf65d1d2ea42fc3ed21b315642" dependencies = [ "boojum", "derivative", @@ -8103,7 +8081,7 @@ dependencies = [ "serde", "serde_json", "serde_with", - "zkevm_circuits 0.150.5", + "zkevm_circuits 0.150.6", ] [[package]] @@ -8139,7 +8117,7 @@ dependencies = [ "circuit_sequencer_api 0.140.3", "circuit_sequencer_api 0.141.2", "circuit_sequencer_api 0.142.2", - "circuit_sequencer_api 0.150.5", + "circuit_sequencer_api 0.150.6", "ethabi", "hex", "itertools 0.10.5", @@ -8151,7 +8129,7 @@ dependencies = [ "zk_evm 0.133.0", "zk_evm 0.140.0", "zk_evm 0.141.0", - "zk_evm 0.150.5", + "zk_evm 0.150.6", "zksync_contracts", "zksync_system_constants", "zksync_types", @@ -8203,7 +8181,7 @@ dependencies = [ "anyhow", "async-trait", "bincode", - "circuit_sequencer_api 0.150.5", + "circuit_sequencer_api 0.150.6", "clap 4.5.4", "ctrlc", "futures 0.3.30", @@ -8429,7 +8407,7 @@ name = "zksync_prover_interface" version = "0.1.0" dependencies = [ "chrono", - "circuit_sequencer_api 0.150.5", + "circuit_sequencer_api 0.150.6", "serde", "serde_with", "strum", @@ -8628,8 +8606,8 @@ source = "git+https://github.com/matter-labs/vm2.git?rev=a233d44bbe61dc6a758a754 dependencies = [ "enum_dispatch", "primitive-types", - "zk_evm_abstractions 0.150.5 (registry+https://github.com/rust-lang/crates.io-index)", - "zkevm_opcode_defs 0.150.5 (registry+https://github.com/rust-lang/crates.io-index)", + "zk_evm_abstractions 0.150.6", + "zkevm_opcode_defs 0.150.6", "zksync_vm2_interface", ] diff --git a/prover/Cargo.toml b/prover/Cargo.toml index 8c338db86d44..659b912b72ec 100644 --- a/prover/Cargo.toml +++ b/prover/Cargo.toml @@ -62,9 +62,9 @@ url = "2.5.2" vise = "0.2.0" # Proving dependencies -circuit_definitions = { git = "https://github.com/matter-labs/zksync-protocol.git", package = "circuit_definitions" } -circuit_sequencer_api = { git = "https://github.com/matter-labs/zksync-protocol.git", package = "circuit_sequencer_api" } -zkevm_test_harness = { git = "https://github.com/matter-labs/zksync-protocol.git", package = "zkevm_test_harness" } +circuit_definitions = "=0.150.6" +circuit_sequencer_api = "=0.150.6" +zkevm_test_harness = "=0.150.6" # GPU proving dependencies wrapper_prover = { git = "https://github.com/matter-labs/zksync-crypto-gpu.git", branch="vv-temp-harness-pin", package = "zksync-wrapper-prover" } diff --git a/prover/crates/lib/keystore/Cargo.toml b/prover/crates/lib/keystore/Cargo.toml index d81e800b3036..4d9addc26bc0 100644 --- a/prover/crates/lib/keystore/Cargo.toml +++ b/prover/crates/lib/keystore/Cargo.toml @@ -15,7 +15,7 @@ zksync_basic_types.workspace = true zksync_utils.workspace = true zksync_prover_fri_types.workspace = true zkevm_test_harness.workspace = true -circuit_definitions = { git = "https://github.com/matter-labs/zksync-protocol.git", package = "circuit_definitions", features = [ "log_tracing" ] } +circuit_definitions = { workspace = true, features = ["log_tracing"] } shivini = { workspace = true, optional = true } anyhow.workspace = true diff --git a/prover/crates/lib/prover_fri_types/Cargo.toml b/prover/crates/lib/prover_fri_types/Cargo.toml index 30046aa0badf..3b228b42ec40 100644 --- a/prover/crates/lib/prover_fri_types/Cargo.toml +++ b/prover/crates/lib/prover_fri_types/Cargo.toml @@ -13,5 +13,5 @@ categories.workspace = true [dependencies] zksync_object_store.workspace = true zksync_types.workspace = true -circuit_definitions = { git = "https://github.com/matter-labs/zksync-protocol.git", package = "circuit_definitions", features = [ "log_tracing" ] } +circuit_definitions = { workspace = true, features = [ "log_tracing" ] } serde = { workspace = true, features = ["derive"] } From 41569e2d75b4898acdfd375cbb3c26a1271a83df Mon Sep 17 00:00:00 2001 From: Vladislav Volosnikov Date: Wed, 16 Oct 2024 17:50:55 +0300 Subject: [PATCH 5/7] Clippy issues --- .../bin/witness_generator/src/rounds/basic_circuits/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prover/crates/bin/witness_generator/src/rounds/basic_circuits/utils.rs b/prover/crates/bin/witness_generator/src/rounds/basic_circuits/utils.rs index 283c59ad98d2..c80e9a8e787c 100644 --- a/prover/crates/bin/witness_generator/src/rounds/basic_circuits/utils.rs +++ b/prover/crates/bin/witness_generator/src/rounds/basic_circuits/utils.rs @@ -191,7 +191,7 @@ pub(super) async fn generate_witness( let object_store = object_store.clone(); save_queue_handles.push(tokio::task::spawn(save_recursion_queue( block_number, - circuit_id.try_into().unwrap(), + circuit_id.unwrap(), queue, inputs, object_store, From 279f6df2595aee190624bd0841ef8425db6fb883 Mon Sep 17 00:00:00 2001 From: Vladislav Volosnikov Date: Wed, 16 Oct 2024 18:04:51 +0300 Subject: [PATCH 6/7] Hotfix --- .../bin/witness_generator/src/rounds/basic_circuits/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prover/crates/bin/witness_generator/src/rounds/basic_circuits/utils.rs b/prover/crates/bin/witness_generator/src/rounds/basic_circuits/utils.rs index c80e9a8e787c..31dc54814103 100644 --- a/prover/crates/bin/witness_generator/src/rounds/basic_circuits/utils.rs +++ b/prover/crates/bin/witness_generator/src/rounds/basic_circuits/utils.rs @@ -191,7 +191,7 @@ pub(super) async fn generate_witness( let object_store = object_store.clone(); save_queue_handles.push(tokio::task::spawn(save_recursion_queue( block_number, - circuit_id.unwrap(), + circuit_id, queue, inputs, object_store, From 4fbb4a51f0a2e01614fd6ca30ca33b946ac3e72b Mon Sep 17 00:00:00 2001 From: Vladislav Volosnikov Date: Fri, 18 Oct 2024 12:27:09 +0200 Subject: [PATCH 7/7] Set zksync-crypto-gpu deps --- prover/Cargo.lock | 35 +++++++++++++++++++++-------------- prover/Cargo.toml | 4 ++-- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/prover/Cargo.lock b/prover/Cargo.lock index 6f2bf2575f00..206cef01ba16 100644 --- a/prover/Cargo.lock +++ b/prover/Cargo.lock @@ -651,8 +651,9 @@ dependencies = [ [[package]] name = "boojum-cuda" -version = "0.150.9" -source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#1fa6d8b1c1ba6fc18bbfb09f91a71dc7a4572e23" +version = "0.151.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98c681a3f867afe40bcc188e5cb5260bbf5699531823affa3cbe28f7ca9b7bc9" dependencies = [ "boojum", "cmake", @@ -1740,8 +1741,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "era_cudart" -version = "0.150.9" -source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#1fa6d8b1c1ba6fc18bbfb09f91a71dc7a4572e23" +version = "0.151.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1e1990fee6e9d25b40524ce53ca7977a211155a17bc7277f4dd354633e4fc22" dependencies = [ "bitflags 2.6.0", "era_cudart_sys", @@ -1750,8 +1752,9 @@ dependencies = [ [[package]] name = "era_cudart_sys" -version = "0.150.9" -source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#1fa6d8b1c1ba6fc18bbfb09f91a71dc7a4572e23" +version = "0.151.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d84e8d300c28cd91ceb56340f66da8607409f44a45f5e694e23723630db8c852" dependencies = [ "serde_json", ] @@ -5679,8 +5682,9 @@ checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" [[package]] name = "shivini" -version = "0.150.9" -source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#1fa6d8b1c1ba6fc18bbfb09f91a71dc7a4572e23" +version = "0.151.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92776ca824f49c255a7417939706d759e0fd3dd4217420d01da68beae04f0bd6" dependencies = [ "bincode", "blake2 0.10.6", @@ -7670,8 +7674,9 @@ dependencies = [ [[package]] name = "zksync-gpu-ffi" -version = "0.150.9" -source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#1fa6d8b1c1ba6fc18bbfb09f91a71dc7a4572e23" +version = "0.151.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d555e24b853359c5b076c52f9ff9e0ed62a7edc8c2f82f93517c524410c21ecb" dependencies = [ "cmake", "crossbeam", @@ -7684,8 +7689,9 @@ dependencies = [ [[package]] name = "zksync-gpu-prover" -version = "0.150.9" -source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#1fa6d8b1c1ba6fc18bbfb09f91a71dc7a4572e23" +version = "0.151.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "615dad34e5fe678ec3b3e029af3f19313bebb1b771a8ce963c9ab9a8cc3879d3" dependencies = [ "bit-vec", "cfg-if", @@ -7700,8 +7706,9 @@ dependencies = [ [[package]] name = "zksync-wrapper-prover" -version = "0.150.9" -source = "git+https://github.com/matter-labs/zksync-crypto-gpu.git?branch=vv-temp-harness-pin#1fa6d8b1c1ba6fc18bbfb09f91a71dc7a4572e23" +version = "0.151.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80721b2da2643bd43f664ac65673ee078e6973c0a88d75b73bfaeac8e1bf5432" dependencies = [ "circuit_definitions", "zkevm_test_harness", diff --git a/prover/Cargo.toml b/prover/Cargo.toml index 659b912b72ec..61169dd43636 100644 --- a/prover/Cargo.toml +++ b/prover/Cargo.toml @@ -67,8 +67,8 @@ circuit_sequencer_api = "=0.150.6" zkevm_test_harness = "=0.150.6" # GPU proving dependencies -wrapper_prover = { git = "https://github.com/matter-labs/zksync-crypto-gpu.git", branch="vv-temp-harness-pin", package = "zksync-wrapper-prover" } -shivini = { git = "https://github.com/matter-labs/zksync-crypto-gpu.git", branch="vv-temp-harness-pin", package = "shivini" } +wrapper_prover = { package = "zksync-wrapper-prover", version = "=0.151.0" } +shivini = "=0.151.0" # Core workspace dependencies zksync_multivm = { path = "../core/lib/multivm", version = "0.1.0" }