diff --git a/contracts b/contracts index 349ba7cbc134..a340571a35c2 160000 --- a/contracts +++ b/contracts @@ -1 +1 @@ -Subproject commit 349ba7cbc134ab6f6309d91cd777a0be5733f38c +Subproject commit a340571a35c2a190047fef46b96d73bedd2a09c8 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/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..41df35fa5604 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 => {} // This is left blank to be able to define the config by file instead of giving it via CLI } } 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..70b16e79f7c8 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,9 @@ 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.no_da_validium_l1_validator_addr + } // TODO: change to EigenDA _ => anyhow::bail!("DA client config is not supported"), } } else {