diff --git a/README.md b/README.md index c8038df..cda06cc 100644 --- a/README.md +++ b/README.md @@ -219,15 +219,20 @@ optimism_package: fjord_time_offset: 0 # Granite fork - # Defaults to None - not activated - decimal value + # Defaults to 0 (genesis activation) - decimal value # Offset is in seconds - granite_time_offset: "" + granite_time_offset: 0 # Holocene fork # Defaults to None - not activated - decimal value # Offset is in seconds holocene_time_offset: "" + # Isthmus fork + # Defaults to None - not activated - decimal value + # Offset is in seconds + isthmus_time_offset: "" + # Interop fork # Defaults to None - not activated - decimal value # Offset is in seconds @@ -254,8 +259,9 @@ optimism_package: # L2 contract deployer configuration - used for all L2 networks # The docker image that should be used for the L2 contract deployer op_contract_deployer_params: - image: mslipper/op-deployer:latest - artifacts_url: https://storage.googleapis.com/oplabs-contract-artifacts/artifacts-v1-4accd01f0c35c26f24d2aa71aba898dd7e5085a2ce5daadc8a84b10caf113409.tar.gz + image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-deployer:v0.0.6 + l1_artifacts_locator: tag://op-contracts/v1.6.0 + l2_artifacts_locator: tag://op-contracts/v1.7.0-beta.1+l2-contracts # The global log level that all clients should log at # Valid values are "error", "warn", "info", "debug", and "trace" diff --git a/network_params.yaml b/network_params.yaml index 5aed7bd..eb1d2fa 100644 --- a/network_params.yaml +++ b/network_params.yaml @@ -34,17 +34,16 @@ optimism_package: seconds_per_slot: 2 name: "op-kurtosis" fjord_time_offset: 0 - granite_time_offset: "" - holocene_time_offset: "" - interop_time_offset: "" + granite_time_offset: 0 fund_dev_accounts: true batcher_params: image: "" extra_params: [] additional_services: [] op_contract_deployer_params: - image: mslipper/op-deployer:latest - artifacts_url: https://storage.googleapis.com/oplabs-contract-artifacts/artifacts-v1-4accd01f0c35c26f24d2aa71aba898dd7e5085a2ce5daadc8a84b10caf113409.tar.gz + image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-deployer:v0.0.6 + l1_artifacts_locator: tag://op-contracts/v1.6.0 + l2_artifacts_locator: tag://op-contracts/v1.7.0-beta.1+l2-contracts global_log_level: "info" global_node_selectors: {} global_tolerations: [] diff --git a/src/contracts/contract_deployer.star b/src/contracts/contract_deployer.star index 19097d8..c93c2f9 100644 --- a/src/contracts/contract_deployer.star +++ b/src/contracts/contract_deployer.star @@ -40,12 +40,36 @@ def deploy_contracts( ), ) + hardfork_schedule = [] + for index, chain in enumerate(optimism_args.chains): + np = chain.network_params + + # rename each hardfork to the name the override expects + renames = ( + ("l2GenesisFjordTimeOffset", np.fjord_time_offset), + ("l2GenesisGraniteTimeOffset", np.granite_time_offset), + ("l2GenesisHoloceneTimeOffset", np.holocene_time_offset), + ("l2GenesisIsthmusTimeOffset", np.isthmus_time_offset), + ("l2GenesisInteropTimeOffset", np.interop_time_offset), + ) + + # only include the hardforks that have been activated since + # toml does not support null values + for fork_key, activation_timestamp in renames: + if activation_timestamp != None: + hardfork_schedule.append((index, fork_key, activation_timestamp)) + intent_updates = ( [ ( "string", - "contractArtifactsURL", - optimism_args.op_contract_deployer_params.artifacts_url, + "l1ContractsLocator", + optimism_args.op_contract_deployer_params.l1_artifacts_locator, + ), + ( + "string", + "l2ContractsLocator", + optimism_args.op_contract_deployer_params.l2_artifacts_locator, ), ] + [ @@ -64,6 +88,14 @@ def deploy_contracts( ) for index, chain in enumerate(optimism_args.chains) ] + + [ + ( + "string", + "chains.[{0}].deployOverrides.{1}".format(index, fork_key), + "0x%x" % activation_timestamp, + ) + for index, fork_key, activation_timestamp in hardfork_schedule + ] ) op_deployer_configure = plan.run_sh( diff --git a/src/package_io/input_parser.star b/src/package_io/input_parser.star index 78a8116..dba6a1d 100644 --- a/src/package_io/input_parser.star +++ b/src/package_io/input_parser.star @@ -80,6 +80,7 @@ def input_parser(plan, input_args): holocene_time_offset=result["network_params"][ "holocene_time_offset" ], + isthmus_time_offset=result["network_params"]["isthmus_time_offset"], interop_time_offset=result["network_params"]["interop_time_offset"], fund_dev_accounts=result["network_params"]["fund_dev_accounts"], ), @@ -93,7 +94,12 @@ def input_parser(plan, input_args): ], op_contract_deployer_params=struct( image=results["op_contract_deployer_params"]["image"], - artifacts_url=results["op_contract_deployer_params"]["artifacts_url"], + l1_artifacts_locator=results["op_contract_deployer_params"][ + "l1_artifacts_locator" + ], + l2_artifacts_locator=results["op_contract_deployer_params"][ + "l2_artifacts_locator" + ], ), global_log_level=results["global_log_level"], global_node_selectors=results["global_node_selectors"], @@ -208,8 +214,9 @@ def default_network_params(): "name": "op-kurtosis", "seconds_per_slot": 2, "fjord_time_offset": 0, - "granite_time_offset": None, + "granite_time_offset": 0, "holocene_time_offset": None, + "isthmus_time_offset": None, "interop_time_offset": None, "fund_dev_accounts": True, } @@ -256,8 +263,9 @@ def default_participant(): def default_op_contract_deployer_params(): return { - "image": "mslipper/op-deployer:latest", - "artifacts_url": "https://storage.googleapis.com/oplabs-contract-artifacts/artifacts-v1-4accd01f0c35c26f24d2aa71aba898dd7e5085a2ce5daadc8a84b10caf113409.tar.gz", + "image": "us-docker.pkg.dev/oplabs-tools-artifacts/images/op-deployer:v0.0.6", + "l1_artifacts_locator": "tag://op-contracts/v1.6.0", + "l2_artifacts_locator": "tag://op-contracts/v1.7.0-beta.1+l2-contracts", } diff --git a/src/package_io/sanity_check.star b/src/package_io/sanity_check.star index 33fedb1..3055cd6 100644 --- a/src/package_io/sanity_check.star +++ b/src/package_io/sanity_check.star @@ -39,6 +39,7 @@ SUBCATEGORY_PARAMS = { "fjord_time_offset", "granite_time_offset", "holocene_time_offset", + "isthmus_time_offset", "interop_time_offset", "fund_dev_accounts", ], @@ -47,7 +48,8 @@ SUBCATEGORY_PARAMS = { OP_CONTRACT_DEPLOYER_PARAMS = [ "image", - "artifacts_url", + "l1_artifacts_locator", + "l2_artifacts_locator", ] ADDITIONAL_SERVICES_PARAMS = [