From 439c5d0a2f4e08d4b98e17fec941f62568187a44 Mon Sep 17 00:00:00 2001 From: Yohei Yamaguchi Date: Mon, 19 Jan 2026 02:40:12 -0800 Subject: [PATCH] fix: create l1-chain-config artifact and wire to op-node (#404) --- main.star | 11 +++++++++++ src/cl/hildr/launcher.star | 1 + src/cl/launcher.star | 3 +++ src/cl/op-node/launcher.star | 25 ++++++++++++++++++------- src/l2/launcher.star | 5 +++++ test/cl/launcher_test.star | 5 +++++ 6 files changed, 43 insertions(+), 7 deletions(-) diff --git a/main.star b/main.star index fdf5a910..51da635b 100644 --- a/main.star +++ b/main.star @@ -65,6 +65,7 @@ def run(plan, args={}): # Deploy the L1 l1_network = "" + l1_chain_config_artifact = None if external_l1_args: plan.print("Using external L1") plan.print(external_l1_args) @@ -100,6 +101,15 @@ def run(plan, args={}): ) plan.print("Waiting for L1 to start up") wait_for_sync.wait_for_startup(plan, l1_config_env_vars) + # op-node v1.16.1+ requires a chain config file for local L1s. + l1_chain_config_artifact = plan.run_sh( + name="sanitize-l1-chain-config", + description="Prepare L1 chain config for op-node", + image=util.DEPLOYMENT_UTILS_IMAGE, + files={"/network-configs": "el_cl_genesis_data"}, + store=[StoreSpec(src="/out", name="l1-chain-config")], + run="mkdir -p /out && jq '.config | del(.terminalTotalDifficultyPassed)' /network-configs/genesis.json > /out/l1-chain-config.json", + ).files_artifacts[0] deployment_output = contract_deployer.deploy_contracts( plan, @@ -144,6 +154,7 @@ def run(plan, args={}): jwt_file=jwt_file, l1_config_env_vars=l1_config_env_vars, deployment_output=deployment_output, + l1_chain_config_artifact=l1_chain_config_artifact, node_selectors=global_node_selectors, observability_helper=observability_helper, l1_rpc_url=l1_rpc_url, diff --git a/src/cl/hildr/launcher.star b/src/cl/hildr/launcher.star index 91e49e4c..6635aad0 100644 --- a/src/cl/hildr/launcher.star +++ b/src/cl/hildr/launcher.star @@ -50,6 +50,7 @@ def launch( cl_contexts, l1_config_env_vars, observability_helper, + l1_chain_config_artifact=None, ): cl_log_level = _ethereum_package_input_parser.get_client_log_level_or_default( params.log_level, log_level, VERBOSITY_LEVELS diff --git a/src/cl/launcher.star b/src/cl/launcher.star index 061e76dc..a12827b6 100644 --- a/src/cl/launcher.star +++ b/src/cl/launcher.star @@ -20,6 +20,7 @@ def launch( cl_contexts, signer_context, l1_config_env_vars, + l1_chain_config_artifact, log_level, persistent, tolerations, @@ -46,6 +47,7 @@ def launch( el_context=el_context, cl_contexts=cl_contexts, l1_config_env_vars=l1_config_env_vars, + l1_chain_config_artifact=l1_chain_config_artifact, log_level=log_level, persistent=persistent, tolerations=tolerations, @@ -85,6 +87,7 @@ def launch( el_context=el_context, cl_contexts=cl_contexts, l1_config_env_vars=l1_config_env_vars, + l1_chain_config_artifact=l1_chain_config_artifact, log_level=log_level, persistent=persistent, tolerations=tolerations, diff --git a/src/cl/op-node/launcher.star b/src/cl/op-node/launcher.star index a62312db..1e94156b 100644 --- a/src/cl/op-node/launcher.star +++ b/src/cl/op-node/launcher.star @@ -50,6 +50,7 @@ def launch( el_context, cl_contexts, l1_config_env_vars, + l1_chain_config_artifact, observability_helper, ): beacon_node_identity_recipe = PostHttpRequestRecipe( @@ -95,6 +96,7 @@ def launch( el_context=el_context, cl_contexts=cl_contexts, l1_config_env_vars=l1_config_env_vars, + l1_chain_config_artifact=l1_chain_config_artifact, observability_helper=observability_helper, ) @@ -147,6 +149,7 @@ def get_service_config( el_context, cl_contexts, l1_config_env_vars, + l1_chain_config_artifact, observability_helper, ): ports = _net.ports_to_port_specs(params.ports) @@ -197,15 +200,16 @@ def get_service_config( # configure files + genesis_artifacts = [deployment_output] + if l1_chain_config_artifact: + genesis_artifacts.append(l1_chain_config_artifact) + if supervisor_params: + genesis_artifacts.append(supervisor_params.superchain.dependency_set.name) + files = { _ethereum_package_constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: Directory( - artifact_names=[ - deployment_output, - supervisor_params.superchain.dependency_set.name, - ] - ) - if supervisor_params - else deployment_output, + artifact_names=genesis_artifacts + ), _ethereum_package_constants.JWT_MOUNTPOINT_ON_CLIENTS: jwt_file, } @@ -275,6 +279,13 @@ def get_service_config( "--sequencer.stopped=true", ] + if l1_chain_config_artifact: + cmd.append( + "--rollup.l1-chain-config={0}/l1-chain-config.json".format( + _ethereum_package_constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS + ) + ) + if len(cl_contexts) > 0: cmd.append( "--p2p.bootnodes=" diff --git a/src/l2/launcher.star b/src/l2/launcher.star index bf47d937..5775ea0d 100644 --- a/src/l2/launcher.star +++ b/src/l2/launcher.star @@ -16,6 +16,7 @@ def launch( jwt_file, deployment_output, l1_config_env_vars, + l1_chain_config_artifact, l1_rpc_url, log_level, persistent, @@ -166,6 +167,7 @@ def launch( jwt_file=jwt_file, deployment_output=deployment_output, l1_config_env_vars=l1_config_env_vars, + l1_chain_config_artifact=l1_chain_config_artifact, log_level=log_level, persistent=persistent, tolerations=tolerations, @@ -201,6 +203,7 @@ def launch( jwt_file=jwt_file, deployment_output=deployment_output, l1_config_env_vars=l1_config_env_vars, + l1_chain_config_artifact=l1_chain_config_artifact, log_level=log_level, persistent=persistent, tolerations=tolerations, @@ -254,6 +257,7 @@ def _launch_sidecar_maybe( jwt_file, deployment_output, l1_config_env_vars, + l1_chain_config_artifact, log_level, persistent, tolerations, @@ -349,6 +353,7 @@ def _launch_sidecar_maybe( jwt_file=jwt_file, deployment_output=deployment_output, l1_config_env_vars=l1_config_env_vars, + l1_chain_config_artifact=l1_chain_config_artifact, log_level=log_level, persistent=persistent, tolerations=tolerations, diff --git a/test/cl/launcher_test.star b/test/cl/launcher_test.star index 32b7c267..9e80319e 100644 --- a/test/cl/launcher_test.star +++ b/test/cl/launcher_test.star @@ -67,6 +67,7 @@ def test_l2_participant_cl_launcher_hildr(plan): jwt_file=_default_jwt_file, deployment_output=_default_deployment_output, l1_config_env_vars=_default_l1_config_env_vars, + l1_chain_config_artifact=None, log_level=_default_log_level, persistent=True, tolerations=[], @@ -164,6 +165,7 @@ def test_l2_participant_cl_launcher_kona_node(plan): jwt_file=_default_jwt_file, deployment_output=_default_deployment_output, l1_config_env_vars=_default_l1_config_env_vars, + l1_chain_config_artifact=None, log_level=_default_log_level, persistent=True, tolerations=[], @@ -300,6 +302,7 @@ def test_l2_participant_cl_launcher_kona_node_with_signer(plan): jwt_file=_default_jwt_file, deployment_output=_default_deployment_output, l1_config_env_vars=_default_l1_config_env_vars, + l1_chain_config_artifact=None, log_level=_default_log_level, persistent=True, tolerations=[], @@ -424,6 +427,7 @@ def test_l2_participant_cl_launcher_op_node(plan): jwt_file=_default_jwt_file, deployment_output=_default_deployment_output, l1_config_env_vars=_default_l1_config_env_vars, + l1_chain_config_artifact=None, log_level=_default_log_level, persistent=True, tolerations=[], @@ -542,6 +546,7 @@ def test_l2_participant_cl_launcher_incompatible_conductor(plan): jwt_file=_default_jwt_file, deployment_output=_default_deployment_output, l1_config_env_vars=_default_l1_config_env_vars, + l1_chain_config_artifact=None, log_level=_default_log_level, persistent=True, tolerations=[],