Commit 5dd4f9b3 authored by Gyanendra Mishra's avatar Gyanendra Mishra Committed by GitHub

fix: fix mismatch between validator_count & metrics gazer (#223)

parent 7b93f1ce
...@@ -273,6 +273,7 @@ def run(plan, args={}): ...@@ -273,6 +273,7 @@ def run(plan, args={}):
plan, plan,
beacon_metrics_gazer_config_template, beacon_metrics_gazer_config_template,
all_cl_client_contexts, all_cl_client_contexts,
args_with_right_defaults.participants,
network_params, network_params,
) )
plan.print("Succesfully launched beacon metrics gazer") plan.print("Succesfully launched beacon metrics gazer")
......
...@@ -23,12 +23,17 @@ USED_PORTS = { ...@@ -23,12 +23,17 @@ USED_PORTS = {
def launch_beacon_metrics_gazer( def launch_beacon_metrics_gazer(
plan, config_template, cl_client_contexts, network_params plan, config_template, cl_client_contexts, participants, network_params
): ):
data = [] data = []
running_total_validator_count = 0
for index, client in enumerate(cl_client_contexts): for index, client in enumerate(cl_client_contexts):
start_index = index * network_params.num_validator_keys_per_node participant = participants[index]
end_index = ((index + 1) * network_params.num_validator_keys_per_node) - 1 if participant.validator_count == 0:
continue
start_index = running_total_validator_count
running_total_validator_count += participant.validator_count
end_index = start_index + participant.validator_count
service_name = client.beacon_service_name service_name = client.beacon_service_name
data.append( data.append(
{ {
......
...@@ -70,6 +70,7 @@ def parse_input(plan, input_args): ...@@ -70,6 +70,7 @@ def parse_input(plan, input_args):
el_extra_params=participant["el_extra_params"], el_extra_params=participant["el_extra_params"],
validator_extra_params=participant["validator_extra_params"], validator_extra_params=participant["validator_extra_params"],
builder_network_params=participant["builder_network_params"], builder_network_params=participant["builder_network_params"],
validator_count=participant["validator_count"],
) )
for participant in result["participants"] for participant in result["participants"]
], ],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment