diff --git a/src/cl/op-node/op_node_launcher.star b/src/cl/op-node/op_node_launcher.star index 97c10495..6dd95444 100644 --- a/src/cl/op-node/op_node_launcher.star +++ b/src/cl/op-node/op_node_launcher.star @@ -17,6 +17,7 @@ ethereum_package_input_parser = import_module( constants = import_module("../../package_io/constants.star") util = import_module("../../util.star") +op_supervisor_launcher = import_module("../../supervisor/op-supervisor/op_supervisor_launcher.star") # ---------------------------------- Beacon client ------------------------------------- @@ -73,6 +74,7 @@ def launch( existing_cl_clients, l1_config_env_vars, sequencer_enabled, + interop_params, ): beacon_node_identity_recipe = PostHttpRequestRecipe( endpoint="/", @@ -104,6 +106,7 @@ def launch( l1_config_env_vars, beacon_node_identity_recipe, sequencer_enabled, + interop_params, ) beacon_service = plan.add_service(service_name, config) @@ -148,6 +151,7 @@ def get_beacon_config( l1_config_env_vars, beacon_node_identity_recipe, sequencer_enabled, + interop_params, ): EXECUTION_ENGINE_ENDPOINT = "http://{0}:{1}".format( el_context.ip_addr, @@ -225,7 +229,11 @@ def get_beacon_config( ports = {} ports.update(used_ports) - env_vars = participant.cl_extra_env_vars + env_vars = dict(participant.cl_extra_env_vars) + + if interop_params.enabled: + env_vars["OP_NODE_SUPERVISOR"] = op_supervisor_launcher.SUPERVISOR_ENDPOINT + config_args = { "image": participant.cl_image, "ports": ports, @@ -262,9 +270,15 @@ def get_beacon_config( return ServiceConfig(**config_args) -def new_op_node_launcher(deployment_output, jwt_file, network_params): +def new_op_node_launcher( + deployment_output, + jwt_file, + network_params, + interop_params +): return struct( deployment_output=deployment_output, jwt_file=jwt_file, network_params=network_params, + interop_params=interop_params, ) diff --git a/src/el/op-besu/op_besu_launcher.star b/src/el/op-besu/op_besu_launcher.star index a47571cb..d47dc3d0 100644 --- a/src/el/op-besu/op_besu_launcher.star +++ b/src/el/op-besu/op_besu_launcher.star @@ -105,6 +105,7 @@ def launch( existing_el_clients, sequencer_enabled, sequencer_context, + interop_params, ): log_level = ethereum_package_input_parser.get_client_log_level_or_default( participant.el_log_level, global_log_level, VERBOSITY_LEVELS @@ -275,10 +276,12 @@ def new_op_besu_launcher( jwt_file, network, network_id, + interop_params, ): return struct( deployment_output=deployment_output, jwt_file=jwt_file, network=network, network_id=network_id, + interop_params=interop_params, ) diff --git a/src/el/op-erigon/op_erigon_launcher.star b/src/el/op-erigon/op_erigon_launcher.star index 264985a7..6d67972d 100644 --- a/src/el/op-erigon/op_erigon_launcher.star +++ b/src/el/op-erigon/op_erigon_launcher.star @@ -97,6 +97,7 @@ def launch( existing_el_clients, sequencer_enabled, sequencer_context, + interop_params, ): log_level = ethereum_package_input_parser.get_client_log_level_or_default( participant.el_log_level, global_log_level, VERBOSITY_LEVELS @@ -270,10 +271,12 @@ def new_op_erigon_launcher( jwt_file, network, network_id, + interop_params, ): return struct( deployment_output=deployment_output, jwt_file=jwt_file, network=network, network_id=network_id, + interop_params=interop_params, ) diff --git a/src/el/op-geth/op_geth_launcher.star b/src/el/op-geth/op_geth_launcher.star index 71a64503..710275f8 100644 --- a/src/el/op-geth/op_geth_launcher.star +++ b/src/el/op-geth/op_geth_launcher.star @@ -22,6 +22,7 @@ ethereum_package_constants = import_module( ) constants = import_module("../../package_io/constants.star") +op_supervisor_launcher = import_module("../../supervisor/op-supervisor/op_supervisor_launcher.star") RPC_PORT_NUM = 8545 WS_PORT_NUM = 8546 @@ -104,6 +105,7 @@ def launch( existing_el_clients, sequencer_enabled, sequencer_context, + interop_params ): log_level = ethereum_package_input_parser.get_client_log_level_or_default( participant.el_log_level, global_log_level, VERBOSITY_LEVELS @@ -124,6 +126,7 @@ def launch( cl_client_name, sequencer_enabled, sequencer_context, + interop_params ) service = plan.add_service(service_name, config) @@ -166,6 +169,7 @@ def get_config( cl_client_name, sequencer_enabled, sequencer_context, + interop_params ): init_datadir_cmd_str = "geth init --datadir={0} --state.scheme=hash {1}".format( EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, @@ -248,7 +252,12 @@ def get_config( constants.EL_TYPE.op_geth + "_volume_size" ], ) - env_vars = participant.el_extra_env_vars + + env_vars = dict(participant.cl_extra_env_vars) + + if interop_params.enabled: + env_vars["GETH_ROLLUP_INTEROPRPC"] = op_supervisor_launcher.SUPERVISOR_ENDPOINT + config_args = { "image": participant.el_image, "ports": used_ports, @@ -284,10 +293,12 @@ def new_op_geth_launcher( jwt_file, network, network_id, + interop_params ): return struct( deployment_output=deployment_output, jwt_file=jwt_file, network=network, network_id=network_id, + interop_params=interop_params, ) diff --git a/src/el/op-nethermind/op_nethermind_launcher.star b/src/el/op-nethermind/op_nethermind_launcher.star index 7ff3d466..414fd12f 100644 --- a/src/el/op-nethermind/op_nethermind_launcher.star +++ b/src/el/op-nethermind/op_nethermind_launcher.star @@ -99,6 +99,7 @@ def launch( existing_el_clients, sequencer_enabled, sequencer_context, + interop_params, ): log_level = ethereum_package_input_parser.get_client_log_level_or_default( participant.el_log_level, global_log_level, VERBOSITY_LEVELS @@ -260,10 +261,12 @@ def new_nethermind_launcher( jwt_file, network, network_id, + interop_params, ): return struct( deployment_output=deployment_output, jwt_file=jwt_file, network=network, network_id=network_id, + interop_params=interop_params, ) diff --git a/src/el/op-reth/op_reth_launcher.star b/src/el/op-reth/op_reth_launcher.star index 3b9a8f4f..70211929 100644 --- a/src/el/op-reth/op_reth_launcher.star +++ b/src/el/op-reth/op_reth_launcher.star @@ -94,6 +94,7 @@ def launch( existing_el_clients, sequencer_enabled, sequencer_context, + interop_params, ): log_level = ethereum_package_input_parser.get_client_log_level_or_default( participant.el_log_level, global_log_level, VERBOSITY_LEVELS @@ -257,10 +258,12 @@ def new_op_reth_launcher( jwt_file, network, network_id, + interop_params, ): return struct( deployment_output=deployment_output, jwt_file=jwt_file, network=network, network_id=network_id, + interop_params=interop_params, ) diff --git a/src/el_cl_launcher.star b/src/el_cl_launcher.star index 82d9cc26..4df066e3 100644 --- a/src/el_cl_launcher.star +++ b/src/el_cl_launcher.star @@ -37,6 +37,7 @@ def launch( global_tolerations, persistent, additional_services, + interop_params, ): el_launchers = { "op-geth": { @@ -45,6 +46,7 @@ def launch( jwt_file, network_params.network, network_params.network_id, + interop_params ), "launch_method": op_geth.launch, }, @@ -54,6 +56,7 @@ def launch( jwt_file, network_params.network, network_params.network_id, + interop_params ), "launch_method": op_reth.launch, }, @@ -63,6 +66,7 @@ def launch( jwt_file, network_params.network, network_params.network_id, + interop_params ), "launch_method": op_erigon.launch, }, @@ -72,6 +76,7 @@ def launch( jwt_file, network_params.network, network_params.network_id, + interop_params ), "launch_method": op_nethermind.launch, }, @@ -81,6 +86,7 @@ def launch( jwt_file, network_params.network, network_params.network_id, + interop_params ), "launch_method": op_besu.launch, }, @@ -89,7 +95,7 @@ def launch( cl_launchers = { "op-node": { "launcher": op_node.new_op_node_launcher( - deployment_output, jwt_file, network_params + deployment_output, jwt_file, network_params, interop_params ), "launch_method": op_node.launch, }, @@ -223,6 +229,7 @@ def launch( all_el_contexts, sequencer_enabled, sequencer_context, + interop_params, ) if rollup_boost_enabled: @@ -241,6 +248,7 @@ def launch( all_el_contexts, sequencer_enabled, sequencer_context, + interop_params, ) else: el_builder_context = struct( @@ -282,6 +290,7 @@ def launch( all_cl_contexts, l1_config_env_vars, sequencer_enabled, + interop_params, ) sequencer_enabled = False diff --git a/src/l2.star b/src/l2.star index 44e2ee30..d51669c8 100644 --- a/src/l2.star +++ b/src/l2.star @@ -20,6 +20,7 @@ def launch_l2( global_node_selectors, global_tolerations, persistent, + interop_params, ): network_params = l2_args.network_params batcher_params = l2_args.batcher_params @@ -46,6 +47,7 @@ def launch_l2( global_tolerations, persistent, l2_args.additional_services, + interop_params, ) all_el_contexts = [] diff --git a/src/participant_network.star b/src/participant_network.star index bfba974b..becea639 100644 --- a/src/participant_network.star +++ b/src/participant_network.star @@ -21,6 +21,7 @@ def launch_participant_network( global_tolerations, persistent, additional_services, + interop_params, ): num_participants = len(participants) # First EL and sequencer CL @@ -39,6 +40,7 @@ def launch_participant_network( global_tolerations, persistent, additional_services, + interop_params, ) all_participants = []