refactor: remove service_name (#8606)

Which issue # does this PR address?
#8586


  Please list or describe the changes introduced by this PR.
Remove `service_name` from `TaskExecutor`


Co-Authored-By: Abhivansh <31abhivanshj@gmail.com>
This commit is contained in:
Abhivansh
2026-01-02 05:37:40 +05:30
committed by GitHub
parent 6dab3c9a61
commit 9b3d7e3a54
12 changed files with 26 additions and 134 deletions

View File

@@ -253,7 +253,6 @@ pub fn run_basic_sim(matches: &ArgMatches) -> Result<(), String> {
network_1
.add_validator_client_with_fallbacks(
validator_config,
i,
beacon_nodes,
files,
)

View File

@@ -249,12 +249,7 @@ pub fn run_fallback_sim(matches: &ArgMatches) -> Result<(), String> {
Some(SUGGESTED_FEE_RECIPIENT.into());
println!("Adding validator client {}", i);
network_1
.add_validator_client_with_fallbacks(
validator_config,
i,
beacon_nodes,
files,
)
.add_validator_client_with_fallbacks(validator_config, beacon_nodes, files)
.await
.expect("should add validator");
},

View File

@@ -206,10 +206,7 @@ impl<E: EthSpec> LocalNetwork<E> {
beacon_config.network.enr_tcp4_port = Some(BOOTNODE_PORT.try_into().expect("non zero"));
beacon_config.network.discv5_config.table_filter = |_| true;
let execution_node = LocalExecutionNode::new(
self.context.service_context("boot_node_el".into()),
mock_execution_config,
);
let execution_node = LocalExecutionNode::new(self.context.clone(), mock_execution_config);
beacon_config.execution_layer = Some(execution_layer::Config {
execution_endpoint: Some(SensitiveUrl::parse(&execution_node.server.url()).unwrap()),
@@ -218,11 +215,7 @@ impl<E: EthSpec> LocalNetwork<E> {
..Default::default()
});
let beacon_node = LocalBeaconNode::production(
self.context.service_context("boot_node".into()),
beacon_config,
)
.await?;
let beacon_node = LocalBeaconNode::production(self.context.clone(), beacon_config).await?;
Ok((beacon_node, execution_node))
}
@@ -252,10 +245,7 @@ impl<E: EthSpec> LocalNetwork<E> {
mock_execution_config.server_config.listen_port = EXECUTION_PORT + count;
// Construct execution node.
let execution_node = LocalExecutionNode::new(
self.context.service_context(format!("node_{}_el", count)),
mock_execution_config,
);
let execution_node = LocalExecutionNode::new(self.context.clone(), mock_execution_config);
// Pair the beacon node and execution node.
beacon_config.execution_layer = Some(execution_layer::Config {
@@ -266,11 +256,7 @@ impl<E: EthSpec> LocalNetwork<E> {
});
// Construct beacon node using the config,
let beacon_node = LocalBeaconNode::production(
self.context.service_context(format!("node_{}", count)),
beacon_config,
)
.await?;
let beacon_node = LocalBeaconNode::production(self.context.clone(), beacon_config).await?;
Ok((beacon_node, execution_node))
}
@@ -343,9 +329,7 @@ impl<E: EthSpec> LocalNetwork<E> {
beacon_node: usize,
validator_files: ValidatorFiles,
) -> Result<(), String> {
let context = self
.context
.service_context(format!("validator_{}", beacon_node));
let context = self.context.clone();
let self_1 = self.clone();
let socket_addr = {
let read_lock = self.beacon_nodes.read();
@@ -401,13 +385,10 @@ impl<E: EthSpec> LocalNetwork<E> {
pub async fn add_validator_client_with_fallbacks(
&self,
mut validator_config: ValidatorConfig,
validator_index: usize,
beacon_nodes: Vec<usize>,
validator_files: ValidatorFiles,
) -> Result<(), String> {
let context = self
.context
.service_context(format!("validator_{}", validator_index));
let context = self.context.clone();
let self_1 = self.clone();
let mut beacon_node_urls = vec![];
for beacon_node in beacon_nodes {