From 30017f2be05d7463bb635d08dbbcf5b7d45104ff Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Thu, 29 Aug 2024 14:45:41 +0200 Subject: [PATCH] fix: explicitly set client contexts0 --- src/cl/hildr/hildr_launcher.star | 206 ---------------- src/cl/op-node/op_node_launcher.star | 14 +- src/el/op-besu/op_besu_launcher.star | 19 +- src/el/op-erigon/op_erigon_launcher.star | 227 ------------------ src/el/op-geth/op_geth_launcher.star | 21 +- .../op-nethermind/op_nethermind_launcher.star | 213 ---------------- src/el/op-reth/op_reth_launcher.star | 19 +- 7 files changed, 36 insertions(+), 683 deletions(-) delete mode 100644 src/cl/hildr/hildr_launcher.star delete mode 100644 src/el/op-erigon/op_erigon_launcher.star delete mode 100644 src/el/op-nethermind/op_nethermind_launcher.star diff --git a/src/cl/hildr/hildr_launcher.star b/src/cl/hildr/hildr_launcher.star deleted file mode 100644 index cdf8b403..00000000 --- a/src/cl/hildr/hildr_launcher.star +++ /dev/null @@ -1,206 +0,0 @@ -shared_utils = import_module( - "github.com/ethpandaops/ethereum-package/src/shared_utils/shared_utils.star" -) - -cl_context = import_module( - "github.com/ethpandaops/ethereum-package/src/cl/cl_context.star" -) - -cl_node_ready_conditions = import_module( - "github.com/ethpandaops/ethereum-package/src/cl/cl_node_ready_conditions.star" -) -constants = import_module( - "github.com/ethpandaops/ethereum-package/src/package_io/constants.star" -) - -# ---------------------------------- Beacon client ------------------------------------- - -# The Docker container runs as the "hildr" user so we can't write to root -BEACON_DATA_DIRPATH_ON_SERVICE_CONTAINER = "/data/hildr/hildr-beacon-data" -ROLLUP_CONFIG_MOUNT_PATH_ON_CONTAINER = "/network-configs/rollup.json" -# Port IDs -BEACON_TCP_DISCOVERY_PORT_ID = "tcp-discovery" -BEACON_UDP_DISCOVERY_PORT_ID = "udp-discovery" -BEACON_HTTP_PORT_ID = "http" - -# Port nums -BEACON_DISCOVERY_PORT_NUM = 9003 -BEACON_HTTP_PORT_NUM = 8547 - - -def get_used_ports(discovery_port): - used_ports = { - BEACON_TCP_DISCOVERY_PORT_ID: shared_utils.new_port_spec( - discovery_port, shared_utils.TCP_PROTOCOL, wait=None - ), - BEACON_UDP_DISCOVERY_PORT_ID: shared_utils.new_port_spec( - discovery_port, shared_utils.UDP_PROTOCOL, wait=None - ), - BEACON_HTTP_PORT_ID: shared_utils.new_port_spec( - BEACON_HTTP_PORT_NUM, - shared_utils.TCP_PROTOCOL, - shared_utils.HTTP_APPLICATION_PROTOCOL, - ), - } - return used_ports - - -ENTRYPOINT_ARGS = ["sh", "-c"] - -VERBOSITY_LEVELS = { - constants.GLOBAL_LOG_LEVEL.error: "ERROR", - constants.GLOBAL_LOG_LEVEL.warn: "WARN", - constants.GLOBAL_LOG_LEVEL.info: "INFO", - constants.GLOBAL_LOG_LEVEL.debug: "DEBUG", - constants.GLOBAL_LOG_LEVEL.trace: "TRACE", -} - - -def launch( - plan, - launcher, - service_name, - image, - el_context, - existing_cl_clients, - l1_config_env_vars, - gs_sequencer_private_key, - sequencer_enabled, -): - network_name = shared_utils.get_network_name(launcher.network) - - # beacon_node_identity_recipe = PostHttpRequestRecipe( - # endpoint="/", - # content_type="application/json", - # body='{"jsonrpc":"2.0","method":"opp2p_self","params":[],"id":1}', - # port_id=BEACON_HTTP_PORT_ID, - # extract={ - # "enr": ".result.ENR", - # "multiaddr": ".result.addresses[0]", - # "peer_id": ".result.peerID", - # }, - # ) - - config = get_beacon_config( - plan, - launcher.el_cl_genesis_data, - launcher.jwt_file, - image, - service_name, - el_context, - existing_cl_clients, - l1_config_env_vars, - gs_sequencer_private_key, - # beacon_node_identity_recipe, - sequencer_enabled, - ) - - beacon_service = plan.add_service(service_name, config) - - 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 - ) - - # 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"] - - return cl_context.new_cl_context( - "hildr", - # beacon_node_enr, - None, - beacon_service.ip_address, - beacon_http_port.number, - beacon_http_url, - None, - service_name, - multiaddr=None, - peer_id=None, - # multiaddr=beacon_multiaddr, - # peer_id=beacon_peer_id, - ) - - -def get_beacon_config( - plan, - el_cl_genesis_data, - jwt_file, - image, - service_name, - el_context, - existing_cl_clients, - l1_config_env_vars, - gs_sequencer_private_key, - # beacon_node_identity_recipe, - sequencer_enabled, -): - EXECUTION_ENGINE_ENDPOINT = "http://{0}:{1}".format( - el_context.ip_addr, - el_context.engine_rpc_port_num, - ) - EXECUTION_RPC_ENDPOINT = "http://{0}:{1}".format( - el_context.ip_addr, - el_context.rpc_port_num, - ) - - used_ports = get_used_ports(BEACON_DISCOVERY_PORT_NUM) - - cmd = [ - "--devnet", - "--jwt-file=" + constants.JWT_MOUNT_PATH_ON_CONTAINER, - "--l1-beacon-url={0}".format(l1_config_env_vars["CL_RPC_URL"]), - "--l1-rpc-url={0}".format(l1_config_env_vars["L1_RPC_URL"]), - "--l1-ws-rpc-url={0}".format(l1_config_env_vars["L1_WS_URL"]), - "--l2-engine-url={0}".format(EXECUTION_ENGINE_ENDPOINT), - "--l2-rpc-url={0}".format(EXECUTION_RPC_ENDPOINT), - "--rpc-addr=0.0.0.0", - "--rpc-port={0}".format(BEACON_HTTP_PORT_NUM), - "--sync-mode=full", - "--network=" + ROLLUP_CONFIG_MOUNT_PATH_ON_CONTAINER, - ] - - if sequencer_enabled: - cmd.append("--sequencer-enable") - - if len(existing_cl_clients) == 1: - cmd.append( - "--disc-boot-nodes=" - + ",".join( - [ctx.enr for ctx in existing_cl_clients[: constants.MAX_ENR_ENTRIES]] - ) - ) - - files = { - constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data, - constants.JWT_MOUNTPOINT_ON_CLIENTS: jwt_file, - } - ports = {} - ports.update(used_ports) - - return ServiceConfig( - image=image, - ports=ports, - cmd=cmd, - files=files, - private_ip_address_placeholder=constants.PRIVATE_IP_ADDRESS_PLACEHOLDER, - # ready_conditions=ReadyCondition( - # recipe=beacon_node_identity_recipe, - # field="code", - # assertion="==", - # target_value=200, - # timeout="1m", - # ), - ) - - -def new_hildr_launcher(el_cl_genesis_data, jwt_file, network_params): - return struct( - el_cl_genesis_data=el_cl_genesis_data, - jwt_file=jwt_file, - network=network_params.network, - ) diff --git a/src/cl/op-node/op_node_launcher.star b/src/cl/op-node/op_node_launcher.star index 1da22859..4d242ffd 100644 --- a/src/cl/op-node/op_node_launcher.star +++ b/src/cl/op-node/op_node_launcher.star @@ -111,13 +111,13 @@ def launch( beacon_peer_id = response["extract.peer_id"] return cl_context.new_cl_context( - "op-node", - beacon_node_enr, - beacon_service.ip_address, - beacon_http_port.number, - beacon_http_url, - None, - service_name, + client_name="op-node", + enr=beacon_node_enr, + ip_addr=beacon_service.ip_address, + http_port=beacon_http_port.number, + beacon_http_url=beacon_http_url, + cl_nodes_metrics_info=None, + beacon_service_name=service_name, multiaddr=beacon_multiaddr, peer_id=beacon_peer_id, ) diff --git a/src/el/op-besu/op_besu_launcher.star b/src/el/op-besu/op_besu_launcher.star index f51f57b2..a532b19f 100644 --- a/src/el/op-besu/op_besu_launcher.star +++ b/src/el/op-besu/op_besu_launcher.star @@ -119,16 +119,15 @@ def launch( http_url = "http://{0}:{1}".format(service.ip_address, RPC_PORT_NUM) return el_context.new_el_context( - "op-besu", - "", # besu has no ENR - enode, - service.ip_address, - RPC_PORT_NUM, - WS_PORT_NUM, - ENGINE_RPC_PORT_NUM, - http_url, - service_name, - [besu_metrics_info], + client_name="op-besu", + enode=enode, + ip_addr=service.ip_address, + rpc_port_num=RPC_PORT_NUM, + ws_port_num=WS_PORT_NUM, + engine_rpc_port_num=ENGINE_RPC_PORT_NUM, + rpc_http_url=http_url, + service_name=service_name, + el_metrics_info=[besu_metrics_info], ) diff --git a/src/el/op-erigon/op_erigon_launcher.star b/src/el/op-erigon/op_erigon_launcher.star deleted file mode 100644 index f3d1e73a..00000000 --- a/src/el/op-erigon/op_erigon_launcher.star +++ /dev/null @@ -1,227 +0,0 @@ -shared_utils = import_module( - "github.com/ethpandaops/ethereum-package/src/shared_utils/shared_utils.star" -) -# input_parser = import_module("../../package_io/input_parser.star") -el_context = import_module( - "github.com/ethpandaops/ethereum-package/src/el/el_context.star" -) -el_admin_node_info = import_module( - "github.com/ethpandaops/ethereum-package/src/el/el_admin_node_info.star" -) - -node_metrics = import_module( - "github.com/ethpandaops/ethereum-package/src/node_metrics_info.star" -) -constants = import_module( - "github.com/ethpandaops/ethereum-package/src/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 = 300 -EXECUTION_MIN_MEMORY = 512 - -# 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" -ENGINE_WS_PORT_ID = "engineWs" -METRICS_PORT_ID = "metrics" - -METRICS_PATH = "/debug/metrics/prometheus" - -# The dirpath of the execution data directory on the client container -EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/data/op-erigon/execution-data" - - -def get_used_ports(discovery_port=DISCOVERY_PORT_NUM): - used_ports = { - RPC_PORT_ID: shared_utils.new_port_spec( - RPC_PORT_NUM, - shared_utils.TCP_PROTOCOL, - shared_utils.HTTP_APPLICATION_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, shared_utils.TCP_PROTOCOL - ), - UDP_DISCOVERY_PORT_ID: shared_utils.new_port_spec( - discovery_port, 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 - ), - } - return used_ports - - -ENTRYPOINT_ARGS = ["sh", "-c"] - -VERBOSITY_LEVELS = { - constants.GLOBAL_LOG_LEVEL.error: "1", - constants.GLOBAL_LOG_LEVEL.warn: "2", - constants.GLOBAL_LOG_LEVEL.info: "3", - constants.GLOBAL_LOG_LEVEL.debug: "4", - constants.GLOBAL_LOG_LEVEL.trace: "5", -} - - -def launch( - plan, - launcher, - service_name, - image, - existing_el_clients, - sequencer_enabled, - sequencer_context, -): - network_name = shared_utils.get_network_name(launcher.network) - - config = get_config( - plan, - launcher.el_cl_genesis_data, - launcher.jwt_file, - launcher.network, - launcher.network_id, - image, - service_name, - existing_el_clients, - sequencer_enabled, - sequencer_context, - ) - - service = plan.add_service(service_name, config) - - enode, enr = el_admin_node_info.get_enode_enr_for_node( - plan, service_name, RPC_PORT_ID - ) - - metrics_url = "{0}:{1}".format(service.ip_address, METRICS_PORT_NUM) - erigon_metrics_info = node_metrics.new_node_metrics_info( - service_name, METRICS_PATH, metrics_url - ) - - http_url = "http://{0}:{1}".format(service.ip_address, RPC_PORT_NUM) - - return el_context.new_el_context( - "op-erigon", - enr, - enode, - service.ip_address, - RPC_PORT_NUM, - WS_PORT_NUM, - ENGINE_RPC_PORT_NUM, - http_url, - service_name, - [erigon_metrics_info], - ) - - -def get_config( - plan, - el_cl_genesis_data, - jwt_file, - network, - network_id, - image, - service_name, - existing_el_clients, - sequencer_enabled, - sequencer_context, -): - init_datadir_cmd_str = "erigon init --datadir={0} {1}".format( - EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, - constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json", - ) - - discovery_port = DISCOVERY_PORT_NUM - used_ports = get_used_ports(discovery_port) - - cmd = [ - "erigon", - "--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, - "--networkid={0}".format(network_id), - "--http", - "--http.addr=0.0.0.0", - "--http.vhosts=*", - "--http.corsdomain=*", - "--http.api=admin,engine,net,eth,web3,debug", - "--ws", - "--ws.port={0}".format(WS_PORT_NUM), - "--allow-insecure-unlock", - "--authrpc.port={0}".format(ENGINE_RPC_PORT_NUM), - "--authrpc.addr=0.0.0.0", - "--authrpc.vhosts=*", - "--authrpc.jwtsecret=" + constants.JWT_MOUNT_PATH_ON_CONTAINER, - "--nat=extip:" + constants.PRIVATE_IP_ADDRESS_PLACEHOLDER, - "--rpc.allow-unprotected-txs", - "--metrics", - "--metrics.addr=0.0.0.0", - "--metrics.port={0}".format(METRICS_PORT_NUM), - "--port={0}".format(discovery_port), - ] - - if not sequencer_enabled: - cmd.append( - "--rollup.sequencerhttp={0}".format(sequencer_context.beacon_http_url) - ) - - if len(existing_el_clients) > 0: - cmd.append( - "--bootnodes=" - + ",".join( - [ - ctx.enode - for ctx in existing_el_clients[: constants.MAX_ENODE_ENTRIES] - ] - ) - ) - - cmd_str = " ".join(cmd) - if network not in constants.PUBLIC_NETWORKS: - subcommand_strs = [ - init_datadir_cmd_str, - cmd_str, - ] - command_str = " && ".join(subcommand_strs) - else: - command_str = cmd_str - - files = { - constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data, - constants.JWT_MOUNTPOINT_ON_CLIENTS: jwt_file, - } - - return ServiceConfig( - image=image, - ports=used_ports, - cmd=[command_str], - files=files, - entrypoint=ENTRYPOINT_ARGS, - private_ip_address_placeholder=constants.PRIVATE_IP_ADDRESS_PLACEHOLDER, - ) - - -def new_op_erigon_launcher( - el_cl_genesis_data, - jwt_file, - network, - network_id, -): - return struct( - el_cl_genesis_data=el_cl_genesis_data, - jwt_file=jwt_file, - network=network, - network_id=network_id, - ) diff --git a/src/el/op-geth/op_geth_launcher.star b/src/el/op-geth/op_geth_launcher.star index 72228b2e..e5bae76c 100644 --- a/src/el/op-geth/op_geth_launcher.star +++ b/src/el/op-geth/op_geth_launcher.star @@ -121,16 +121,17 @@ def launch( http_url = "http://{0}:{1}".format(service.ip_address, RPC_PORT_NUM) return el_context.new_el_context( - "op-geth", - enr, - enode, - service.ip_address, - RPC_PORT_NUM, - WS_PORT_NUM, - ENGINE_RPC_PORT_NUM, - http_url, - service_name, - [geth_metrics_info], + client_name="op-geth", + enode=enode, + ip_addr=service.ip_address, + rpc_port_num=RPC_PORT_NUM, + ws_port_num=WS_PORT_NUM, + engine_rpc_port_num=ENGINE_RPC_PORT_NUM, + rpc_http_url=http_url, + ws_url=ws_url, + enr=enr, + service_name=service_name, + el_metrics_info=[op_geth_metrics_info], ) diff --git a/src/el/op-nethermind/op_nethermind_launcher.star b/src/el/op-nethermind/op_nethermind_launcher.star deleted file mode 100644 index f045ceb4..00000000 --- a/src/el/op-nethermind/op_nethermind_launcher.star +++ /dev/null @@ -1,213 +0,0 @@ -shared_utils = import_module( - "github.com/ethpandaops/ethereum-package/src/shared_utils/shared_utils.star" -) - -el_context = import_module( - "github.com/ethpandaops/ethereum-package/src/el/el_context.star" -) -el_admin_node_info = import_module( - "github.com/ethpandaops/ethereum-package/src/el/el_admin_node_info.star" -) - -node_metrics = import_module( - "github.com/ethpandaops/ethereum-package/src/node_metrics_info.star" -) -constants = import_module( - "github.com/ethpandaops/ethereum-package/src/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 = 300 -EXECUTION_MIN_MEMORY = 512 - -# 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" -ENGINE_WS_PORT_ID = "engineWs" -METRICS_PORT_ID = "metrics" - -# TODO(old) Scale this dynamically based on CPUs available and Nethermind nodes mining -NUM_MINING_THREADS = 1 - -METRICS_PATH = "/debug/metrics/prometheus" - -# The dirpath of the execution data directory on the client container -EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/data/nethermind/execution-data" - - -def get_used_ports(discovery_port=DISCOVERY_PORT_NUM): - used_ports = { - RPC_PORT_ID: shared_utils.new_port_spec( - RPC_PORT_NUM, - shared_utils.TCP_PROTOCOL, - shared_utils.HTTP_APPLICATION_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, shared_utils.TCP_PROTOCOL - ), - UDP_DISCOVERY_PORT_ID: shared_utils.new_port_spec( - discovery_port, 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 - ), - } - return used_ports - - -VERBOSITY_LEVELS = { - constants.GLOBAL_LOG_LEVEL.error: "1", - constants.GLOBAL_LOG_LEVEL.warn: "2", - constants.GLOBAL_LOG_LEVEL.info: "3", - constants.GLOBAL_LOG_LEVEL.debug: "4", - constants.GLOBAL_LOG_LEVEL.trace: "5", -} - - -def launch( - plan, - launcher, - service_name, - image, - existing_el_clients, - sequencer_enabled, - sequencer_context, -): - network_name = shared_utils.get_network_name(launcher.network) - - config = get_config( - plan, - launcher.el_cl_genesis_data, - launcher.jwt_file, - launcher.network, - launcher.network_id, - image, - service_name, - existing_el_clients, - sequencer_enabled, - sequencer_context, - ) - - service = plan.add_service(service_name, config) - - enode = el_admin_node_info.get_enode_for_node(plan, service_name, RPC_PORT_ID) - - metrics_url = "{0}:{1}".format(service.ip_address, METRICS_PORT_NUM) - nethermind_metrics_info = node_metrics.new_node_metrics_info( - service_name, METRICS_PATH, metrics_url - ) - - http_url = "http://{0}:{1}".format(service.ip_address, RPC_PORT_NUM) - ws_url = "ws://{0}:{1}".format(service.ip_address, WS_PORT_NUM) - - return el_context.new_el_context( - "op-nethermind", - "", - enode, - service.ip_address, - RPC_PORT_NUM, - WS_PORT_NUM, - ENGINE_RPC_PORT_NUM, - http_url, - service_name, - [nethermind_metrics_info], - ) - - -def get_config( - plan, - el_cl_genesis_data, - jwt_file, - network, - network_id, - image, - service_name, - existing_el_clients, - sequencer_enabled, - sequencer_context, -): - discovery_port = DISCOVERY_PORT_NUM - used_ports = get_used_ports(discovery_port) - cmd = [ - "--log=debug", - "--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, - "--Init.WebSocketsEnabled=true", - "--JsonRpc.Enabled=true", - "--JsonRpc.EnabledModules=net,eth,consensus,subscribe,web3,admin", - "--JsonRpc.Host=0.0.0.0", - "--JsonRpc.Port={0}".format(RPC_PORT_NUM), - "--JsonRpc.WebSocketsPort={0}".format(WS_PORT_NUM), - "--JsonRpc.EngineHost=0.0.0.0", - "--JsonRpc.EnginePort={0}".format(ENGINE_RPC_PORT_NUM), - "--Network.ExternalIp=" + constants.PRIVATE_IP_ADDRESS_PLACEHOLDER, - "--Network.DiscoveryPort={0}".format(discovery_port), - "--Network.P2PPort={0}".format(discovery_port), - "--JsonRpc.JwtSecretFile=" + constants.JWT_MOUNT_PATH_ON_CONTAINER, - "--Metrics.Enabled=true", - "--Metrics.ExposePort={0}".format(METRICS_PORT_NUM), - "--Metrics.ExposeHost=0.0.0.0", - ] - if not sequencer_enabled: - cmd.append( - "--Optimism.SequencerUrl={0}".format(sequencer_context.beacon_http_url) - ) - - if len(existing_el_clients) > 0: - cmd.append( - "--Discovery.Bootnodes=" - + ",".join( - [ - ctx.enode - for ctx in existing_el_clients[: constants.MAX_ENODE_ENTRIES] - ] - ) - ) - - # TODO: Adding the chainspec and config separately as we may want to have support for public networks and shadowforks - cmd.append("--config=none.cfg") - cmd.append( - "--Init.ChainSpecPath=" - + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER - + "/chainspec.json" - ) - - files = { - constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data, - constants.JWT_MOUNTPOINT_ON_CLIENTS: jwt_file, - } - - return ServiceConfig( - image=image, - ports=used_ports, - cmd=cmd, - files=files, - private_ip_address_placeholder=constants.PRIVATE_IP_ADDRESS_PLACEHOLDER, - ) - - -def new_nethermind_launcher( - el_cl_genesis_data, - jwt_file, - network, - network_id, -): - return struct( - el_cl_genesis_data=el_cl_genesis_data, - jwt_file=jwt_file, - network=network, - network_id=network_id, - ) diff --git a/src/el/op-reth/op_reth_launcher.star b/src/el/op-reth/op_reth_launcher.star index 2ee53813..a923fe2c 100644 --- a/src/el/op-reth/op_reth_launcher.star +++ b/src/el/op-reth/op_reth_launcher.star @@ -112,16 +112,15 @@ def launch( http_url = "http://{0}:{1}".format(service.ip_address, RPC_PORT_NUM) return el_context.new_el_context( - "reth", - "", # reth has no enr - enode, - service.ip_address, - RPC_PORT_NUM, - WS_PORT_NUM, - ENGINE_RPC_PORT_NUM, - http_url, - service_name, - [op_reth_metrics_info], + client_name="reth", + enode=enode, + ip_addr=service.ip_address, + rpc_port_num=RPC_PORT_NUM, + ws_port_num=WS_PORT_NUM, + engine_rpc_port_num=ENGINE_RPC_PORT_NUM, + rpc_http_url=http_url, + service_name=service_name, + el_metrics_info=[op_reth_metrics_info], )