Skip to content

Commit

Permalink
fix: fix mismatch between validator_count & metrics gazer (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
h4ck3rk3y committed Sep 22, 2023
1 parent 7b93f1c commit 5dd4f9b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions main.star
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ def run(plan, args={}):
plan,
beacon_metrics_gazer_config_template,
all_cl_client_contexts,
args_with_right_defaults.participants,
network_params,
)
plan.print("Succesfully launched beacon metrics gazer")
Expand Down
11 changes: 8 additions & 3 deletions src/beacon_metrics_gazer/beacon_metrics_gazer_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,17 @@ USED_PORTS = {


def launch_beacon_metrics_gazer(
plan, config_template, cl_client_contexts, network_params
plan, config_template, cl_client_contexts, participants, network_params
):
data = []
running_total_validator_count = 0
for index, client in enumerate(cl_client_contexts):
start_index = index * network_params.num_validator_keys_per_node
end_index = ((index + 1) * network_params.num_validator_keys_per_node) - 1
participant = participants[index]
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
data.append(
{
Expand Down
1 change: 1 addition & 0 deletions src/package_io/parse_input.star
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def parse_input(plan, input_args):
el_extra_params=participant["el_extra_params"],
validator_extra_params=participant["validator_extra_params"],
builder_network_params=participant["builder_network_params"],
validator_count=participant["validator_count"],
)
for participant in result["participants"]
],
Expand Down

0 comments on commit 5dd4f9b

Please sign in to comment.