diff --git a/core/lib/basic_types/src/basic_fri_types.rs b/core/lib/basic_types/src/basic_fri_types.rs index 33d4fafa5905..a1563ff7e590 100644 --- a/core/lib/basic_types/src/basic_fri_types.rs +++ b/core/lib/basic_types/src/basic_fri_types.rs @@ -6,6 +6,8 @@ use std::{convert::TryFrom, str::FromStr}; use serde::{Deserialize, Serialize}; +use crate::protocol_version::{ProtocolSemanticVersion, ProtocolVersionId, VersionPatch}; + const BLOB_CHUNK_SIZE: usize = 31; const ELEMENTS_PER_4844_BLOCK: usize = 4096; pub const MAX_4844_BLOBS_PER_BLOCK: usize = 16; @@ -189,6 +191,16 @@ pub struct JobIdentifiers { pub circuit_id: u8, pub aggregation_round: u8, pub protocol_version: u16, + pub protocol_version_patch: u32, +} + +impl JobIdentifiers { + pub fn get_semantic_protocol_version(&self) -> ProtocolSemanticVersion { + ProtocolSemanticVersion::new( + ProtocolVersionId::try_from(self.protocol_version).unwrap(), + VersionPatch(self.protocol_version_patch), + ) + } } #[cfg(test)] diff --git a/core/lib/basic_types/src/protocol_version.rs b/core/lib/basic_types/src/protocol_version.rs index 4f29d936a73f..d8083c0f6a31 100644 --- a/core/lib/basic_types/src/protocol_version.rs +++ b/core/lib/basic_types/src/protocol_version.rs @@ -20,16 +20,6 @@ use crate::{ pub const PACKED_SEMVER_MINOR_OFFSET: u32 = 32; pub const PACKED_SEMVER_MINOR_MASK: u32 = 0xFFFF; -// These values should be manually updated for every protocol upgrade -// Otherwise, the prover will not be able to work with new versions. -// TODO(PLA-954): Move to prover workspace -pub const PROVER_PROTOCOL_VERSION: ProtocolVersionId = ProtocolVersionId::Version24; -pub const PROVER_PROTOCOL_PATCH: VersionPatch = VersionPatch(0); -pub const PROVER_PROTOCOL_SEMANTIC_VERSION: ProtocolSemanticVersion = ProtocolSemanticVersion { - minor: PROVER_PROTOCOL_VERSION, - patch: PROVER_PROTOCOL_PATCH, -}; - /// `ProtocolVersionId` is a unique identifier of the protocol version. /// Note, that it is an identifier of the `minor` semver version of the protocol, with /// the `major` version being `0`. Also, the protocol version on the contracts may contain @@ -85,10 +75,6 @@ impl ProtocolVersionId { Self::Version24 } - pub fn current_prover_version() -> Self { - PROVER_PROTOCOL_VERSION - } - pub fn next() -> Self { Self::Version25 } @@ -311,10 +297,6 @@ impl ProtocolSemanticVersion { Self { minor, patch } } - pub fn current_prover_version() -> Self { - PROVER_PROTOCOL_SEMANTIC_VERSION - } - pub fn try_from_packed(packed: U256) -> Result { let minor = ((packed >> U256::from(PACKED_SEMVER_MINOR_OFFSET)) & U256::from(PACKED_SEMVER_MINOR_MASK)) diff --git a/core/node/house_keeper/src/prover/metrics.rs b/core/node/house_keeper/src/prover/metrics.rs index 4af13b61b0c5..7711c9c04a6b 100644 --- a/core/node/house_keeper/src/prover/metrics.rs +++ b/core/node/house_keeper/src/prover/metrics.rs @@ -1,6 +1,5 @@ use vise::{Counter, EncodeLabelSet, EncodeLabelValue, Family, Gauge, LabeledFamily, Metrics}; -use zksync_types::ProtocolVersionId; - +use zksync_types::protocol_version::ProtocolSemanticVersion; #[derive(Debug, Metrics)] #[metrics(prefix = "house_keeper")] pub(crate) struct HouseKeeperMetrics { @@ -63,7 +62,7 @@ impl FriProverMetrics { circuit_id: u8, aggregation_round: u8, prover_group_id: u8, - protocol_version: ProtocolVersionId, + protocol_version: ProtocolSemanticVersion, amount: u64, ) { self.prover_jobs[&ProverJobsLabels { diff --git a/core/node/house_keeper/src/prover/queue_reporter/fri_proof_compressor_queue_reporter.rs b/core/node/house_keeper/src/prover/queue_reporter/fri_proof_compressor_queue_reporter.rs index ce7d7467bcc9..886a4c116b89 100644 --- a/core/node/house_keeper/src/prover/queue_reporter/fri_proof_compressor_queue_reporter.rs +++ b/core/node/house_keeper/src/prover/queue_reporter/fri_proof_compressor_queue_reporter.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use async_trait::async_trait; use prover_dal::{Prover, ProverDal}; use zksync_dal::ConnectionPool; -use zksync_types::{prover_dal::JobCountStatistics, ProtocolVersionId}; +use zksync_types::{protocol_version::ProtocolSemanticVersion, prover_dal::JobCountStatistics}; use crate::{ periodic_job::PeriodicJob, @@ -28,7 +28,7 @@ impl FriProofCompressorQueueReporter { async fn get_job_statistics( pool: &ConnectionPool, - ) -> HashMap { + ) -> HashMap { pool.connection() .await .unwrap() diff --git a/core/node/house_keeper/src/prover/queue_reporter/fri_prover_queue_reporter.rs b/core/node/house_keeper/src/prover/queue_reporter/fri_prover_queue_reporter.rs index b3b04a519b29..1ae03c74b45e 100644 --- a/core/node/house_keeper/src/prover/queue_reporter/fri_prover_queue_reporter.rs +++ b/core/node/house_keeper/src/prover/queue_reporter/fri_prover_queue_reporter.rs @@ -2,7 +2,6 @@ use async_trait::async_trait; use prover_dal::{Prover, ProverDal}; use zksync_config::configs::fri_prover_group::FriProverGroupConfig; use zksync_dal::{ConnectionPool, Core, CoreDal}; -use zksync_types::ProtocolVersionId; use crate::{periodic_job::PeriodicJob, prover::metrics::FRI_PROVER_METRICS}; @@ -67,7 +66,7 @@ impl PeriodicJob for FriProverQueueReporter { circuit_id, job_identifiers.aggregation_round, group_id, - ProtocolVersionId::try_from(job_identifiers.protocol_version).unwrap(), + job_identifiers.get_semantic_protocol_version(), stats.queued as u64, ); @@ -76,7 +75,7 @@ impl PeriodicJob for FriProverQueueReporter { circuit_id, job_identifiers.aggregation_round, group_id, - ProtocolVersionId::try_from(job_identifiers.protocol_version).unwrap(), + job_identifiers.get_semantic_protocol_version(), stats.in_progress as u64, ); } diff --git a/core/node/house_keeper/src/prover/queue_reporter/fri_witness_generator_queue_reporter.rs b/core/node/house_keeper/src/prover/queue_reporter/fri_witness_generator_queue_reporter.rs index da44a34f145a..487b28491c43 100644 --- a/core/node/house_keeper/src/prover/queue_reporter/fri_witness_generator_queue_reporter.rs +++ b/core/node/house_keeper/src/prover/queue_reporter/fri_witness_generator_queue_reporter.rs @@ -4,7 +4,8 @@ use async_trait::async_trait; use prover_dal::{Prover, ProverDal}; use zksync_dal::ConnectionPool; use zksync_types::{ - basic_fri_types::AggregationRound, prover_dal::JobCountStatistics, ProtocolVersionId, + basic_fri_types::AggregationRound, protocol_version::ProtocolSemanticVersion, + prover_dal::JobCountStatistics, }; use crate::{periodic_job::PeriodicJob, prover::metrics::SERVER_METRICS}; @@ -27,7 +28,7 @@ impl FriWitnessGeneratorQueueReporter { async fn get_job_statistics( &self, - ) -> HashMap<(AggregationRound, ProtocolVersionId), JobCountStatistics> { + ) -> HashMap<(AggregationRound, ProtocolSemanticVersion), JobCountStatistics> { let mut conn = self.pool.connection().await.unwrap(); let mut result = HashMap::new(); result.extend( @@ -62,7 +63,7 @@ impl FriWitnessGeneratorQueueReporter { fn emit_metrics_for_round( round: AggregationRound, - protocol_version: ProtocolVersionId, + protocol_version: ProtocolSemanticVersion, stats: &JobCountStatistics, ) { if stats.queued > 0 || stats.in_progress > 0 { @@ -95,7 +96,7 @@ impl PeriodicJob for FriWitnessGeneratorQueueReporter { async fn run_routine_task(&mut self) -> anyhow::Result<()> { let stats_for_all_rounds = self.get_job_statistics().await; - let mut aggregated = HashMap::::new(); + let mut aggregated = HashMap::::new(); for ((round, protocol_version), stats) in stats_for_all_rounds { emit_metrics_for_round(round, protocol_version, &stats); diff --git a/infrastructure/protocol-upgrade/src/transaction.ts b/infrastructure/protocol-upgrade/src/transaction.ts index 38f4ed1e91bd..dc9d5d190512 100644 --- a/infrastructure/protocol-upgrade/src/transaction.ts +++ b/infrastructure/protocol-upgrade/src/transaction.ts @@ -1,5 +1,5 @@ import { BigNumberish } from '@ethersproject/bignumber'; -import { Bytes, BytesLike, ethers } from 'ethers'; +import { BytesLike, ethers } from 'ethers'; import { ForceDeployUpgraderFactory as ForceDeployUpgraderFactoryL2 } from 'l2-contracts/typechain'; import { DefaultUpgradeFactory as DefaultUpgradeFactoryL1, diff --git a/prover/Cargo.lock b/prover/Cargo.lock index f0191b835453..e60514a75736 100644 --- a/prover/Cargo.lock +++ b/prover/Cargo.lock @@ -4670,7 +4670,7 @@ dependencies = [ name = "prover_version" version = "0.1.0" dependencies = [ - "zksync_types", + "zksync_prover_fri_types", ] [[package]] diff --git a/prover/proof_fri_compressor/src/main.rs b/prover/proof_fri_compressor/src/main.rs index ec66515b6a35..9786170874ec 100644 --- a/prover/proof_fri_compressor/src/main.rs +++ b/prover/proof_fri_compressor/src/main.rs @@ -10,8 +10,8 @@ use tokio::sync::{oneshot, watch}; use zksync_config::configs::{DatabaseSecrets, FriProofCompressorConfig, ObservabilityConfig}; use zksync_env_config::{object_store::ProverObjectStoreConfig, FromEnv}; use zksync_object_store::ObjectStoreFactory; +use zksync_prover_fri_types::PROVER_PROTOCOL_SEMANTIC_VERSION; use zksync_queued_job_processor::JobProcessor; -use zksync_types::protocol_version::ProtocolSemanticVersion; use zksync_utils::wait_for_tasks::ManagedTasks; use crate::{ @@ -73,7 +73,7 @@ async fn main() -> anyhow::Result<()> { .create_store() .await; - let protocol_version = ProtocolSemanticVersion::current_prover_version(); + let protocol_version = PROVER_PROTOCOL_SEMANTIC_VERSION; let proof_compressor = ProofCompressor::new( blob_store, diff --git a/prover/prover_dal/.sqlx/query-7496a9df12e409162338266085ce27807ede6b4db9541198cee2861b874b52f9.json b/prover/prover_dal/.sqlx/query-7496a9df12e409162338266085ce27807ede6b4db9541198cee2861b874b52f9.json deleted file mode 100644 index 1a8ebf4e4253..000000000000 --- a/prover/prover_dal/.sqlx/query-7496a9df12e409162338266085ce27807ede6b4db9541198cee2861b874b52f9.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT\n protocol_version,\n COUNT(*) FILTER (\n WHERE\n status = 'queued'\n ) AS queued,\n COUNT(*) FILTER (\n WHERE\n status = 'in_progress'\n ) AS in_progress\n FROM\n proof_compression_jobs_fri\n WHERE\n protocol_version IS NOT NULL\n GROUP BY\n protocol_version\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "protocol_version", - "type_info": "Int4" - }, - { - "ordinal": 1, - "name": "queued", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "in_progress", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - true, - null, - null - ] - }, - "hash": "7496a9df12e409162338266085ce27807ede6b4db9541198cee2861b874b52f9" -} diff --git a/prover/prover_dal/.sqlx/query-5449963638944edc62b5ec293bcda37e6c0c6c85fe5f701ebc9919fcad749a23.json b/prover/prover_dal/.sqlx/query-a94fffdbc1827dc5df908ea1e99ef3ad13840d2c497760e9bd0513f68dc4271c.json similarity index 52% rename from prover/prover_dal/.sqlx/query-5449963638944edc62b5ec293bcda37e6c0c6c85fe5f701ebc9919fcad749a23.json rename to prover/prover_dal/.sqlx/query-a94fffdbc1827dc5df908ea1e99ef3ad13840d2c497760e9bd0513f68dc4271c.json index 01d32127608e..20db1e57aeb8 100644 --- a/prover/prover_dal/.sqlx/query-5449963638944edc62b5ec293bcda37e6c0c6c85fe5f701ebc9919fcad749a23.json +++ b/prover/prover_dal/.sqlx/query-a94fffdbc1827dc5df908ea1e99ef3ad13840d2c497760e9bd0513f68dc4271c.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n COUNT(*) AS \"count!\",\n circuit_id AS \"circuit_id!\",\n aggregation_round AS \"aggregation_round!\",\n status AS \"status!\",\n protocol_version AS \"protocol_version!\"\n FROM\n prover_jobs_fri\n WHERE\n (\n status = 'queued'\n OR status = 'in_progress'\n )\n AND protocol_version IS NOT NULL\n GROUP BY\n circuit_id,\n aggregation_round,\n status,\n protocol_version\n ", + "query": "\n SELECT\n COUNT(*) AS \"count!\",\n circuit_id AS \"circuit_id!\",\n aggregation_round AS \"aggregation_round!\",\n status AS \"status!\",\n protocol_version AS \"protocol_version!\",\n protocol_version_patch AS \"protocol_version_patch!\"\n FROM\n prover_jobs_fri\n WHERE\n (\n status = 'queued'\n OR status = 'in_progress'\n )\n AND protocol_version IS NOT NULL\n GROUP BY\n circuit_id,\n aggregation_round,\n status,\n protocol_version,\n protocol_version_patch\n ", "describe": { "columns": [ { @@ -27,6 +27,11 @@ "ordinal": 4, "name": "protocol_version!", "type_info": "Int4" + }, + { + "ordinal": 5, + "name": "protocol_version_patch!", + "type_info": "Int4" } ], "parameters": { @@ -37,8 +42,9 @@ false, false, false, - true + true, + false ] }, - "hash": "5449963638944edc62b5ec293bcda37e6c0c6c85fe5f701ebc9919fcad749a23" + "hash": "a94fffdbc1827dc5df908ea1e99ef3ad13840d2c497760e9bd0513f68dc4271c" } diff --git a/prover/prover_dal/.sqlx/query-e9c9b69852fa68f463f17b6d63ab99cf505662036f2dd7a9f1807c4c1bad7c7b.json b/prover/prover_dal/.sqlx/query-e9c9b69852fa68f463f17b6d63ab99cf505662036f2dd7a9f1807c4c1bad7c7b.json new file mode 100644 index 000000000000..160eb31bf953 --- /dev/null +++ b/prover/prover_dal/.sqlx/query-e9c9b69852fa68f463f17b6d63ab99cf505662036f2dd7a9f1807c4c1bad7c7b.json @@ -0,0 +1,38 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n protocol_version,\n protocol_version_patch,\n COUNT(*) FILTER (\n WHERE\n status = 'queued'\n ) AS queued,\n COUNT(*) FILTER (\n WHERE\n status = 'in_progress'\n ) AS in_progress\n FROM\n proof_compression_jobs_fri\n WHERE\n protocol_version IS NOT NULL\n GROUP BY\n protocol_version,\n protocol_version_patch\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "protocol_version", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "protocol_version_patch", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "queued", + "type_info": "Int8" + }, + { + "ordinal": 3, + "name": "in_progress", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + true, + false, + null, + null + ] + }, + "hash": "e9c9b69852fa68f463f17b6d63ab99cf505662036f2dd7a9f1807c4c1bad7c7b" +} diff --git a/prover/prover_dal/src/fri_proof_compressor_dal.rs b/prover/prover_dal/src/fri_proof_compressor_dal.rs index 35bb6329bdb8..38f09114f2bf 100644 --- a/prover/prover_dal/src/fri_proof_compressor_dal.rs +++ b/prover/prover_dal/src/fri_proof_compressor_dal.rs @@ -251,11 +251,12 @@ impl FriProofCompressorDal<'_, '_> { .unwrap(); } - pub async fn get_jobs_stats(&mut self) -> HashMap { + pub async fn get_jobs_stats(&mut self) -> HashMap { sqlx::query!( r#" SELECT protocol_version, + protocol_version_patch, COUNT(*) FILTER ( WHERE status = 'queued' @@ -269,7 +270,8 @@ impl FriProofCompressorDal<'_, '_> { WHERE protocol_version IS NOT NULL GROUP BY - protocol_version + protocol_version, + protocol_version_patch "#, ) .fetch_all(self.storage.conn()) @@ -277,7 +279,10 @@ impl FriProofCompressorDal<'_, '_> { .unwrap() .into_iter() .map(|row| { - let key = ProtocolVersionId::try_from(row.protocol_version.unwrap() as u16).unwrap(); + let key = ProtocolSemanticVersion::new( + ProtocolVersionId::try_from(row.protocol_version.unwrap() as u16).unwrap(), + VersionPatch(row.protocol_version_patch as u32), + ); let value = JobCountStatistics { queued: row.queued.unwrap() as usize, in_progress: row.in_progress.unwrap() as usize, diff --git a/prover/prover_dal/src/fri_prover_dal.rs b/prover/prover_dal/src/fri_prover_dal.rs index 18d9ec9e14fa..35fb46e8aff3 100644 --- a/prover/prover_dal/src/fri_prover_dal.rs +++ b/prover/prover_dal/src/fri_prover_dal.rs @@ -409,7 +409,8 @@ impl FriProverDal<'_, '_> { circuit_id AS "circuit_id!", aggregation_round AS "aggregation_round!", status AS "status!", - protocol_version AS "protocol_version!" + protocol_version AS "protocol_version!", + protocol_version_patch AS "protocol_version_patch!" FROM prover_jobs_fri WHERE @@ -422,7 +423,8 @@ impl FriProverDal<'_, '_> { circuit_id, aggregation_round, status, - protocol_version + protocol_version, + protocol_version_patch "# ) .fetch_all(self.storage.conn()) @@ -437,6 +439,7 @@ impl FriProverDal<'_, '_> { circuit_id: row.circuit_id as u8, aggregation_round: row.aggregation_round as u8, protocol_version: row.protocol_version as u16, + protocol_version_patch: row.protocol_version_patch as u32, }) .or_default(); match row.status.as_ref() { diff --git a/prover/prover_dal/src/fri_witness_generator_dal.rs b/prover/prover_dal/src/fri_witness_generator_dal.rs index 4ce0122d7143..3c733623e477 100644 --- a/prover/prover_dal/src/fri_witness_generator_dal.rs +++ b/prover/prover_dal/src/fri_witness_generator_dal.rs @@ -1365,19 +1365,21 @@ impl FriWitnessGeneratorDal<'_, '_> { pub async fn get_witness_jobs_stats( &mut self, aggregation_round: AggregationRound, - ) -> HashMap<(AggregationRound, ProtocolVersionId), JobCountStatistics> { + ) -> HashMap<(AggregationRound, ProtocolSemanticVersion), JobCountStatistics> { let table_name = Self::input_table_name_for(aggregation_round); let sql = format!( r#" SELECT protocol_version, + protocol_version_patch, COUNT(*) FILTER (WHERE status = 'queued') as queued, COUNT(*) FILTER (WHERE status = 'in_progress') as in_progress FROM {} WHERE protocol_version IS NOT NULL GROUP BY - protocol_version + protocol_version, + protocol_version_patch "#, table_name, ); @@ -1387,11 +1389,12 @@ impl FriWitnessGeneratorDal<'_, '_> { .unwrap() .into_iter() .map(|row| { - let key = ( - aggregation_round, + let protocol_semantic_version = ProtocolSemanticVersion::new( ProtocolVersionId::try_from(row.get::("protocol_version") as u16) .unwrap(), + VersionPatch(row.get::("protocol_version_patch") as u32), ); + let key = (aggregation_round, protocol_semantic_version); let value = JobCountStatistics { queued: row.get::("queued") as usize, in_progress: row.get::("in_progress") as usize, diff --git a/prover/prover_fri/src/main.rs b/prover/prover_fri/src/main.rs index 4caceae13e9d..7bd658868258 100644 --- a/prover/prover_fri/src/main.rs +++ b/prover/prover_fri/src/main.rs @@ -18,11 +18,11 @@ use zksync_env_config::{ FromEnv, }; use zksync_object_store::{ObjectStore, ObjectStoreFactory}; +use zksync_prover_fri_types::PROVER_PROTOCOL_SEMANTIC_VERSION; use zksync_prover_fri_utils::{get_all_circuit_id_round_tuples_for, region_fetcher::get_zone}; use zksync_queued_job_processor::JobProcessor; use zksync_types::{ basic_fri_types::CircuitIdRoundTuple, - protocol_version::ProtocolSemanticVersion, prover_dal::{GpuProverInstanceStatus, SocketAddress}, }; use zksync_utils::wait_for_tasks::ManagedTasks; @@ -195,7 +195,7 @@ async fn get_prover_tasks( ) -> anyhow::Result>>> { use crate::prover_job_processor::{load_setup_data_cache, Prover}; - let protocol_version = ProtocolSemanticVersion::current_prover_version(); + let protocol_version = PROVER_PROTOCOL_SEMANTIC_VERSION; tracing::info!( "Starting CPU FRI proof generation for with protocol_version: {:?}", @@ -247,7 +247,7 @@ async fn get_prover_tasks( port: prover_config.witness_vector_receiver_port, }; - let protocol_version = ProtocolSemanticVersion::current_prover_version(); + let protocol_version = PROVER_PROTOCOL_SEMANTIC_VERSION; let prover = gpu_prover::Prover::new( store_factory.create_store().await, diff --git a/prover/prover_fri_types/src/lib.rs b/prover/prover_fri_types/src/lib.rs index 611702cd34f1..dd123448220a 100644 --- a/prover/prover_fri_types/src/lib.rs +++ b/prover/prover_fri_types/src/lib.rs @@ -14,7 +14,11 @@ use circuit_definitions::{ }, }; use zksync_object_store::{serialize_using_bincode, Bucket, StoredObject}; -use zksync_types::{basic_fri_types::AggregationRound, L1BatchNumber}; +use zksync_types::{ + basic_fri_types::AggregationRound, + protocol_version::{ProtocolSemanticVersion, VersionPatch}, + L1BatchNumber, ProtocolVersionId, +}; use crate::keys::FriCircuitKey; @@ -23,6 +27,14 @@ pub mod queue; pub const EIP_4844_CIRCUIT_ID: u8 = 255; +// THESE VALUES SHOULD BE UPDATED ON ANY PROTOCOL UPGRADE OF PROVERS +pub const PROVER_PROTOCOL_VERSION: ProtocolVersionId = ProtocolVersionId::Version24; +pub const PROVER_PROTOCOL_PATCH: VersionPatch = VersionPatch(0); +pub const PROVER_PROTOCOL_SEMANTIC_VERSION: ProtocolSemanticVersion = ProtocolSemanticVersion { + minor: PROVER_PROTOCOL_VERSION, + patch: PROVER_PROTOCOL_PATCH, +}; + #[derive(serde::Serialize, serde::Deserialize, Clone)] #[allow(clippy::large_enum_variant)] pub enum CircuitWrapper { diff --git a/prover/prover_version/Cargo.toml b/prover/prover_version/Cargo.toml index af2c9936ec7f..0275b4169b72 100644 --- a/prover/prover_version/Cargo.toml +++ b/prover/prover_version/Cargo.toml @@ -4,4 +4,4 @@ version = "0.1.0" edition.workspace = true [dependencies] -zksync_types.workspace = true +zksync_prover_fri_types.workspace = true diff --git a/prover/prover_version/src/main.rs b/prover/prover_version/src/main.rs index 3ed931240d9f..f4b52801820a 100644 --- a/prover/prover_version/src/main.rs +++ b/prover/prover_version/src/main.rs @@ -1,5 +1,5 @@ -use zksync_types::ProtocolVersionId; +use zksync_prover_fri_types::PROVER_PROTOCOL_SEMANTIC_VERSION; fn main() { - println!("{}", ProtocolVersionId::current_prover_version()); + println!("{}", PROVER_PROTOCOL_SEMANTIC_VERSION); } diff --git a/prover/witness_generator/src/main.rs b/prover/witness_generator/src/main.rs index e176347acafe..e0e39b442a83 100644 --- a/prover/witness_generator/src/main.rs +++ b/prover/witness_generator/src/main.rs @@ -41,7 +41,7 @@ mod utils; #[cfg(not(target_env = "msvc"))] use jemallocator::Jemalloc; use zksync_dal::Core; -use zksync_types::protocol_version::ProtocolSemanticVersion; +use zksync_prover_fri_types::PROVER_PROTOCOL_SEMANTIC_VERSION; #[cfg(not(target_env = "msvc"))] #[global_allocator] @@ -126,7 +126,7 @@ async fn main() -> anyhow::Result<()> { .context("failed to build a prover_connection_pool")?; let (stop_sender, stop_receiver) = watch::channel(false); - let protocol_version = ProtocolSemanticVersion::current_prover_version(); + let protocol_version = PROVER_PROTOCOL_SEMANTIC_VERSION; let vk_commitments_in_db = match prover_connection_pool .connection() .await diff --git a/prover/witness_vector_generator/src/main.rs b/prover/witness_vector_generator/src/main.rs index 843ae02530d2..2b8134d09e58 100644 --- a/prover/witness_vector_generator/src/main.rs +++ b/prover/witness_vector_generator/src/main.rs @@ -13,9 +13,9 @@ use zksync_config::configs::{ }; use zksync_env_config::{object_store::ProverObjectStoreConfig, FromEnv}; use zksync_object_store::ObjectStoreFactory; +use zksync_prover_fri_types::PROVER_PROTOCOL_SEMANTIC_VERSION; use zksync_prover_fri_utils::{get_all_circuit_id_round_tuples_for, region_fetcher::get_zone}; use zksync_queued_job_processor::JobProcessor; -use zksync_types::protocol_version::ProtocolSemanticVersion; use zksync_utils::wait_for_tasks::ManagedTasks; use crate::generator::WitnessVectorGenerator; @@ -87,7 +87,7 @@ async fn main() -> anyhow::Result<()> { let zone_url = &fri_prover_config.zone_read_url; let zone = get_zone(zone_url).await.context("get_zone()")?; - let protocol_version = ProtocolSemanticVersion::current_prover_version(); + let protocol_version = PROVER_PROTOCOL_SEMANTIC_VERSION; let witness_vector_generator = WitnessVectorGenerator::new( blob_store,