diff --git a/contracts b/contracts index 349ba7cbc134..72eaa623b2eb 160000 --- a/contracts +++ b/contracts @@ -1 +1 @@ -Subproject commit 349ba7cbc134ab6f6309d91cd777a0be5733f38c +Subproject commit 72eaa623b2ebb18f592b1ab25b9135d064ca09a4 diff --git a/zkstack_cli/crates/config/src/chain.rs b/zkstack_cli/crates/config/src/chain.rs index 2287a2e72b95..1822e2bada46 100644 --- a/zkstack_cli/crates/config/src/chain.rs +++ b/zkstack_cli/crates/config/src/chain.rs @@ -9,7 +9,7 @@ use xshell::Shell; use zksync_basic_types::L2ChainId; use zksync_config::{ configs::{gateway::GatewayChainConfig, GatewayConfig}, - DAClientConfig::Avail, + DAClientConfig::{Avail, Eigen}, }; use crate::{ @@ -75,6 +75,7 @@ pub enum DAValidatorType { Rollup = 0, NoDA = 1, Avail = 2, + EigenDA = 3, } impl Serialize for ChainConfig { @@ -121,6 +122,7 @@ impl ChainConfig { (L1BatchCommitmentMode::Rollup, _) => Ok(DAValidatorType::Rollup), (L1BatchCommitmentMode::Validium, None) => Ok(DAValidatorType::NoDA), (L1BatchCommitmentMode::Validium, Some(Avail(_))) => Ok(DAValidatorType::Avail), + (L1BatchCommitmentMode::Validium, Some(Eigen(_))) => Ok(DAValidatorType::EigenDA), _ => anyhow::bail!("DAValidatorType is not supported"), } } diff --git a/zkstack_cli/crates/config/src/contracts.rs b/zkstack_cli/crates/config/src/contracts.rs index 4666d0e465b8..666883cad4c0 100644 --- a/zkstack_cli/crates/config/src/contracts.rs +++ b/zkstack_cli/crates/config/src/contracts.rs @@ -114,6 +114,11 @@ impl ContractsConfig { .deployed_addresses .avail_l1_da_validator_addr, ); + self.l1.eigenda_l1_validator_addr = Some( + deploy_l1_output + .deployed_addresses + .eigenda_l1_validator_addr, + ); self.l1.chain_admin_addr = deploy_l1_output.deployed_addresses.chain_admin; } @@ -249,6 +254,9 @@ pub struct L1Contracts { pub no_da_validium_l1_validator_addr: Option
, // `Option` to be able to parse configs from previous protocol version #[serde(skip_serializing_if = "Option::is_none")] + pub eigenda_l1_validator_addr: Option
, + // `Option` to be able to parse configs from previous protocol version + #[serde(skip_serializing_if = "Option::is_none")] pub transaction_filterer_addr: Option
, } diff --git a/zkstack_cli/crates/config/src/forge_interface/deploy_ecosystem/input.rs b/zkstack_cli/crates/config/src/forge_interface/deploy_ecosystem/input.rs index bc0c6cabb39f..25556a7661e8 100644 --- a/zkstack_cli/crates/config/src/forge_interface/deploy_ecosystem/input.rs +++ b/zkstack_cli/crates/config/src/forge_interface/deploy_ecosystem/input.rs @@ -168,6 +168,7 @@ impl DeployL1Config { validator_timelock_execution_delay: initial_deployment_config .validator_timelock_execution_delay, avail_l1_da_validator_addr: l1_network.avail_l1_da_validator_addr(), + eigenda_l1_validator_addr: l1_network.eigenda_l1_validator_addr(), }, tokens: TokensDeployL1Config { token_weth_address: initial_deployment_config.token_weth_address, @@ -204,6 +205,8 @@ pub struct ContractsDeployL1Config { pub evm_emulator_hash: Option, #[serde(skip_serializing_if = "Option::is_none")] pub avail_l1_da_validator_addr: Option
, + #[serde(skip_serializing_if = "Option::is_none")] + pub eigenda_l1_validator_addr: Option
, } #[derive(Debug, Deserialize, Serialize, Clone)] diff --git a/zkstack_cli/crates/config/src/forge_interface/deploy_ecosystem/output.rs b/zkstack_cli/crates/config/src/forge_interface/deploy_ecosystem/output.rs index a0bca69cafd5..9294cba6ef8c 100644 --- a/zkstack_cli/crates/config/src/forge_interface/deploy_ecosystem/output.rs +++ b/zkstack_cli/crates/config/src/forge_interface/deploy_ecosystem/output.rs @@ -36,6 +36,7 @@ pub struct DeployL1DeployedAddressesOutput { pub rollup_l1_da_validator_addr: Address, pub no_da_validium_l1_validator_addr: Address, pub avail_l1_da_validator_addr: Address, + pub eigenda_l1_validator_addr: Address, pub l1_rollup_da_manager: Address, pub native_token_vault_addr: Address, } diff --git a/zkstack_cli/crates/types/src/l1_network.rs b/zkstack_cli/crates/types/src/l1_network.rs index 609af7ef3e7c..0578f685b6ec 100644 --- a/zkstack_cli/crates/types/src/l1_network.rs +++ b/zkstack_cli/crates/types/src/l1_network.rs @@ -48,4 +48,15 @@ impl L1Network { L1Network::Mainnet => None, // TODO: add mainnet address after it is known } } + + pub fn eigenda_l1_validator_addr(&self) -> Option
{ + match self { + L1Network::Localhost => None, + L1Network::Sepolia | L1Network::Holesky => { + None + //TODO: add real address + } + L1Network::Mainnet => None, // TODO: add mainnet address after it is known + } + } } diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/args/init/da_configs.rs b/zkstack_cli/crates/zkstack/src/commands/chain/args/init/da_configs.rs index 55d8afdd9fb2..d6e4e1cfee05 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/args/init/da_configs.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/args/init/da_configs.rs @@ -31,6 +31,7 @@ pub struct ValidiumTypeArgs { pub enum ValidiumTypeInternal { NoDA, Avail, + EigenDA, } #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, EnumIter, Display, ValueEnum)] @@ -43,11 +44,13 @@ pub enum AvailClientTypeInternal { pub enum ValidiumType { NoDA, Avail((AvailConfig, AvailSecrets)), + EigenDA, } impl ValidiumType { pub fn read() -> Self { match PromptSelect::new(MSG_VALIDIUM_TYPE_PROMPT, ValidiumTypeInternal::iter()).ask() { + ValidiumTypeInternal::EigenDA => ValidiumType::EigenDA, ValidiumTypeInternal::NoDA => ValidiumType::NoDA, ValidiumTypeInternal::Avail => { let avail_client_type = PromptSelect::new( diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/args/init/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/args/init/mod.rs index b8a42d332c17..159f65d6d8c0 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/args/init/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/args/init/mod.rs @@ -100,6 +100,7 @@ impl InitArgs { Some(da_configs::ValidiumTypeInternal::Avail) => panic!( "Avail is not supported via CLI args, use interactive mode" // TODO: Add support for configuration via CLI args ), + Some(da_configs::ValidiumTypeInternal::EigenDA) => Some(ValidiumType::EigenDA), }, _ => None, }; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/init/configs.rs b/zkstack_cli/crates/zkstack/src/commands/chain/init/configs.rs index e05f29efcc8c..2c48879d12b9 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/init/configs.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/init/configs.rs @@ -97,6 +97,7 @@ pub async fn init_configs( general_config.da_client_config = Some(avail_config.into()); secrets.data_availability = Some(DataAvailabilitySecrets::Avail(avail_secrets)); } + ValidiumType::EigenDA => {} } } diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/init/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/init/mod.rs index 6543e3e09f9f..fc3887e8b4c4 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/init/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/init/mod.rs @@ -237,6 +237,7 @@ pub(crate) fn get_l1_da_validator(chain_config: &ChainConfig) -> anyhow::Result< if let Some(da_client_config) = general_config.da_client_config { match da_client_config { DAClientConfig::Avail(_) => contracts_config.l1.avail_l1_da_validator_addr, + DAClientConfig::Eigen(_) => contracts_config.l1.eigenda_l1_validator_addr, _ => anyhow::bail!("DA client config is not supported"), } } else {