From 5a9406ebef95888ab0f5a453ea844d31b4d26a51 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Tue, 12 Dec 2023 12:02:04 +0100 Subject: [PATCH] add some fixes --- src/blobber/blobber_launcher.star | 6 +++--- src/cl/lighthouse/lighthouse_launcher.star | 4 ++-- src/cl/lodestar/lodestar_launcher.star | 16 ++++++++-------- src/cl/nimbus/nimbus_launcher.star | 1 + src/cl/prysm/prysm_launcher.star | 20 ++++++++++---------- src/cl/teku/teku_launcher.star | 2 +- 6 files changed, 25 insertions(+), 24 deletions(-) diff --git a/src/blobber/blobber_launcher.star b/src/blobber/blobber_launcher.star index 686694b48..f7da4bd13 100644 --- a/src/blobber/blobber_launcher.star +++ b/src/blobber/blobber_launcher.star @@ -6,7 +6,7 @@ blobber_context = import_module("../blobber/blobber_context.star") BLOBBER_BEACON_PORT_NUM = 9000 BLOBBER_BEACON_PORT_ID = "discovery" -BLOBBER_VALIDATOR_PROXY_PORT_NUM = 4000 +BLOBBER_VALIDATOR_PROXY_PORT_NUM = 5000 BLOBBER_VALIDATOR_PROXY_PORT_ID = "http" PRIVATE_IP_ADDRESS_PLACEHOLDER = "KURTOSIS_IP_ADDR_PLACEHOLDER" @@ -34,7 +34,7 @@ def launch(plan, service_name, node_keystore_files, beacon_http_url, extra_param blobber_service = plan.add_service(blobber_service_name, blobber_config) return blobber_context.new_blobber_context( - blobber_service.ip_address, BLOBBER_VALIDATOR_PROXY_PORT_NUM + blobber_service.ip_address, blobber_service.ports[BLOBBER_VALIDATOR_PROXY_PORT_NUM] ) @@ -50,7 +50,7 @@ def get_config(service_name, node_keystore_files, beacon_http_url, extra_params) "--validator-key-folder={0}".format(validator_root_dirpath), "--enable-unsafe-mode", "--external-ip={0}".format(PRIVATE_IP_ADDRESS_PLACEHOLDER), - "--validator-proxy-port-start={0}".format(BLOBBER_VALIDATOR_PROXY_PORT_NUM), # use the same port as the beacon http port + "--validator-proxy-port-start={0}".format(BLOBBER_VALIDATOR_PROXY_PORT_NUM), ] if len(extra_params) > 0: diff --git a/src/cl/lighthouse/lighthouse_launcher.star b/src/cl/lighthouse/lighthouse_launcher.star index a86411257..bc0802a5d 100644 --- a/src/cl/lighthouse/lighthouse_launcher.star +++ b/src/cl/lighthouse/lighthouse_launcher.star @@ -170,9 +170,9 @@ def launch( ) blobber_service = plan.add_service(blobber_service_name, blobber_config) - blobber_http_port = blobber_service.ports[BEACON_HTTP_PORT_ID] + blobber_http_port = blobber_service.ports[blobber_launcher.BLOBBER_VALIDATOR_PROXY_PORT_ID] blobber_http_url = "http://{0}:{1}".format( - blobber_service.ip_address, beacon_http_port.number + blobber_service.ip_address, blobber_http_port.number ) beacon_http_url = blobber_http_url diff --git a/src/cl/lodestar/lodestar_launcher.star b/src/cl/lodestar/lodestar_launcher.star index 94a6b9db1..19c127072 100644 --- a/src/cl/lodestar/lodestar_launcher.star +++ b/src/cl/lodestar/lodestar_launcher.star @@ -3,7 +3,7 @@ input_parser = import_module("../../package_io/input_parser.star") cl_client_context = import_module("../../cl/cl_client_context.star") node_metrics = import_module("../../node_metrics_info.star") cl_node_ready_conditions = import_module("../../cl/cl_node_ready_conditions.star") - +blobber_launcher = import_module("../../blobber/blobber_launcher.star") constants = import_module("../../package_io/constants.star") # ---------------------------------- Beacon client ------------------------------------- @@ -11,7 +11,7 @@ CONSENSUS_DATA_DIRPATH_ON_SERVICE_CONTAINER = "/consensus-data" # Port IDs TCP_DISCOVERY_PORT_ID = "tcp-discovery" UDP_DISCOVERY_PORT_ID = "udp-discovery" -HTTP_PORT_ID = "http" +BEACON_HTTP_PORT_ID = "http" METRICS_PORT_ID = "metrics" VALIDATOR_METRICS_PORT_ID = "validator-metrics" @@ -47,7 +47,7 @@ BEACON_USED_PORTS = { UDP_DISCOVERY_PORT_ID: shared_utils.new_port_spec( DISCOVERY_PORT_NUM, shared_utils.UDP_PROTOCOL ), - HTTP_PORT_ID: shared_utils.new_port_spec(HTTP_PORT_NUM, shared_utils.TCP_PROTOCOL), + BEACON_HTTP_PORT_ID: shared_utils.new_port_spec(HTTP_PORT_NUM, shared_utils.TCP_PROTOCOL), METRICS_PORT_ID: shared_utils.new_port_spec( METRICS_PORT_NUM, shared_utils.TCP_PROTOCOL ), @@ -128,7 +128,7 @@ def launch( beacon_service = plan.add_service(beacon_node_service_name, beacon_config) - beacon_http_port = beacon_service.ports[HTTP_PORT_ID] + beacon_http_port = beacon_service.ports[BEACON_HTTP_PORT_ID] beacon_http_url = "http://{0}:{1}".format( beacon_service.ip_address, beacon_http_port.number @@ -145,9 +145,9 @@ def launch( ) blobber_service = plan.add_service(blobber_service_name, blobber_config) - blobber_http_port = blobber_service.ports[BEACON_HTTP_PORT_ID] + blobber_http_port = blobber_service.ports[blobber_launcher.BLOBBER_VALIDATOR_PROXY_PORT_ID] blobber_http_url = "http://{0}:{1}".format( - blobber_service.ip_address, beacon_http_port.number + blobber_service.ip_address, blobber_http_port.number ) beacon_http_url = blobber_http_url @@ -179,7 +179,7 @@ def launch( beacon_node_identity_recipe = GetHttpRequestRecipe( endpoint="/eth/v1/node/identity", - port_id=HTTP_PORT_ID, + port_id=BEACON_HTTP_PORT_ID, extract={ "enr": ".data.enr", "multiaddr": ".data.p2p_addresses[-1]", @@ -306,7 +306,7 @@ def get_beacon_config( constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid }, private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER, - ready_conditions=cl_node_ready_conditions.get_ready_conditions(HTTP_PORT_ID), + ready_conditions=cl_node_ready_conditions.get_ready_conditions(BEACON_HTTP_PORT_ID), min_cpu=bn_min_cpu, max_cpu=bn_max_cpu, min_memory=bn_min_mem, diff --git a/src/cl/nimbus/nimbus_launcher.star b/src/cl/nimbus/nimbus_launcher.star index 0a110ff88..513d798a0 100644 --- a/src/cl/nimbus/nimbus_launcher.star +++ b/src/cl/nimbus/nimbus_launcher.star @@ -6,6 +6,7 @@ cl_node_ready_conditions = import_module("../../cl/cl_node_ready_conditions.star constants = import_module("../../package_io/constants.star") +blobber_launcher = import_module("../../blobber/blobber_launcher.star") VALIDATOR_KEYS_MOUNTPOINT_ON_CLIENT = "/validator-keys" # Port IDs diff --git a/src/cl/prysm/prysm_launcher.star b/src/cl/prysm/prysm_launcher.star index 28792261b..8af510fa4 100644 --- a/src/cl/prysm/prysm_launcher.star +++ b/src/cl/prysm/prysm_launcher.star @@ -4,7 +4,7 @@ cl_client_context = import_module("../../cl/cl_client_context.star") node_metrics = import_module("../../node_metrics_info.star") cl_node_ready_conditions = import_module("../../cl/cl_node_ready_conditions.star") constants = import_module("../../package_io/constants.star") - +blobber_launcher = import_module("../../blobber/blobber_launcher.star") IMAGE_SEPARATOR_DELIMITER = "," EXPECTED_NUM_IMAGES = 2 @@ -15,7 +15,7 @@ CONSENSUS_DATA_DIRPATH_ON_SERVICE_CONTAINER = "/consensus-data" TCP_DISCOVERY_PORT_ID = "tcp-discovery" UDP_DISCOVERY_PORT_ID = "udp-discovery" RPC_PORT_ID = "rpc" -HTTP_PORT_ID = "http" +BEACON_HTTP_PORT_ID = "http" BEACON_MONITORING_PORT_ID = "monitoring" # Port nums @@ -61,7 +61,7 @@ BEACON_NODE_USED_PORTS = { DISCOVERY_UDP_PORT_NUM, shared_utils.UDP_PROTOCOL ), RPC_PORT_ID: shared_utils.new_port_spec(RPC_PORT_NUM, shared_utils.TCP_PROTOCOL), - HTTP_PORT_ID: shared_utils.new_port_spec(HTTP_PORT_NUM, shared_utils.TCP_PROTOCOL), + BEACON_HTTP_PORT_ID: shared_utils.new_port_spec(HTTP_PORT_NUM, shared_utils.TCP_PROTOCOL), BEACON_MONITORING_PORT_ID: shared_utils.new_port_spec( BEACON_MONITORING_PORT_NUM, shared_utils.TCP_PROTOCOL ), @@ -155,7 +155,7 @@ def launch( beacon_service = plan.add_service(beacon_node_service_name, beacon_config) - beacon_http_port = beacon_service.ports[HTTP_PORT_ID] + beacon_http_port = beacon_service.ports[BEACON_HTTP_PORT_ID] beacon_http_endpoint = "{0}:{1}".format(beacon_service.ip_address, HTTP_PORT_NUM) beacon_rpc_endpoint = "{0}:{1}".format(beacon_service.ip_address, RPC_PORT_NUM) @@ -166,16 +166,16 @@ def launch( blobber_config = blobber_launcher.get_config( blobber_service_name, node_keystore_files, - beacon_http_url, + beacon_rpc_endpoint, blobber_extra_params, ) blobber_service = plan.add_service(blobber_service_name, blobber_config) - blobber_http_port = blobber_service.ports[BEACON_HTTP_PORT_ID] + blobber_http_port = blobber_service.ports[blobber_launcher.BLOBBER_VALIDATOR_PROXY_PORT_ID] blobber_http_url = "http://{0}:{1}".format( - blobber_service.ip_address, beacon_http_port.number + blobber_service.ip_address, blobber_http_port.number ) - beacon_http_url = blobber_http_url + beacon_rpc_endpoint = blobber_http_url # Launch validator node if we have a keystore file validator_service = None @@ -210,7 +210,7 @@ def launch( # 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=HTTP_PORT_ID, + port_id=BEACON_HTTP_PORT_ID, extract={ "enr": ".data.enr", "multiaddr": ".data.discovery_addresses[0]", @@ -335,7 +335,7 @@ def get_beacon_config( constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid, }, private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER, - ready_conditions=cl_node_ready_conditions.get_ready_conditions(HTTP_PORT_ID), + ready_conditions=cl_node_ready_conditions.get_ready_conditions(BEACON_HTTP_PORT_ID), min_cpu=bn_min_cpu, max_cpu=bn_max_cpu, min_memory=bn_min_mem, diff --git a/src/cl/teku/teku_launcher.star b/src/cl/teku/teku_launcher.star index e33088f27..6f9e0722b 100644 --- a/src/cl/teku/teku_launcher.star +++ b/src/cl/teku/teku_launcher.star @@ -5,7 +5,7 @@ node_metrics = import_module("../../node_metrics_info.star") cl_node_ready_conditions = import_module("../../cl/cl_node_ready_conditions.star") constants = import_module("../../package_io/constants.star") - +blobber_launcher = import_module("../../blobber/blobber_launcher.star") TEKU_BINARY_FILEPATH_IN_IMAGE = "/opt/teku/bin/teku" # The Docker container runs as the "teku" user so we can't write to root