From d1517696ae8d1ed2463bd936ef6ec476396f508f Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Tue, 20 Feb 2024 11:24:44 +0100 Subject: [PATCH 1/7] feat: add nimbus-eth1 --- .github/tests/nimbus-eth1-all.yaml | 12 ++ README.md | 3 +- src/el/nimbus-eth1/nimbus_launcher.star | 267 ++++++++++++++++++++++++ src/package_io/constants.star | 22 ++ src/package_io/input_parser.star | 1 + src/participant_network.star | 9 + 6 files changed, 313 insertions(+), 1 deletion(-) create mode 100644 .github/tests/nimbus-eth1-all.yaml create mode 100644 src/el/nimbus-eth1/nimbus_launcher.star diff --git a/.github/tests/nimbus-eth1-all.yaml b/.github/tests/nimbus-eth1-all.yaml new file mode 100644 index 000000000..540801f92 --- /dev/null +++ b/.github/tests/nimbus-eth1-all.yaml @@ -0,0 +1,12 @@ +participants: + - el_client_type: nimbus + cl_client_type: teku + - el_client_type: nimbus + cl_client_type: prysm + - el_client_type: nimbus + cl_client_type: nimbus + - el_client_type: nimbus + cl_client_type: lighthouse + - el_client_type: nimbus + cl_client_type: lodestar +additional_services: [] diff --git a/README.md b/README.md index ecb40bcea..de969ded1 100644 --- a/README.md +++ b/README.md @@ -153,7 +153,7 @@ To configure the package behaviour, you can modify your `network_params.yaml` fi # Specification of the participants in the network participants: # The type of EL client that should be started - # Valid values are geth, nethermind, erigon, besu, ethereumjs, reth + # Valid values are geth, nethermind, erigon, besu, ethereumjs, reth, nimbus-eth1 - el_client_type: geth # The Docker image that should be used for the EL client; leave blank to use the default for the client type @@ -164,6 +164,7 @@ participants: # - besu: hyperledger/besu:develop # - reth: ghcr.io/paradigmxyz/reth # - ethereumjs: ethpandaops/ethereumjs:master + # - nimbus-eth1: ethpandaops/nimbus-eth1:master el_client_image: "" # The log level string that this participant's EL client should log at diff --git a/src/el/nimbus-eth1/nimbus_launcher.star b/src/el/nimbus-eth1/nimbus_launcher.star new file mode 100644 index 000000000..3fea86178 --- /dev/null +++ b/src/el/nimbus-eth1/nimbus_launcher.star @@ -0,0 +1,267 @@ +shared_utils = import_module("../../shared_utils/shared_utils.star") +input_parser = import_module("../../package_io/input_parser.star") +el_client_context = import_module("../../el/el_client_context.star") +el_admin_node_info = import_module("../../el/el_admin_node_info.star") +node_metrics = import_module("../../node_metrics_info.star") +constants = import_module("../../package_io/constants.star") + +RPC_PORT_NUM = 8545 +WS_PORT_NUM = 8546 +DISCOVERY_PORT_NUM = 30303 +ENGINE_RPC_PORT_NUM = 8551 +METRICS_PORT_NUM = 9001 + +# The min/max CPU/memory that the execution node can use +EXECUTION_MIN_CPU = 100 +EXECUTION_MIN_MEMORY = 256 + +# Port IDs +RPC_PORT_ID = "rpc" +WS_PORT_ID = "ws" +TCP_DISCOVERY_PORT_ID = "tcp-discovery" +UDP_DISCOVERY_PORT_ID = "udp-discovery" +ENGINE_RPC_PORT_ID = "engine-rpc" +METRICS_PORT_ID = "metrics" + +# Paths +METRICS_PATH = "/metrics" + +# The dirpath of the execution data directory on the client container +EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/data/nimbus/execution-data" + +PRIVATE_IP_ADDRESS_PLACEHOLDER = "KURTOSIS_IP_ADDR_PLACEHOLDER" + +USED_PORTS = { + RPC_PORT_ID: shared_utils.new_port_spec(RPC_PORT_NUM, shared_utils.TCP_PROTOCOL), + WS_PORT_ID: shared_utils.new_port_spec(WS_PORT_NUM, shared_utils.TCP_PROTOCOL), + TCP_DISCOVERY_PORT_ID: shared_utils.new_port_spec( + DISCOVERY_PORT_NUM, shared_utils.TCP_PROTOCOL + ), + UDP_DISCOVERY_PORT_ID: shared_utils.new_port_spec( + DISCOVERY_PORT_NUM, shared_utils.UDP_PROTOCOL + ), + ENGINE_RPC_PORT_ID: shared_utils.new_port_spec( + ENGINE_RPC_PORT_NUM, shared_utils.TCP_PROTOCOL + ), + METRICS_PORT_ID: shared_utils.new_port_spec( + METRICS_PORT_NUM, shared_utils.TCP_PROTOCOL + ), +} + +VERBOSITY_LEVELS = { + constants.GLOBAL_CLIENT_LOG_LEVEL.error: "ERROR", + constants.GLOBAL_CLIENT_LOG_LEVEL.warn: "WARN", + constants.GLOBAL_CLIENT_LOG_LEVEL.info: "INFO", + constants.GLOBAL_CLIENT_LOG_LEVEL.debug: "DEBUG", + constants.GLOBAL_CLIENT_LOG_LEVEL.trace: "TRACE", +} + + +def launch( + plan, + launcher, + service_name, + image, + participant_log_level, + global_log_level, + # If empty then the node will be launched as a bootnode + existing_el_clients, + el_min_cpu, + el_max_cpu, + el_min_mem, + el_max_mem, + extra_params, + extra_env_vars, + extra_labels, + persistent, + el_volume_size, + tolerations, + node_selectors, +): + log_level = input_parser.get_client_log_level_or_default( + participant_log_level, global_log_level, VERBOSITY_LEVELS + ) + + network_name = shared_utils.get_network_name(launcher.network) + + el_min_cpu = int(el_min_cpu) if int(el_min_cpu) > 0 else EXECUTION_MIN_CPU + el_max_cpu = ( + int(el_max_cpu) + if int(el_max_cpu) > 0 + else constants.RAM_CPU_OVERRIDES[network_name]["nimbus_eth1_max_cpu"] + ) + el_min_mem = int(el_min_mem) if int(el_min_mem) > 0 else EXECUTION_MIN_MEMORY + el_max_mem = ( + int(el_max_mem) + if int(el_max_mem) > 0 + else constants.RAM_CPU_OVERRIDES[network_name]["nimbus_eth1_max_mem"] + ) + + el_volume_size = ( + el_volume_size + if int(el_volume_size) > 0 + else constants.VOLUME_SIZE[network_name]["nimbus_eth1_volume_size"] + ) + + cl_client_name = service_name.split("-")[3] + + config = get_config( + plan, + launcher.el_cl_genesis_data, + launcher.jwt_file, + launcher.network, + image, + service_name, + existing_el_clients, + cl_client_name, + log_level, + el_min_cpu, + el_max_cpu, + el_min_mem, + el_max_mem, + extra_params, + extra_env_vars, + extra_labels, + persistent, + el_volume_size, + tolerations, + node_selectors, + ) + + service = plan.add_service(service_name, config) + + enode = el_admin_node_info.get_enode_for_node(plan, service_name, RPC_PORT_ID) + + metric_url = "{0}:{1}".format(service.ip_address, METRICS_PORT_NUM) + nimbus_metrics_info = node_metrics.new_node_metrics_info( + service_name, METRICS_PATH, metric_url + ) + + return el_client_context.new_el_client_context( + "nimbus", + "", # nimbus has no enr + enode, + service.ip_address, + RPC_PORT_NUM, + WS_PORT_NUM, + ENGINE_RPC_PORT_NUM, + service_name, + [nimbus_metrics_info], + ) + + +def get_config( + plan, + el_cl_genesis_data, + jwt_file, + network, + image, + service_name, + existing_el_clients, + cl_client_name, + verbosity_level, + el_min_cpu, + el_max_cpu, + el_min_mem, + el_max_mem, + extra_params, + extra_env_vars, + extra_labels, + persistent, + el_volume_size, + tolerations, + node_selectors, +): + cmd = [ + "--log-level={0}".format(verbosity_level), + "--data-dir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, + "--http-port={0}".format(RPC_PORT_NUM), + "--http-address=0.0.0.0", + "--rpc", + "--rpc-api=eth,debug,exp", + "--ws", + "--ws-api=eth,debug,exp", + "--engine-api", + "--engine-api-address=0.0.0.0", + "--engine-api-port={0}".format(ENGINE_RPC_PORT_NUM), + "--jwt-secret=" + constants.JWT_MOUNT_PATH_ON_CONTAINER, + "--metrics", + "--metrics-address=0.0.0.0", + "--metrics-port={0}".format(METRICS_PORT_NUM), + ] + if ( + network not in constants.PUBLIC_NETWORKS + or constants.NETWORK_NAME.shadowfork in network + ): + cmd.append( + "--custom-network=" + + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + + "/genesis.json" + ) + else: + cmd.append("--network=" + network) + + if network == constants.NETWORK_NAME.kurtosis: + if len(existing_el_clients) > 0: + cmd.append( + "--bootstrap-node=" + + ",".join( + [ + ctx.enode + for ctx in existing_el_clients[: constants.MAX_ENODE_ENTRIES] + ] + ) + ) + elif network not in constants.PUBLIC_NETWORKS: + cmd.append( + "--bootstrap-node=" + + shared_utils.get_devnet_enodes( + plan, el_cl_genesis_data.files_artifact_uuid + ) + ) + + if len(extra_params) > 0: + # this is a repeated, we convert it into Starlark + cmd.extend([param for param in extra_params]) + + + files = { + constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid, + constants.JWT_MOUNTPOINT_ON_CLIENTS: jwt_file, + } + + if persistent: + files[EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER] = Directory( + persistent_key="data-{0}".format(service_name), + size=el_volume_size, + ) + + return ServiceConfig( + image=image, + ports=USED_PORTS, + cmd=cmd, + files=files, + private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER, + min_cpu=el_min_cpu, + max_cpu=el_max_cpu, + min_memory=el_min_mem, + max_memory=el_max_mem, + env_vars=extra_env_vars, + labels=shared_utils.label_maker( + constants.EL_CLIENT_TYPE.nimbus, + constants.CLIENT_TYPES.el, + image, + cl_client_name, + extra_labels, + ), + tolerations=tolerations, + node_selectors=node_selectors, + ) + + +def new_nimbus_launcher(el_cl_genesis_data, jwt_file, network): + return struct( + el_cl_genesis_data=el_cl_genesis_data, + jwt_file=jwt_file, + network=network, + ) diff --git a/src/package_io/constants.star b/src/package_io/constants.star index 2e9f1c06e..1f1e64985 100644 --- a/src/package_io/constants.star +++ b/src/package_io/constants.star @@ -6,6 +6,7 @@ EL_CLIENT_TYPE = struct( besu="besu", reth="reth", ethereumjs="ethereumjs", + nimbus="nimbus", ) CL_CLIENT_TYPE = struct( @@ -123,6 +124,7 @@ VOLUME_SIZE = { "besu_volume_size": 1000000, # 1TB "reth_volume_size": 3000000, # 3TB "ethereumjs_volume_size": 1000000, # 1TB + "nimbus_eth1_volume_size": 1000000, # 1TB "prysm_volume_size": 500000, # 500GB "lighthouse_volume_size": 500000, # 500GB "teku_volume_size": 500000, # 500GB @@ -136,6 +138,7 @@ VOLUME_SIZE = { "besu_volume_size": 800000, # 800GB "reth_volume_size": 1200000, # 1200GB "ethereumjs_volume_size": 800000, # 800GB + "nimbus_eth1_volume_size": 800000, # 800GB "prysm_volume_size": 300000, # 300GB "lighthouse_volume_size": 300000, # 300GB "teku_volume_size": 300000, # 300GB @@ -149,6 +152,7 @@ VOLUME_SIZE = { "besu_volume_size": 300000, # 300GB "reth_volume_size": 500000, # 500GB "ethereumjs_volume_size": 300000, # 300GB + "nimbus_eth1_volume_size": 300000, # 300GB "prysm_volume_size": 150000, # 150GB "lighthouse_volume_size": 150000, # 150GB "teku_volume_size": 150000, # 150GB @@ -162,6 +166,7 @@ VOLUME_SIZE = { "besu_volume_size": 100000, # 100GB "reth_volume_size": 200000, # 200GB "ethereumjs_volume_size": 100000, # 100GB + "nimbus_eth1_volume_size": 100000, # 100GB "prysm_volume_size": 100000, # 100GB "lighthouse_volume_size": 100000, # 100GB "teku_volume_size": 100000, # 100GB @@ -175,6 +180,7 @@ VOLUME_SIZE = { "besu_volume_size": 100000, # 100GB "reth_volume_size": 200000, # 200GB "ethereumjs_volume_size": 100000, # 100GB + "nimbus_eth1_volume_size": 100000, # 100GB "prysm_volume_size": 100000, # 100GB "lighthouse_volume_size": 100000, # 100GB "teku_volume_size": 100000, # 100GB @@ -188,6 +194,7 @@ VOLUME_SIZE = { "besu_volume_size": 3000, # 3GB "reth_volume_size": 3000, # 3GB "ethereumjs_volume_size": 3000, # 3GB + "nimbus_eth1_volume_size": 3000, # 3GB "prysm_volume_size": 1000, # 1GB "lighthouse_volume_size": 1000, # 1GB "teku_volume_size": 1000, # 1GB @@ -201,6 +208,7 @@ VOLUME_SIZE = { "besu_volume_size": 3000, # 3GB "reth_volume_size": 3000, # 3GB "ethereumjs_volume_size": 3000, # 3GB + "nimbus_eth1_volume_size": 3000, # 3GB "prysm_volume_size": 1000, # 1GB "lighthouse_volume_size": 1000, # 1GB "teku_volume_size": 1000, # 1GB @@ -223,6 +231,8 @@ RAM_CPU_OVERRIDES = { "reth_max_cpu": 4000, # 4 cores "ethereumjs_max_mem": 16384, # 16GB "ethereumjs_max_cpu": 4000, # 4 cores + "nimbus_eth1_max_mem": 16384, # 16GB + "nimbus_eth1_max_cpu": 4000, # 4 cores "prysm_max_mem": 16384, # 16GB "prysm_max_cpu": 4000, # 4 cores "lighthouse_max_mem": 16384, # 16GB @@ -247,6 +257,8 @@ RAM_CPU_OVERRIDES = { "reth_max_cpu": 2000, # 2 cores "ethereumjs_max_mem": 8192, # 8GB "ethereumjs_max_cpu": 2000, # 2 cores + "nimbus_eth1_max_mem": 8192, # 8GB + "nimbus_eth1_max_cpu": 2000, # 2 cores "prysm_max_mem": 8192, # 8GB "prysm_max_cpu": 2000, # 2 cores "lighthouse_max_mem": 8192, # 8GB @@ -271,6 +283,8 @@ RAM_CPU_OVERRIDES = { "reth_max_cpu": 1000, # 1 core "ethereumjs_max_mem": 4096, # 4GB "ethereumjs_max_cpu": 1000, # 1 core + "nimbus_eth1_max_mem": 4096, # 4GB + "nimbus_eth1_max_cpu": 1000, # 1 core "prysm_max_mem": 4096, # 4GB "prysm_max_cpu": 1000, # 1 core "lighthouse_max_mem": 4096, # 4GB @@ -295,6 +309,8 @@ RAM_CPU_OVERRIDES = { "reth_max_cpu": 2000, # 2 cores "ethereumjs_max_mem": 8192, # 8GB "ethereumjs_max_cpu": 2000, # 2 cores + "nimbus_eth1_max_mem": 8192, # 8GB + "nimbus_eth1_max_cpu": 2000, # 2 cores "prysm_max_mem": 8192, # 8GB "prysm_max_cpu": 2000, # 2 cores "lighthouse_max_mem": 8192, # 8GB @@ -319,6 +335,8 @@ RAM_CPU_OVERRIDES = { "reth_max_cpu": 1000, # 1 core "ethereumjs_max_mem": 4096, # 4GB "ethereumjs_max_cpu": 1000, # 1 core + "nimbus_eth1_max_mem": 4096, # 4GB + "nimbus_eth1_max_cpu": 1000, # 1 core "prysm_max_mem": 4096, # 4GB "prysm_max_cpu": 1000, # 1 core "lighthouse_max_mem": 4096, # 4GB @@ -343,6 +361,8 @@ RAM_CPU_OVERRIDES = { "reth_max_cpu": 1000, # 1 core "ethereumjs_max_mem": 1024, # 1GB "ethereumjs_max_cpu": 1000, # 1 core + "nimbus_eth1_max_mem": 1024, # 1GB + "nimbus_eth1_max_cpu": 1000, # 1 core "prysm_max_mem": 1024, # 1GB "prysm_max_cpu": 1000, # 1 core "lighthouse_max_mem": 1024, # 1GB @@ -367,6 +387,8 @@ RAM_CPU_OVERRIDES = { "reth_max_cpu": 1000, # 1 core "ethereumjs_max_mem": 1024, # 1GB "ethereumjs_max_cpu": 1000, # 1 core + "nimbus_eth1_max_mem": 1024, # 1GB + "nimbus_eth1_max_cpu": 1000, # 1 core "prysm_max_mem": 1024, # 1GB "prysm_max_cpu": 1000, # 1 core "lighthouse_max_mem": 1024, # 1GB diff --git a/src/package_io/input_parser.star b/src/package_io/input_parser.star index edcb2b149..f5efb27e1 100644 --- a/src/package_io/input_parser.star +++ b/src/package_io/input_parser.star @@ -11,6 +11,7 @@ DEFAULT_EL_IMAGES = { "besu": "hyperledger/besu:latest", "reth": "ghcr.io/paradigmxyz/reth", "ethereumjs": "ethpandaops/ethereumjs:master", + "nimbus": "ethpandaops/nimbus-eth1:master", } DEFAULT_CL_IMAGES = { diff --git a/src/participant_network.star b/src/participant_network.star index 13bb1e97a..a572caa5a 100644 --- a/src/participant_network.star +++ b/src/participant_network.star @@ -21,6 +21,7 @@ erigon = import_module("./el/erigon/erigon_launcher.star") nethermind = import_module("./el/nethermind/nethermind_launcher.star") reth = import_module("./el/reth/reth_launcher.star") ethereumjs = import_module("./el/ethereumjs/ethereumjs_launcher.star") +nimbus_eth1 = import_module("./el/nimbus-eth1/nimbus_launcher.star") lighthouse = import_module("./cl/lighthouse/lighthouse_launcher.star") lodestar = import_module("./cl/lodestar/lodestar_launcher.star") @@ -417,6 +418,14 @@ def launch_participant_network( ), "launch_method": ethereumjs.launch, }, + constants.EL_CLIENT_TYPE.nimbus: { + "launcher": nimbus_eth1.new_nimbus_launcher( + el_cl_data, + jwt_file, + network_params.network, + ), + "launch_method": nimbus_eth1.launch, + }, } all_el_client_contexts = [] From 6cea62bd21ae66da0304e538edee32c5bc8717ab Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Tue, 20 Feb 2024 11:27:06 +0100 Subject: [PATCH 2/7] fix lint --- src/el/nimbus-eth1/nimbus_launcher.star | 1 - 1 file changed, 1 deletion(-) diff --git a/src/el/nimbus-eth1/nimbus_launcher.star b/src/el/nimbus-eth1/nimbus_launcher.star index 3fea86178..dc8ef118f 100644 --- a/src/el/nimbus-eth1/nimbus_launcher.star +++ b/src/el/nimbus-eth1/nimbus_launcher.star @@ -224,7 +224,6 @@ def get_config( # this is a repeated, we convert it into Starlark cmd.extend([param for param in extra_params]) - files = { constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid, constants.JWT_MOUNTPOINT_ON_CLIENTS: jwt_file, From 5c1f2e02f5d6aa8e794020925be9acc3cd0300e9 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Tue, 20 Feb 2024 11:35:14 +0100 Subject: [PATCH 3/7] add geth as bootnode --- .github/tests/nimbus-eth1-all.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/tests/nimbus-eth1-all.yaml b/.github/tests/nimbus-eth1-all.yaml index 540801f92..fe0ee47dc 100644 --- a/.github/tests/nimbus-eth1-all.yaml +++ b/.github/tests/nimbus-eth1-all.yaml @@ -1,4 +1,6 @@ participants: + - el_client_type: geth + cl_client_type: teku - el_client_type: nimbus cl_client_type: teku - el_client_type: nimbus From 9f7b7db111786875a2648aa0ea4dae7eb126a58b Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Tue, 20 Feb 2024 11:36:46 +0100 Subject: [PATCH 4/7] add log level debug --- .github/tests/nimbus-eth1-all.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/tests/nimbus-eth1-all.yaml b/.github/tests/nimbus-eth1-all.yaml index fe0ee47dc..5172d9278 100644 --- a/.github/tests/nimbus-eth1-all.yaml +++ b/.github/tests/nimbus-eth1-all.yaml @@ -12,3 +12,4 @@ participants: - el_client_type: nimbus cl_client_type: lodestar additional_services: [] +global_client_log_level: debug From da85bf7bcdaaef0340544c4041247813833269ee Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Mon, 26 Feb 2024 18:12:30 +0100 Subject: [PATCH 5/7] fix nimbus --- src/el/nimbus-eth1/nimbus_launcher.star | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/el/nimbus-eth1/nimbus_launcher.star b/src/el/nimbus-eth1/nimbus_launcher.star index dc8ef118f..e90262dd4 100644 --- a/src/el/nimbus-eth1/nimbus_launcher.star +++ b/src/el/nimbus-eth1/nimbus_launcher.star @@ -5,8 +5,7 @@ el_admin_node_info = import_module("../../el/el_admin_node_info.star") node_metrics = import_module("../../node_metrics_info.star") constants = import_module("../../package_io/constants.star") -RPC_PORT_NUM = 8545 -WS_PORT_NUM = 8546 +WS_RPC_PORT_NUM = 8545 DISCOVERY_PORT_NUM = 30303 ENGINE_RPC_PORT_NUM = 8551 METRICS_PORT_NUM = 9001 @@ -16,8 +15,7 @@ EXECUTION_MIN_CPU = 100 EXECUTION_MIN_MEMORY = 256 # Port IDs -RPC_PORT_ID = "rpc" -WS_PORT_ID = "ws" +WS_RPC_PORT_ID = "ws-rpc" TCP_DISCOVERY_PORT_ID = "tcp-discovery" UDP_DISCOVERY_PORT_ID = "udp-discovery" ENGINE_RPC_PORT_ID = "engine-rpc" @@ -32,19 +30,18 @@ EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/data/nimbus/execution-data" PRIVATE_IP_ADDRESS_PLACEHOLDER = "KURTOSIS_IP_ADDR_PLACEHOLDER" USED_PORTS = { - RPC_PORT_ID: shared_utils.new_port_spec(RPC_PORT_NUM, shared_utils.TCP_PROTOCOL), - WS_PORT_ID: shared_utils.new_port_spec(WS_PORT_NUM, shared_utils.TCP_PROTOCOL), + WS_RPC_PORT_ID: shared_utils.new_port_spec(WS_RPC_PORT_NUM, shared_utils.TCP_PROTOCOL, ), TCP_DISCOVERY_PORT_ID: shared_utils.new_port_spec( - DISCOVERY_PORT_NUM, shared_utils.TCP_PROTOCOL + DISCOVERY_PORT_NUM, shared_utils.TCP_PROTOCOL, ), UDP_DISCOVERY_PORT_ID: shared_utils.new_port_spec( - DISCOVERY_PORT_NUM, shared_utils.UDP_PROTOCOL + DISCOVERY_PORT_NUM, shared_utils.UDP_PROTOCOL, ), ENGINE_RPC_PORT_ID: shared_utils.new_port_spec( - ENGINE_RPC_PORT_NUM, shared_utils.TCP_PROTOCOL + ENGINE_RPC_PORT_NUM, shared_utils.TCP_PROTOCOL, ), METRICS_PORT_ID: shared_utils.new_port_spec( - METRICS_PORT_NUM, shared_utils.TCP_PROTOCOL + METRICS_PORT_NUM, shared_utils.TCP_PROTOCOL, ), } @@ -130,7 +127,7 @@ def launch( service = plan.add_service(service_name, config) - enode = el_admin_node_info.get_enode_for_node(plan, service_name, RPC_PORT_ID) + enode = el_admin_node_info.get_enode_for_node(plan, service_name, WS_RPC_PORT_ID) metric_url = "{0}:{1}".format(service.ip_address, METRICS_PORT_NUM) nimbus_metrics_info = node_metrics.new_node_metrics_info( @@ -142,8 +139,8 @@ def launch( "", # nimbus has no enr enode, service.ip_address, - RPC_PORT_NUM, - WS_PORT_NUM, + WS_RPC_PORT_NUM, + WS_RPC_PORT_NUM, ENGINE_RPC_PORT_NUM, service_name, [nimbus_metrics_info], @@ -175,7 +172,7 @@ def get_config( cmd = [ "--log-level={0}".format(verbosity_level), "--data-dir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, - "--http-port={0}".format(RPC_PORT_NUM), + "--http-port={0}".format(WS_RPC_PORT_NUM), "--http-address=0.0.0.0", "--rpc", "--rpc-api=eth,debug,exp", From dfe18612d77118602657ce823577d14aef4a1c01 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Mon, 26 Feb 2024 18:13:43 +0100 Subject: [PATCH 6/7] fix lint --- src/el/nimbus-eth1/nimbus_launcher.star | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/el/nimbus-eth1/nimbus_launcher.star b/src/el/nimbus-eth1/nimbus_launcher.star index e90262dd4..bed447c00 100644 --- a/src/el/nimbus-eth1/nimbus_launcher.star +++ b/src/el/nimbus-eth1/nimbus_launcher.star @@ -30,18 +30,25 @@ EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/data/nimbus/execution-data" PRIVATE_IP_ADDRESS_PLACEHOLDER = "KURTOSIS_IP_ADDR_PLACEHOLDER" USED_PORTS = { - WS_RPC_PORT_ID: shared_utils.new_port_spec(WS_RPC_PORT_NUM, shared_utils.TCP_PROTOCOL, ), + WS_RPC_PORT_ID: shared_utils.new_port_spec( + WS_RPC_PORT_NUM, + shared_utils.TCP_PROTOCOL, + ), TCP_DISCOVERY_PORT_ID: shared_utils.new_port_spec( - DISCOVERY_PORT_NUM, shared_utils.TCP_PROTOCOL, + DISCOVERY_PORT_NUM, + shared_utils.TCP_PROTOCOL, ), UDP_DISCOVERY_PORT_ID: shared_utils.new_port_spec( - DISCOVERY_PORT_NUM, shared_utils.UDP_PROTOCOL, + DISCOVERY_PORT_NUM, + shared_utils.UDP_PROTOCOL, ), ENGINE_RPC_PORT_ID: shared_utils.new_port_spec( - ENGINE_RPC_PORT_NUM, shared_utils.TCP_PROTOCOL, + ENGINE_RPC_PORT_NUM, + shared_utils.TCP_PROTOCOL, ), METRICS_PORT_ID: shared_utils.new_port_spec( - METRICS_PORT_NUM, shared_utils.TCP_PROTOCOL, + METRICS_PORT_NUM, + shared_utils.TCP_PROTOCOL, ), } From 9561c526cd69a603a527b053f7a456aca7235212 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Mon, 26 Feb 2024 18:19:47 +0100 Subject: [PATCH 7/7] fix example --- .github/tests/nimbus-eth1-all.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/tests/nimbus-eth1-all.yaml b/.github/tests/nimbus-eth1-all.yaml index 5172d9278..fe0ee47dc 100644 --- a/.github/tests/nimbus-eth1-all.yaml +++ b/.github/tests/nimbus-eth1-all.yaml @@ -12,4 +12,3 @@ participants: - el_client_type: nimbus cl_client_type: lodestar additional_services: [] -global_client_log_level: debug