diff --git a/main.star b/main.star index e2bb02b7..6f26999a 100644 --- a/main.star +++ b/main.star @@ -108,6 +108,17 @@ def run(plan, args={}): name="op_jwt_file", ) + # TODO We need to create the dependency sets before we launch the chains since + # e.g. op-node now depends on the artifacts to be present + # + # This can easily turn into another dependency cycle which means we might have to introduce yet another layer + # of execution whose sole purpose is to create required artifacts + for superchain_params in optimism_args.superchains: + superchain_launcher.launch( + plan=plan, + params=superchain_params, + ) + l2s = [] for chain in optimism_args.chains: # We filter out the supervisors applicable to this network @@ -138,12 +149,6 @@ def run(plan, args={}): ) ) - for superchain_params in optimism_args.superchains: - superchain_launcher.launch( - plan=plan, - params=superchain_params, - ) - for supervisor_params in optimism_args.supervisors: op_supervisor_launcher.launch( plan=plan, diff --git a/src/cl/op-node/op_node_launcher.star b/src/cl/op-node/op_node_launcher.star index fc406b72..d164ba26 100644 --- a/src/cl/op-node/op_node_launcher.star +++ b/src/cl/op-node/op_node_launcher.star @@ -188,10 +188,19 @@ def get_beacon_config( "--altda.da-server=" + da_server_context.http_url, ] + supervisor_params = _filter.first(supervisors_params) + # configure files files = { - ethereum_package_constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: launcher.deployment_output, + ethereum_package_constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: Directory( + artifact_names=[ + launcher.deployment_output, + supervisor_params.superchain.dependency_set.name, + ] + ) + if supervisor_params + else launcher.deployment_output, ethereum_package_constants.JWT_MOUNTPOINT_ON_CLIENTS: launcher.jwt_file, } @@ -220,7 +229,6 @@ def get_beacon_config( observability.expose_metrics_port(ports) - supervisor_params = _filter.first(supervisors_params) if supervisor_params: interop_rpc_port = supervisor_params.superchain.ports[ _net.INTEROP_RPC_PORT_NAME @@ -232,6 +240,10 @@ def get_beacon_config( "OP_NODE_INTEROP_RPC_ADDR": "0.0.0.0", "OP_NODE_INTEROP_RPC_PORT": str(interop_rpc_port.number), "OP_NODE_INTEROP_JWT_SECRET": ethereum_package_constants.JWT_MOUNT_PATH_ON_CONTAINER, + "OP_NODE_INTEROP_DEPENDENCY_SET": "{0}/{1}".format( + ethereum_package_constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS, + supervisor_params.superchain.dependency_set.path, + ), } ) diff --git a/test/el_cl_launcher_test.star b/test/el_cl_launcher_test.star index addb649d..2a0acb1c 100644 --- a/test/el_cl_launcher_test.star +++ b/test/el_cl_launcher_test.star @@ -328,6 +328,7 @@ def test_launch_with_superchains(plan): "OP_NODE_INTEROP_RPC_ADDR": "0.0.0.0", "OP_NODE_INTEROP_RPC_PORT": "9645", "OP_NODE_INTEROP_JWT_SECRET": "/jwt/jwtsecret", + "OP_NODE_INTEROP_DEPENDENCY_SET": "/network-configs/superchain-depset-superchain0.json", }, ) expect.eq(