Skip to content

Commit 7634ff6

Browse files
authored
Revert "feat: provers v29.1" (#4463)
Reverts #4462
1 parent 74c311e commit 7634ff6

File tree

125 files changed

+573
-727
lines changed

Some content is hidden

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

125 files changed

+573
-727
lines changed

prover/crates/lib/prover_fri_types/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub const MAX_COMPRESSION_CIRCUITS: u8 = 5;
2424

2525
// THESE VALUES SHOULD BE UPDATED ON ANY PROTOCOL UPGRADE OF PROVERS
2626
pub const PROVER_PROTOCOL_VERSION: ProtocolVersionId = ProtocolVersionId::Version29;
27-
pub const PROVER_PROTOCOL_PATCH: VersionPatch = VersionPatch(1);
27+
pub const PROVER_PROTOCOL_PATCH: VersionPatch = VersionPatch(0);
2828
pub const PROVER_PROTOCOL_SEMANTIC_VERSION: ProtocolSemanticVersion = ProtocolSemanticVersion {
2929
minor: PROVER_PROTOCOL_VERSION,
3030
patch: PROVER_PROTOCOL_PATCH,

zkstack_cli/crates/common/src/contracts.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@ use xshell::{cmd, Shell};
44

55
use crate::cmd::Cmd;
66

7-
pub fn build_l1_contracts(shell: Shell, link_to_contracts: &Path) -> anyhow::Result<()> {
8-
let _dir_guard = shell.push_dir(link_to_contracts.join("l1-contracts"));
7+
pub fn build_l1_contracts(shell: Shell, link_to_code: &Path) -> anyhow::Result<()> {
8+
let _dir_guard = shell.push_dir(link_to_code.join("contracts/l1-contracts"));
99
// Do not update era-contract's lockfile to avoid dirty submodule
1010
// Note, tha the v26 contracts depend on the node_modules to be present at the time of the compilation.
1111
Cmd::new(cmd!(shell, "yarn install --frozen-lockfile")).run()?;
1212
Ok(Cmd::new(cmd!(shell, "yarn build:foundry")).run()?)
1313
}
1414

15-
pub fn build_l1_da_contracts(shell: Shell, link_to_contracts: &Path) -> anyhow::Result<()> {
16-
let _dir_guard = shell.push_dir(link_to_contracts.join("da-contracts"));
15+
pub fn build_l1_da_contracts(shell: Shell, link_to_code: &Path) -> anyhow::Result<()> {
16+
let _dir_guard = shell.push_dir(link_to_code.join("contracts/da-contracts"));
1717
Ok(Cmd::new(cmd!(shell, "forge build")).run()?)
1818
}
1919

20-
pub fn build_l2_contracts(shell: Shell, link_to_contracts: &Path) -> anyhow::Result<()> {
21-
let _dir_guard = shell.push_dir(link_to_contracts.join("l2-contracts"));
20+
pub fn build_l2_contracts(shell: Shell, link_to_code: &Path) -> anyhow::Result<()> {
21+
let _dir_guard = shell.push_dir(link_to_code.join("contracts/l2-contracts"));
2222
Cmd::new(cmd!(shell, "yarn build:foundry")).run()?;
2323
Ok(())
2424
}
2525

26-
pub fn build_system_contracts(shell: Shell, link_to_contracts: &Path) -> anyhow::Result<()> {
27-
let _dir_guard = shell.push_dir(link_to_contracts.join("system-contracts"));
26+
pub fn build_system_contracts(shell: Shell, link_to_code: &Path) -> anyhow::Result<()> {
27+
let _dir_guard = shell.push_dir(link_to_code.join("contracts/system-contracts"));
2828
Ok(Cmd::new(cmd!(shell, "yarn build:foundry")).run()?)
2929
}

zkstack_cli/crates/config/src/apps.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use xshell::Shell;
55

66
use crate::{
77
consts::{APPS_CONFIG_FILE, DEFAULT_EXPLORER_PORT, DEFAULT_PORTAL_PORT, LOCAL_CONFIGS_PATH},
8-
traits::{FileConfigTrait, FileConfigWithDefaultName, ReadConfig, SaveConfig},
8+
traits::{FileConfigWithDefaultName, ReadConfig, SaveConfig, ZkStackConfigTrait},
99
};
1010

1111
/// Ecosystem level configuration for the apps (portal and explorer).
@@ -20,7 +20,7 @@ pub struct AppEcosystemConfig {
2020
pub http_port: u16,
2121
}
2222

23-
impl FileConfigTrait for AppsEcosystemConfig {}
23+
impl ZkStackConfigTrait for AppsEcosystemConfig {}
2424
impl FileConfigWithDefaultName for AppsEcosystemConfig {
2525
const FILE_NAME: &'static str = APPS_CONFIG_FILE;
2626
}

zkstack_cli/crates/config/src/chain.rs

Lines changed: 17 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ use zksync_basic_types::L2ChainId;
1212

1313
use crate::{
1414
consts::{
15-
CONFIG_NAME, CONTRACTS_FILE, CONTRACTS_PATH, EN_CONFIG_FILE, GENERAL_FILE, GENESIS_FILE,
16-
L1_CONTRACTS_FOUNDRY_INSIDE_CONTRACTS, SECRETS_FILE, WALLETS_FILE,
15+
CONFIG_NAME, CONTRACTS_FILE, EN_CONFIG_FILE, GENERAL_FILE, GENESIS_FILE,
16+
L1_CONTRACTS_FOUNDRY, SECRETS_FILE, WALLETS_FILE,
1717
},
1818
create_localhost_wallets,
1919
gateway::GatewayConfig,
2020
traits::{
21-
FileConfigTrait, FileConfigWithDefaultName, ReadConfig, ReadConfigWithBasePath, SaveConfig,
22-
SaveConfigWithBasePath,
21+
FileConfigWithDefaultName, ReadConfig, ReadConfigWithBasePath, SaveConfig,
22+
SaveConfigWithBasePath, ZkStackConfigTrait,
2323
},
2424
ContractsConfig, EcosystemConfig, GatewayChainConfig, GeneralConfig, GenesisConfig,
25-
SecretsConfig, WalletsConfig, ZkStackConfigTrait, CONFIGS_PATH, GATEWAY_CHAIN_FILE,
25+
SecretsConfig, WalletsConfig, GATEWAY_CHAIN_FILE,
2626
};
2727

2828
/// Chain configuration file. This file is created in the chain
@@ -61,19 +61,19 @@ pub struct ChainConfig {
6161
pub chain_id: L2ChainId,
6262
pub prover_version: ProverMode,
6363
pub l1_network: L1Network,
64+
pub self_path: PathBuf,
65+
pub link_to_code: PathBuf,
6466
pub rocks_db_path: PathBuf,
6567
pub artifacts: PathBuf,
6668
pub configs: PathBuf,
6769
pub external_node_config_path: Option<PathBuf>,
6870
pub l1_batch_commit_data_generator_mode: L1BatchCommitmentMode,
6971
pub base_token: BaseToken,
7072
pub wallet_creation: WalletCreation,
73+
pub shell: OnceCell<Shell>,
7174
pub legacy_bridge: Option<bool>,
7275
pub evm_emulator: bool,
7376
pub tight_ports: bool,
74-
shell: OnceCell<Shell>,
75-
self_path: PathBuf,
76-
link_to_code: PathBuf,
7777
}
7878

7979
#[derive(Debug, Clone)]
@@ -93,49 +93,6 @@ impl Serialize for ChainConfig {
9393
}
9494

9595
impl ChainConfig {
96-
#[allow(clippy::too_many_arguments)]
97-
pub fn new(
98-
id: u32,
99-
name: String,
100-
chain_id: L2ChainId,
101-
prover_version: ProverMode,
102-
l1_network: L1Network,
103-
self_path: PathBuf,
104-
link_to_code: PathBuf,
105-
rocks_db_path: PathBuf,
106-
artifacts: PathBuf,
107-
configs: PathBuf,
108-
external_node_config_path: Option<PathBuf>,
109-
l1_batch_commit_data_generator_mode: L1BatchCommitmentMode,
110-
base_token: BaseToken,
111-
wallet_creation: WalletCreation,
112-
shell: OnceCell<Shell>,
113-
legacy_bridge: Option<bool>,
114-
evm_emulator: bool,
115-
tight_ports: bool,
116-
) -> Self {
117-
Self {
118-
id,
119-
name,
120-
chain_id,
121-
prover_version,
122-
l1_network,
123-
self_path,
124-
link_to_code,
125-
rocks_db_path,
126-
artifacts,
127-
configs,
128-
external_node_config_path,
129-
l1_batch_commit_data_generator_mode,
130-
base_token,
131-
wallet_creation,
132-
shell,
133-
legacy_bridge,
134-
evm_emulator,
135-
tight_ports,
136-
}
137-
}
138-
13996
pub(crate) fn get_shell(&self) -> &Shell {
14097
self.shell.get().expect("Not initialized")
14198
}
@@ -161,6 +118,10 @@ impl ChainConfig {
161118
anyhow::bail!("Wallets configs has not been found");
162119
}
163120

121+
pub fn get_preexisting_ecosystem_contracts_path(&self) -> PathBuf {
122+
todo!()
123+
}
124+
164125
pub fn get_contracts_config(&self) -> anyhow::Result<ContractsConfig> {
165126
ContractsConfig::read_with_base_path(self.get_shell(), &self.configs)
166127
}
@@ -201,6 +162,10 @@ impl ChainConfig {
201162
self.configs.join(GATEWAY_CHAIN_FILE)
202163
}
203164

165+
pub fn path_to_l1_foundry(&self) -> PathBuf {
166+
self.link_to_code.join(L1_CONTRACTS_FOUNDRY)
167+
}
168+
204169
pub fn save(&self, shell: &Shell, path: impl AsRef<Path>) -> anyhow::Result<()> {
205170
let config = self.get_internal();
206171
config.save(shell, path)
@@ -297,23 +262,4 @@ impl FileConfigWithDefaultName for ChainConfigInternal {
297262
const FILE_NAME: &'static str = CONFIG_NAME;
298263
}
299264

300-
impl FileConfigTrait for ChainConfigInternal {}
301-
302-
impl ZkStackConfigTrait for ChainConfig {
303-
fn link_to_code(&self) -> PathBuf {
304-
self.link_to_code.clone()
305-
}
306-
307-
fn default_configs_path(&self) -> PathBuf {
308-
self.link_to_code().join(CONFIGS_PATH)
309-
}
310-
311-
fn contracts_path(&self) -> PathBuf {
312-
self.link_to_code().join(CONTRACTS_PATH)
313-
}
314-
315-
fn path_to_foundry_scripts(&self) -> PathBuf {
316-
self.contracts_path()
317-
.join(L1_CONTRACTS_FOUNDRY_INSIDE_CONTRACTS)
318-
}
319-
}
265+
impl ZkStackConfigTrait for ChainConfigInternal {}

zkstack_cli/crates/config/src/consts.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ pub(crate) const LOCAL_CONFIGS_PATH: &str = "configs/";
4242
pub(crate) const LOCAL_GENERATED_PATH: &str = ".generated/";
4343
pub(crate) const LOCAL_DB_PATH: &str = "db/";
4444
pub(crate) const LOCAL_ARTIFACTS_PATH: &str = "artifacts/";
45-
pub(crate) const CONTRACTS_PATH: &str = "contracts/";
4645

4746
/// Name of apps config file
4847
pub const APPS_CONFIG_FILE: &str = "apps.yaml";
@@ -106,8 +105,8 @@ pub const EXPLORER_BATCHES_PROCESSING_POLLING_INTERVAL: u64 = 1000;
106105
/// Path to ecosystem contacts
107106
pub(crate) const ECOSYSTEM_PATH: &str = "etc/env/ecosystems";
108107

109-
pub(crate) const L1_CONTRACTS_FOUNDRY_INSIDE_CONTRACTS: &str = "l1-contracts";
110-
108+
/// Path to l1 contracts foundry folder inside zksync-era
109+
pub(crate) const L1_CONTRACTS_FOUNDRY: &str = "contracts/l1-contracts";
111110
/// Path to proving networks contracts
112111
pub(crate) const PROVING_NETWORKS_PATH: &str = "proof-manager-contracts";
113112
/// Path to proving networks contracts deploy script

zkstack_cli/crates/config/src/contracts.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use crate::{
1515
},
1616
register_chain::output::RegisterChainOutput,
1717
},
18-
traits::{FileConfigTrait, FileConfigWithDefaultName},
18+
traits::{FileConfigWithDefaultName, ZkStackConfigTrait},
1919
};
2020

2121
#[derive(Debug, Deserialize, Serialize, Clone, Default)]
@@ -215,7 +215,7 @@ impl FileConfigWithDefaultName for ContractsConfig {
215215
const FILE_NAME: &'static str = CONTRACTS_FILE;
216216
}
217217

218-
impl FileConfigTrait for ContractsConfig {}
218+
impl ZkStackConfigTrait for ContractsConfig {}
219219

220220
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Default)]
221221
pub struct EcosystemContracts {
@@ -248,7 +248,7 @@ pub struct EcosystemContracts {
248248
pub server_notifier_proxy_addr: Option<Address>,
249249
}
250250

251-
impl FileConfigTrait for EcosystemContracts {}
251+
impl ZkStackConfigTrait for EcosystemContracts {}
252252

253253
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
254254
pub struct BridgesContracts {

zkstack_cli/crates/config/src/docker_compose.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::collections::HashMap;
22

33
use serde::{Deserialize, Serialize};
44

5-
use crate::traits::FileConfigTrait;
5+
use crate::traits::ZkStackConfigTrait;
66

77
#[derive(Debug, Default, Serialize, Deserialize, Clone)]
88
pub struct DockerComposeConfig {
@@ -36,7 +36,7 @@ pub struct DockerComposeService {
3636
pub other: serde_json::Value,
3737
}
3838

39-
impl FileConfigTrait for DockerComposeConfig {}
39+
impl ZkStackConfigTrait for DockerComposeConfig {}
4040

4141
impl DockerComposeConfig {
4242
pub fn add_service(&mut self, name: &str, service: DockerComposeService) {

0 commit comments

Comments
 (0)