From 2ca3e7596954b433b72b83beaadaa2ce9603f1cc Mon Sep 17 00:00:00 2001 From: Martin Paulucci Date: Tue, 11 Jun 2024 14:34:17 +0200 Subject: [PATCH 01/13] Add support for `ethereum_rust`. --- src/el/el_launcher.star | 10 +- .../ethereumrust/ethereumrust_launcher.star | 301 ++++++++++++++++++ src/package_io/constants.star | 27 +- src/package_io/input_parser.star | 1 + 4 files changed, 334 insertions(+), 5 deletions(-) create mode 100644 src/el/ethereumrust/ethereumrust_launcher.star diff --git a/src/el/el_launcher.star b/src/el/el_launcher.star index f08a4379f..c29b705d1 100644 --- a/src/el/el_launcher.star +++ b/src/el/el_launcher.star @@ -9,7 +9,7 @@ nethermind = import_module("./nethermind/nethermind_launcher.star") reth = import_module("./reth/reth_launcher.star") ethereumjs = import_module("./ethereumjs/ethereumjs_launcher.star") nimbus_eth1 = import_module("./nimbus-eth1/nimbus_launcher.star") - +ethereumrust = import_module("./ethereumrust/ethereumrust_launcher.star") def launch( plan, @@ -98,6 +98,14 @@ def launch( ), "launch_method": nimbus_eth1.launch, }, + constants.EL_TYPE.ethereumrust: { + "launcher": ethereumrust.new_ethereumrust_launcher( + el_cl_data, + jwt_file, + network_params.network, + ), + "launch_method": ethereumrust.launch, + }, } all_el_contexts = [] diff --git a/src/el/ethereumrust/ethereumrust_launcher.star b/src/el/ethereumrust/ethereumrust_launcher.star new file mode 100644 index 000000000..b7f4b3c9d --- /dev/null +++ b/src/el/ethereumrust/ethereumrust_launcher.star @@ -0,0 +1,301 @@ +shared_utils = import_module("../../shared_utils/shared_utils.star") +input_parser = import_module("../../package_io/input_parser.star") +el_context = import_module("../../el/el_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" + +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, + 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, + port_publisher, +): + 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]["ethereumrust_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]["ethereumrust_max_mem"] + ) + + el_volume_size = ( + el_volume_size + if int(el_volume_size) > 0 + else constants.VOLUME_SIZE[network_name]["ethereumrust_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, + port_publisher, + ) + + 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) + reth_metrics_info = node_metrics.new_node_metrics_info( + service_name, METRICS_PATH, metric_url + ) + + return el_context.new_el_context( + "ethereumrust", + "", # ethereumrust has no enr? + enode, + service.ip_address, + RPC_PORT_NUM, + WS_PORT_NUM, + ENGINE_RPC_PORT_NUM, + service_name, + [reth_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, + port_publisher, +): + public_ports = {} + discovery_port = DISCOVERY_PORT_NUM + if port_publisher.public_port_start: + discovery_port = port_publisher.el_start + len(existing_el_clients) + public_ports = { + 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 + ), + } + used_ports = get_used_ports(discovery_port) + + cmd = [ + "ethereum_rust", + # "-{0}".format(verbosity_level), + # "--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, + # "--chain={0}".format( + # network + # if network in constants.PUBLIC_NETWORKS + # else constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json" + # ), + # "--http", + "--http.port={0}".format(RPC_PORT_NUM), + "--http.addr=0.0.0.0", + # "--http.corsdomain=*", + # # WARNING: The admin info endpoint is enabled so that we can easily get ENR/enode, which means + # # that users should NOT store private information in these Kurtosis nodes! + # "--http.api=admin,net,eth,web3,debug,trace", + # "--ws", + # "--ws.addr=0.0.0.0", + # "--ws.port={0}".format(WS_PORT_NUM), + # "--ws.api=net,eth", + # "--ws.origins=*", + # "--nat=extip:" + port_publisher.nat_exit_ip, + "--authrpc.port={0}".format(ENGINE_RPC_PORT_NUM), + # "--authrpc.jwtsecret=" + constants.JWT_MOUNT_PATH_ON_CONTAINER, + "--authrpc.addr=0.0.0.0", + # "--metrics=0.0.0.0:{0}".format(METRICS_PORT_NUM), + # "--discovery.port={0}".format(discovery_port), + # "--port={0}".format(discovery_port), + ] + # if network == constants.NETWORK_NAME.kurtosis: + # if len(existing_el_clients) > 0: + # cmd.append( + # "--bootnodes=" + # + ",".join( + # [ + # ctx.enode + # for ctx in existing_el_clients[: constants.MAX_ENODE_ENTRIES] + # ] + # ) + # ) + # elif network not in constants.PUBLIC_NETWORKS: + # cmd.append( + # "--bootnodes=" + # + 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]) + + cmd_str = " ".join(cmd) + if network not in constants.PUBLIC_NETWORKS: + # subcommand_strs = [ + # init_datadir_cmd_str, + # cmd_str, + # ] + subcommand_strs = [cmd_str] + else: + subcommand_strs = [cmd_str] + + command_str = " && ".join(subcommand_strs) + + 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, + public_ports=public_ports, + cmd=[command_str], + files=files, + entrypoint=ENTRYPOINT_ARGS, + private_ip_address_placeholder=constants.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_TYPE.ethereumrust, + constants.CLIENT_TYPES.el, + image, + cl_client_name, + extra_labels, + ), + tolerations=tolerations, + node_selectors=node_selectors, + ) + + +def new_ethereumrust_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 8573d7aaf..791625344 100644 --- a/src/package_io/constants.star +++ b/src/package_io/constants.star @@ -7,6 +7,7 @@ EL_TYPE = struct( reth="reth", ethereumjs="ethereumjs", nimbus="nimbus", + ethereumrust="ethereumrust", ) CL_TYPE = struct( @@ -144,7 +145,8 @@ VOLUME_SIZE = { "teku_volume_size": 500000, # 500GB "nimbus_volume_size": 500000, # 500GB "lodestar_volume_size": 500000, # 500GB - "grandine_volume_size": 500000, # 500GB + "grandine_volume_size": 500000, # 500GB, + "ethereumrust_volume_size": 500000, # 500GB }, "sepolia": { "geth_volume_size": 300000, # 300GB @@ -159,7 +161,8 @@ VOLUME_SIZE = { "teku_volume_size": 150000, # 150GB "nimbus_volume_size": 150000, # 150GB "lodestar_volume_size": 150000, # 150GB - "grandine_volume_size": 150000, # 150GB + "grandine_volume_size": 150000, # 150GB, + "ethereumrust_volume_size": 150000, # 150GB }, "holesky": { "geth_volume_size": 100000, # 100GB @@ -174,7 +177,8 @@ VOLUME_SIZE = { "teku_volume_size": 100000, # 100GB "nimbus_volume_size": 100000, # 100GB "lodestar_volume_size": 100000, # 100GB - "grandine_volume_size": 100000, # 100GB + "grandine_volume_size": 100000, # 100GB, + "ethereumrust_volume_size": 100000, # 100GB }, "devnets": { "geth_volume_size": 100000, # 100GB @@ -189,7 +193,8 @@ VOLUME_SIZE = { "teku_volume_size": 100000, # 100GB "nimbus_volume_size": 100000, # 100GB "lodestar_volume_size": 100000, # 100GB - "grandine_volume_size": 100000, # 100GB + "grandine_volume_size": 100000, # 100GB, + "ethereumrust_volume_size": 100000, # 100GB }, "ephemery": { "geth_volume_size": 5000, # 5GB @@ -205,6 +210,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 1000, # 1GB "lodestar_volume_size": 1000, # 1GB "grandine_volume_size": 1000, # 1GB + "ethereumrust_volume_size": 1000, # 1GB }, "kurtosis": { "geth_volume_size": 5000, # 5GB @@ -220,6 +226,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 1000, # 1GB "lodestar_volume_size": 1000, # 1GB "grandine_volume_size": 1000, # 1GB + "ethereumrust_volume_size": 1000, # 1GB }, } @@ -251,6 +258,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 4000, # 4 cores "grandine_max_mem": 16384, # 16GB "grandine_max_cpu": 4000, # 4 cores + "ethereumrust_max_mem": 16384, # 16GB + "ethereumrust_max_cpu": 4000, # 4 cores }, "sepolia": { "geth_max_mem": 4096, # 4GB @@ -279,6 +288,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 1000, # 1 core "grandine_max_mem": 4096, # 4GB "grandine_max_cpu": 1000, # 1 core + "ethereumrust_max_mem": 4096, # 4GB + "ethereumrust_max_cpu": 1000, # 1 core }, "holesky": { "geth_max_mem": 8192, # 8GB @@ -307,6 +318,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 2000, # 2 cores "grandine_max_mem": 8192, # 8GB "grandine_max_cpu": 2000, # 2 cores + "ethereumrust_max_mem": 8192, # 8GB + "ethereumrust_max_cpu": 2000, # 2 cores }, "devnets": { "geth_max_mem": 4096, # 4GB @@ -335,6 +348,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 1000, # 1 core "grandine_max_mem": 4096, # 4GB "grandine_max_cpu": 1000, # 1 core + "ethereumrust_max_mem": 4096, # 4GB + "ethereumrust_max_cpu": 1000, # 1 core }, "ephemery": { "geth_max_mem": 1024, # 1GB @@ -363,6 +378,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 1000, # 1 core "grandine_max_mem": 1024, # 1GB "grandine_max_cpu": 1000, # 1 core + "ethereumrust_max_mem": 1024, # 1GB + "ethereumrust_max_cpu": 1000, # 1 core }, "kurtosis": { "geth_max_mem": 1024, # 1GB @@ -391,5 +408,7 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 1000, # 1 core "grandine_max_mem": 2048, # 2GB "grandine_max_cpu": 1000, # 1 core + "ethereumrust_max_mem": 1024, # 1GB + "ethereumrust_max_cpu": 1000, # 1 core }, } diff --git a/src/package_io/input_parser.star b/src/package_io/input_parser.star index 99c3baa5a..299872d0f 100644 --- a/src/package_io/input_parser.star +++ b/src/package_io/input_parser.star @@ -12,6 +12,7 @@ DEFAULT_EL_IMAGES = { "reth": "ghcr.io/paradigmxyz/reth", "ethereumjs": "ethpandaops/ethereumjs:master", "nimbus": "ethpandaops/nimbus-eth1:master", + "ethereumrust": "ethereum_rust:latest", } DEFAULT_CL_IMAGES = { From 261278b2d90f8454b7e94bc870538d9f7fa150f4 Mon Sep 17 00:00:00 2001 From: Martin Paulucci Date: Tue, 11 Jun 2024 14:55:23 +0200 Subject: [PATCH 02/13] Remove port arg. --- src/el/ethereumrust/ethereumrust_launcher.star | 1 - 1 file changed, 1 deletion(-) diff --git a/src/el/ethereumrust/ethereumrust_launcher.star b/src/el/ethereumrust/ethereumrust_launcher.star index b7f4b3c9d..5f7ea11cd 100644 --- a/src/el/ethereumrust/ethereumrust_launcher.star +++ b/src/el/ethereumrust/ethereumrust_launcher.star @@ -220,7 +220,6 @@ def get_config( "--authrpc.addr=0.0.0.0", # "--metrics=0.0.0.0:{0}".format(METRICS_PORT_NUM), # "--discovery.port={0}".format(discovery_port), - # "--port={0}".format(discovery_port), ] # if network == constants.NETWORK_NAME.kurtosis: # if len(existing_el_clients) > 0: From 4f328be52c7f936baf24346c718776caed68f629 Mon Sep 17 00:00:00 2001 From: Martin Paulucci Date: Tue, 11 Jun 2024 15:22:42 +0200 Subject: [PATCH 03/13] Rename chain to network. --- src/el/ethereumrust/ethereumrust_launcher.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/el/ethereumrust/ethereumrust_launcher.star b/src/el/ethereumrust/ethereumrust_launcher.star index 5f7ea11cd..95d0e2805 100644 --- a/src/el/ethereumrust/ethereumrust_launcher.star +++ b/src/el/ethereumrust/ethereumrust_launcher.star @@ -197,7 +197,7 @@ def get_config( "ethereum_rust", # "-{0}".format(verbosity_level), # "--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, - # "--chain={0}".format( + # "--network={0}".format( # network # if network in constants.PUBLIC_NETWORKS # else constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json" From 2097d8013fcff65f82c6dabaf52e8e98a4ab4372 Mon Sep 17 00:00:00 2001 From: Martin Paulucci Date: Tue, 11 Jun 2024 15:23:34 +0200 Subject: [PATCH 04/13] Rename metrics_info. --- src/el/ethereumrust/ethereumrust_launcher.star | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/el/ethereumrust/ethereumrust_launcher.star b/src/el/ethereumrust/ethereumrust_launcher.star index 95d0e2805..88a20f649 100644 --- a/src/el/ethereumrust/ethereumrust_launcher.star +++ b/src/el/ethereumrust/ethereumrust_launcher.star @@ -139,7 +139,7 @@ def launch( 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) - reth_metrics_info = node_metrics.new_node_metrics_info( + metrics_info = node_metrics.new_node_metrics_info( service_name, METRICS_PATH, metric_url ) @@ -152,7 +152,7 @@ def launch( WS_PORT_NUM, ENGINE_RPC_PORT_NUM, service_name, - [reth_metrics_info], + [metrics_info], ) From 7c8cb1b89d098bb81308c44107cc9a7d032d6536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Tue, 25 Jun 2024 15:07:58 -0300 Subject: [PATCH 05/13] chore: rename ethereum_rust/ethereumrust -> ethrex --- src/el/el_launcher.star | 8 ++-- .../ethrex_launcher.star} | 16 ++++---- src/package_io/constants.star | 38 +++++++++---------- src/package_io/input_parser.star | 2 +- 4 files changed, 32 insertions(+), 32 deletions(-) rename src/el/{ethereumrust/ethereumrust_launcher.star => ethrex/ethrex_launcher.star} (95%) diff --git a/src/el/el_launcher.star b/src/el/el_launcher.star index c29b705d1..9c4f2dc12 100644 --- a/src/el/el_launcher.star +++ b/src/el/el_launcher.star @@ -9,7 +9,7 @@ nethermind = import_module("./nethermind/nethermind_launcher.star") reth = import_module("./reth/reth_launcher.star") ethereumjs = import_module("./ethereumjs/ethereumjs_launcher.star") nimbus_eth1 = import_module("./nimbus-eth1/nimbus_launcher.star") -ethereumrust = import_module("./ethereumrust/ethereumrust_launcher.star") +ethrex = import_module("./ethrex/ethrex_launcher.star") def launch( plan, @@ -98,13 +98,13 @@ def launch( ), "launch_method": nimbus_eth1.launch, }, - constants.EL_TYPE.ethereumrust: { - "launcher": ethereumrust.new_ethereumrust_launcher( + constants.EL_TYPE.ethrex: { + "launcher": ethrex.new_ethrex_launcher( el_cl_data, jwt_file, network_params.network, ), - "launch_method": ethereumrust.launch, + "launch_method": ethrex.launch, }, } diff --git a/src/el/ethereumrust/ethereumrust_launcher.star b/src/el/ethrex/ethrex_launcher.star similarity index 95% rename from src/el/ethereumrust/ethereumrust_launcher.star rename to src/el/ethrex/ethrex_launcher.star index 88a20f649..2ab4c4104 100644 --- a/src/el/ethereumrust/ethereumrust_launcher.star +++ b/src/el/ethrex/ethrex_launcher.star @@ -93,19 +93,19 @@ def launch( el_max_cpu = ( int(el_max_cpu) if int(el_max_cpu) > 0 - else constants.RAM_CPU_OVERRIDES[network_name]["ethereumrust_max_cpu"] + else constants.RAM_CPU_OVERRIDES[network_name]["ethrex_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]["ethereumrust_max_mem"] + else constants.RAM_CPU_OVERRIDES[network_name]["ethrex_max_mem"] ) el_volume_size = ( el_volume_size if int(el_volume_size) > 0 - else constants.VOLUME_SIZE[network_name]["ethereumrust_volume_size"] + else constants.VOLUME_SIZE[network_name]["ethrex_volume_size"] ) cl_client_name = service_name.split("-")[3] @@ -144,8 +144,8 @@ def launch( ) return el_context.new_el_context( - "ethereumrust", - "", # ethereumrust has no enr? + "ethrex", + "", # ethrex has no enr? enode, service.ip_address, RPC_PORT_NUM, @@ -194,7 +194,7 @@ def get_config( used_ports = get_used_ports(discovery_port) cmd = [ - "ethereum_rust", + "ethrex", # "-{0}".format(verbosity_level), # "--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, # "--network={0}".format( @@ -281,7 +281,7 @@ def get_config( max_memory=el_max_mem, env_vars=extra_env_vars, labels=shared_utils.label_maker( - constants.EL_TYPE.ethereumrust, + constants.EL_TYPE.ethrex, constants.CLIENT_TYPES.el, image, cl_client_name, @@ -292,7 +292,7 @@ def get_config( ) -def new_ethereumrust_launcher(el_cl_genesis_data, jwt_file, network): +def new_ethrex_launcher(el_cl_genesis_data, jwt_file, network): return struct( el_cl_genesis_data=el_cl_genesis_data, jwt_file=jwt_file, diff --git a/src/package_io/constants.star b/src/package_io/constants.star index 791625344..09fa45674 100644 --- a/src/package_io/constants.star +++ b/src/package_io/constants.star @@ -7,7 +7,7 @@ EL_TYPE = struct( reth="reth", ethereumjs="ethereumjs", nimbus="nimbus", - ethereumrust="ethereumrust", + ethrex="ethrex", ) CL_TYPE = struct( @@ -146,7 +146,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 500000, # 500GB "lodestar_volume_size": 500000, # 500GB "grandine_volume_size": 500000, # 500GB, - "ethereumrust_volume_size": 500000, # 500GB + "ethrex_volume_size": 500000, # 500GB }, "sepolia": { "geth_volume_size": 300000, # 300GB @@ -162,7 +162,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 150000, # 150GB "lodestar_volume_size": 150000, # 150GB "grandine_volume_size": 150000, # 150GB, - "ethereumrust_volume_size": 150000, # 150GB + "ethrex_volume_size": 150000, # 150GB }, "holesky": { "geth_volume_size": 100000, # 100GB @@ -178,7 +178,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 100000, # 100GB "lodestar_volume_size": 100000, # 100GB "grandine_volume_size": 100000, # 100GB, - "ethereumrust_volume_size": 100000, # 100GB + "ethrex_volume_size": 100000, # 100GB }, "devnets": { "geth_volume_size": 100000, # 100GB @@ -194,7 +194,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 100000, # 100GB "lodestar_volume_size": 100000, # 100GB "grandine_volume_size": 100000, # 100GB, - "ethereumrust_volume_size": 100000, # 100GB + "ethrex_volume_size": 100000, # 100GB }, "ephemery": { "geth_volume_size": 5000, # 5GB @@ -210,7 +210,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 1000, # 1GB "lodestar_volume_size": 1000, # 1GB "grandine_volume_size": 1000, # 1GB - "ethereumrust_volume_size": 1000, # 1GB + "ethrex_volume_size": 1000, # 1GB }, "kurtosis": { "geth_volume_size": 5000, # 5GB @@ -226,7 +226,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 1000, # 1GB "lodestar_volume_size": 1000, # 1GB "grandine_volume_size": 1000, # 1GB - "ethereumrust_volume_size": 1000, # 1GB + "ethrex_volume_size": 1000, # 1GB }, } @@ -258,8 +258,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 4000, # 4 cores "grandine_max_mem": 16384, # 16GB "grandine_max_cpu": 4000, # 4 cores - "ethereumrust_max_mem": 16384, # 16GB - "ethereumrust_max_cpu": 4000, # 4 cores + "ethrex_max_mem": 16384, # 16GB + "ethrex_max_cpu": 4000, # 4 cores }, "sepolia": { "geth_max_mem": 4096, # 4GB @@ -288,8 +288,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 1000, # 1 core "grandine_max_mem": 4096, # 4GB "grandine_max_cpu": 1000, # 1 core - "ethereumrust_max_mem": 4096, # 4GB - "ethereumrust_max_cpu": 1000, # 1 core + "ethrex_max_mem": 4096, # 4GB + "ethrex_max_cpu": 1000, # 1 core }, "holesky": { "geth_max_mem": 8192, # 8GB @@ -318,8 +318,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 2000, # 2 cores "grandine_max_mem": 8192, # 8GB "grandine_max_cpu": 2000, # 2 cores - "ethereumrust_max_mem": 8192, # 8GB - "ethereumrust_max_cpu": 2000, # 2 cores + "ethrex_max_mem": 8192, # 8GB + "ethrex_max_cpu": 2000, # 2 cores }, "devnets": { "geth_max_mem": 4096, # 4GB @@ -348,8 +348,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 1000, # 1 core "grandine_max_mem": 4096, # 4GB "grandine_max_cpu": 1000, # 1 core - "ethereumrust_max_mem": 4096, # 4GB - "ethereumrust_max_cpu": 1000, # 1 core + "ethrex_max_mem": 4096, # 4GB + "ethrex_max_cpu": 1000, # 1 core }, "ephemery": { "geth_max_mem": 1024, # 1GB @@ -378,8 +378,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 1000, # 1 core "grandine_max_mem": 1024, # 1GB "grandine_max_cpu": 1000, # 1 core - "ethereumrust_max_mem": 1024, # 1GB - "ethereumrust_max_cpu": 1000, # 1 core + "ethrex_max_mem": 1024, # 1GB + "ethrex_max_cpu": 1000, # 1 core }, "kurtosis": { "geth_max_mem": 1024, # 1GB @@ -408,7 +408,7 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 1000, # 1 core "grandine_max_mem": 2048, # 2GB "grandine_max_cpu": 1000, # 1 core - "ethereumrust_max_mem": 1024, # 1GB - "ethereumrust_max_cpu": 1000, # 1 core + "ethrex_max_mem": 1024, # 1GB + "ethrex_max_cpu": 1000, # 1 core }, } diff --git a/src/package_io/input_parser.star b/src/package_io/input_parser.star index 299872d0f..0b686ab0d 100644 --- a/src/package_io/input_parser.star +++ b/src/package_io/input_parser.star @@ -12,7 +12,7 @@ DEFAULT_EL_IMAGES = { "reth": "ghcr.io/paradigmxyz/reth", "ethereumjs": "ethpandaops/ethereumjs:master", "nimbus": "ethpandaops/nimbus-eth1:master", - "ethereumrust": "ethereum_rust:latest", + "ethrex": "ethrex:latest", } DEFAULT_CL_IMAGES = { From fe7075ab7307e629f1c88f47f339ee1fe760c369 Mon Sep 17 00:00:00 2001 From: ricomateo Date: Thu, 27 Jun 2024 16:05:48 -0300 Subject: [PATCH 06/13] uncomment stuff related to genesis and kurtosis bootnodes --- src/el/ethrex/ethrex_launcher.star | 46 +++++++++++++++--------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/el/ethrex/ethrex_launcher.star b/src/el/ethrex/ethrex_launcher.star index 2ab4c4104..95b6b3664 100644 --- a/src/el/ethrex/ethrex_launcher.star +++ b/src/el/ethrex/ethrex_launcher.star @@ -197,11 +197,11 @@ def get_config( "ethrex", # "-{0}".format(verbosity_level), # "--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, - # "--network={0}".format( - # network - # if network in constants.PUBLIC_NETWORKS - # else constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json" - # ), + "--network={0}".format( + network + if network in constants.PUBLIC_NETWORKS + else constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json" + ), # "--http", "--http.port={0}".format(RPC_PORT_NUM), "--http.addr=0.0.0.0", @@ -221,24 +221,24 @@ def get_config( # "--metrics=0.0.0.0:{0}".format(METRICS_PORT_NUM), # "--discovery.port={0}".format(discovery_port), ] - # if network == constants.NETWORK_NAME.kurtosis: - # if len(existing_el_clients) > 0: - # cmd.append( - # "--bootnodes=" - # + ",".join( - # [ - # ctx.enode - # for ctx in existing_el_clients[: constants.MAX_ENODE_ENTRIES] - # ] - # ) - # ) - # elif network not in constants.PUBLIC_NETWORKS: - # cmd.append( - # "--bootnodes=" - # + shared_utils.get_devnet_enodes( - # plan, el_cl_genesis_data.files_artifact_uuid - # ) - # ) + if network == constants.NETWORK_NAME.kurtosis: + if len(existing_el_clients) > 0: + cmd.append( + "--bootnodes=" + + ",".join( + [ + ctx.enode + for ctx in existing_el_clients[: constants.MAX_ENODE_ENTRIES] + ] + ) + ) + elif network not in constants.PUBLIC_NETWORKS: + cmd.append( + "--bootnodes=" + + 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 From 9b87e4aba42263402f44ef5cb9288bdbb20a9d84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Wed, 3 Jul 2024 11:52:50 -0300 Subject: [PATCH 07/13] chore: rename ethrex -> ethereum_rust --- src/el/el_launcher.star | 8 ++-- .../ethereum_rust_launcher.star} | 16 ++++---- src/package_io/constants.star | 38 +++++++++---------- src/package_io/input_parser.star | 2 +- 4 files changed, 32 insertions(+), 32 deletions(-) rename src/el/{ethrex/ethrex_launcher.star => ethereum_rust/ethereum_rust_launcher.star} (94%) diff --git a/src/el/el_launcher.star b/src/el/el_launcher.star index 9c4f2dc12..11a231ae8 100644 --- a/src/el/el_launcher.star +++ b/src/el/el_launcher.star @@ -9,7 +9,7 @@ nethermind = import_module("./nethermind/nethermind_launcher.star") reth = import_module("./reth/reth_launcher.star") ethereumjs = import_module("./ethereumjs/ethereumjs_launcher.star") nimbus_eth1 = import_module("./nimbus-eth1/nimbus_launcher.star") -ethrex = import_module("./ethrex/ethrex_launcher.star") +ethereum_rust = import_module("./ethereum_rust/ethereum_rust_launcher.star") def launch( plan, @@ -98,13 +98,13 @@ def launch( ), "launch_method": nimbus_eth1.launch, }, - constants.EL_TYPE.ethrex: { - "launcher": ethrex.new_ethrex_launcher( + constants.EL_TYPE.ethereum_rust: { + "launcher": ethereum_rust.new_ethereum_rust_launcher( el_cl_data, jwt_file, network_params.network, ), - "launch_method": ethrex.launch, + "launch_method": ethereum_rust.launch, }, } diff --git a/src/el/ethrex/ethrex_launcher.star b/src/el/ethereum_rust/ethereum_rust_launcher.star similarity index 94% rename from src/el/ethrex/ethrex_launcher.star rename to src/el/ethereum_rust/ethereum_rust_launcher.star index 95b6b3664..1b99e8c01 100644 --- a/src/el/ethrex/ethrex_launcher.star +++ b/src/el/ethereum_rust/ethereum_rust_launcher.star @@ -93,19 +93,19 @@ def launch( el_max_cpu = ( int(el_max_cpu) if int(el_max_cpu) > 0 - else constants.RAM_CPU_OVERRIDES[network_name]["ethrex_max_cpu"] + else constants.RAM_CPU_OVERRIDES[network_name]["ethereum_rust_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]["ethrex_max_mem"] + else constants.RAM_CPU_OVERRIDES[network_name]["ethereum_rust_max_mem"] ) el_volume_size = ( el_volume_size if int(el_volume_size) > 0 - else constants.VOLUME_SIZE[network_name]["ethrex_volume_size"] + else constants.VOLUME_SIZE[network_name]["ethereum_rust_volume_size"] ) cl_client_name = service_name.split("-")[3] @@ -144,8 +144,8 @@ def launch( ) return el_context.new_el_context( - "ethrex", - "", # ethrex has no enr? + "ethereum_rust", + "", # ethereum_rust has no enr? enode, service.ip_address, RPC_PORT_NUM, @@ -194,7 +194,7 @@ def get_config( used_ports = get_used_ports(discovery_port) cmd = [ - "ethrex", + "ethereum_rust", # "-{0}".format(verbosity_level), # "--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, "--network={0}".format( @@ -281,7 +281,7 @@ def get_config( max_memory=el_max_mem, env_vars=extra_env_vars, labels=shared_utils.label_maker( - constants.EL_TYPE.ethrex, + constants.EL_TYPE.ethereum_rust, constants.CLIENT_TYPES.el, image, cl_client_name, @@ -292,7 +292,7 @@ def get_config( ) -def new_ethrex_launcher(el_cl_genesis_data, jwt_file, network): +def new_ethereum_rust_launcher(el_cl_genesis_data, jwt_file, network): return struct( el_cl_genesis_data=el_cl_genesis_data, jwt_file=jwt_file, diff --git a/src/package_io/constants.star b/src/package_io/constants.star index 09fa45674..70f17a01c 100644 --- a/src/package_io/constants.star +++ b/src/package_io/constants.star @@ -7,7 +7,7 @@ EL_TYPE = struct( reth="reth", ethereumjs="ethereumjs", nimbus="nimbus", - ethrex="ethrex", + ethereum_rust="ethereum_rust", ) CL_TYPE = struct( @@ -146,7 +146,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 500000, # 500GB "lodestar_volume_size": 500000, # 500GB "grandine_volume_size": 500000, # 500GB, - "ethrex_volume_size": 500000, # 500GB + "ethereum_rust_volume_size": 500000, # 500GB }, "sepolia": { "geth_volume_size": 300000, # 300GB @@ -162,7 +162,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 150000, # 150GB "lodestar_volume_size": 150000, # 150GB "grandine_volume_size": 150000, # 150GB, - "ethrex_volume_size": 150000, # 150GB + "ethereum_rust_volume_size": 150000, # 150GB }, "holesky": { "geth_volume_size": 100000, # 100GB @@ -178,7 +178,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 100000, # 100GB "lodestar_volume_size": 100000, # 100GB "grandine_volume_size": 100000, # 100GB, - "ethrex_volume_size": 100000, # 100GB + "ethereum_rust_volume_size": 100000, # 100GB }, "devnets": { "geth_volume_size": 100000, # 100GB @@ -194,7 +194,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 100000, # 100GB "lodestar_volume_size": 100000, # 100GB "grandine_volume_size": 100000, # 100GB, - "ethrex_volume_size": 100000, # 100GB + "ethereum_rust_volume_size": 100000, # 100GB }, "ephemery": { "geth_volume_size": 5000, # 5GB @@ -210,7 +210,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 1000, # 1GB "lodestar_volume_size": 1000, # 1GB "grandine_volume_size": 1000, # 1GB - "ethrex_volume_size": 1000, # 1GB + "ethereum_rust_volume_size": 1000, # 1GB }, "kurtosis": { "geth_volume_size": 5000, # 5GB @@ -226,7 +226,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 1000, # 1GB "lodestar_volume_size": 1000, # 1GB "grandine_volume_size": 1000, # 1GB - "ethrex_volume_size": 1000, # 1GB + "ethereum_rust_volume_size": 1000, # 1GB }, } @@ -258,8 +258,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 4000, # 4 cores "grandine_max_mem": 16384, # 16GB "grandine_max_cpu": 4000, # 4 cores - "ethrex_max_mem": 16384, # 16GB - "ethrex_max_cpu": 4000, # 4 cores + "ethereum_rust_max_mem": 16384, # 16GB + "ethereum_rust_max_cpu": 4000, # 4 cores }, "sepolia": { "geth_max_mem": 4096, # 4GB @@ -288,8 +288,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 1000, # 1 core "grandine_max_mem": 4096, # 4GB "grandine_max_cpu": 1000, # 1 core - "ethrex_max_mem": 4096, # 4GB - "ethrex_max_cpu": 1000, # 1 core + "ethereum_rust_max_mem": 4096, # 4GB + "ethereum_rust_max_cpu": 1000, # 1 core }, "holesky": { "geth_max_mem": 8192, # 8GB @@ -318,8 +318,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 2000, # 2 cores "grandine_max_mem": 8192, # 8GB "grandine_max_cpu": 2000, # 2 cores - "ethrex_max_mem": 8192, # 8GB - "ethrex_max_cpu": 2000, # 2 cores + "ethereum_rust_max_mem": 8192, # 8GB + "ethereum_rust_max_cpu": 2000, # 2 cores }, "devnets": { "geth_max_mem": 4096, # 4GB @@ -348,8 +348,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 1000, # 1 core "grandine_max_mem": 4096, # 4GB "grandine_max_cpu": 1000, # 1 core - "ethrex_max_mem": 4096, # 4GB - "ethrex_max_cpu": 1000, # 1 core + "ethereum_rust_max_mem": 4096, # 4GB + "ethereum_rust_max_cpu": 1000, # 1 core }, "ephemery": { "geth_max_mem": 1024, # 1GB @@ -378,8 +378,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 1000, # 1 core "grandine_max_mem": 1024, # 1GB "grandine_max_cpu": 1000, # 1 core - "ethrex_max_mem": 1024, # 1GB - "ethrex_max_cpu": 1000, # 1 core + "ethereum_rust_max_mem": 1024, # 1GB + "ethereum_rust_max_cpu": 1000, # 1 core }, "kurtosis": { "geth_max_mem": 1024, # 1GB @@ -408,7 +408,7 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 1000, # 1 core "grandine_max_mem": 2048, # 2GB "grandine_max_cpu": 1000, # 1 core - "ethrex_max_mem": 1024, # 1GB - "ethrex_max_cpu": 1000, # 1 core + "ethereum_rust_max_mem": 1024, # 1GB + "ethereum_rust_max_cpu": 1000, # 1 core }, } diff --git a/src/package_io/input_parser.star b/src/package_io/input_parser.star index 0b686ab0d..7ac36267c 100644 --- a/src/package_io/input_parser.star +++ b/src/package_io/input_parser.star @@ -12,7 +12,7 @@ DEFAULT_EL_IMAGES = { "reth": "ghcr.io/paradigmxyz/reth", "ethereumjs": "ethpandaops/ethereumjs:master", "nimbus": "ethpandaops/nimbus-eth1:master", - "ethrex": "ethrex:latest", + "ethereum_rust": "ethereum_rust:latest", } DEFAULT_CL_IMAGES = { From efbd64f1121cb1560440ea0258d0bc16799b9ba3 Mon Sep 17 00:00:00 2001 From: Martin Paulucci Date: Wed, 24 Jul 2024 19:50:39 +0200 Subject: [PATCH 08/13] Fix renaming issues. --- src/el/el_launcher.star | 2 +- src/el/ethereum_rust/ethereum_rust_launcher.star | 2 +- src/package_io/constants.star | 2 +- src/package_io/input_parser.star | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/el/el_launcher.star b/src/el/el_launcher.star index 11a231ae8..23d6d07b5 100644 --- a/src/el/el_launcher.star +++ b/src/el/el_launcher.star @@ -98,7 +98,7 @@ def launch( ), "launch_method": nimbus_eth1.launch, }, - constants.EL_TYPE.ethereum_rust: { + constants.EL_TYPE.ethereumrust: { "launcher": ethereum_rust.new_ethereum_rust_launcher( el_cl_data, jwt_file, diff --git a/src/el/ethereum_rust/ethereum_rust_launcher.star b/src/el/ethereum_rust/ethereum_rust_launcher.star index 1b99e8c01..f4d310161 100644 --- a/src/el/ethereum_rust/ethereum_rust_launcher.star +++ b/src/el/ethereum_rust/ethereum_rust_launcher.star @@ -281,7 +281,7 @@ def get_config( max_memory=el_max_mem, env_vars=extra_env_vars, labels=shared_utils.label_maker( - constants.EL_TYPE.ethereum_rust, + constants.EL_TYPE.ethereumrust, constants.CLIENT_TYPES.el, image, cl_client_name, diff --git a/src/package_io/constants.star b/src/package_io/constants.star index 70f17a01c..bbe19f1ae 100644 --- a/src/package_io/constants.star +++ b/src/package_io/constants.star @@ -7,7 +7,7 @@ EL_TYPE = struct( reth="reth", ethereumjs="ethereumjs", nimbus="nimbus", - ethereum_rust="ethereum_rust", + ethereumrust="ethereumrust", ) CL_TYPE = struct( diff --git a/src/package_io/input_parser.star b/src/package_io/input_parser.star index 7ac36267c..299872d0f 100644 --- a/src/package_io/input_parser.star +++ b/src/package_io/input_parser.star @@ -12,7 +12,7 @@ DEFAULT_EL_IMAGES = { "reth": "ghcr.io/paradigmxyz/reth", "ethereumjs": "ethpandaops/ethereumjs:master", "nimbus": "ethpandaops/nimbus-eth1:master", - "ethereum_rust": "ethereum_rust:latest", + "ethereumrust": "ethereum_rust:latest", } DEFAULT_CL_IMAGES = { From 2f5664af4f2d288f8f5894dfe6f506e16a6ed9bb Mon Sep 17 00:00:00 2001 From: fmoletta Date: Mon, 12 Aug 2024 17:49:25 -0300 Subject: [PATCH 09/13] Add datadir arg --- src/el/ethereum_rust/ethereum_rust_launcher.star | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/el/ethereum_rust/ethereum_rust_launcher.star b/src/el/ethereum_rust/ethereum_rust_launcher.star index f4d310161..b484511f6 100644 --- a/src/el/ethereum_rust/ethereum_rust_launcher.star +++ b/src/el/ethereum_rust/ethereum_rust_launcher.star @@ -25,6 +25,7 @@ METRICS_PORT_ID = "metrics" # Paths METRICS_PATH = "/metrics" +EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/data/ethereum_rust/execution-data" def get_used_ports(discovery_port=DISCOVERY_PORT_NUM): used_ports = { @@ -196,7 +197,7 @@ def get_config( cmd = [ "ethereum_rust", # "-{0}".format(verbosity_level), - # "--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, + "--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, "--network={0}".format( network if network in constants.PUBLIC_NETWORKS From d8aeb508b69a3006c7c3939eac7837c983d35885 Mon Sep 17 00:00:00 2001 From: Vicente Vieytes Date: Fri, 23 Aug 2024 15:13:23 -0300 Subject: [PATCH 10/13] pass jwt secret to client --- src/el/ethereum_rust/ethereum_rust_launcher.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/el/ethereum_rust/ethereum_rust_launcher.star b/src/el/ethereum_rust/ethereum_rust_launcher.star index b484511f6..1c3c59448 100644 --- a/src/el/ethereum_rust/ethereum_rust_launcher.star +++ b/src/el/ethereum_rust/ethereum_rust_launcher.star @@ -217,7 +217,7 @@ def get_config( # "--ws.origins=*", # "--nat=extip:" + port_publisher.nat_exit_ip, "--authrpc.port={0}".format(ENGINE_RPC_PORT_NUM), - # "--authrpc.jwtsecret=" + constants.JWT_MOUNT_PATH_ON_CONTAINER, + "--authrpc.jwtsecret=" + constants.JWT_MOUNT_PATH_ON_CONTAINER, "--authrpc.addr=0.0.0.0", # "--metrics=0.0.0.0:{0}".format(METRICS_PORT_NUM), # "--discovery.port={0}".format(discovery_port), From 811581ee8ab42639e4e9ef7c1197041689bfdfd1 Mon Sep 17 00:00:00 2001 From: Rodrigo Oliveri Date: Wed, 23 Oct 2024 10:43:49 -0300 Subject: [PATCH 11/13] Point to the correct repo in kurtosis.yml (needed for assertoor) --- kurtosis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kurtosis.yml b/kurtosis.yml index c34fd2c49..0dfc6084d 100644 --- a/kurtosis.yml +++ b/kurtosis.yml @@ -1 +1 @@ -name: "github.com/kurtosis-tech/ethereum-package" +name: "github.com/lambdaclass/ethereum-package" From e1eeed0cec0b15b1b6629775e8270e2d72c10450 Mon Sep 17 00:00:00 2001 From: Javier Chatruc Date: Wed, 20 Nov 2024 12:35:20 -0300 Subject: [PATCH 12/13] Rename to ethrex --- src/el/el_launcher.star | 8 ++-- .../ethereum_rust/ethereum_rust_launcher.star | 18 ++++----- src/package_io/constants.star | 38 +++++++++---------- src/package_io/input_parser.star | 2 +- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/el/el_launcher.star b/src/el/el_launcher.star index 23d6d07b5..9c4f2dc12 100644 --- a/src/el/el_launcher.star +++ b/src/el/el_launcher.star @@ -9,7 +9,7 @@ nethermind = import_module("./nethermind/nethermind_launcher.star") reth = import_module("./reth/reth_launcher.star") ethereumjs = import_module("./ethereumjs/ethereumjs_launcher.star") nimbus_eth1 = import_module("./nimbus-eth1/nimbus_launcher.star") -ethereum_rust = import_module("./ethereum_rust/ethereum_rust_launcher.star") +ethrex = import_module("./ethrex/ethrex_launcher.star") def launch( plan, @@ -98,13 +98,13 @@ def launch( ), "launch_method": nimbus_eth1.launch, }, - constants.EL_TYPE.ethereumrust: { - "launcher": ethereum_rust.new_ethereum_rust_launcher( + constants.EL_TYPE.ethrex: { + "launcher": ethrex.new_ethrex_launcher( el_cl_data, jwt_file, network_params.network, ), - "launch_method": ethereum_rust.launch, + "launch_method": ethrex.launch, }, } diff --git a/src/el/ethereum_rust/ethereum_rust_launcher.star b/src/el/ethereum_rust/ethereum_rust_launcher.star index 1c3c59448..4ef105187 100644 --- a/src/el/ethereum_rust/ethereum_rust_launcher.star +++ b/src/el/ethereum_rust/ethereum_rust_launcher.star @@ -25,7 +25,7 @@ METRICS_PORT_ID = "metrics" # Paths METRICS_PATH = "/metrics" -EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/data/ethereum_rust/execution-data" +EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/data/ethrex/execution-data" def get_used_ports(discovery_port=DISCOVERY_PORT_NUM): used_ports = { @@ -94,19 +94,19 @@ def launch( el_max_cpu = ( int(el_max_cpu) if int(el_max_cpu) > 0 - else constants.RAM_CPU_OVERRIDES[network_name]["ethereum_rust_max_cpu"] + else constants.RAM_CPU_OVERRIDES[network_name]["ethrex_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]["ethereum_rust_max_mem"] + else constants.RAM_CPU_OVERRIDES[network_name]["ethrex_max_mem"] ) el_volume_size = ( el_volume_size if int(el_volume_size) > 0 - else constants.VOLUME_SIZE[network_name]["ethereum_rust_volume_size"] + else constants.VOLUME_SIZE[network_name]["ethrex_volume_size"] ) cl_client_name = service_name.split("-")[3] @@ -145,8 +145,8 @@ def launch( ) return el_context.new_el_context( - "ethereum_rust", - "", # ethereum_rust has no enr? + "ethrex", + "", # ethrex has no enr? enode, service.ip_address, RPC_PORT_NUM, @@ -195,7 +195,7 @@ def get_config( used_ports = get_used_ports(discovery_port) cmd = [ - "ethereum_rust", + "ethrex", # "-{0}".format(verbosity_level), "--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, "--network={0}".format( @@ -282,7 +282,7 @@ def get_config( max_memory=el_max_mem, env_vars=extra_env_vars, labels=shared_utils.label_maker( - constants.EL_TYPE.ethereumrust, + constants.EL_TYPE.ethrex, constants.CLIENT_TYPES.el, image, cl_client_name, @@ -293,7 +293,7 @@ def get_config( ) -def new_ethereum_rust_launcher(el_cl_genesis_data, jwt_file, network): +def new_ethrex_launcher(el_cl_genesis_data, jwt_file, network): return struct( el_cl_genesis_data=el_cl_genesis_data, jwt_file=jwt_file, diff --git a/src/package_io/constants.star b/src/package_io/constants.star index bbe19f1ae..09fa45674 100644 --- a/src/package_io/constants.star +++ b/src/package_io/constants.star @@ -7,7 +7,7 @@ EL_TYPE = struct( reth="reth", ethereumjs="ethereumjs", nimbus="nimbus", - ethereumrust="ethereumrust", + ethrex="ethrex", ) CL_TYPE = struct( @@ -146,7 +146,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 500000, # 500GB "lodestar_volume_size": 500000, # 500GB "grandine_volume_size": 500000, # 500GB, - "ethereum_rust_volume_size": 500000, # 500GB + "ethrex_volume_size": 500000, # 500GB }, "sepolia": { "geth_volume_size": 300000, # 300GB @@ -162,7 +162,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 150000, # 150GB "lodestar_volume_size": 150000, # 150GB "grandine_volume_size": 150000, # 150GB, - "ethereum_rust_volume_size": 150000, # 150GB + "ethrex_volume_size": 150000, # 150GB }, "holesky": { "geth_volume_size": 100000, # 100GB @@ -178,7 +178,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 100000, # 100GB "lodestar_volume_size": 100000, # 100GB "grandine_volume_size": 100000, # 100GB, - "ethereum_rust_volume_size": 100000, # 100GB + "ethrex_volume_size": 100000, # 100GB }, "devnets": { "geth_volume_size": 100000, # 100GB @@ -194,7 +194,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 100000, # 100GB "lodestar_volume_size": 100000, # 100GB "grandine_volume_size": 100000, # 100GB, - "ethereum_rust_volume_size": 100000, # 100GB + "ethrex_volume_size": 100000, # 100GB }, "ephemery": { "geth_volume_size": 5000, # 5GB @@ -210,7 +210,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 1000, # 1GB "lodestar_volume_size": 1000, # 1GB "grandine_volume_size": 1000, # 1GB - "ethereum_rust_volume_size": 1000, # 1GB + "ethrex_volume_size": 1000, # 1GB }, "kurtosis": { "geth_volume_size": 5000, # 5GB @@ -226,7 +226,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 1000, # 1GB "lodestar_volume_size": 1000, # 1GB "grandine_volume_size": 1000, # 1GB - "ethereum_rust_volume_size": 1000, # 1GB + "ethrex_volume_size": 1000, # 1GB }, } @@ -258,8 +258,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 4000, # 4 cores "grandine_max_mem": 16384, # 16GB "grandine_max_cpu": 4000, # 4 cores - "ethereum_rust_max_mem": 16384, # 16GB - "ethereum_rust_max_cpu": 4000, # 4 cores + "ethrex_max_mem": 16384, # 16GB + "ethrex_max_cpu": 4000, # 4 cores }, "sepolia": { "geth_max_mem": 4096, # 4GB @@ -288,8 +288,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 1000, # 1 core "grandine_max_mem": 4096, # 4GB "grandine_max_cpu": 1000, # 1 core - "ethereum_rust_max_mem": 4096, # 4GB - "ethereum_rust_max_cpu": 1000, # 1 core + "ethrex_max_mem": 4096, # 4GB + "ethrex_max_cpu": 1000, # 1 core }, "holesky": { "geth_max_mem": 8192, # 8GB @@ -318,8 +318,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 2000, # 2 cores "grandine_max_mem": 8192, # 8GB "grandine_max_cpu": 2000, # 2 cores - "ethereum_rust_max_mem": 8192, # 8GB - "ethereum_rust_max_cpu": 2000, # 2 cores + "ethrex_max_mem": 8192, # 8GB + "ethrex_max_cpu": 2000, # 2 cores }, "devnets": { "geth_max_mem": 4096, # 4GB @@ -348,8 +348,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 1000, # 1 core "grandine_max_mem": 4096, # 4GB "grandine_max_cpu": 1000, # 1 core - "ethereum_rust_max_mem": 4096, # 4GB - "ethereum_rust_max_cpu": 1000, # 1 core + "ethrex_max_mem": 4096, # 4GB + "ethrex_max_cpu": 1000, # 1 core }, "ephemery": { "geth_max_mem": 1024, # 1GB @@ -378,8 +378,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 1000, # 1 core "grandine_max_mem": 1024, # 1GB "grandine_max_cpu": 1000, # 1 core - "ethereum_rust_max_mem": 1024, # 1GB - "ethereum_rust_max_cpu": 1000, # 1 core + "ethrex_max_mem": 1024, # 1GB + "ethrex_max_cpu": 1000, # 1 core }, "kurtosis": { "geth_max_mem": 1024, # 1GB @@ -408,7 +408,7 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 1000, # 1 core "grandine_max_mem": 2048, # 2GB "grandine_max_cpu": 1000, # 1 core - "ethereum_rust_max_mem": 1024, # 1GB - "ethereum_rust_max_cpu": 1000, # 1 core + "ethrex_max_mem": 1024, # 1GB + "ethrex_max_cpu": 1000, # 1 core }, } diff --git a/src/package_io/input_parser.star b/src/package_io/input_parser.star index 299872d0f..0b686ab0d 100644 --- a/src/package_io/input_parser.star +++ b/src/package_io/input_parser.star @@ -12,7 +12,7 @@ DEFAULT_EL_IMAGES = { "reth": "ghcr.io/paradigmxyz/reth", "ethereumjs": "ethpandaops/ethereumjs:master", "nimbus": "ethpandaops/nimbus-eth1:master", - "ethereumrust": "ethereum_rust:latest", + "ethrex": "ethrex:latest", } DEFAULT_CL_IMAGES = { From 8c74c7c3c97afeed3830b66134bfdb75322a5d55 Mon Sep 17 00:00:00 2001 From: Javier Chatruc Date: Wed, 20 Nov 2024 12:35:59 -0300 Subject: [PATCH 13/13] Revert "Rename to ethrex" This reverts commit e1eeed0cec0b15b1b6629775e8270e2d72c10450. --- src/el/el_launcher.star | 8 ++-- .../ethereum_rust/ethereum_rust_launcher.star | 18 ++++----- src/package_io/constants.star | 38 +++++++++---------- src/package_io/input_parser.star | 2 +- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/el/el_launcher.star b/src/el/el_launcher.star index 9c4f2dc12..23d6d07b5 100644 --- a/src/el/el_launcher.star +++ b/src/el/el_launcher.star @@ -9,7 +9,7 @@ nethermind = import_module("./nethermind/nethermind_launcher.star") reth = import_module("./reth/reth_launcher.star") ethereumjs = import_module("./ethereumjs/ethereumjs_launcher.star") nimbus_eth1 = import_module("./nimbus-eth1/nimbus_launcher.star") -ethrex = import_module("./ethrex/ethrex_launcher.star") +ethereum_rust = import_module("./ethereum_rust/ethereum_rust_launcher.star") def launch( plan, @@ -98,13 +98,13 @@ def launch( ), "launch_method": nimbus_eth1.launch, }, - constants.EL_TYPE.ethrex: { - "launcher": ethrex.new_ethrex_launcher( + constants.EL_TYPE.ethereumrust: { + "launcher": ethereum_rust.new_ethereum_rust_launcher( el_cl_data, jwt_file, network_params.network, ), - "launch_method": ethrex.launch, + "launch_method": ethereum_rust.launch, }, } diff --git a/src/el/ethereum_rust/ethereum_rust_launcher.star b/src/el/ethereum_rust/ethereum_rust_launcher.star index 4ef105187..1c3c59448 100644 --- a/src/el/ethereum_rust/ethereum_rust_launcher.star +++ b/src/el/ethereum_rust/ethereum_rust_launcher.star @@ -25,7 +25,7 @@ METRICS_PORT_ID = "metrics" # Paths METRICS_PATH = "/metrics" -EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/data/ethrex/execution-data" +EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/data/ethereum_rust/execution-data" def get_used_ports(discovery_port=DISCOVERY_PORT_NUM): used_ports = { @@ -94,19 +94,19 @@ def launch( el_max_cpu = ( int(el_max_cpu) if int(el_max_cpu) > 0 - else constants.RAM_CPU_OVERRIDES[network_name]["ethrex_max_cpu"] + else constants.RAM_CPU_OVERRIDES[network_name]["ethereum_rust_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]["ethrex_max_mem"] + else constants.RAM_CPU_OVERRIDES[network_name]["ethereum_rust_max_mem"] ) el_volume_size = ( el_volume_size if int(el_volume_size) > 0 - else constants.VOLUME_SIZE[network_name]["ethrex_volume_size"] + else constants.VOLUME_SIZE[network_name]["ethereum_rust_volume_size"] ) cl_client_name = service_name.split("-")[3] @@ -145,8 +145,8 @@ def launch( ) return el_context.new_el_context( - "ethrex", - "", # ethrex has no enr? + "ethereum_rust", + "", # ethereum_rust has no enr? enode, service.ip_address, RPC_PORT_NUM, @@ -195,7 +195,7 @@ def get_config( used_ports = get_used_ports(discovery_port) cmd = [ - "ethrex", + "ethereum_rust", # "-{0}".format(verbosity_level), "--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, "--network={0}".format( @@ -282,7 +282,7 @@ def get_config( max_memory=el_max_mem, env_vars=extra_env_vars, labels=shared_utils.label_maker( - constants.EL_TYPE.ethrex, + constants.EL_TYPE.ethereumrust, constants.CLIENT_TYPES.el, image, cl_client_name, @@ -293,7 +293,7 @@ def get_config( ) -def new_ethrex_launcher(el_cl_genesis_data, jwt_file, network): +def new_ethereum_rust_launcher(el_cl_genesis_data, jwt_file, network): return struct( el_cl_genesis_data=el_cl_genesis_data, jwt_file=jwt_file, diff --git a/src/package_io/constants.star b/src/package_io/constants.star index 09fa45674..bbe19f1ae 100644 --- a/src/package_io/constants.star +++ b/src/package_io/constants.star @@ -7,7 +7,7 @@ EL_TYPE = struct( reth="reth", ethereumjs="ethereumjs", nimbus="nimbus", - ethrex="ethrex", + ethereumrust="ethereumrust", ) CL_TYPE = struct( @@ -146,7 +146,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 500000, # 500GB "lodestar_volume_size": 500000, # 500GB "grandine_volume_size": 500000, # 500GB, - "ethrex_volume_size": 500000, # 500GB + "ethereum_rust_volume_size": 500000, # 500GB }, "sepolia": { "geth_volume_size": 300000, # 300GB @@ -162,7 +162,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 150000, # 150GB "lodestar_volume_size": 150000, # 150GB "grandine_volume_size": 150000, # 150GB, - "ethrex_volume_size": 150000, # 150GB + "ethereum_rust_volume_size": 150000, # 150GB }, "holesky": { "geth_volume_size": 100000, # 100GB @@ -178,7 +178,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 100000, # 100GB "lodestar_volume_size": 100000, # 100GB "grandine_volume_size": 100000, # 100GB, - "ethrex_volume_size": 100000, # 100GB + "ethereum_rust_volume_size": 100000, # 100GB }, "devnets": { "geth_volume_size": 100000, # 100GB @@ -194,7 +194,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 100000, # 100GB "lodestar_volume_size": 100000, # 100GB "grandine_volume_size": 100000, # 100GB, - "ethrex_volume_size": 100000, # 100GB + "ethereum_rust_volume_size": 100000, # 100GB }, "ephemery": { "geth_volume_size": 5000, # 5GB @@ -210,7 +210,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 1000, # 1GB "lodestar_volume_size": 1000, # 1GB "grandine_volume_size": 1000, # 1GB - "ethrex_volume_size": 1000, # 1GB + "ethereum_rust_volume_size": 1000, # 1GB }, "kurtosis": { "geth_volume_size": 5000, # 5GB @@ -226,7 +226,7 @@ VOLUME_SIZE = { "nimbus_volume_size": 1000, # 1GB "lodestar_volume_size": 1000, # 1GB "grandine_volume_size": 1000, # 1GB - "ethrex_volume_size": 1000, # 1GB + "ethereum_rust_volume_size": 1000, # 1GB }, } @@ -258,8 +258,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 4000, # 4 cores "grandine_max_mem": 16384, # 16GB "grandine_max_cpu": 4000, # 4 cores - "ethrex_max_mem": 16384, # 16GB - "ethrex_max_cpu": 4000, # 4 cores + "ethereum_rust_max_mem": 16384, # 16GB + "ethereum_rust_max_cpu": 4000, # 4 cores }, "sepolia": { "geth_max_mem": 4096, # 4GB @@ -288,8 +288,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 1000, # 1 core "grandine_max_mem": 4096, # 4GB "grandine_max_cpu": 1000, # 1 core - "ethrex_max_mem": 4096, # 4GB - "ethrex_max_cpu": 1000, # 1 core + "ethereum_rust_max_mem": 4096, # 4GB + "ethereum_rust_max_cpu": 1000, # 1 core }, "holesky": { "geth_max_mem": 8192, # 8GB @@ -318,8 +318,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 2000, # 2 cores "grandine_max_mem": 8192, # 8GB "grandine_max_cpu": 2000, # 2 cores - "ethrex_max_mem": 8192, # 8GB - "ethrex_max_cpu": 2000, # 2 cores + "ethereum_rust_max_mem": 8192, # 8GB + "ethereum_rust_max_cpu": 2000, # 2 cores }, "devnets": { "geth_max_mem": 4096, # 4GB @@ -348,8 +348,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 1000, # 1 core "grandine_max_mem": 4096, # 4GB "grandine_max_cpu": 1000, # 1 core - "ethrex_max_mem": 4096, # 4GB - "ethrex_max_cpu": 1000, # 1 core + "ethereum_rust_max_mem": 4096, # 4GB + "ethereum_rust_max_cpu": 1000, # 1 core }, "ephemery": { "geth_max_mem": 1024, # 1GB @@ -378,8 +378,8 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 1000, # 1 core "grandine_max_mem": 1024, # 1GB "grandine_max_cpu": 1000, # 1 core - "ethrex_max_mem": 1024, # 1GB - "ethrex_max_cpu": 1000, # 1 core + "ethereum_rust_max_mem": 1024, # 1GB + "ethereum_rust_max_cpu": 1000, # 1 core }, "kurtosis": { "geth_max_mem": 1024, # 1GB @@ -408,7 +408,7 @@ RAM_CPU_OVERRIDES = { "lodestar_max_cpu": 1000, # 1 core "grandine_max_mem": 2048, # 2GB "grandine_max_cpu": 1000, # 1 core - "ethrex_max_mem": 1024, # 1GB - "ethrex_max_cpu": 1000, # 1 core + "ethereum_rust_max_mem": 1024, # 1GB + "ethereum_rust_max_cpu": 1000, # 1 core }, } diff --git a/src/package_io/input_parser.star b/src/package_io/input_parser.star index 0b686ab0d..299872d0f 100644 --- a/src/package_io/input_parser.star +++ b/src/package_io/input_parser.star @@ -12,7 +12,7 @@ DEFAULT_EL_IMAGES = { "reth": "ghcr.io/paradigmxyz/reth", "ethereumjs": "ethpandaops/ethereumjs:master", "nimbus": "ethpandaops/nimbus-eth1:master", - "ethrex": "ethrex:latest", + "ethereumrust": "ethereum_rust:latest", } DEFAULT_CL_IMAGES = {