@@ -21,17 +21,12 @@ use super::{
2121 load_optional_env_var,
2222} ;
2323use crate :: {
24- commit:: client:: SignerClient ,
25- config:: {
26- CONFIG_ENV , MODULE_JWT_ENV , MuxKeysLoader , PBS_IMAGE_DEFAULT , PBS_SERVICE_NAME , PbsMuxes ,
27- SIGNER_TLS_CERTIFICATE_NAME , SIGNER_TLS_CERTIFICATES_PATH_ENV , SIGNER_URL_ENV ,
28- SignerConfig , TlsMode , load_env_var, load_file_from_env,
29- } ,
24+ config:: { CONFIG_ENV , MuxKeysLoader , PBS_IMAGE_DEFAULT , PbsMuxes , load_file_from_env} ,
3025 pbs:: {
3126 DEFAULT_PBS_PORT , DEFAULT_REGISTRY_REFRESH_SECONDS , DefaultTimeout , LATE_IN_SLOT_TIME_MS ,
3227 REGISTER_VALIDATOR_RETRY_LIMIT , RelayClient , RelayEntry ,
3328 } ,
34- types:: { BlsPublicKey , Chain , Jwt , ModuleId } ,
29+ types:: { BlsPublicKey , Chain } ,
3530 utils:: {
3631 WEI_PER_ETH , as_eth_str, default_bool, default_host, default_u16, default_u32, default_u64,
3732 default_u256,
@@ -244,9 +239,6 @@ pub struct StaticPbsConfig {
244239 /// Config of pbs module
245240 #[ serde( flatten) ]
246241 pub pbs_config : PbsConfig ,
247- /// Whether to enable the signer client
248- #[ serde( default = "default_bool::<false>" ) ]
249- pub with_signer : bool ,
250242}
251243
252244impl StaticPbsConfig {
@@ -279,8 +271,6 @@ pub struct PbsModuleConfig {
279271 /// URL) DO NOT use this for get_header calls, use `relays` or `mux_lookup`
280272 /// instead
281273 pub all_relays : Vec < RelayClient > ,
282- /// Signer client to call Signer API
283- pub signer_client : Option < SignerClient > ,
284274 /// List of raw mux details configured, if any
285275 pub registry_muxes : Option < HashMap < MuxKeysLoader , RuntimeMuxConfig > > ,
286276 /// Lookup of pubkey to mux config
@@ -355,7 +345,6 @@ pub async fn load_pbs_config(config_path: Option<PathBuf>) -> Result<(PbsModuleC
355345 pbs_config : Arc :: new ( config. pbs . pbs_config ) ,
356346 relays : relay_clients,
357347 all_relays,
358- signer_client : None ,
359348 registry_muxes,
360349 mux_lookup,
361350 } ,
@@ -378,7 +367,6 @@ pub async fn load_pbs_custom_config<T: DeserializeOwned>() -> Result<(PbsModuleC
378367 chain : Chain ,
379368 relays : Vec < RelayConfig > ,
380369 pbs : CustomPbsConfig < U > ,
381- signer : Option < SignerConfig > ,
382370 muxes : Option < PbsMuxes > ,
383371 }
384372
@@ -431,41 +419,13 @@ pub async fn load_pbs_custom_config<T: DeserializeOwned>() -> Result<(PbsModuleC
431419
432420 let all_relays = all_relays. into_values ( ) . collect ( ) ;
433421
434- let signer_client = if cb_config. pbs . static_config . with_signer {
435- // if custom pbs requires a signer client, load jwt
436- let module_jwt = Jwt ( load_env_var ( MODULE_JWT_ENV ) ?) ;
437- let signer_server_url = load_env_var ( SIGNER_URL_ENV ) ?. parse ( ) ?;
438- let certs_path = match cb_config
439- . signer
440- . ok_or_else ( || eyre:: eyre!( "with_signer = true but no [signer] section in config" ) ) ?
441- . tls_mode
442- {
443- TlsMode :: Insecure => None ,
444- TlsMode :: Certificate ( path) => Some (
445- load_env_var ( SIGNER_TLS_CERTIFICATES_PATH_ENV )
446- . map ( PathBuf :: from)
447- . unwrap_or ( path)
448- . join ( SIGNER_TLS_CERTIFICATE_NAME ) ,
449- ) ,
450- } ;
451- Some ( SignerClient :: new (
452- signer_server_url,
453- certs_path,
454- module_jwt,
455- ModuleId ( PBS_SERVICE_NAME . to_string ( ) ) ,
456- ) ?)
457- } else {
458- None
459- } ;
460-
461422 Ok ( (
462423 PbsModuleConfig {
463424 chain : cb_config. chain ,
464425 endpoint,
465426 pbs_config : Arc :: new ( cb_config. pbs . static_config . pbs_config ) ,
466427 relays : relay_clients,
467428 all_relays,
468- signer_client,
469429 registry_muxes,
470430 mux_lookup,
471431 } ,
0 commit comments