From bf3f695753f411f6f55453597e111c2a30dff507 Mon Sep 17 00:00:00 2001 From: joanestebanr <129153821+joanestebanr@users.noreply.github.com> Date: Tue, 12 Nov 2024 17:09:10 +0100 Subject: [PATCH 1/7] feat: aggsender and agglayer bump version --- .github/tests/fork12-pessimistic.yml | 2 +- input_parser.star | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/tests/fork12-pessimistic.yml b/.github/tests/fork12-pessimistic.yml index c6e7b605..da564dfa 100644 --- a/.github/tests/fork12-pessimistic.yml +++ b/.github/tests/fork12-pessimistic.yml @@ -1,5 +1,5 @@ args: - agglayer_image: ghcr.io/agglayer/agglayer:0.2.0-rc.5 + agglayer_image: ghcr.io/agglayer/agglayer:0.2.0-rc.9 cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.60.0-beta3 cdk_node_image: nulyjkdhthz/cdk:6d775da5dad55990f534e0190a89613ae64f5ccf cdk_validium_node_image: 0xpolygon/cdk-validium-node:0.7.0-cdk diff --git a/input_parser.star b/input_parser.star index 7b54a79d..38299b73 100644 --- a/input_parser.star +++ b/input_parser.star @@ -31,7 +31,7 @@ DEFAULT_DEPLOYMENT_STAGES = { DEFAULT_IMAGES = { "agglayer_image": "ghcr.io/agglayer/agglayer:0.2.0-rc.5", # https://github.com/agglayer/agglayer/pkgs/container/agglayer-rs "cdk_erigon_node_image": "hermeznetwork/cdk-erigon:v2.1.2", # https://hub.docker.com/r/hermeznetwork/cdk-erigon/tags - "cdk_node_image": "ghcr.io/0xpolygon/cdk:0.4.0-beta5", # https://github.com/0xpolygon/cdk/pkgs/container/cdk + "cdk_node_image": "ghcr.io/0xpolygon/cdk:0.4.0-beta8", # https://github.com/0xpolygon/cdk/pkgs/container/cdk "cdk_validium_node_image": "0xpolygon/cdk-validium-node:0.7.0-cdk", # https://hub.docker.com/r/0xpolygon/cdk-validium-node/tags "zkevm_bridge_proxy_image": "haproxy:3.0-bookworm", # https://hub.docker.com/_/haproxy/tags "zkevm_bridge_service_image": "hermeznetwork/zkevm-bridge-service:v0.6.0-RC1", # https://hub.docker.com/r/hermeznetwork/zkevm-bridge-service/tags From 91dbce2a3c591a8ec0f11d13609a7219e45e1db0 Mon Sep 17 00:00:00 2001 From: John Hilliard Date: Tue, 12 Nov 2024 15:11:03 -0500 Subject: [PATCH 2/7] fix: issue with empty sp1 key --- .github/tests/fork12-pessimistic.yml | 6 ++---- agglayer.star | 13 +++++++------ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/tests/fork12-pessimistic.yml b/.github/tests/fork12-pessimistic.yml index da564dfa..ee810eb1 100644 --- a/.github/tests/fork12-pessimistic.yml +++ b/.github/tests/fork12-pessimistic.yml @@ -1,8 +1,6 @@ args: agglayer_image: ghcr.io/agglayer/agglayer:0.2.0-rc.9 - cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.60.0-beta3 - cdk_node_image: nulyjkdhthz/cdk:6d775da5dad55990f534e0190a89613ae64f5ccf - cdk_validium_node_image: 0xpolygon/cdk-validium-node:0.7.0-cdk + cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.60.0-beta8 zkevm_bridge_proxy_image: haproxy:3.0-bookworm zkevm_bridge_service_image: hermeznetwork/zkevm-bridge-service:v0.6.0-RC1 zkevm_bridge_ui_image: leovct/zkevm-bridge-ui:multi-network @@ -12,5 +10,5 @@ args: sequencer_type: erigon erigon_strict_mode: false zkevm_use_gas_token_contract: false - agglayer_prover_sp1_key: REDACTED + agglayer_prover_sp1_key: enable_normalcy: true diff --git a/agglayer.star b/agglayer.star index 229430f4..c4f68544 100644 --- a/agglayer.star +++ b/agglayer.star @@ -9,7 +9,7 @@ def run(plan, args): (ports, public_ports) = get_agglayer_prover_ports(args) prover_env_vars = {} - if args["agglayer_prover_sp1_key"] != "": + if "agglayer_prover_sp1_key" in args and args["agglayer_prover_sp1_key"] != None: prover_env_vars["SP1_PRIVATE_KEY"] = args["agglayer_prover_sp1_key"] agglayer_prover = plan.add_service( @@ -76,11 +76,12 @@ def create_agglayer_prover_config_artifact(plan, args): src="./templates/bridge-infra/agglayer-prover-config.toml" ) - is_cpu_prover_enabled = "false" - is_network_prover_enabled = "true" - if args["agglayer_prover_sp1_key"] == "": - is_cpu_prover_enabled = "true" - is_network_prover_enabled = "false" + is_cpu_prover_enabled = "true" + is_network_prover_enabled = "false" + if "agglayer_prover_sp1_key" in args and args["agglayer_prover_sp1_key"] != None: + is_cpu_prover_enabled = "false" + is_network_prover_enabled = "true" + return plan.render_templates( name="agglayer-prover-config-artifact", From 31dc33443f297214ab3a65afa68ee162d895adef Mon Sep 17 00:00:00 2001 From: John Hilliard Date: Tue, 12 Nov 2024 16:11:16 -0500 Subject: [PATCH 3/7] fix: agglayer startup order --- main.star | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/main.star b/main.star index 9f5f180e..e0262075 100644 --- a/main.star +++ b/main.star @@ -74,6 +74,13 @@ def run(plan, args={}): src="/opt/zkevm/genesis.json", ) + # Deploy the agglayer. + if deployment_stages.get("deploy_agglayer", False): + plan.print("Deploying the agglayer") + import_module(agglayer_package).run(plan, args) + else: + plan.print("Skipping the deployment of the agglayer") + # Deploy cdk central/trusted environment. if deployment_stages.get("deploy_cdk_central_environment", False): # Deploy cdk-erigon sequencer node. @@ -115,12 +122,6 @@ def run(plan, args={}): else: plan.print("Skipping the deployment of cdk/bridge infrastructure") - # Deploy the agglayer. - if deployment_stages.get("deploy_agglayer", False): - plan.print("Deploying the agglayer") - import_module(agglayer_package).run(plan, args) - else: - plan.print("Skipping the deployment of the agglayer") # Deploy contracts on L2. if deployment_stages.get("deploy_l2_contracts", False): From 1b9227a6ce1608d680035fd40b84b5b2bf54930f Mon Sep 17 00:00:00 2001 From: John Hilliard Date: Tue, 12 Nov 2024 16:13:05 -0500 Subject: [PATCH 4/7] chore: lint --- agglayer.star | 1 - main.star | 1 - 2 files changed, 2 deletions(-) diff --git a/agglayer.star b/agglayer.star index c4f68544..5e598677 100644 --- a/agglayer.star +++ b/agglayer.star @@ -82,7 +82,6 @@ def create_agglayer_prover_config_artifact(plan, args): is_cpu_prover_enabled = "false" is_network_prover_enabled = "true" - return plan.render_templates( name="agglayer-prover-config-artifact", config={ diff --git a/main.star b/main.star index e0262075..ce0ccba7 100644 --- a/main.star +++ b/main.star @@ -122,7 +122,6 @@ def run(plan, args={}): else: plan.print("Skipping the deployment of cdk/bridge infrastructure") - # Deploy contracts on L2. if deployment_stages.get("deploy_l2_contracts", False): plan.print("Deploying contracts on L2") From 8e12ce4e5e9b0ccfcb4cf52288ef2e10fb20e02b Mon Sep 17 00:00:00 2001 From: John Hilliard Date: Tue, 12 Nov 2024 17:00:30 -0500 Subject: [PATCH 5/7] fix: default value --- agglayer.star | 2 ++ input_parser.star | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/agglayer.star b/agglayer.star index 5e598677..c7049798 100644 --- a/agglayer.star +++ b/agglayer.star @@ -9,6 +9,8 @@ def run(plan, args): (ports, public_ports) = get_agglayer_prover_ports(args) prover_env_vars = {} + + prover_env_vars["RUST_BACKTRACE"] = "1" if "agglayer_prover_sp1_key" in args and args["agglayer_prover_sp1_key"] != None: prover_env_vars["SP1_PRIVATE_KEY"] = args["agglayer_prover_sp1_key"] diff --git a/input_parser.star b/input_parser.star index da7aec5d..f8a2acff 100644 --- a/input_parser.star +++ b/input_parser.star @@ -246,7 +246,7 @@ DEFAULT_ROLLUP_ARGS = { # https://hackmd.io/@4cbvqzFdRBSWMHNeI8Wbwg/r1hKHp_S0 "enable_normalcy": False, # If the agglayer is going to be configured to use SP1 services, we'll need to provide an API Key - "agglayer_prover_sp1_key": "", + "agglayer_prover_sp1_key": None, # The URL where the agglayer can be reached "agglayer_url": "http://agglayer:" + str(DEFAULT_PORTS.get("agglayer_port")), # This is a path where the cdk-node will write data From 83f4b4b9afd499b0127292fd7b576feaed641348 Mon Sep 17 00:00:00 2001 From: joanestebanr <129153821+joanestebanr@users.noreply.github.com> Date: Wed, 13 Nov 2024 11:56:45 +0100 Subject: [PATCH 6/7] feat: cherry-pick commit https://github.com/hadjiszs/kurtosis-cdk/commit/bc33cd5b8f611156e7590881d490c78126d8a77b --- .github/tests/fork12-pessimistic.yml | 4 ++-- templates/bridge-infra/agglayer-config.toml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/tests/fork12-pessimistic.yml b/.github/tests/fork12-pessimistic.yml index ee810eb1..7847e134 100644 --- a/.github/tests/fork12-pessimistic.yml +++ b/.github/tests/fork12-pessimistic.yml @@ -1,5 +1,5 @@ args: - agglayer_image: ghcr.io/agglayer/agglayer:0.2.0-rc.9 + agglayer_image: ghcr.io/agglayer/agglayer:0.2.0-rc.10 cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.60.0-beta8 zkevm_bridge_proxy_image: haproxy:3.0-bookworm zkevm_bridge_service_image: hermeznetwork/zkevm-bridge-service:v0.6.0-RC1 @@ -10,5 +10,5 @@ args: sequencer_type: erigon erigon_strict_mode: false zkevm_use_gas_token_contract: false - agglayer_prover_sp1_key: + #agglayer_prover_sp1_key: enable_normalcy: true diff --git a/templates/bridge-infra/agglayer-config.toml b/templates/bridge-infra/agglayer-config.toml index 5bb0d870..4f6f4dc8 100644 --- a/templates/bridge-infra/agglayer-config.toml +++ b/templates/bridge-infra/agglayer-config.toml @@ -35,6 +35,7 @@ chain-id = {{.l1_chain_id}} node-url = "{{.l1_rpc_url}}" ws-node-url = "{{.l1_ws_url}}" rollup-manager-contract = "{{.zkevm_rollup_manager_address}}" +polygon-zkevm-global-exit-root-v2-contract = "{{.zkevm_global_exit_root_address}}" rpc-timeout = 45 [l2] From 954061c5e79251ef0015558ada2ce36187d7f8dd Mon Sep 17 00:00:00 2001 From: John Hilliard Date: Wed, 13 Nov 2024 16:28:03 -0500 Subject: [PATCH 7/7] chore: version bump --- .github/tests/fork12-pessimistic.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/tests/fork12-pessimistic.yml b/.github/tests/fork12-pessimistic.yml index 7847e134..bf8e6530 100644 --- a/.github/tests/fork12-pessimistic.yml +++ b/.github/tests/fork12-pessimistic.yml @@ -1,5 +1,5 @@ args: - agglayer_image: ghcr.io/agglayer/agglayer:0.2.0-rc.10 + agglayer_image: ghcr.io/agglayer/agglayer:0.2.0-rc.11 cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.60.0-beta8 zkevm_bridge_proxy_image: haproxy:3.0-bookworm zkevm_bridge_service_image: hermeznetwork/zkevm-bridge-service:v0.6.0-RC1