Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions main.star
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/cl/hildr/launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/cl/launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def launch(
cl_contexts,
signer_context,
l1_config_env_vars,
l1_chain_config_artifact,
log_level,
persistent,
tolerations,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
25 changes: 18 additions & 7 deletions src/cl/op-node/launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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,
)

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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,
}

Expand Down Expand Up @@ -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="
Expand Down
5 changes: 5 additions & 0 deletions src/l2/launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def launch(
jwt_file,
deployment_output,
l1_config_env_vars,
l1_chain_config_artifact,
l1_rpc_url,
log_level,
persistent,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -254,6 +257,7 @@ def _launch_sidecar_maybe(
jwt_file,
deployment_output,
l1_config_env_vars,
l1_chain_config_artifact,
log_level,
persistent,
tolerations,
Expand Down Expand Up @@ -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,
Expand Down
5 changes: 5 additions & 0 deletions test/cl/launcher_test.star
Original file line number Diff line number Diff line change
Expand Up @@ -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=[],
Expand Down Expand Up @@ -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=[],
Expand Down Expand Up @@ -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=[],
Expand Down Expand Up @@ -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=[],
Expand Down Expand Up @@ -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=[],
Expand Down