diff --git a/core/lib/config/src/configs/da_client/eigen.rs b/core/lib/config/src/configs/da_client/eigen.rs index 8c099ac89488..cd036e407427 100644 --- a/core/lib/config/src/configs/da_client/eigen.rs +++ b/core/lib/config/src/configs/da_client/eigen.rs @@ -1,5 +1,5 @@ use serde::Deserialize; -use zksync_basic_types::{secrets::PrivateKey, Address}; +use zksync_basic_types::secrets::PrivateKey; /// Configuration for the EigenDA remote disperser client. #[derive(Clone, Debug, PartialEq, Deserialize, Default)] pub struct EigenConfig { @@ -11,7 +11,7 @@ pub struct EigenConfig { /// URL of the Ethereum RPC server pub eigenda_eth_rpc: Option, /// Address of the service manager contract - pub eigenda_svc_manager_address: Address, + pub eigenda_svc_manager_address: String, /// Wait for the blob to be finalized before returning the response pub wait_for_finalization: bool, /// Authenticated dispersal diff --git a/core/lib/env_config/src/da_client.rs b/core/lib/env_config/src/da_client.rs index e0239f75b7f4..deda1ce3f5c2 100644 --- a/core/lib/env_config/src/da_client.rs +++ b/core/lib/env_config/src/da_client.rs @@ -90,9 +90,6 @@ impl FromEnv for DataAvailabilitySecrets { #[cfg(test)] mod tests { - use std::str::FromStr; - - use zksync_basic_types::Address; use zksync_config::{ configs::{ da_client::{ @@ -254,7 +251,7 @@ mod tests { DA_DISPERSER_RPC="http://localhost:8080" DA_SETTLEMENT_LAYER_CONFIRMATION_DEPTH=0 DA_EIGENDA_ETH_RPC="http://localhost:8545" - DA_EIGENDA_SVC_MANAGER_ADDRESS="0xD4A7E1Bd8015057293f0D0A557088c286942e84b" + DA_EIGENDA_SVC_MANAGER_ADDRESS="0x123" DA_WAIT_FOR_FINALIZATION=true DA_AUTHENTICATED=false DA_G1_URL="resources1" @@ -270,10 +267,7 @@ mod tests { disperser_rpc: "http://localhost:8080".to_string(), settlement_layer_confirmation_depth: 0, eigenda_eth_rpc: Some("http://localhost:8545".to_string()), - eigenda_svc_manager_address: Address::from_str( - "0xD4A7E1Bd8015057293f0D0A557088c286942e84b" - ) - .unwrap(), + eigenda_svc_manager_address: "0x123".to_string(), wait_for_finalization: true, authenticated: false, g1_url: "resources1".to_string(), diff --git a/core/lib/protobuf_config/src/da_client.rs b/core/lib/protobuf_config/src/da_client.rs index 63b73b42436b..84e94aeae1a2 100644 --- a/core/lib/protobuf_config/src/da_client.rs +++ b/core/lib/protobuf_config/src/da_client.rs @@ -1,5 +1,3 @@ -use std::str::FromStr; - use anyhow::Context; use zksync_config::configs::{ self, @@ -11,7 +9,6 @@ use zksync_config::configs::{ }, }; use zksync_protobuf::{required, ProtoRepr}; -use zksync_types::Address; use crate::proto::{ da_client::{self as proto}, @@ -67,10 +64,9 @@ impl ProtoRepr for proto::DataAvailabilityClient { ) .context("settlement_layer_confirmation_depth")?, eigenda_eth_rpc: required(&conf.eigenda_eth_rpc).ok().cloned(), - eigenda_svc_manager_address: Address::from_str( - required(&conf.eigenda_svc_manager_address) - .context("eigenda_svc_manager_address")?, - )?, + eigenda_svc_manager_address: required(&conf.eigenda_svc_manager_address) + .context("eigenda_svc_manager_address")? + .clone(), wait_for_finalization: *required(&conf.wait_for_finalization) .context("wait_for_finalization")?, authenticated: *required(&conf.authenticated).context("authenticated")?, @@ -120,7 +116,7 @@ impl ProtoRepr for proto::DataAvailabilityClient { config.settlement_layer_confirmation_depth, ), eigenda_eth_rpc: config.eigenda_eth_rpc.clone(), - eigenda_svc_manager_address: Some(config.eigenda_svc_manager_address.to_string()), + eigenda_svc_manager_address: Some(config.eigenda_svc_manager_address.clone()), wait_for_finalization: Some(config.wait_for_finalization), authenticated: Some(config.authenticated), g1_url: Some(config.g1_url.clone()), diff --git a/core/node/da_clients/src/eigen/client_tests.rs b/core/node/da_clients/src/eigen/client_tests.rs index b90fa4cdbad2..99cd81cf2797 100644 --- a/core/node/da_clients/src/eigen/client_tests.rs +++ b/core/node/da_clients/src/eigen/client_tests.rs @@ -13,7 +13,7 @@ mod tests { types::{DAError, DispatchResponse}, DataAvailabilityClient, }; - use zksync_types::{secrets::PrivateKey, Address}; + use zksync_types::secrets::PrivateKey; use crate::eigen::{blob_info::BlobInfo, EigenClient, GetBlobData}; @@ -72,7 +72,7 @@ mod tests { disperser_rpc: "https://disperser-holesky.eigenda.xyz:443".to_string(), settlement_layer_confirmation_depth: 0, eigenda_eth_rpc: Some("https://ethereum-holesky-rpc.publicnode.com".to_string()), - eigenda_svc_manager_address: Address::from_str("0xD4A7E1Bd8015057293f0D0A557088c286942e84b").unwrap(), + eigenda_svc_manager_address: "0xD4A7E1Bd8015057293f0D0A557088c286942e84b".to_string(), wait_for_finalization: false, authenticated: false, g1_url: "https://github.com/Layr-Labs/eigenda-proxy/raw/2fd70b99ef5bf137d7bbca3461cf9e1f2c899451/resources/g1.point".to_string(), @@ -112,7 +112,7 @@ mod tests { disperser_rpc: "https://disperser-holesky.eigenda.xyz:443".to_string(), settlement_layer_confirmation_depth: 0, eigenda_eth_rpc: Some("https://ethereum-holesky-rpc.publicnode.com".to_string()), - eigenda_svc_manager_address: Address::from_str("0xD4A7E1Bd8015057293f0D0A557088c286942e84b").unwrap(), + eigenda_svc_manager_address: "0xD4A7E1Bd8015057293f0D0A557088c286942e84b".to_string(), wait_for_finalization: false, authenticated: true, g1_url: "https://github.com/Layr-Labs/eigenda-proxy/raw/2fd70b99ef5bf137d7bbca3461cf9e1f2c899451/resources/g1.point".to_string(), @@ -156,7 +156,7 @@ mod tests { g2_url: "https://github.com/Layr-Labs/eigenda-proxy/raw/2fd70b99ef5bf137d7bbca3461cf9e1f2c899451/resources/g2.point.powerOf2".to_string(), settlement_layer_confirmation_depth: 0, eigenda_eth_rpc: Some("https://ethereum-holesky-rpc.publicnode.com".to_string()), - eigenda_svc_manager_address: Address::from_str("0xD4A7E1Bd8015057293f0D0A557088c286942e84b").unwrap(), + eigenda_svc_manager_address: "0xD4A7E1Bd8015057293f0D0A557088c286942e84b".to_string(), chain_id: 17000, }; let secrets = EigenSecrets { @@ -192,7 +192,7 @@ mod tests { disperser_rpc: "https://disperser-holesky.eigenda.xyz:443".to_string(), settlement_layer_confirmation_depth: 5, eigenda_eth_rpc: Some("https://ethereum-holesky-rpc.publicnode.com".to_string()), - eigenda_svc_manager_address:Address::from_str("0xD4A7E1Bd8015057293f0D0A557088c286942e84b").unwrap(), + eigenda_svc_manager_address: "0xD4A7E1Bd8015057293f0D0A557088c286942e84b".to_string(), wait_for_finalization: false, authenticated: false, g1_url: "https://github.com/Layr-Labs/eigenda-proxy/raw/2fd70b99ef5bf137d7bbca3461cf9e1f2c899451/resources/g1.point".to_string(), @@ -232,7 +232,7 @@ mod tests { disperser_rpc: "https://disperser-holesky.eigenda.xyz:443".to_string(), settlement_layer_confirmation_depth: 5, eigenda_eth_rpc: Some("https://ethereum-holesky-rpc.publicnode.com".to_string()), - eigenda_svc_manager_address: Address::from_str("0xD4A7E1Bd8015057293f0D0A557088c286942e84b").unwrap(), + eigenda_svc_manager_address: "0xD4A7E1Bd8015057293f0D0A557088c286942e84b".to_string(), wait_for_finalization: false, authenticated: true, g1_url: "https://github.com/Layr-Labs/eigenda-proxy/raw/2fd70b99ef5bf137d7bbca3461cf9e1f2c899451/resources/g1.point".to_string(), diff --git a/core/node/da_clients/src/eigen/sdk.rs b/core/node/da_clients/src/eigen/sdk.rs index e435e9525fc7..c1e52e42ffc9 100644 --- a/core/node/da_clients/src/eigen/sdk.rs +++ b/core/node/da_clients/src/eigen/sdk.rs @@ -10,7 +10,7 @@ use tonic::{ use zksync_config::EigenConfig; use zksync_da_client::types::DAError; use zksync_eth_client::clients::PKSigningClient; -use zksync_types::{url::SensitiveUrl, K256PrivateKey, SLChainId}; +use zksync_types::{url::SensitiveUrl, Address, K256PrivateKey, SLChainId}; use zksync_web3_decl::client::{Client, DynClient, L1}; use super::{ @@ -58,7 +58,7 @@ impl RawEigenClient { .eigenda_eth_rpc .clone() .ok_or(anyhow::anyhow!("EigenDA ETH RPC not set"))?, - svc_manager_addr: config.eigenda_svc_manager_address, + svc_manager_addr: Address::from_str(&config.eigenda_svc_manager_address)?, max_blob_size: Self::BLOB_SIZE_LIMIT as u32, g1_url: config.g1_url.clone(), g2_url: config.g2_url.clone(), diff --git a/core/node/da_clients/src/eigen/verifier.rs b/core/node/da_clients/src/eigen/verifier.rs index a5cef84058a7..bfb68f6d0068 100644 --- a/core/node/da_clients/src/eigen/verifier.rs +++ b/core/node/da_clients/src/eigen/verifier.rs @@ -429,7 +429,6 @@ impl Verifier { let call_request = CallRequest { to: Some(self.cfg.svc_manager_addr), - data: Some(zksync_basic_types::web3::Bytes(data)), ..Default::default() };