Skip to content

Commit 5b422a2

Browse files
authored
Merge pull request #423 from lambdaclass/rename_eigen_client
Fix: Rename eigenda client to eigen
2 parents 8fb158a + 03d2501 commit 5b422a2

File tree

20 files changed

+57
-89
lines changed

20 files changed

+57
-89
lines changed

core/bin/external_node/src/config/env_config.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ use zksync_config::{
99
da_client::{
1010
avail::{AvailClientConfig, AvailSecrets},
1111
celestia::CelestiaSecrets,
12-
eigenda::EigenDASecrets,
12+
eigen::EigenSecrets,
1313
},
1414
DataAvailabilitySecrets,
1515
},
16-
AvailConfig, DAClientConfig, EigenDAConfig,
16+
AvailConfig, DAClientConfig, EigenConfig,
1717
};
1818
use zksync_types::{
1919
secrets::{APIKey, PrivateKey, SeedPhrase},
@@ -29,7 +29,7 @@ fn envy_load<T: DeserializeOwned>(name: &str, prefix: &str) -> anyhow::Result<T>
2929

3030
const AVAIL_CLIENT_CONFIG_NAME: &str = "Avail";
3131
const CELESTIA_CLIENT_CONFIG_NAME: &str = "Celestia";
32-
const EIGENDA_CLIENT_CONFIG_NAME: &str = "EigenDA";
32+
const EIGEN_CLIENT_CONFIG_NAME: &str = "Eigen";
3333
const OBJECT_STORE_CLIENT_CONFIG_NAME: &str = "ObjectStore";
3434
const NO_DA_CLIENT_CONFIG_NAME: &str = "NoDA";
3535
const AVAIL_GAS_RELAY_CLIENT_NAME: &str = "GasRelay";
@@ -54,7 +54,7 @@ pub fn da_client_config_from_env(prefix: &str) -> anyhow::Result<DAClientConfig>
5454
CELESTIA_CLIENT_CONFIG_NAME => {
5555
DAClientConfig::Celestia(envy_load("da_celestia_config", prefix)?)
5656
}
57-
EIGENDA_CLIENT_CONFIG_NAME => DAClientConfig::EigenDA(EigenDAConfig {
57+
EIGEN_CLIENT_CONFIG_NAME => DAClientConfig::Eigen(EigenConfig {
5858
disperser_rpc: env::var(format!("{}DISPERSER_RPC", prefix))?,
5959
eigenda_eth_rpc: match env::var(format!("{}EIGENDA_ETH_RPC", prefix)) {
6060
// Use a specific L1 RPC URL for the EigenDA client.
@@ -72,8 +72,8 @@ pub fn da_client_config_from_env(prefix: &str) -> anyhow::Result<DAClientConfig>
7272
.parse()
7373
.context("EigenDA blob version not found")?,
7474
polynomial_form: match env::var(format!("{}POLYNOMIAL_FORM", prefix))?.as_str() {
75-
"Coeff" => zksync_config::configs::da_client::eigenda::PolynomialForm::Coeff,
76-
"Eval" => zksync_config::configs::da_client::eigenda::PolynomialForm::Eval,
75+
"Coeff" => zksync_config::configs::da_client::eigen::PolynomialForm::Coeff,
76+
"Eval" => zksync_config::configs::da_client::eigen::PolynomialForm::Eval,
7777
_ => anyhow::bail!("Unknown Eigen polynomial form"),
7878
},
7979
}),
@@ -112,10 +112,10 @@ pub fn da_client_secrets_from_env(prefix: &str) -> anyhow::Result<DataAvailabili
112112
private_key: PrivateKey(private_key.into()),
113113
})
114114
}
115-
EIGENDA_CLIENT_CONFIG_NAME => {
115+
EIGEN_CLIENT_CONFIG_NAME => {
116116
let private_key = env::var(format!("{}SECRETS_PRIVATE_KEY", prefix))
117117
.context("Eigen private key not found")?;
118-
DataAvailabilitySecrets::EigenDA(EigenDASecrets {
118+
DataAvailabilitySecrets::Eigen(EigenSecrets {
119119
private_key: PrivateKey(private_key.into()),
120120
})
121121
}

core/bin/external_node/src/node_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ impl<R> ExternalNodeBuilder<R> {
314314
self.node
315315
.add_layer(CelestiaWiringLayer::new(config, secret));
316316
}
317-
(DAClientConfig::EigenDA(mut config), DataAvailabilitySecrets::EigenDA(secret)) => {
317+
(DAClientConfig::Eigen(mut config), DataAvailabilitySecrets::Eigen(secret)) => {
318318
if config.eigenda_eth_rpc.is_none() {
319319
config.eigenda_eth_rpc = Some(self.config.required.eth_client_url.clone());
320320
}

core/bin/zksync_server/src/node_builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ impl MainNodeBuilder {
142142
Some(da_client_config) => Ok(match da_client_config {
143143
DAClientConfig::Avail(_) => PubdataType::Avail,
144144
DAClientConfig::Celestia(_) => PubdataType::Celestia,
145-
DAClientConfig::EigenDA(_) => PubdataType::Eigen,
145+
DAClientConfig::Eigen(_) => PubdataType::Eigen,
146146
DAClientConfig::ObjectStore(_) => PubdataType::ObjectStore,
147147
DAClientConfig::NoDA => PubdataType::NoDA,
148148
}),
@@ -600,7 +600,7 @@ impl MainNodeBuilder {
600600
self.node
601601
.add_layer(CelestiaWiringLayer::new(config, secret));
602602
}
603-
(DAClientConfig::EigenDA(mut config), DataAvailabilitySecrets::EigenDA(secret)) => {
603+
(DAClientConfig::Eigen(mut config), DataAvailabilitySecrets::Eigen(secret)) => {
604604
if config.eigenda_eth_rpc.is_none() {
605605
let l1_secrets = &self.secrets.l1;
606606
config.eigenda_eth_rpc = l1_secrets.l1_rpc_url.clone();

core/lib/config/src/configs/da_client/eigenda.rs renamed to core/lib/config/src/configs/da_client/eigen.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ impl WellKnown for PolynomialForm {
3838
/// This configuration is meant to be used by the EigenDA V2 client.
3939
/// It is an insecure integration, where the dispersal is not verified.
4040
#[derive(Clone, Debug, PartialEq, Deserialize, DescribeConfig, DeserializeConfig)]
41-
pub struct EigenDAConfig {
41+
pub struct EigenConfig {
4242
/// URL of the Disperser RPC server
4343
pub disperser_rpc: String,
4444
/// URL of the Ethereum RPC server
@@ -58,7 +58,7 @@ pub struct EigenDAConfig {
5858

5959
/// Configuration for the EigenDA secrets.
6060
#[derive(Clone, Debug, DescribeConfig, DeserializeConfig)]
61-
pub struct EigenDASecrets {
61+
pub struct EigenSecrets {
6262
/// Private key used for dispersing the blobs
6363
#[config(with = FromSecretString)]
6464
pub private_key: PrivateKey,

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

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
use smart_config::{DescribeConfig, DeserializeConfig};
22

3-
use crate::{AvailConfig, CelestiaConfig, EigenDAConfig, ObjectStoreConfig};
3+
use crate::{AvailConfig, CelestiaConfig, EigenConfig, ObjectStoreConfig};
44

55
pub mod avail;
66
pub mod celestia;
7-
pub mod eigenda;
7+
pub mod eigen;
88

99
#[derive(Debug, Clone, PartialEq, DescribeConfig, DeserializeConfig)]
1010
#[config(tag = "client")]
1111
pub enum DAClientConfig {
1212
Avail(AvailConfig),
1313
Celestia(CelestiaConfig),
14-
EigenDA(EigenDAConfig),
14+
Eigen(EigenConfig),
1515
ObjectStore(ObjectStoreConfig),
1616
#[config(alias = "NoDa")]
1717
NoDA,
@@ -35,7 +35,7 @@ mod tests {
3535

3636
use super::{avail::AvailClientConfig, *};
3737
use crate::configs::{
38-
da_client::eigenda::PolynomialForm, object_store::ObjectStoreMode, DataAvailabilitySecrets,
38+
da_client::eigen::PolynomialForm, object_store::ObjectStoreMode, DataAvailabilitySecrets,
3939
Secrets,
4040
};
4141

@@ -294,9 +294,9 @@ mod tests {
294294
}
295295

296296
#[test]
297-
fn eigenda_config_from_env() {
297+
fn eigen_config_from_env() {
298298
let env = r#"
299-
DA_CLIENT="EigenDA"
299+
DA_CLIENT="Eigen"
300300
DA_DISPERSER_RPC="http://localhost:8080"
301301
DA_EIGENDA_ETH_RPC="http://localhost:8545"
302302
DA_AUTHENTICATED=false
@@ -309,7 +309,7 @@ mod tests {
309309
.strip_prefix("DA_");
310310

311311
let config = test_complete::<DAClientConfig>(env).unwrap();
312-
let DAClientConfig::EigenDA(config) = config else {
312+
let DAClientConfig::Eigen(config) = config else {
313313
panic!("unexpected config: {config:?}");
314314
};
315315

@@ -330,25 +330,10 @@ mod tests {
330330
assert_eq!(config.polynomial_form, PolynomialForm::Coeff);
331331
}
332332

333-
fn assert_eigen_config(config: &DAClientConfig) {
334-
let DAClientConfig::EigenDA(config) = config else {
335-
panic!("unexpected config: {config:?}");
336-
};
337-
assert_eq!(
338-
config.disperser_rpc,
339-
"https://disperser-holesky.eigenda.xyz:443"
340-
);
341-
assert_eq!(
342-
config.eigenda_eth_rpc.as_ref().unwrap().expose_str(),
343-
"https://holesky.infura.io/"
344-
);
345-
assert!(config.authenticated);
346-
}
347-
348333
#[test]
349-
fn eigenda_config_from_yaml() {
334+
fn eigen_config_from_yaml() {
350335
let yaml = r#"
351-
client: EigenDA
336+
client: Eigen
352337
disperser_rpc: https://disperser-holesky.eigenda.xyz:443
353338
eigenda_eth_rpc: https://holesky.infura.io/
354339
authenticated: true
@@ -359,10 +344,13 @@ mod tests {
359344
let yaml = Yaml::new("test.yml", serde_yaml::from_str(yaml).unwrap()).unwrap();
360345

361346
let config = test_complete::<DAClientConfig>(yaml).unwrap();
362-
let DAClientConfig::EigenDA(config) = config else {
347+
assert_eigen_config(&config);
348+
}
349+
350+
fn assert_eigen_config(config: &DAClientConfig) {
351+
let DAClientConfig::Eigen(config) = config else {
363352
panic!("unexpected config: {config:?}");
364353
};
365-
366354
assert_eq!(
367355
config.disperser_rpc,
368356
"https://disperser-holesky.eigenda.xyz:443"
@@ -384,9 +372,9 @@ mod tests {
384372
}
385373

386374
#[test]
387-
fn eigenda_config_from_yaml_with_enum_coercion() {
375+
fn eigen_config_from_yaml_with_enum_coercion() {
388376
let yaml = r#"
389-
eigen_d_a:
377+
eigen:
390378
disperser_rpc: https://disperser-holesky.eigenda.xyz:443
391379
eigenda_eth_rpc: https://holesky.infura.io/
392380
authenticated: true

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ pub use self::{
55
commitment_generator::CommitmentGeneratorConfig,
66
contract_verifier::ContractVerifierConfig,
77
contracts::chain::ContractsConfig,
8-
da_client::{
9-
avail::AvailConfig, celestia::CelestiaConfig, eigenda::EigenDAConfig, DAClientConfig,
10-
},
8+
da_client::{avail::AvailConfig, celestia::CelestiaConfig, eigen::EigenConfig, DAClientConfig},
119
da_dispatcher::DADispatcherConfig,
1210
database::{DBConfig, PostgresConfig},
1311
eth_sender::{EthConfig, GasAdjusterConfig},

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use zksync_basic_types::{secrets::APIKey, url::SensitiveUrl};
99

1010
use crate::configs::{
1111
consensus::ConsensusSecrets,
12-
da_client::{avail::AvailSecrets, celestia::CelestiaSecrets, eigenda::EigenDASecrets},
12+
da_client::{avail::AvailSecrets, celestia::CelestiaSecrets, eigen::EigenSecrets},
1313
};
1414

1515
#[derive(Debug, Clone, DescribeConfig, DeserializeConfig)]
@@ -42,7 +42,7 @@ pub struct L1Secrets {
4242
pub enum DataAvailabilitySecrets {
4343
Avail(AvailSecrets),
4444
Celestia(CelestiaSecrets),
45-
EigenDA(EigenDASecrets),
45+
Eigen(EigenSecrets),
4646
// Needed for compatibility with the non-secret part of the DA config
4747
NoDA,
4848
}

core/lib/config/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
pub use crate::configs::{
44
contracts::chain::ContractsConfig, full_config_schema, ApiConfig, AvailConfig,
55
BaseTokenAdjusterConfig, CelestiaConfig, ContractVerifierConfig, DAClientConfig,
6-
DADispatcherConfig, DBConfig, EigenDAConfig, EthConfig, EthWatchConfig,
6+
DADispatcherConfig, DBConfig, EigenConfig, EthConfig, EthWatchConfig,
77
ExternalProofIntegrationApiConfig, GasAdjusterConfig, GenesisConfig, ObjectStoreConfig,
88
PostgresConfig, SnapshotsCreatorConfig,
99
};

core/lib/da_client/src/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub enum ClientType {
5959
NoDA,
6060
Avail,
6161
Celestia,
62-
EigenDA,
62+
Eigen,
6363
ObjectStore,
6464
}
6565

@@ -69,7 +69,7 @@ impl ClientType {
6969
ClientType::NoDA => PubdataType::NoDA,
7070
ClientType::Avail => PubdataType::Avail,
7171
ClientType::Celestia => PubdataType::Celestia,
72-
ClientType::EigenDA => PubdataType::Eigen,
72+
ClientType::Eigen => PubdataType::Eigen,
7373
ClientType::ObjectStore => PubdataType::ObjectStore,
7474
}
7575
}

core/lib/dal/src/consensus/conv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ impl proto::PubdataType {
581581
Self::NoDa => PubdataType::NoDA,
582582
Self::Avail => PubdataType::Avail,
583583
Self::Celestia => PubdataType::Celestia,
584-
Self::EigenDa => PubdataType::Eigen,
584+
Self::Eigen => PubdataType::Eigen,
585585
Self::ObjectStore => PubdataType::ObjectStore,
586586
}
587587
}

0 commit comments

Comments
 (0)