From 4aa2e6d2bdfb14d8b64a0c28781cd7f548a20687 Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Thu, 14 Aug 2025 10:47:27 -0700 Subject: [PATCH 01/27] wip: Use ghost L1 to deploy contracts --- main.star | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/main.star b/main.star index 451c68ad..5f7925fc 100644 --- a/main.star +++ b/main.star @@ -101,6 +101,46 @@ def run(plan, args={}): plan.print("Waiting for L1 to start up") wait_for_sync.wait_for_startup(plan, l1_config_env_vars) + # EXPERIMENT + # + # Deploy an l1 with a single node and the lowest blocktime we can get + + plan.print("Deploying a ghost L1") + + ghost_l1 = ethereum_package.run(plan, { + "network_params": { + "seconds_per_slot": 1 + } + }) + + all_ghost_l1_participants = ghost_l1.all_participants + ghost_l1_network_params = ghost_l1.network_params + ghost_l1_network_id = ghost_l1.network_id + ghost_l1_rpc_url = all_ghost_l1_participants[0].el_context.rpc_http_url + ghost_l1_priv_key = ghost_l1.pre_funded_accounts[ + 12 + ].private_key # reserved for L2 contract deployers + ghost_l1_config_env_vars = get_l1_config( + all_ghost_l1_participants, ghost_l1_network_params, ghost_l1_network_id + ) + plan.print("Waiting for ghost L1 to start up") + wait_for_sync.wait_for_startup(plan, ghost_l1_config_env_vars) + + plan.print("Deployed a ghost L1") + plan.print("Deploying contracts on ghost L1") + + ghost_deployment_output = contract_deployer.deploy_contracts( + plan, + ghost_l1_priv_key, + ghost_l1_config_env_vars, + optimism_args, + "local", + altda_deploy_config, + ) + + plan.print("Deployed contracts on ghost L1") + plan.print("Deploying contracts on real L1") + deployment_output = contract_deployer.deploy_contracts( plan, l1_priv_key, @@ -110,6 +150,8 @@ def run(plan, args={}): altda_deploy_config, ) + plan.print("Deployed contracts on real L1") + jwt_file = plan.upload_files( src=ethereum_package_static_files.JWT_PATH_FILEPATH, name="op_jwt_file", From 3478ce8394977624d4d7dc61717255bfcaa9c8dc Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Thu, 14 Aug 2025 10:54:09 -0700 Subject: [PATCH 02/27] fix: Deployer file keys --- main.star | 1 + src/contracts/contract_deployer.star | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/main.star b/main.star index 5f7925fc..4057f96a 100644 --- a/main.star +++ b/main.star @@ -136,6 +136,7 @@ def run(plan, args={}): optimism_args, "local", altda_deploy_config, + key="--ghost" ) plan.print("Deployed contracts on ghost L1") diff --git a/src/contracts/contract_deployer.star b/src/contracts/contract_deployer.star index 68c1e5aa..606e81aa 100644 --- a/src/contracts/contract_deployer.star +++ b/src/contracts/contract_deployer.star @@ -262,7 +262,7 @@ def _build_deployment_intent( def deploy_contracts( - plan, priv_key, l1_config_env_vars, optimism_args, l1_network, altda_args + plan, priv_key, l1_config_env_vars, optimism_args, l1_network, altda_args, key="" ): l2_chain_ids_list = [ str(chain.network_params.network_id) for chain in optimism_args.chains @@ -277,7 +277,7 @@ def deploy_contracts( store=[ StoreSpec( src="/network-data", - name="op-deployer-configs", + name="op-deployer-configs{}".format(key), ) ], run=" && ".join( @@ -303,7 +303,7 @@ def deploy_contracts( fund_script_artifact = plan.upload_files( src=FUND_SCRIPT_FILEPATH, - name="op-deployer-fund-script", + name="op-deployer-fund-script{}".format(key), ) plan.run_sh( @@ -322,7 +322,7 @@ def deploy_contracts( store=[ StoreSpec( src="/network-data", - name="op-deployer-configs", + name="op-deployer-configs{}".format(key), ) ], files={ @@ -340,13 +340,13 @@ def deploy_contracts( intent_json_artifact = utils.write_to_file(plan, intent_json, "/tmp", "intent.json") op_deployer_configure = plan.run_sh( - name="op-deployer-configure", + name="op-deployer-configure{}".format(key), description="Configure L2 contract deployments", image=utils.DEPLOYMENT_UTILS_IMAGE, store=[ StoreSpec( src="/network-data", - name="op-deployer-configs", + name="op-deployer-configs{}".format(key), ) ], files={ @@ -398,7 +398,7 @@ def deploy_contracts( store=[ StoreSpec( src="/network-data", - name="op-deployer-configs", + name="op-deployer-configs{}".format(key), ) ], files={ @@ -417,7 +417,7 @@ def deploy_contracts( store=[ StoreSpec( src="/network-data", - name="op-deployer-configs", + name="op-deployer-configs{}".format(key), ) ], files={ From 8c59abb2650ec153959e129208da3b9032f59a75 Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Thu, 14 Aug 2025 11:34:14 -0700 Subject: [PATCH 03/27] wip: Bump ethereum package --- kurtosis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kurtosis.yml b/kurtosis.yml index 5ae67362..67d6fc5e 100644 --- a/kurtosis.yml +++ b/kurtosis.yml @@ -3,6 +3,6 @@ description: | # Optimism Package This is a Kurtosis package for deploying an Optimism Rollup replace: - github.com/ethpandaops/ethereum-package: github.com/ethpandaops/ethereum-package@83830d44823767af65eda7dfe6b26c87c536c4cf + github.com/ethpandaops/ethereum-package: github.com/janjakubnanista/ethereum-package@d58379802cf231fb86cb90469267d4f33e06a4c0 github.com/kurtosis-tech/prometheus-package: github.com/kurtosis-tech/prometheus-package@f5ce159aec728898e3deb827f6b921f8ecfc527f github.com/kurtosis-tech/postgres-package: github.com/kurtosis-tech/postgres-package@2d363be1bc42524f6b0575cac0bbc0fd194ae173 From 15cedcd605cc26d7862555dd77c1eaef3e87703a Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Thu, 14 Aug 2025 11:40:23 -0700 Subject: [PATCH 04/27] chore: SOme random network ID --- main.star | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.star b/main.star index 4057f96a..aa13124f 100644 --- a/main.star +++ b/main.star @@ -109,7 +109,8 @@ def run(plan, args={}): ghost_l1 = ethereum_package.run(plan, { "network_params": { - "seconds_per_slot": 1 + "seconds_per_slot": 1, + "network_id": 1111111111, } }) From e3a338954f5d14a64a532c4c88e0b56a590ec224 Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Thu, 14 Aug 2025 11:41:50 -0700 Subject: [PATCH 05/27] fix: Typo --- main.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.star b/main.star index aa13124f..a6749a48 100644 --- a/main.star +++ b/main.star @@ -110,7 +110,7 @@ def run(plan, args={}): ghost_l1 = ethereum_package.run(plan, { "network_params": { "seconds_per_slot": 1, - "network_id": 1111111111, + "network_id": "1111111111", } }) From 55207b3a91b2c811db28f21464bb9feee4c5df01 Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 18 Aug 2025 09:23:27 -0700 Subject: [PATCH 06/27] WIP --- main.star | 119 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 81 insertions(+), 38 deletions(-) diff --git a/main.star b/main.star index a6749a48..6f30fb32 100644 --- a/main.star +++ b/main.star @@ -63,44 +63,6 @@ def run(plan, args={}): observability_params = optimism_args.observability observability_helper = observability.make_helper(observability_params) - # Deploy the L1 - l1_network = "" - if external_l1_args: - plan.print("Using external L1") - plan.print(external_l1_args) - - l1_rpc_url = external_l1_args.el_rpc_url - l1_priv_key = external_l1_args.priv_key - - l1_config_env_vars = { - "L1_RPC_KIND": external_l1_args.rpc_kind, - "L1_RPC_URL": l1_rpc_url, - "CL_RPC_URL": external_l1_args.cl_rpc_url, - "L1_WS_URL": external_l1_args.el_ws_url, - "L1_CHAIN_ID": external_l1_args.network_id, - } - - plan.print("Waiting for network to sync") - wait_for_sync.wait_for_sync(plan, l1_config_env_vars) - else: - plan.print("Deploying a local L1") - l1 = ethereum_package.run(plan, ethereum_args) - plan.print(l1.network_params) - # Get L1 info - all_l1_participants = l1.all_participants - l1_network = "local" - l1_network_params = l1.network_params - l1_network_id = l1.network_id - l1_rpc_url = all_l1_participants[0].el_context.rpc_http_url - l1_priv_key = l1.pre_funded_accounts[ - 12 - ].private_key # reserved for L2 contract deployers - l1_config_env_vars = get_l1_config( - all_l1_participants, l1_network_params, l1_network_id - ) - plan.print("Waiting for L1 to start up") - wait_for_sync.wait_for_startup(plan, l1_config_env_vars) - # EXPERIMENT # # Deploy an l1 with a single node and the lowest blocktime we can get @@ -108,6 +70,9 @@ def run(plan, args={}): plan.print("Deploying a ghost L1") ghost_l1 = ethereum_package.run(plan, { + "participants": [ + "el_type": "geth" + ], "network_params": { "seconds_per_slot": 1, "network_id": "1111111111", @@ -140,6 +105,84 @@ def run(plan, args={}): key="--ghost" ) + # exec_recipe = ExecRecipe( + # command = ["geth", "dump"], + # ) + + # result = plan.exec( + # # A Service name designating a service that already exists inside the enclave + # # If it does not, a validation error will be thrown + # # MANDATORY + # service_name = "my-service", + + # # The recipe that will determine the exec to be performed. + # # Valid values are of the following types: (ExecRecipe) + # # MANDATORY + # recipe = exec_recipe, + + # # If the recipe returns a code that does not belong on this list, this instruction will fail. + # # OPTIONAL (Defaults to [0]) + # acceptable_codes = [0, 1], # Here both 0 and 1 are valid codes that we want to accept and not fail the instruction + + # # If False, instruction will never fail based on code (acceptable_codes will be ignored). + # # You can chain this call with assert to check codes after request is done. + # # OPTIONAL (Defaults to False) + # skip_code_check = False, + + # # A human friendly description for the end user of the package + # # OPTIONAL (Default: Executing command on service 'SERVICE_NAME') + # description = "executing a command" + + # ) + + # + # FIXME Get the L1 state + # + # Retrieve storage contents from an EVM address using web3.py + # This script fetches all storage slots for a given contract address and formats them for genesis insertion + + # Now tear down the ghost L1 + for s in plan.get_services(): + plan.remove_service(name = s.name) + + # Deploy the L1 + l1_network = "" + if external_l1_args: + plan.print("Using external L1") + plan.print(external_l1_args) + + l1_rpc_url = external_l1_args.el_rpc_url + l1_priv_key = external_l1_args.priv_key + + l1_config_env_vars = { + "L1_RPC_KIND": external_l1_args.rpc_kind, + "L1_RPC_URL": l1_rpc_url, + "CL_RPC_URL": external_l1_args.cl_rpc_url, + "L1_WS_URL": external_l1_args.el_ws_url, + "L1_CHAIN_ID": external_l1_args.network_id, + } + + plan.print("Waiting for network to sync") + wait_for_sync.wait_for_sync(plan, l1_config_env_vars) + else: + plan.print("Deploying a local L1") + l1 = ethereum_package.run(plan, ethereum_args) + plan.print(l1.network_params) + # Get L1 info + all_l1_participants = l1.all_participants + l1_network = "local" + l1_network_params = l1.network_params + l1_network_id = l1.network_id + l1_rpc_url = all_l1_participants[0].el_context.rpc_http_url + l1_priv_key = l1.pre_funded_accounts[ + 12 + ].private_key # reserved for L2 contract deployers + l1_config_env_vars = get_l1_config( + all_l1_participants, l1_network_params, l1_network_id + ) + plan.print("Waiting for L1 to start up") + wait_for_sync.wait_for_startup(plan, l1_config_env_vars) + plan.print("Deployed contracts on ghost L1") plan.print("Deploying contracts on real L1") From a69140d3c9e54c81f898aeb562533dc9def5c721 Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 18 Aug 2025 09:23:54 -0700 Subject: [PATCH 07/27] WIP --- main.star | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/main.star b/main.star index 6f30fb32..7d1e53dd 100644 --- a/main.star +++ b/main.star @@ -119,19 +119,10 @@ def run(plan, args={}): # # Valid values are of the following types: (ExecRecipe) # # MANDATORY # recipe = exec_recipe, - - # # If the recipe returns a code that does not belong on this list, this instruction will fail. - # # OPTIONAL (Defaults to [0]) - # acceptable_codes = [0, 1], # Here both 0 and 1 are valid codes that we want to accept and not fail the instruction - - # # If False, instruction will never fail based on code (acceptable_codes will be ignored). - # # You can chain this call with assert to check codes after request is done. - # # OPTIONAL (Defaults to False) - # skip_code_check = False, # # A human friendly description for the end user of the package # # OPTIONAL (Default: Executing command on service 'SERVICE_NAME') - # description = "executing a command" + # description = "Dumping ghost L1 storage" # ) From 38f5cebef6a6adc9e5d6a8c6f41a57e18bebf318 Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 18 Aug 2025 09:24:31 -0700 Subject: [PATCH 08/27] WIP --- main.star | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/main.star b/main.star index 7d1e53dd..de06c9da 100644 --- a/main.star +++ b/main.star @@ -64,20 +64,21 @@ def run(plan, args={}): observability_helper = observability.make_helper(observability_params) # EXPERIMENT - # + # # Deploy an l1 with a single node and the lowest blocktime we can get plan.print("Deploying a ghost L1") - ghost_l1 = ethereum_package.run(plan, { - "participants": [ - "el_type": "geth" - ], - "network_params": { - "seconds_per_slot": 1, - "network_id": "1111111111", - } - }) + ghost_l1 = ethereum_package.run( + plan, + { + "participants": [{"el_type": "geth"}], + "network_params": { + "seconds_per_slot": 1, + "network_id": "1111111111", + }, + }, + ) all_ghost_l1_participants = ghost_l1.all_participants ghost_l1_network_params = ghost_l1.network_params @@ -102,7 +103,7 @@ def run(plan, args={}): optimism_args, "local", altda_deploy_config, - key="--ghost" + key="--ghost", ) # exec_recipe = ExecRecipe( @@ -114,7 +115,7 @@ def run(plan, args={}): # # If it does not, a validation error will be thrown # # MANDATORY # service_name = "my-service", - + # # The recipe that will determine the exec to be performed. # # Valid values are of the following types: (ExecRecipe) # # MANDATORY @@ -126,15 +127,15 @@ def run(plan, args={}): # ) - # + # # FIXME Get the L1 state - # + # # Retrieve storage contents from an EVM address using web3.py # This script fetches all storage slots for a given contract address and formats them for genesis insertion # Now tear down the ghost L1 for s in plan.get_services(): - plan.remove_service(name = s.name) + plan.remove_service(name=s.name) # Deploy the L1 l1_network = "" From 1dc3310e52eda62be1443b106c57369768b41b81 Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 18 Aug 2025 09:33:52 -0700 Subject: [PATCH 09/27] WIP --- main.star | 354 +++++++++++++++++++++++++++--------------------------- 1 file changed, 177 insertions(+), 177 deletions(-) diff --git a/main.star b/main.star index de06c9da..6a6c3e6a 100644 --- a/main.star +++ b/main.star @@ -137,186 +137,186 @@ def run(plan, args={}): for s in plan.get_services(): plan.remove_service(name=s.name) - # Deploy the L1 - l1_network = "" - if external_l1_args: - plan.print("Using external L1") - plan.print(external_l1_args) - - l1_rpc_url = external_l1_args.el_rpc_url - l1_priv_key = external_l1_args.priv_key - - l1_config_env_vars = { - "L1_RPC_KIND": external_l1_args.rpc_kind, - "L1_RPC_URL": l1_rpc_url, - "CL_RPC_URL": external_l1_args.cl_rpc_url, - "L1_WS_URL": external_l1_args.el_ws_url, - "L1_CHAIN_ID": external_l1_args.network_id, - } - - plan.print("Waiting for network to sync") - wait_for_sync.wait_for_sync(plan, l1_config_env_vars) - else: - plan.print("Deploying a local L1") - l1 = ethereum_package.run(plan, ethereum_args) - plan.print(l1.network_params) - # Get L1 info - all_l1_participants = l1.all_participants - l1_network = "local" - l1_network_params = l1.network_params - l1_network_id = l1.network_id - l1_rpc_url = all_l1_participants[0].el_context.rpc_http_url - l1_priv_key = l1.pre_funded_accounts[ - 12 - ].private_key # reserved for L2 contract deployers - l1_config_env_vars = get_l1_config( - all_l1_participants, l1_network_params, l1_network_id - ) - plan.print("Waiting for L1 to start up") - wait_for_sync.wait_for_startup(plan, l1_config_env_vars) - - plan.print("Deployed contracts on ghost L1") - plan.print("Deploying contracts on real L1") - - deployment_output = contract_deployer.deploy_contracts( - plan, - l1_priv_key, - l1_config_env_vars, - optimism_args, - l1_network, - altda_deploy_config, - ) - - plan.print("Deployed contracts on real L1") - - jwt_file = plan.upload_files( - src=ethereum_package_static_files.JWT_PATH_FILEPATH, - 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 l2_params in optimism_args.chains: - # We filter out the supervisors applicable to this network - l2_supervisors_params = [ - supervisor_params - for supervisor_params in optimism_args.supervisors - if l2_params.network_params.network_id - in supervisor_params.superchain.participants - ] - - l2s.append( - _l2_launcher.launch( - plan=plan, - params=l2_params, - supervisors_params=l2_supervisors_params, - jwt_file=jwt_file, - l1_config_env_vars=l1_config_env_vars, - deployment_output=deployment_output, - node_selectors=global_node_selectors, - observability_helper=observability_helper, - l1_rpc_url=l1_rpc_url, - log_level=global_log_level, - tolerations=global_tolerations, - persistent=persistent, - ) - ) - - for supervisor_params in optimism_args.supervisors: - supervisor_launcher.launch( - plan=plan, - params=supervisor_params, - l1_config_env_vars=l1_config_env_vars, - l2s_params=optimism_args.chains, - jwt_file=jwt_file, - deployment_output=deployment_output, - observability_helper=observability_helper, - ) - - for test_sequencer_params in optimism_args.test_sequencers: - op_test_sequencer_launcher.launch( - plan=plan, - params=test_sequencer_params, - l1_config_env_vars=l1_config_env_vars, - l2s_params=optimism_args.chains, - jwt_file=jwt_file, - deployment_output=deployment_output, - observability_helper=observability_helper, - ) - - for challenger_params in optimism_args.challengers: - op_challenger_launcher.launch( - plan=plan, - params=challenger_params, - l2s_params=optimism_args.chains, - supervisors_params=optimism_args.supervisors, - l1_config_env_vars=l1_config_env_vars, - deployment_output=deployment_output, - observability_helper=observability_helper, - ) - - for index, l2_params in enumerate(optimism_args.chains): - # We filter out the supervisors applicable to this network - l2_supervisors_params = [ - supervisor_params - for supervisor_params in optimism_args.supervisors - if l2_params.network_params.network_id - in supervisor_params.superchain.participants - ] - - original_launcher_output__hack = l2s[index] - - _l2_launcher__hack.launch( - original_launcher_output__hack=original_launcher_output__hack, - plan=plan, - params=l2_params, - supervisors_params=l2_supervisors_params, - jwt_file=jwt_file, - l1_config_env_vars=l1_config_env_vars, - deployment_output=deployment_output, - node_selectors=global_node_selectors, - observability_helper=observability_helper, - l1_rpc_url=l1_rpc_url, - log_level=global_log_level, - tolerations=global_tolerations, - persistent=persistent, - registry=registry, - ) + # # Deploy the L1 + # l1_network = "" + # if external_l1_args: + # plan.print("Using external L1") + # plan.print(external_l1_args) + + # l1_rpc_url = external_l1_args.el_rpc_url + # l1_priv_key = external_l1_args.priv_key + + # l1_config_env_vars = { + # "L1_RPC_KIND": external_l1_args.rpc_kind, + # "L1_RPC_URL": l1_rpc_url, + # "CL_RPC_URL": external_l1_args.cl_rpc_url, + # "L1_WS_URL": external_l1_args.el_ws_url, + # "L1_CHAIN_ID": external_l1_args.network_id, + # } + + # plan.print("Waiting for network to sync") + # wait_for_sync.wait_for_sync(plan, l1_config_env_vars) + # else: + # plan.print("Deploying a local L1") + # l1 = ethereum_package.run(plan, ethereum_args) + # plan.print(l1.network_params) + # # Get L1 info + # all_l1_participants = l1.all_participants + # l1_network = "local" + # l1_network_params = l1.network_params + # l1_network_id = l1.network_id + # l1_rpc_url = all_l1_participants[0].el_context.rpc_http_url + # l1_priv_key = l1.pre_funded_accounts[ + # 12 + # ].private_key # reserved for L2 contract deployers + # l1_config_env_vars = get_l1_config( + # all_l1_participants, l1_network_params, l1_network_id + # ) + # plan.print("Waiting for L1 to start up") + # wait_for_sync.wait_for_startup(plan, l1_config_env_vars) + + # plan.print("Deployed contracts on ghost L1") + # plan.print("Deploying contracts on real L1") + + # deployment_output = contract_deployer.deploy_contracts( + # plan, + # l1_priv_key, + # l1_config_env_vars, + # optimism_args, + # l1_network, + # altda_deploy_config, + # ) - if optimism_args.faucet.enabled: - _install_faucet( - plan=plan, - registry=registry, - faucet_params=optimism_args.faucet, - l1_config_env_vars=l1_config_env_vars, - l1_priv_key=l1_priv_key, - deployment_output=deployment_output, - l2s=l2s, - ) + # plan.print("Deployed contracts on real L1") - # Launch interop monitoring - if optimism_args.interop_mon and optimism_args.interop_mon.enabled: - interop_mon.launch( - plan=plan, - params=optimism_args.interop_mon, - image=optimism_args.interop_mon.image, - l2s=l2s, - observability_helper=observability_helper, - ) + # jwt_file = plan.upload_files( + # src=ethereum_package_static_files.JWT_PATH_FILEPATH, + # name="op_jwt_file", + # ) - observability.launch( - plan, observability_helper, global_node_selectors, observability_params - ) + # # 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 l2_params in optimism_args.chains: + # # We filter out the supervisors applicable to this network + # l2_supervisors_params = [ + # supervisor_params + # for supervisor_params in optimism_args.supervisors + # if l2_params.network_params.network_id + # in supervisor_params.superchain.participants + # ] + + # l2s.append( + # _l2_launcher.launch( + # plan=plan, + # params=l2_params, + # supervisors_params=l2_supervisors_params, + # jwt_file=jwt_file, + # l1_config_env_vars=l1_config_env_vars, + # deployment_output=deployment_output, + # node_selectors=global_node_selectors, + # observability_helper=observability_helper, + # l1_rpc_url=l1_rpc_url, + # log_level=global_log_level, + # tolerations=global_tolerations, + # persistent=persistent, + # ) + # ) + + # for supervisor_params in optimism_args.supervisors: + # supervisor_launcher.launch( + # plan=plan, + # params=supervisor_params, + # l1_config_env_vars=l1_config_env_vars, + # l2s_params=optimism_args.chains, + # jwt_file=jwt_file, + # deployment_output=deployment_output, + # observability_helper=observability_helper, + # ) + + # for test_sequencer_params in optimism_args.test_sequencers: + # op_test_sequencer_launcher.launch( + # plan=plan, + # params=test_sequencer_params, + # l1_config_env_vars=l1_config_env_vars, + # l2s_params=optimism_args.chains, + # jwt_file=jwt_file, + # deployment_output=deployment_output, + # observability_helper=observability_helper, + # ) + + # for challenger_params in optimism_args.challengers: + # op_challenger_launcher.launch( + # plan=plan, + # params=challenger_params, + # l2s_params=optimism_args.chains, + # supervisors_params=optimism_args.supervisors, + # l1_config_env_vars=l1_config_env_vars, + # deployment_output=deployment_output, + # observability_helper=observability_helper, + # ) + + # for index, l2_params in enumerate(optimism_args.chains): + # # We filter out the supervisors applicable to this network + # l2_supervisors_params = [ + # supervisor_params + # for supervisor_params in optimism_args.supervisors + # if l2_params.network_params.network_id + # in supervisor_params.superchain.participants + # ] + + # original_launcher_output__hack = l2s[index] + + # _l2_launcher__hack.launch( + # original_launcher_output__hack=original_launcher_output__hack, + # plan=plan, + # params=l2_params, + # supervisors_params=l2_supervisors_params, + # jwt_file=jwt_file, + # l1_config_env_vars=l1_config_env_vars, + # deployment_output=deployment_output, + # node_selectors=global_node_selectors, + # observability_helper=observability_helper, + # l1_rpc_url=l1_rpc_url, + # log_level=global_log_level, + # tolerations=global_tolerations, + # persistent=persistent, + # registry=registry, + # ) + + # if optimism_args.faucet.enabled: + # _install_faucet( + # plan=plan, + # registry=registry, + # faucet_params=optimism_args.faucet, + # l1_config_env_vars=l1_config_env_vars, + # l1_priv_key=l1_priv_key, + # deployment_output=deployment_output, + # l2s=l2s, + # ) + + # # Launch interop monitoring + # if optimism_args.interop_mon and optimism_args.interop_mon.enabled: + # interop_mon.launch( + # plan=plan, + # params=optimism_args.interop_mon, + # image=optimism_args.interop_mon.image, + # l2s=l2s, + # observability_helper=observability_helper, + # ) + + # observability.launch( + # plan, observability_helper, global_node_selectors, observability_params + # ) def get_l1_config(all_l1_participants, l1_network_params, l1_network_id): From 783c1a7c6b0d428b35a88384dd7e1b4d2ddd5ffe Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 18 Aug 2025 09:41:04 -0700 Subject: [PATCH 10/27] WIP --- main.star | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/main.star b/main.star index 6a6c3e6a..849932e4 100644 --- a/main.star +++ b/main.star @@ -69,15 +69,16 @@ def run(plan, args={}): plan.print("Deploying a ghost L1") + ghost_ethereum_args = ethereum_args | {} + ghost_ethereum_args["participants"] = [{"el_type": "geth"}] + ghost_ethereum_args["network_params"] = { + "seconds_per_slot": 1, + "network_id": "1111111111", + } + ghost_l1 = ethereum_package.run( plan, - { - "participants": [{"el_type": "geth"}], - "network_params": { - "seconds_per_slot": 1, - "network_id": "1111111111", - }, - }, + ghost_ethereum_args, ) all_ghost_l1_participants = ghost_l1.all_participants From 8abbbb440a8840ff8b25c871d1b9b7e2af699a55 Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 18 Aug 2025 09:53:19 -0700 Subject: [PATCH 11/27] WIP --- main.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.star b/main.star index 849932e4..d3e1f59e 100644 --- a/main.star +++ b/main.star @@ -71,7 +71,7 @@ def run(plan, args={}): ghost_ethereum_args = ethereum_args | {} ghost_ethereum_args["participants"] = [{"el_type": "geth"}] - ghost_ethereum_args["network_params"] = { + ghost_ethereum_args["network_params"] = ethereum_args.get("network_params") | { "seconds_per_slot": 1, "network_id": "1111111111", } From 9d1d25a78485e3c5a4d246af323c6d029c16482e Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 18 Aug 2025 11:19:34 -0700 Subject: [PATCH 12/27] WIP --- main.star | 68 ++++++++++++++++++---------- src/contracts/contract_deployer.star | 2 +- 2 files changed, 44 insertions(+), 26 deletions(-) diff --git a/main.star b/main.star index d3e1f59e..2e46037a 100644 --- a/main.star +++ b/main.star @@ -69,38 +69,56 @@ def run(plan, args={}): plan.print("Deploying a ghost L1") - ghost_ethereum_args = ethereum_args | {} - ghost_ethereum_args["participants"] = [{"el_type": "geth"}] - ghost_ethereum_args["network_params"] = ethereum_args.get("network_params") | { - "seconds_per_slot": 1, - "network_id": "1111111111", - } - - ghost_l1 = ethereum_package.run( - plan, - ghost_ethereum_args, + ghost_l1 = plan.add_service( + name = "ghost_l1", + description = "Starting ghost L1", + config = ServiceConfig( + image = "ghcr.io/ethpandaops/anvil:latest", + cmd = ["anvil", "--chain-id", "1111111111"], + ports = { + [_net.RPC_PORT_NAME]: PortSpec(number=8545) + } + ) ) - all_ghost_l1_participants = ghost_l1.all_participants - ghost_l1_network_params = ghost_l1.network_params - ghost_l1_network_id = ghost_l1.network_id - ghost_l1_rpc_url = all_ghost_l1_participants[0].el_context.rpc_http_url - ghost_l1_priv_key = ghost_l1.pre_funded_accounts[ - 12 - ].private_key # reserved for L2 contract deployers - ghost_l1_config_env_vars = get_l1_config( - all_ghost_l1_participants, ghost_l1_network_params, ghost_l1_network_id - ) - plan.print("Waiting for ghost L1 to start up") - wait_for_sync.wait_for_startup(plan, ghost_l1_config_env_vars) + # ghost_ethereum_args = ethereum_args | {} + # ghost_ethereum_args["participants"] = [{"el_type": "geth"}] + # ghost_ethereum_args["network_params"] = ethereum_args.get("network_params") | { + # "seconds_per_slot": 1, + # "network_id": "1111111111", + # } + + # ghost_l1 = ethereum_package.run( + # plan, + # ghost_ethereum_args, + # ) + + # all_ghost_l1_participants = ghost_l1.all_participants + # ghost_l1_network_params = ghost_l1.network_params + # ghost_l1_network_id = ghost_l1.network_id + # ghost_l1_rpc_url = all_ghost_l1_participants[0].el_context.rpc_http_url + # ghost_l1_priv_key = ghost_l1.pre_funded_accounts[ + # 12 + # ].private_key # reserved for L2 contract deployers + # ghost_l1_config_env_vars = get_l1_config( + # all_ghost_l1_participants, ghost_l1_network_params, ghost_l1_network_id + # ) + # plan.print("Waiting for ghost L1 to start up") + # wait_for_sync.wait_for_startup(plan, ghost_l1_config_env_vars) - plan.print("Deployed a ghost L1") + # plan.print("Deployed a ghost L1") plan.print("Deploying contracts on ghost L1") ghost_deployment_output = contract_deployer.deploy_contracts( plan, - ghost_l1_priv_key, - ghost_l1_config_env_vars, + "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", # Private key for "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + { + "L1_RPC_KIND": "standard", + "L1_RPC_URL": _net.service_url("ghost_l1", _net.port(number=8545)), + "CL_RPC_URL": "AAAAAAAAAAA", + "L1_WS_URL": "AAAAAAAAAAA", + "L1_CHAIN_ID": "1111111111", + }, optimism_args, "local", altda_deploy_config, diff --git a/src/contracts/contract_deployer.star b/src/contracts/contract_deployer.star index 606e81aa..2b80e2d7 100644 --- a/src/contracts/contract_deployer.star +++ b/src/contracts/contract_deployer.star @@ -371,7 +371,7 @@ def deploy_contracts( ) apply_cmds = [ - "op-deployer apply --l1-rpc-url $L1_RPC_URL --private-key $PRIVATE_KEY --workdir /network-data", + "op-deployer apply --l1-rpc-url $L1_RPC_URL --private-key $PRIVATE_KEY --workdir /network-data --deployment-target genesis", ] for chain in optimism_args.chains: network_id = chain.network_params.network_id From 0379b1895cbee1ef606810322cd0a14044f98b4a Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 18 Aug 2025 11:21:55 -0700 Subject: [PATCH 13/27] WIP --- main.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.star b/main.star index 2e46037a..d9312275 100644 --- a/main.star +++ b/main.star @@ -74,7 +74,7 @@ def run(plan, args={}): description = "Starting ghost L1", config = ServiceConfig( image = "ghcr.io/ethpandaops/anvil:latest", - cmd = ["anvil", "--chain-id", "1111111111"], + cmd = " ".join(["anvil", "--chain-id", "1111111111"]), ports = { [_net.RPC_PORT_NAME]: PortSpec(number=8545) } From f49526c6f35ad6284008f5e93f1aafab2286f0d7 Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 18 Aug 2025 11:24:32 -0700 Subject: [PATCH 14/27] WIP --- main.star | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.star b/main.star index d9312275..86b96b37 100644 --- a/main.star +++ b/main.star @@ -74,9 +74,9 @@ def run(plan, args={}): description = "Starting ghost L1", config = ServiceConfig( image = "ghcr.io/ethpandaops/anvil:latest", - cmd = " ".join(["anvil", "--chain-id", "1111111111"]), + cmd = ["anvil", "--chain-id", "1111111111"], ports = { - [_net.RPC_PORT_NAME]: PortSpec(number=8545) + _net.RPC_PORT_NAME: PortSpec(number=8545) } ) ) From fde60eb2e3512f49d406128e5d927310fdf5d184 Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 18 Aug 2025 11:26:00 -0700 Subject: [PATCH 15/27] WIP --- main.star | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.star b/main.star index 86b96b37..daa6f672 100644 --- a/main.star +++ b/main.star @@ -70,7 +70,7 @@ def run(plan, args={}): plan.print("Deploying a ghost L1") ghost_l1 = plan.add_service( - name = "ghost_l1", + name = "l1-ghost", description = "Starting ghost L1", config = ServiceConfig( image = "ghcr.io/ethpandaops/anvil:latest", @@ -114,7 +114,7 @@ def run(plan, args={}): "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", # Private key for "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", { "L1_RPC_KIND": "standard", - "L1_RPC_URL": _net.service_url("ghost_l1", _net.port(number=8545)), + "L1_RPC_URL": _net.service_url("l1-ghost", _net.port(number=8545)), "CL_RPC_URL": "AAAAAAAAAAA", "L1_WS_URL": "AAAAAAAAAAA", "L1_CHAIN_ID": "1111111111", From 1cfac859ccdfbb7ada6bcd184e9116d4464e87fe Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 18 Aug 2025 11:27:53 -0700 Subject: [PATCH 16/27] WIP --- main.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.star b/main.star index daa6f672..36b13d6b 100644 --- a/main.star +++ b/main.star @@ -73,7 +73,7 @@ def run(plan, args={}): name = "l1-ghost", description = "Starting ghost L1", config = ServiceConfig( - image = "ghcr.io/ethpandaops/anvil:latest", + image = "ghcr.io/foundry-rs/foundry:latest", cmd = ["anvil", "--chain-id", "1111111111"], ports = { _net.RPC_PORT_NAME: PortSpec(number=8545) From 09f774917d0c576e0deb2b5a56ba677a8882f027 Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 18 Aug 2025 11:31:54 -0700 Subject: [PATCH 17/27] WIP --- main.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.star b/main.star index 36b13d6b..003eb7a2 100644 --- a/main.star +++ b/main.star @@ -74,7 +74,7 @@ def run(plan, args={}): description = "Starting ghost L1", config = ServiceConfig( image = "ghcr.io/foundry-rs/foundry:latest", - cmd = ["anvil", "--chain-id", "1111111111"], + cmd = ["anvil", "--chain-id", "1111111111", "--port", "8545", "--host", "0.0.0.0"], ports = { _net.RPC_PORT_NAME: PortSpec(number=8545) } From 69abba78ff95168c261b362c739887d2112892fd Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 18 Aug 2025 11:36:56 -0700 Subject: [PATCH 18/27] WIP --- main.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.star b/main.star index 003eb7a2..f9176c58 100644 --- a/main.star +++ b/main.star @@ -74,7 +74,7 @@ def run(plan, args={}): description = "Starting ghost L1", config = ServiceConfig( image = "ghcr.io/foundry-rs/foundry:latest", - cmd = ["anvil", "--chain-id", "1111111111", "--port", "8545", "--host", "0.0.0.0"], + cmd = ["anvil", "--chain-id=1111111111", "--port=8545", "--host=0.0.0.0"], ports = { _net.RPC_PORT_NAME: PortSpec(number=8545) } From c5f03d0eadf295f55aff51811194f855e8538b79 Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 18 Aug 2025 11:38:46 -0700 Subject: [PATCH 19/27] WIP --- main.star | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/main.star b/main.star index f9176c58..080811fc 100644 --- a/main.star +++ b/main.star @@ -69,17 +69,17 @@ def run(plan, args={}): plan.print("Deploying a ghost L1") - ghost_l1 = plan.add_service( - name = "l1-ghost", - description = "Starting ghost L1", - config = ServiceConfig( - image = "ghcr.io/foundry-rs/foundry:latest", - cmd = ["anvil", "--chain-id=1111111111", "--port=8545", "--host=0.0.0.0"], - ports = { - _net.RPC_PORT_NAME: PortSpec(number=8545) - } - ) - ) + # ghost_l1 = plan.add_service( + # name = "l1-ghost", + # description = "Starting ghost L1", + # config = ServiceConfig( + # image = "ghcr.io/foundry-rs/foundry:latest", + # cmd = ["anvil", "--chain-id=1111111111", "--port=8545", "--host=0.0.0.0"], + # ports = { + # _net.RPC_PORT_NAME: PortSpec(number=8545) + # } + # ) + # ) # ghost_ethereum_args = ethereum_args | {} # ghost_ethereum_args["participants"] = [{"el_type": "geth"}] From e889d429c7fbe78ee310ab5fd1fa181c169e1b65 Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 18 Aug 2025 11:41:01 -0700 Subject: [PATCH 20/27] WIP --- main.star | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/main.star b/main.star index 080811fc..d6f4add1 100644 --- a/main.star +++ b/main.star @@ -69,17 +69,17 @@ def run(plan, args={}): plan.print("Deploying a ghost L1") - # ghost_l1 = plan.add_service( - # name = "l1-ghost", - # description = "Starting ghost L1", - # config = ServiceConfig( - # image = "ghcr.io/foundry-rs/foundry:latest", - # cmd = ["anvil", "--chain-id=1111111111", "--port=8545", "--host=0.0.0.0"], - # ports = { - # _net.RPC_PORT_NAME: PortSpec(number=8545) - # } - # ) - # ) + ghost_l1 = plan.add_service( + name = "l1-ghost", + description = "Starting ghost L1", + config = ServiceConfig( + image = "ghcr.io/foundry-rs/foundry:stable", + cmd = ["anvil", "--chain-id=1111111111", "--port=8545", "--host=0.0.0.0"], + ports = { + _net.RPC_PORT_NAME: PortSpec(number=8545) + } + ) + ) # ghost_ethereum_args = ethereum_args | {} # ghost_ethereum_args["participants"] = [{"el_type": "geth"}] From 8371bfa54815d68483dcca0ac47f2eff2756a8ad Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 18 Aug 2025 11:42:09 -0700 Subject: [PATCH 21/27] WIP --- main.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.star b/main.star index d6f4add1..1f51eca2 100644 --- a/main.star +++ b/main.star @@ -76,7 +76,7 @@ def run(plan, args={}): image = "ghcr.io/foundry-rs/foundry:stable", cmd = ["anvil", "--chain-id=1111111111", "--port=8545", "--host=0.0.0.0"], ports = { - _net.RPC_PORT_NAME: PortSpec(number=8545) + _net.RPC_PORT_NAME: PortSpec(number=8545, wait = "30s") } ) ) From 9a48ea486a890c4f0f598ed9e8481d365cc7a9ca Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 18 Aug 2025 11:46:12 -0700 Subject: [PATCH 22/27] WIP --- main.star | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.star b/main.star index 1f51eca2..0db8a4e0 100644 --- a/main.star +++ b/main.star @@ -74,7 +74,8 @@ def run(plan, args={}): description = "Starting ghost L1", config = ServiceConfig( image = "ghcr.io/foundry-rs/foundry:stable", - cmd = ["anvil", "--chain-id=1111111111", "--port=8545", "--host=0.0.0.0"], + entrypoint = "anvil", + cmd = ["--chain-id=1111111111", "--port=8545", "--host 0.0.0.0"], ports = { _net.RPC_PORT_NAME: PortSpec(number=8545, wait = "30s") } From db8a8d71fbf21abc682d3189cce20c045f9adfdf Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 18 Aug 2025 11:47:12 -0700 Subject: [PATCH 23/27] WIP --- main.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.star b/main.star index 0db8a4e0..64beadfb 100644 --- a/main.star +++ b/main.star @@ -74,7 +74,7 @@ def run(plan, args={}): description = "Starting ghost L1", config = ServiceConfig( image = "ghcr.io/foundry-rs/foundry:stable", - entrypoint = "anvil", + entrypoint = ["anvil"], cmd = ["--chain-id=1111111111", "--port=8545", "--host 0.0.0.0"], ports = { _net.RPC_PORT_NAME: PortSpec(number=8545, wait = "30s") From fc4d074b5b24d7058b1f42a001649fdac48d48ae Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 18 Aug 2025 11:49:28 -0700 Subject: [PATCH 24/27] WIP --- main.star | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.star b/main.star index 64beadfb..424656b1 100644 --- a/main.star +++ b/main.star @@ -78,6 +78,9 @@ def run(plan, args={}): cmd = ["--chain-id=1111111111", "--port=8545", "--host 0.0.0.0"], ports = { _net.RPC_PORT_NAME: PortSpec(number=8545, wait = "30s") + }, + env_vars = { + "ANVIL_IP_ADDR": "0.0.0.0" } ) ) From b15d6ca00eb10cee3c6d5690236e36b9efd00b53 Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 18 Aug 2025 11:50:09 -0700 Subject: [PATCH 25/27] WIP --- main.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.star b/main.star index 424656b1..b1adb170 100644 --- a/main.star +++ b/main.star @@ -75,7 +75,7 @@ def run(plan, args={}): config = ServiceConfig( image = "ghcr.io/foundry-rs/foundry:stable", entrypoint = ["anvil"], - cmd = ["--chain-id=1111111111", "--port=8545", "--host 0.0.0.0"], + cmd = ["--chain-id=1111111111", "--port=8545", "--host=0.0.0.0"], ports = { _net.RPC_PORT_NAME: PortSpec(number=8545, wait = "30s") }, From 4194e537c02df88db00b93075cb54e349fdb396d Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 18 Aug 2025 11:52:05 -0700 Subject: [PATCH 26/27] WIP --- src/contracts/contract_deployer.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/contracts/contract_deployer.star b/src/contracts/contract_deployer.star index 2b80e2d7..4102aa8d 100644 --- a/src/contracts/contract_deployer.star +++ b/src/contracts/contract_deployer.star @@ -371,7 +371,7 @@ def deploy_contracts( ) apply_cmds = [ - "op-deployer apply --l1-rpc-url $L1_RPC_URL --private-key $PRIVATE_KEY --workdir /network-data --deployment-target genesis", + "op-deployer apply --workdir /network-data --deployment-target genesis", ] for chain in optimism_args.chains: network_id = chain.network_params.network_id From 8b38e9b5000ff1f6dafae5f9395fc63c3ddbde33 Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 18 Aug 2025 11:54:53 -0700 Subject: [PATCH 27/27] WIP --- src/contracts/contract_deployer.star | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/contracts/contract_deployer.star b/src/contracts/contract_deployer.star index 4102aa8d..b4b3d300 100644 --- a/src/contracts/contract_deployer.star +++ b/src/contracts/contract_deployer.star @@ -391,10 +391,8 @@ def deploy_contracts( description="Apply L2 contract deployments", image=optimism_args.op_contract_deployer_params.image, env_vars={ - "PRIVATE_KEY": str(priv_key), "DEPLOYER_CACHE_DIR": "/var/cache/op-deployer", - } - | l1_config_env_vars, + }, store=[ StoreSpec( src="/network-data",