Skip to content

Commit fbbdc76

Browse files
authored
feat!: Remove old prover stack (#3729)
This PR removes the entire old prover stack. What it means for you: Firstly, if you're using the deprecated witness_vector_generator & prover_fri, the binaries are gone. Secondly, you will need to migrate to circuit_prover (which is faster & comes with extra bells & whistles). This PR does not attempt to refactor the codebase post removal. It's big enough as it is, a follow-up cleanup PR will be needed.
1 parent e50201c commit fbbdc76

File tree

82 files changed

+111
-5065
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+111
-5065
lines changed

core/bin/zksync_server/src/main.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@ use zksync_config::{
99
CircuitBreakerConfig, MempoolConfig, NetworkConfig, OperationsManagerConfig,
1010
StateKeeperConfig, TimestampAsserterConfig,
1111
},
12-
fri_prover_group::FriProverGroupConfig,
1312
house_keeper::HouseKeeperConfig,
1413
BasicWitnessInputProducerConfig, ContractVerifierSecrets, ContractsConfig,
1514
DataAvailabilitySecrets, DatabaseSecrets, ExperimentalVmConfig,
1615
ExternalPriceApiClientConfig, FriProofCompressorConfig, FriProverConfig,
17-
FriProverGatewayConfig, FriWitnessGeneratorConfig, FriWitnessVectorGeneratorConfig,
18-
L1Secrets, ObservabilityConfig, PrometheusConfig, ProofDataHandlerConfig,
19-
ProtectiveReadsWriterConfig, Secrets,
16+
FriProverGatewayConfig, FriWitnessGeneratorConfig, L1Secrets, ObservabilityConfig,
17+
PrometheusConfig, ProofDataHandlerConfig, ProtectiveReadsWriterConfig, Secrets,
2018
},
2119
ApiConfig, BaseTokenAdjusterConfig, ContractVerifierConfig, DAClientConfig, DADispatcherConfig,
2220
DBConfig, EthConfig, EthWatchConfig, ExternalProofIntegrationApiConfig, GasAdjusterConfig,
@@ -208,9 +206,7 @@ fn load_env_config() -> anyhow::Result<TempConfigStore> {
208206
house_keeper_config: HouseKeeperConfig::from_env().ok(),
209207
fri_proof_compressor_config: FriProofCompressorConfig::from_env().ok(),
210208
fri_prover_config: FriProverConfig::from_env().ok(),
211-
fri_prover_group_config: FriProverGroupConfig::from_env().ok(),
212209
fri_prover_gateway_config: FriProverGatewayConfig::from_env().ok(),
213-
fri_witness_vector_generator: FriWitnessVectorGeneratorConfig::from_env().ok(),
214210
fri_witness_generator_config: FriWitnessGeneratorConfig::from_env().ok(),
215211
prometheus_config: PrometheusConfig::from_env().ok(),
216212
proof_data_handler_config: ProofDataHandlerConfig::from_env().ok(),

core/lib/basic_types/src/prover_dal.rs

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Types exposed by the prover DAL for general-purpose use.
2-
use std::{net::IpAddr, ops::Add, str::FromStr, time::Instant};
2+
use std::{ops::Add, time::Instant};
33

44
use chrono::{DateTime, Duration, NaiveDateTime, NaiveTime, Utc};
55
use serde::{Deserialize, Serialize};
@@ -81,28 +81,6 @@ pub struct StuckJobs {
8181
pub error: Option<String>,
8282
}
8383

84-
// TODO (PLA-774): Redundant structure, should be replaced with `std::net::SocketAddr`.
85-
#[derive(Debug, Clone)]
86-
pub struct SocketAddress {
87-
pub host: IpAddr,
88-
pub port: u16,
89-
}
90-
91-
impl From<SocketAddress> for std::net::SocketAddr {
92-
fn from(socket_address: SocketAddress) -> Self {
93-
Self::new(socket_address.host, socket_address.port)
94-
}
95-
}
96-
97-
impl From<std::net::SocketAddr> for SocketAddress {
98-
fn from(socket_address: std::net::SocketAddr) -> Self {
99-
Self {
100-
host: socket_address.ip(),
101-
port: socket_address.port(),
102-
}
103-
}
104-
}
105-
10684
#[derive(Debug, Clone)]
10785
pub struct LeafAggregationJobMetadata {
10886
pub id: u32,
@@ -239,32 +217,6 @@ pub struct JobExtendedStatistics {
239217
pub active_area: Vec<ProverJobInfo>,
240218
}
241219

242-
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
243-
pub enum GpuProverInstanceStatus {
244-
// The instance is available for processing.
245-
Available,
246-
// The instance is running at full capacity.
247-
Full,
248-
// The instance is reserved by an synthesizer.
249-
Reserved,
250-
// The instance is not alive anymore.
251-
Dead,
252-
}
253-
254-
impl FromStr for GpuProverInstanceStatus {
255-
type Err = ();
256-
257-
fn from_str(s: &str) -> Result<Self, Self::Err> {
258-
match s {
259-
"available" => Ok(Self::Available),
260-
"full" => Ok(Self::Full),
261-
"reserved" => Ok(Self::Reserved),
262-
"dead" => Ok(Self::Dead),
263-
_ => Err(()),
264-
}
265-
}
266-
}
267-
268220
#[derive(Debug, Clone)]
269221
pub struct ProverJobFriInfo {
270222
pub id: u32,

core/lib/config/src/configs/fri_prover.rs

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,14 @@ use serde::Deserialize;
44

55
use crate::ObjectStoreConfig;
66

7-
#[derive(Debug, Deserialize, Clone, Copy, PartialEq)]
8-
pub enum SetupLoadMode {
9-
FromDisk,
10-
FromMemory,
11-
}
12-
13-
/// Kind of cloud environment prover subsystem runs in.
14-
///
15-
/// Currently will only affect how the prover zone is chosen.
16-
#[derive(Debug, Default, Deserialize, Clone, Copy, PartialEq, Eq)]
17-
pub enum CloudConnectionMode {
18-
/// Assumes that the prover runs in GCP.
19-
/// Will use zone information to make sure that the direct network communication
20-
/// between components is performed only within the same zone.
21-
#[default]
22-
GCP,
23-
/// Assumes that the prover subsystem runs locally.
24-
Local,
25-
}
26-
277
/// Configuration for the fri prover application
288
#[derive(Debug, Deserialize, Clone, PartialEq)]
299
pub struct FriProverConfig {
3010
pub setup_data_path: String,
3111
pub prometheus_port: u16,
3212
pub max_attempts: u32,
3313
pub generation_timeout_in_secs: u16,
34-
pub setup_load_mode: SetupLoadMode,
35-
pub specialized_group_id: u8,
36-
pub queue_capacity: usize,
37-
pub witness_vector_receiver_port: u16,
38-
pub zone_read_url: String,
39-
pub availability_check_interval_in_secs: Option<u32>,
40-
4114
pub prover_object_store: Option<ObjectStoreConfig>,
42-
#[serde(default)]
43-
pub cloud_type: CloudConnectionMode,
4415
}
4516

4617
impl FriProverConfig {

core/lib/config/src/configs/fri_prover_group.rs

Lines changed: 0 additions & 151 deletions
This file was deleted.

core/lib/config/src/configs/fri_witness_vector_generator.rs

Lines changed: 0 additions & 37 deletions
This file was deleted.

core/lib/config/src/configs/general.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@ use crate::{
88
consensus::ConsensusConfig,
99
da_client::DAClientConfig,
1010
da_dispatcher::DADispatcherConfig,
11-
fri_prover_group::FriProverGroupConfig,
1211
house_keeper::HouseKeeperConfig,
1312
prover_job_monitor::ProverJobMonitorConfig,
1413
pruning::PruningConfig,
1514
snapshot_recovery::SnapshotRecoveryConfig,
1615
vm_runner::{BasicWitnessInputProducerConfig, ProtectiveReadsWriterConfig},
1716
CommitmentGeneratorConfig, ExperimentalVmConfig, ExternalPriceApiClientConfig,
1817
FriProofCompressorConfig, FriProverConfig, FriProverGatewayConfig,
19-
FriWitnessGeneratorConfig, FriWitnessVectorGeneratorConfig, ObservabilityConfig,
20-
PrometheusConfig, ProofDataHandlerConfig,
18+
FriWitnessGeneratorConfig, ObservabilityConfig, PrometheusConfig, ProofDataHandlerConfig,
2119
},
2220
ApiConfig, ContractVerifierConfig, DBConfig, EthConfig, ExternalProofIntegrationApiConfig,
2321
ObjectStoreConfig, PostgresConfig, SnapshotsCreatorConfig,
@@ -36,8 +34,6 @@ pub struct GeneralConfig {
3634
pub proof_compressor_config: Option<FriProofCompressorConfig>,
3735
pub prover_config: Option<FriProverConfig>,
3836
pub prover_gateway: Option<FriProverGatewayConfig>,
39-
pub witness_vector_generator: Option<FriWitnessVectorGeneratorConfig>,
40-
pub prover_group_config: Option<FriProverGroupConfig>,
4137
pub witness_generator_config: Option<FriWitnessGeneratorConfig>,
4238
pub prometheus_config: Option<PrometheusConfig>,
4339
pub proof_data_handler_config: Option<ProofDataHandlerConfig>,

core/lib/config/src/configs/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ pub use self::{
1717
fri_prover::FriProverConfig,
1818
fri_prover_gateway::FriProverGatewayConfig,
1919
fri_witness_generator::FriWitnessGeneratorConfig,
20-
fri_witness_vector_generator::FriWitnessVectorGeneratorConfig,
2120
gateway::{GatewayChainConfig, GatewayConfig},
2221
general::GeneralConfig,
2322
genesis::GenesisConfig,
@@ -54,9 +53,7 @@ pub mod external_proof_integration_api;
5453
pub mod fri_proof_compressor;
5554
pub mod fri_prover;
5655
pub mod fri_prover_gateway;
57-
pub mod fri_prover_group;
5856
pub mod fri_witness_generator;
59-
pub mod fri_witness_vector_generator;
6057
pub mod gateway;
6158
mod general;
6259
pub mod genesis;

0 commit comments

Comments
 (0)