diff --git a/.github/tests/skip.yaml b/.github/tests/skip.yaml new file mode 100644 index 000000000..f8c4344c7 --- /dev/null +++ b/.github/tests/skip.yaml @@ -0,0 +1,30 @@ +participants: + - cl_type: prysm + + - cl_type: lighthouse + checkpoint_sync_enabled: true + skip_start: true + validator_count: 1 + + - cl_type: teku + checkpoint_sync_enabled: true + skip_start: true + validator_count: 1 + + - cl_type: lodestar + checkpoint_sync_enabled: true + skip_start: true + validator_count: 1 + + - cl_type: grandine + checkpoint_sync_enabled: true + skip_start: true + validator_count: 1 + +network_params: + seconds_per_slot: 4 + preset: minimal +additional_services: + - dora + - checkpointz + diff --git a/README.md b/README.md index 084459792..e4d39d85b 100644 --- a/README.md +++ b/README.md @@ -518,6 +518,13 @@ participants: # Defaults to null (uses global checkpoint_sync_enabled setting) checkpoint_sync_enabled: null + # If set to true, the beacon node will be created and then immediately stopped. + # No health checks are performed during creation (ready_conditions are disabled). + # The service can be started later using: kurtosis service start + # This is useful for testing or when you want to manually control when the beacon node starts. + # Defaults to false + skip_start: false + # Participants matrix creates a participant for each combination of EL, CL and VC clients # Each EL/CL/VC item can provide the same parameters as a standard participant participants_matrix: {} diff --git a/src/cl/cl_launcher.star b/src/cl/cl_launcher.star index 4e18eb27f..84731ad03 100644 --- a/src/cl/cl_launcher.star +++ b/src/cl/cl_launcher.star @@ -198,7 +198,14 @@ def launch( checkpoint_sync_enabled = participant.checkpoint_sync_enabled if checkpoint_sync_enabled: if args_with_right_defaults.checkpoint_sync_url == "": - if ( + if network_params.network == constants.NETWORK_NAME.kurtosis: + if "checkpointz" in args_with_right_defaults.additional_services: + checkpoint_sync_url = "http://checkpointz:5555" + else: + fail( + "Checkpoint sync URL is required if you enabled checkpoint_sync for kurtosis network. Please enable checkpointz additional service." + ) + elif ( network_params.network in constants.PUBLIC_NETWORKS or network_params.network == constants.NETWORK_NAME.ephemery ): diff --git a/src/cl/grandine/grandine_launcher.star b/src/cl/grandine/grandine_launcher.star index 4b02af12d..16e62da73 100644 --- a/src/cl/grandine/grandine_launcher.star +++ b/src/cl/grandine/grandine_launcher.star @@ -193,7 +193,11 @@ def get_beacon_config( constants.HTTP_PORT_ID: BEACON_HTTP_PORT_NUM, constants.METRICS_PORT_ID: BEACON_METRICS_PORT_NUM, } - used_ports = shared_utils.get_port_specs(used_port_assignments) + # Disable port checks if skip_start is enabled + if participant.skip_start: + used_ports = shared_utils.get_port_specs(used_port_assignments, wait=None) + else: + used_ports = shared_utils.get_port_specs(used_port_assignments) cmd = [ GRANDINE_ENTRYPOINT_COMMAND, @@ -343,9 +347,6 @@ def get_beacon_config( "files": files, "env_vars": participant.cl_extra_env_vars, "private_ip_address_placeholder": constants.PRIVATE_IP_ADDRESS_PLACEHOLDER, - "ready_conditions": cl_node_ready_conditions.get_ready_conditions( - constants.HTTP_PORT_ID - ), "labels": shared_utils.label_maker( client=constants.CL_TYPE.grandine, client_type=constants.CLIENT_TYPES.cl, @@ -360,6 +361,12 @@ def get_beacon_config( "user": User(uid=0, gid=0), } + # Only add ready_conditions if not skipping start + if not participant.skip_start: + config_args["ready_conditions"] = cl_node_ready_conditions.get_ready_conditions( + constants.HTTP_PORT_ID + ) + if int(participant.cl_min_cpu) > 0: config_args["min_cpu"] = int(participant.cl_min_cpu) if int(participant.cl_max_cpu) > 0: @@ -386,21 +393,27 @@ def get_cl_context( beacon_metrics_port = service.ports[constants.METRICS_PORT_ID] beacon_metrics_url = "{0}:{1}".format(service.name, beacon_metrics_port.number) - beacon_node_identity_recipe = GetHttpRequestRecipe( - endpoint="/eth/v1/node/identity", - port_id=constants.HTTP_PORT_ID, - extract={ - "enr": ".data.enr", - "multiaddr": ".data.p2p_addresses[0]", - "peer_id": ".data.peer_id", - }, - ) - response = plan.request( - recipe=beacon_node_identity_recipe, service_name=service_name - ) - beacon_node_enr = response["extract.enr"] - beacon_multiaddr = response["extract.multiaddr"] - beacon_peer_id = response["extract.peer_id"] + # Skip HTTP requests if skip_start is enabled (service won't be running) + if participant.skip_start: + beacon_node_enr = "" + beacon_multiaddr = "" + beacon_peer_id = "" + else: + beacon_node_identity_recipe = GetHttpRequestRecipe( + endpoint="/eth/v1/node/identity", + port_id=constants.HTTP_PORT_ID, + extract={ + "enr": ".data.enr", + "multiaddr": ".data.p2p_addresses[0]", + "peer_id": ".data.peer_id", + }, + ) + response = plan.request( + recipe=beacon_node_identity_recipe, service_name=service_name + ) + beacon_node_enr = response["extract.enr"] + beacon_multiaddr = response["extract.multiaddr"] + beacon_peer_id = response["extract.peer_id"] beacon_node_metrics_info = node_metrics.new_node_metrics_info( service_name, BEACON_METRICS_PATH, beacon_metrics_url diff --git a/src/cl/lighthouse/lighthouse_launcher.star b/src/cl/lighthouse/lighthouse_launcher.star index e47bc1597..618878950 100644 --- a/src/cl/lighthouse/lighthouse_launcher.star +++ b/src/cl/lighthouse/lighthouse_launcher.star @@ -183,7 +183,11 @@ def get_beacon_config( constants.HTTP_PORT_ID: BEACON_HTTP_PORT_NUM, constants.METRICS_PORT_ID: BEACON_METRICS_PORT_NUM, } - used_ports = shared_utils.get_port_specs(used_port_assignments) + # Disable port checks if skip_start is enabled + if participant.skip_start: + used_ports = shared_utils.get_port_specs(used_port_assignments, wait=None) + else: + used_ports = shared_utils.get_port_specs(used_port_assignments) cmd = [ LIGHTHOUSE_ENTRYPOINT_COMMAND, "beacon_node", @@ -307,6 +311,7 @@ def get_beacon_config( env_vars = {RUST_BACKTRACE_ENVVAR_NAME: RUST_FULL_BACKTRACE_KEYWORD} env_vars.update(participant.cl_extra_env_vars) + config_args = { "image": participant.cl_image, "ports": used_ports, @@ -316,9 +321,6 @@ def get_beacon_config( "files": files, "env_vars": env_vars, "private_ip_address_placeholder": constants.PRIVATE_IP_ADDRESS_PLACEHOLDER, - "ready_conditions": cl_node_ready_conditions.get_ready_conditions( - constants.HTTP_PORT_ID - ), "labels": shared_utils.label_maker( client=constants.CL_TYPE.lighthouse, client_type=constants.CLIENT_TYPES.cl, @@ -332,6 +334,12 @@ def get_beacon_config( "node_selectors": node_selectors, } + # Only add ready_conditions if not skipping start + if not participant.skip_start: + config_args["ready_conditions"] = cl_node_ready_conditions.get_ready_conditions( + constants.HTTP_PORT_ID + ) + if int(participant.cl_min_cpu) > 0: config_args["min_cpu"] = int(participant.cl_min_cpu) if int(participant.cl_max_cpu) > 0: @@ -355,22 +363,28 @@ def get_cl_context( beacon_http_port = service.ports[constants.HTTP_PORT_ID] beacon_http_url = "http://{0}:{1}".format(service.name, beacon_http_port.number) - # TODO(old) add validator availability using the validator API: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v1#/ValidatorRequiredApi | from eth2-merge-kurtosis-module - beacon_node_identity_recipe = GetHttpRequestRecipe( - endpoint="/eth/v1/node/identity", - port_id=constants.HTTP_PORT_ID, - extract={ - "enr": ".data.enr", - "multiaddr": ".data.p2p_addresses[0]", - "peer_id": ".data.peer_id", - }, - ) - response = plan.request( - recipe=beacon_node_identity_recipe, service_name=service_name - ) - beacon_node_enr = response["extract.enr"] - beacon_multiaddr = response["extract.multiaddr"] - beacon_peer_id = response["extract.peer_id"] + # Skip HTTP requests if skip_start is enabled (service won't be running) + if participant.skip_start: + beacon_node_enr = "" + beacon_multiaddr = "" + beacon_peer_id = "" + else: + # TODO(old) add validator availability using the validator API: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v1#/ValidatorRequiredApi | from eth2-merge-kurtosis-module + beacon_node_identity_recipe = GetHttpRequestRecipe( + endpoint="/eth/v1/node/identity", + port_id=constants.HTTP_PORT_ID, + extract={ + "enr": ".data.enr", + "multiaddr": ".data.p2p_addresses[0]", + "peer_id": ".data.peer_id", + }, + ) + response = plan.request( + recipe=beacon_node_identity_recipe, service_name=service_name + ) + beacon_node_enr = response["extract.enr"] + beacon_multiaddr = response["extract.multiaddr"] + beacon_peer_id = response["extract.peer_id"] beacon_metrics_port = service.ports[constants.METRICS_PORT_ID] beacon_metrics_url = "{0}:{1}".format(service.name, beacon_metrics_port.number) diff --git a/src/cl/lodestar/lodestar_launcher.star b/src/cl/lodestar/lodestar_launcher.star index 0bbc74b2d..4e275df14 100644 --- a/src/cl/lodestar/lodestar_launcher.star +++ b/src/cl/lodestar/lodestar_launcher.star @@ -164,7 +164,11 @@ def get_beacon_config( constants.HTTP_PORT_ID: BEACON_HTTP_PORT_NUM, constants.METRICS_PORT_ID: BEACON_METRICS_PORT_NUM, } - used_ports = shared_utils.get_port_specs(used_port_assignments) + # Disable port checks if skip_start is enabled + if participant.skip_start: + used_ports = shared_utils.get_port_specs(used_port_assignments, wait=None) + else: + used_ports = shared_utils.get_port_specs(used_port_assignments) cmd = [ LODESTAR_ENTRYPOINT_COMMAND, @@ -296,9 +300,6 @@ def get_beacon_config( "files": files, "env_vars": env_vars, "private_ip_address_placeholder": constants.PRIVATE_IP_ADDRESS_PLACEHOLDER, - "ready_conditions": cl_node_ready_conditions.get_ready_conditions( - constants.HTTP_PORT_ID - ), "labels": shared_utils.label_maker( client=constants.CL_TYPE.lodestar, client_type=constants.CLIENT_TYPES.cl, @@ -312,6 +313,12 @@ def get_beacon_config( "node_selectors": node_selectors, } + # Only add ready_conditions if not skipping start + if not participant.skip_start: + config_args["ready_conditions"] = cl_node_ready_conditions.get_ready_conditions( + constants.HTTP_PORT_ID + ) + if int(participant.cl_min_cpu) > 0: config_args["min_cpu"] = int(participant.cl_min_cpu) if int(participant.cl_max_cpu) > 0: @@ -336,23 +343,28 @@ def get_cl_context( beacon_http_url = "http://{0}:{1}".format(service.name, beacon_http_port.number) - # TODO(old) add validator availability using the validator API: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v1#/ValidatorRequiredApi | from eth2-merge-kurtosis-module - - beacon_node_identity_recipe = GetHttpRequestRecipe( - endpoint="/eth/v1/node/identity", - port_id=constants.HTTP_PORT_ID, - extract={ - "enr": ".data.enr", - "multiaddr": ".data.p2p_addresses[-1]", - "peer_id": ".data.peer_id", - }, - ) - response = plan.request( - recipe=beacon_node_identity_recipe, service_name=service_name - ) - beacon_node_enr = response["extract.enr"] - beacon_multiaddr = response["extract.multiaddr"] - beacon_peer_id = response["extract.peer_id"] + # Skip HTTP requests if skip_start is enabled (service won't be running) + if participant.skip_start: + beacon_node_enr = "" + beacon_multiaddr = "" + beacon_peer_id = "" + else: + # TODO(old) add validator availability using the validator API: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v1#/ValidatorRequiredApi | from eth2-merge-kurtosis-module + beacon_node_identity_recipe = GetHttpRequestRecipe( + endpoint="/eth/v1/node/identity", + port_id=constants.HTTP_PORT_ID, + extract={ + "enr": ".data.enr", + "multiaddr": ".data.p2p_addresses[-1]", + "peer_id": ".data.peer_id", + }, + ) + response = plan.request( + recipe=beacon_node_identity_recipe, service_name=service_name + ) + beacon_node_enr = response["extract.enr"] + beacon_multiaddr = response["extract.multiaddr"] + beacon_peer_id = response["extract.peer_id"] beacon_metrics_port = service.ports[constants.METRICS_PORT_ID] beacon_metrics_url = "{0}:{1}".format(service.name, beacon_metrics_port.number) diff --git a/src/cl/nimbus/nimbus_launcher.star b/src/cl/nimbus/nimbus_launcher.star index 61f179e35..313186da9 100644 --- a/src/cl/nimbus/nimbus_launcher.star +++ b/src/cl/nimbus/nimbus_launcher.star @@ -192,7 +192,11 @@ def get_beacon_config( constants.HTTP_PORT_ID: BEACON_HTTP_PORT_NUM, constants.METRICS_PORT_ID: BEACON_METRICS_PORT_NUM, } - used_ports = shared_utils.get_port_specs(used_port_assignments) + # Disable port checks if skip_start is enabled + if participant.skip_start: + used_ports = shared_utils.get_port_specs(used_port_assignments, wait=None) + else: + used_ports = shared_utils.get_port_specs(used_port_assignments) nimbus_checkpoint_sync_subtask_str = "{0} trustedNodeSync --data-dir={1} --trusted-node-url={2} --network={3} --backfill=false".format( BEACON_NODE_ENTRYPOINT, @@ -353,9 +357,6 @@ def get_beacon_config( "files": files, "env_vars": participant.cl_extra_env_vars, "private_ip_address_placeholder": constants.PRIVATE_IP_ADDRESS_PLACEHOLDER, - "ready_conditions": cl_node_ready_conditions.get_ready_conditions( - constants.HTTP_PORT_ID - ), "labels": shared_utils.label_maker( client=constants.CL_TYPE.nimbus, client_type=constants.CLIENT_TYPES.cl, @@ -370,6 +371,12 @@ def get_beacon_config( "user": User(uid=0, gid=0), } + # Only add ready_conditions if not skipping start + if not participant.skip_start: + config_args["ready_conditions"] = cl_node_ready_conditions.get_ready_conditions( + constants.HTTP_PORT_ID + ) + if int(participant.cl_min_cpu) > 0: config_args["min_cpu"] = int(participant.cl_min_cpu) if int(participant.cl_max_cpu) > 0: @@ -395,21 +402,27 @@ def get_cl_context( beacon_http_url = "http://{0}:{1}".format(service.name, beacon_http_port.number) beacon_metrics_url = "{0}:{1}".format(service.name, beacon_metrics_port.number) - beacon_node_identity_recipe = GetHttpRequestRecipe( - endpoint="/eth/v1/node/identity", - port_id=constants.HTTP_PORT_ID, - extract={ - "enr": ".data.enr", - "multiaddr": ".data.p2p_addresses[0]", - "peer_id": ".data.peer_id", - }, - ) - response = plan.request( - recipe=beacon_node_identity_recipe, service_name=service_name - ) - beacon_node_enr = response["extract.enr"] - beacon_multiaddr = response["extract.multiaddr"] - beacon_peer_id = response["extract.peer_id"] + # Skip HTTP requests if skip_start is enabled (service won't be running) + if participant.skip_start: + beacon_node_enr = "" + beacon_multiaddr = "" + beacon_peer_id = "" + else: + beacon_node_identity_recipe = GetHttpRequestRecipe( + endpoint="/eth/v1/node/identity", + port_id=constants.HTTP_PORT_ID, + extract={ + "enr": ".data.enr", + "multiaddr": ".data.p2p_addresses[0]", + "peer_id": ".data.peer_id", + }, + ) + response = plan.request( + recipe=beacon_node_identity_recipe, service_name=service_name + ) + beacon_node_enr = response["extract.enr"] + beacon_multiaddr = response["extract.multiaddr"] + beacon_peer_id = response["extract.peer_id"] nimbus_node_metrics_info = node_metrics.new_node_metrics_info( service_name, BEACON_METRICS_PATH, beacon_metrics_url diff --git a/src/cl/prysm/prysm_launcher.star b/src/cl/prysm/prysm_launcher.star index 0f6ded00d..19fe38c31 100644 --- a/src/cl/prysm/prysm_launcher.star +++ b/src/cl/prysm/prysm_launcher.star @@ -191,7 +191,11 @@ def get_beacon_config( constants.RPC_PORT_ID: RPC_PORT_NUM, constants.PROFILING_PORT_ID: PROFILING_PORT_NUM, } - used_ports = shared_utils.get_port_specs(used_port_assignments) + # Disable port checks if skip_start is enabled + if participant.skip_start: + used_ports = shared_utils.get_port_specs(used_port_assignments, wait=None) + else: + used_ports = shared_utils.get_port_specs(used_port_assignments) cmd = [ PRYSM_ENTRYPOINT_COMMAND, @@ -332,9 +336,6 @@ def get_beacon_config( "files": files, "env_vars": participant.cl_extra_env_vars, "private_ip_address_placeholder": constants.PRIVATE_IP_ADDRESS_PLACEHOLDER, - "ready_conditions": cl_node_ready_conditions.get_ready_conditions( - constants.HTTP_PORT_ID - ), "labels": shared_utils.label_maker( client=constants.CL_TYPE.prysm, client_type=constants.CLIENT_TYPES.cl, @@ -349,6 +350,12 @@ def get_beacon_config( "tty_enabled": True, } + # Only add ready_conditions if not skipping start (port checks are already disabled via wait="disable") + if not participant.skip_start: + config_args["ready_conditions"] = cl_node_ready_conditions.get_ready_conditions( + constants.HTTP_PORT_ID + ) + if int(participant.cl_min_cpu) > 0: config_args["min_cpu"] = int(participant.cl_min_cpu) if int(participant.cl_max_cpu) > 0: @@ -374,23 +381,29 @@ def get_cl_context( beacon_http_url = "http://{0}:{1}".format(service.name, BEACON_HTTP_PORT_NUM) beacon_grpc_url = "{0}:{1}".format(service.name, RPC_PORT_NUM) - # TODO(old) add validator availability using the validator API: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v1#/ValidatorRequiredApi | from eth2-merge-kurtosis-module - beacon_node_identity_recipe = GetHttpRequestRecipe( - endpoint="/eth/v1/node/identity", - port_id=constants.HTTP_PORT_ID, - extract={ - "enr": ".data.enr", - "multiaddr": ".data.p2p_addresses[0]", - "peer_id": ".data.peer_id", - }, - headers={"Accept-Encoding": "identity"}, - ) - response = plan.request( - recipe=beacon_node_identity_recipe, service_name=service_name - ) - beacon_node_enr = response["extract.enr"] - beacon_multiaddr = response["extract.multiaddr"] - beacon_peer_id = response["extract.peer_id"] + # Skip HTTP requests if skip_start is enabled (service won't be running) + if participant.skip_start: + beacon_node_enr = "" + beacon_multiaddr = "" + beacon_peer_id = "" + else: + # TODO(old) add validator availability using the validator API: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v1#/ValidatorRequiredApi | from eth2-merge-kurtosis-module + beacon_node_identity_recipe = GetHttpRequestRecipe( + endpoint="/eth/v1/node/identity", + port_id=constants.HTTP_PORT_ID, + extract={ + "enr": ".data.enr", + "multiaddr": ".data.p2p_addresses[0]", + "peer_id": ".data.peer_id", + }, + headers={"Accept-Encoding": "identity"}, + ) + response = plan.request( + recipe=beacon_node_identity_recipe, service_name=service_name + ) + beacon_node_enr = response["extract.enr"] + beacon_multiaddr = response["extract.multiaddr"] + beacon_peer_id = response["extract.peer_id"] beacon_metrics_port = service.ports[constants.METRICS_PORT_ID] beacon_metrics_url = "{0}:{1}".format(service.name, beacon_metrics_port.number) diff --git a/src/cl/teku/teku_launcher.star b/src/cl/teku/teku_launcher.star index eb97533cb..b6795d145 100644 --- a/src/cl/teku/teku_launcher.star +++ b/src/cl/teku/teku_launcher.star @@ -177,7 +177,11 @@ def get_beacon_config( constants.HTTP_PORT_ID: BEACON_HTTP_PORT_NUM, constants.METRICS_PORT_ID: BEACON_METRICS_PORT_NUM, } - used_ports = shared_utils.get_port_specs(used_port_assignments) + # Disable port checks if skip_start is enabled + if participant.skip_start: + used_ports = shared_utils.get_port_specs(used_port_assignments, wait=None) + else: + used_ports = shared_utils.get_port_specs(used_port_assignments) cmd = [ TEKU_ENTRYPOINT_COMMAND, @@ -354,9 +358,6 @@ def get_beacon_config( "files": files, "env_vars": participant.cl_extra_env_vars, "private_ip_address_placeholder": constants.PRIVATE_IP_ADDRESS_PLACEHOLDER, - "ready_conditions": cl_node_ready_conditions.get_ready_conditions( - constants.HTTP_PORT_ID - ), "labels": shared_utils.label_maker( client=constants.CL_TYPE.teku, client_type=constants.CLIENT_TYPES.cl, @@ -371,6 +372,12 @@ def get_beacon_config( "user": User(uid=0, gid=0), } + # Only add ready_conditions if not skipping start + if not participant.skip_start: + config_args["ready_conditions"] = cl_node_ready_conditions.get_ready_conditions( + constants.HTTP_PORT_ID + ) + if int(participant.cl_min_cpu) > 0: config_args["min_cpu"] = int(participant.cl_min_cpu) if int(participant.cl_max_cpu) > 0: @@ -397,21 +404,27 @@ def get_cl_context( beacon_metrics_port = service.ports[constants.METRICS_PORT_ID] beacon_metrics_url = "{0}:{1}".format(service.name, beacon_metrics_port.number) - beacon_node_identity_recipe = GetHttpRequestRecipe( - endpoint="/eth/v1/node/identity", - port_id=constants.HTTP_PORT_ID, - extract={ - "enr": ".data.enr", - "multiaddr": ".data.p2p_addresses[0]", - "peer_id": ".data.peer_id", - }, - ) - response = plan.request( - recipe=beacon_node_identity_recipe, service_name=service_name - ) - beacon_node_enr = response["extract.enr"] - beacon_multiaddr = response["extract.multiaddr"] - beacon_peer_id = response["extract.peer_id"] + # Skip HTTP requests if skip_start is enabled (service won't be running) + if participant.skip_start: + beacon_node_enr = "" + beacon_multiaddr = "" + beacon_peer_id = "" + else: + beacon_node_identity_recipe = GetHttpRequestRecipe( + endpoint="/eth/v1/node/identity", + port_id=constants.HTTP_PORT_ID, + extract={ + "enr": ".data.enr", + "multiaddr": ".data.p2p_addresses[0]", + "peer_id": ".data.peer_id", + }, + ) + response = plan.request( + recipe=beacon_node_identity_recipe, service_name=service_name + ) + beacon_node_enr = response["extract.enr"] + beacon_multiaddr = response["extract.multiaddr"] + beacon_peer_id = response["extract.peer_id"] beacon_node_metrics_info = node_metrics.new_node_metrics_info( service_name, BEACON_METRICS_PATH, beacon_metrics_url diff --git a/src/package_io/input_parser.star b/src/package_io/input_parser.star index cf27f0f7b..5cf4fb439 100644 --- a/src/package_io/input_parser.star +++ b/src/package_io/input_parser.star @@ -462,6 +462,7 @@ def input_parser(plan, input_args): keymanager_enabled=participant["keymanager_enabled"], vc_beacon_node_indices=participant["vc_beacon_node_indices"], checkpoint_sync_enabled=participant["checkpoint_sync_enabled"], + skip_start=participant["skip_start"], ) for participant in result["participants"] ], @@ -1458,6 +1459,7 @@ def default_participant(): "keymanager_enabled": None, "vc_beacon_node_indices": None, "checkpoint_sync_enabled": None, + "skip_start": False, } diff --git a/src/package_io/sanity_check.star b/src/package_io/sanity_check.star index 542a50696..af481365f 100644 --- a/src/package_io/sanity_check.star +++ b/src/package_io/sanity_check.star @@ -67,6 +67,7 @@ PARTICIPANT_CATEGORIES = { "keymanager_enabled", "vc_beacon_node_indices", "checkpoint_sync_enabled", + "skip_start", ], } diff --git a/src/participant_network.star b/src/participant_network.star index 0f91fd4de..d5a65b34f 100644 --- a/src/participant_network.star +++ b/src/participant_network.star @@ -219,6 +219,17 @@ def launch_participant_network( bootnodoor_enr, ) + # Stop beacon nodes for participants with skip_start enabled + for index, participant in enumerate(args_with_right_defaults.participants): + if participant.skip_start: + cl_context = all_cl_contexts[index] + plan.print( + "Stopping beacon node {0} due to skip_start flag".format( + cl_context.beacon_service_name + ) + ) + plan.stop_service(cl_context.beacon_service_name) + # Launch all blobbers after all CLs are up cl_context_to_blobber_url = {} if len(blobber_configs_with_contexts) > 0: diff --git a/src/shared_utils/shared_utils.star b/src/shared_utils/shared_utils.star index 2c818bb07..ee4023442 100644 --- a/src/shared_utils/shared_utils.star +++ b/src/shared_utils/shared_utils.star @@ -279,7 +279,7 @@ def __get_port_range(port_start, max_ports_per_component, participant_index): return (public_port_start, public_port_end) -def get_port_specs(port_assignments): +def get_port_specs(port_assignments, wait=NOT_PROVIDED_WAIT): ports = {} for port_id, port in port_assignments.items(): if port_id in [ @@ -292,13 +292,13 @@ def get_port_specs(port_assignments): constants.WS_PORT_ID, constants.PROFILING_PORT_ID, ]: - ports.update({port_id: new_port_spec(port, TCP_PROTOCOL)}) + ports.update({port_id: new_port_spec(port, TCP_PROTOCOL, wait=wait)}) elif port_id in [ constants.UDP_DISCOVERY_PORT_ID, constants.QUIC_DISCOVERY_PORT_ID, constants.TORRENT_PORT_ID, ]: - ports.update({port_id: new_port_spec(port, UDP_PROTOCOL)}) + ports.update({port_id: new_port_spec(port, UDP_PROTOCOL, wait=wait)}) elif port_id == constants.DEBUG_PORT_ID: ports.update( { @@ -317,7 +317,11 @@ def get_port_specs(port_assignments): constants.RBUILDER_METRICS_PORT_ID, ]: ports.update( - {port_id: new_port_spec(port, TCP_PROTOCOL, HTTP_APPLICATION_PROTOCOL)} + { + port_id: new_port_spec( + port, TCP_PROTOCOL, HTTP_APPLICATION_PROTOCOL, wait=wait + ) + } ) else: fail("Unknown port id: {}".format(port_id)) diff --git a/static_files/checkpointz-config/config.yaml.tmpl b/static_files/checkpointz-config/config.yaml.tmpl index 590fbdc1a..135086b2a 100644 --- a/static_files/checkpointz-config/config.yaml.tmpl +++ b/static_files/checkpointz-config/config.yaml.tmpl @@ -4,7 +4,7 @@ global: metricsAddr: ":9090" checkpointz: - mode: "light" + mode: "full" custom_preset: true caches: blocks: