Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix mismatch between validator_count & metrics gazer #223

Merged
merged 5 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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