diff --git a/.github/tests/mix-assert.yaml b/.github/tests/mix-assert.yaml index 9d8cb6820..d71bf444c 100644 --- a/.github/tests/mix-assert.yaml +++ b/.github/tests/mix-assert.yaml @@ -13,6 +13,9 @@ participants: cl_type: grandine additional_services: - assertoor + - dora assertoor_params: run_stability_check: false run_block_proposal_check: true +network_params: + preset: minimal diff --git a/src/cl/cl_launcher.star b/src/cl/cl_launcher.star index 541ce04b0..f3b4a69a3 100644 --- a/src/cl/cl_launcher.star +++ b/src/cl/cl_launcher.star @@ -84,7 +84,6 @@ def launch( "launch_method": grandine.launch, }, } - all_snooper_engine_contexts = [] all_cl_contexts = [] preregistered_validator_keys_for_nodes = ( @@ -122,10 +121,10 @@ def launch( cl_service_name = "cl-{0}-{1}-{2}".format(index_str, cl_type, el_type) new_cl_node_validator_keystores = None - if participant.validator_count != 0 and participant.vc_count != 0: - new_cl_node_validator_keystores = preregistered_validator_keys_for_nodes[ - index - ] + if participant.validator_count > 0 and participant.use_separate_vc == False: + new_cl_node_validator_keystores = ( + preregistered_validator_keys_for_nodes.locator[index][0] + ) el_context = all_el_contexts[index] diff --git a/src/package_io/input_parser.star b/src/package_io/input_parser.star index 44c608c96..ae499b7f6 100644 --- a/src/package_io/input_parser.star +++ b/src/package_io/input_parser.star @@ -622,6 +622,18 @@ def parse_network_params(plan, input_args): + participant["cl_type"], ) ) + if participant["vc_count"] > 1 and participant["use_separate_vc"] != True: + fail( + "vc_count is set to {0} but use_separate_vc is set to {1} for participant: {2}. You have to use use_separate_vc = True for teku/nimbus if you want to set vc_count.".format( + participant["vc_count"], + participant["use_separate_vc"], + str(index + 1) + + "-" + + participant["el_type"] + + "-" + + participant["cl_type"], + ) + ) snooper_enabled = participant["snooper_enabled"] if snooper_enabled == None: diff --git a/src/participant_network.star b/src/participant_network.star index 14b4f2794..ed9d3609f 100644 --- a/src/participant_network.star +++ b/src/participant_network.star @@ -197,7 +197,6 @@ def launch_participant_network( constants.CL_TYPE.lighthouse, ] - current_vc_index = 0 for index, participant in enumerate(participants): el_type = participant.el_type cl_type = participant.cl_type @@ -294,14 +293,8 @@ def launch_participant_network( ) vc_keystores = None - if participant.validator_count != 0: - if participant.vc_count == 1: - vc_keystores = preregistered_validator_keys_for_nodes[index] - else: - vc_keystores = preregistered_validator_keys_for_nodes[ - index + sub_index - ] - + if participant.validator_count > 0: + vc_keystores = preregistered_validator_keys_for_nodes.locator vc_context = None remote_signer_context = None snooper_beacon_context = None @@ -358,7 +351,7 @@ def launch_participant_network( global_tolerations=global_tolerations, node_selectors=node_selectors, port_publisher=port_publisher, - remote_signer_index=current_vc_index, + remote_signer_index=vc_keystores, ) all_remote_signer_contexts.append(remote_signer_context) @@ -391,13 +384,12 @@ def launch_participant_network( network=network_params.network, electra_fork_epoch=network_params.electra_fork_epoch, port_publisher=port_publisher, - vc_index=current_vc_index, + vc_index=vc_keystores, ) all_vc_contexts.append(vc_context) if vc_context and vc_context.metrics_info: vc_context.metrics_info["config"] = participant.prometheus_config - current_vc_index += 1 all_participants = [] diff --git a/src/prelaunch_data_generator/validator_keystores/keystore_files.star b/src/prelaunch_data_generator/validator_keystores/keystore_files.star index d10f359b4..58e609512 100644 --- a/src/prelaunch_data_generator/validator_keystores/keystore_files.star +++ b/src/prelaunch_data_generator/validator_keystores/keystore_files.star @@ -8,6 +8,7 @@ def new_keystore_files( prysm_relative_dirpath, teku_keys_relative_dirpath, teku_secrets_relative_dirpath, + locator, ): return struct( files_artifact_uuid=files_artifact_uuid, @@ -19,4 +20,5 @@ def new_keystore_files( prysm_relative_dirpath=prysm_relative_dirpath, teku_keys_relative_dirpath=teku_keys_relative_dirpath, teku_secrets_relative_dirpath=teku_secrets_relative_dirpath, + locator=locator, ) diff --git a/src/prelaunch_data_generator/validator_keystores/validator_keystore_generator.star b/src/prelaunch_data_generator/validator_keystores/validator_keystore_generator.star index 603cfdb2d..0b06dcdba 100644 --- a/src/prelaunch_data_generator/validator_keystores/validator_keystore_generator.star +++ b/src/prelaunch_data_generator/validator_keystores/validator_keystore_generator.star @@ -178,7 +178,7 @@ def generate_validator_keystores(plan, mnemonic, participants): artifact_name = plan.store_service_files( service_name, output_dirpath, name=artifact_name ) - + locator = {str(idx): i} base_dirname_in_artifact = shared_utils.path_base(output_dirpath) to_add = keystore_files_module.new_keystore_files( artifact_name, @@ -189,6 +189,7 @@ def generate_validator_keystores(plan, mnemonic, participants): shared_utils.path_join(base_dirname_in_artifact, PRYSM_DIRNAME), shared_utils.path_join(base_dirname_in_artifact, TEKU_KEYS_DIRNAME), shared_utils.path_join(base_dirname_in_artifact, TEKU_SECRETS_DIRNAME), + locator, ) keystore_files.append(to_add)