From e7361785b5212f929e5d7395925cd4534a2a81cf Mon Sep 17 00:00:00 2001 From: Victor Castell <0x@vcastellm.xyz> Date: Thu, 7 Nov 2024 11:50:36 +0000 Subject: [PATCH 1/4] chore: bump kustoris --- .github/workflows/test-e2e.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index 7fdb5a2b..9efddba0 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -39,7 +39,7 @@ jobs: run: | echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list sudo apt update - sudo apt install kurtosis-cli=1.3.0 + sudo apt install kurtosis-cli=1.4.1 kurtosis version - name: Disable kurtosis analytics @@ -70,7 +70,7 @@ jobs: with: repository: 0xPolygon/kurtosis-cdk path: "kurtosis-cdk" - ref: "v0.2.15" + ref: "v0.2.18" - name: Setup Bats and bats libs uses: bats-core/bats-action@2.0.0 From a77b2ef5d83a161d7464f3f9e7d466f855c0135d Mon Sep 17 00:00:00 2001 From: Victor Castell <0x@vcastellm.xyz> Date: Thu, 7 Nov 2024 16:00:16 +0000 Subject: [PATCH 2/4] Adapt to changes in services names --- .github/workflows/test-resequence.yml | 29 +++++++++++----------- crates/cdk/versions.json | 2 +- scripts/local_config | 4 +-- test/helpers/common-setup.bash | 2 +- test/scripts/batch_verification_monitor.sh | 2 +- 5 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test-resequence.yml b/.github/workflows/test-resequence.yml index 71ebc7d7..a729c81f 100644 --- a/.github/workflows/test-resequence.yml +++ b/.github/workflows/test-resequence.yml @@ -86,22 +86,21 @@ jobs: working-directory: ./cdk-erigon run: .github/scripts/test_resequence.sh - - name: Prepare logs - if: always() - working-directory: ./kurtosis-cdk + - name: Dump enclave logs + if: failure() + run: kurtosis dump ./dump + + - name: Generate archive name + if: failure() run: | - mkdir -p ci_logs - cd ci_logs - kurtosis service logs cdk-v1 cdk-erigon-node-001 --all > cdk-erigon-node-001.log - kurtosis service logs cdk-v1 cdk-erigon-sequencer-001 --all > cdk-erigon-sequencer-001.log - kurtosis service logs cdk-v1 zkevm-agglayer-001 --all > zkevm-agglayer-001.log - kurtosis service logs cdk-v1 zkevm-prover-001 --all > zkevm-prover-001.log - kurtosis service logs cdk-v1 cdk-node-001 --all > cdk-node-001.log - kurtosis service logs cdk-v1 zkevm-bridge-service-001 --all > zkevm-bridge-service-001.log - + archive_name="dump_run_with_args_${{matrix.e2e-group}}_${{ github.run_id }}" + echo "ARCHIVE_NAME=${archive_name}" >> "$GITHUB_ENV" + echo "Generated archive name: ${archive_name}" + kurtosis service exec cdk cdk-node-001 'cat /etc/cdk/cdk-node-config.toml' > ./dump/cdk-node-config.toml + - name: Upload logs - if: always() + if: failure() uses: actions/upload-artifact@v4 with: - name: logs_${{ github.run_id }} - path: ./kurtosis-cdk/ci_logs + name: ${{ env.ARCHIVE_NAME }} + path: ./dump diff --git a/crates/cdk/versions.json b/crates/cdk/versions.json index 36f2af1f..bafbd00b 100644 --- a/crates/cdk/versions.json +++ b/crates/cdk/versions.json @@ -1,7 +1,7 @@ { "agglayer_image": "ghcr.io/agglayer/agglayer:0.2.0-rc.5", "cdk_erigon_node_image": "hermeznetwork/cdk-erigon:v2.1.2", - "cdk_node_image": "ghcr.io/0xpolygon/cdk:0.4.0-beta4", + "cdk_node_image": "ghcr.io/0xpolygon/cdk:0.4.0-beta5", "cdk_validium_node_image": "0xpolygon/cdk-validium-node:0.7.0-cdk", "zkevm_bridge_proxy_image": "haproxy:3.0-bookworm", "zkevm_bridge_service_image": "hermeznetwork/zkevm-bridge-service:v0.6.0-RC1", diff --git a/scripts/local_config b/scripts/local_config index d1a47b2c..0541897f 100755 --- a/scripts/local_config +++ b/scripts/local_config @@ -206,7 +206,7 @@ function export_portnum_from_kurtosis_or_fail(){ ############################################################################### function export_ports_from_kurtosis(){ export_portnum_from_kurtosis_or_fail l1_rpc_port el-1-geth-lighthouse rpc - export_portnum_from_kurtosis_or_fail zkevm_rpc_http_port cdk-erigon-node-001 http-rpc rpc + export_portnum_from_kurtosis_or_fail zkevm_rpc_http_port cdk-erigon-rpc-001 http-rpc rpc export_portnum_from_kurtosis_or_fail zkevm_data_streamer_port cdk-erigon-sequencer-001 data-streamer export_portnum_from_kurtosis_or_fail aggregator_db_port postgres-001 postgres export_portnum_from_kurtosis_or_fail agglayer_port agglayer agglayer @@ -371,4 +371,4 @@ EOF echo " -----------------------------------------------------------" echo " " echo " - rembember to clean previous execution data: " -echo " rm -Rf ${path_rw_data}/*" \ No newline at end of file +echo " rm -Rf ${path_rw_data}/*" diff --git a/test/helpers/common-setup.bash b/test/helpers/common-setup.bash index dac81beb..5f53cbf8 100644 --- a/test/helpers/common-setup.bash +++ b/test/helpers/common-setup.bash @@ -21,6 +21,6 @@ _common_setup() { readonly enclave=${KURTOSIS_ENCLAVE:-cdk} readonly contracts_container=${KURTOSIS_CONTRACTS:-contracts-001} readonly contracts_service_wrapper=${KURTOSIS_CONTRACTS_WRAPPER:-"kurtosis service exec $enclave $contracts_container"} - readonly erigon_rpc_node=${KURTOSIS_ERIGON_RPC:-cdk-erigon-node-001} + readonly erigon_rpc_node=${KURTOSIS_ERIGON_RPC:-cdk-erigon-rpc-001} readonly l2_rpc_url=${L2_ETH_RPC_URL:-"$(kurtosis port print $enclave $erigon_rpc_node rpc)"} } diff --git a/test/scripts/batch_verification_monitor.sh b/test/scripts/batch_verification_monitor.sh index 9c923888..a0bfaefd 100755 --- a/test/scripts/batch_verification_monitor.sh +++ b/test/scripts/batch_verification_monitor.sh @@ -17,7 +17,7 @@ timeout="$2" start_time=$(date +%s) end_time=$((start_time + timeout)) -rpc_url="$(kurtosis port print cdk cdk-erigon-node-001 rpc)" +rpc_url="$(kurtosis port print cdk cdk-erigon-rpc-001 rpc)" while true; do verified_batches="$(cast to-dec "$(cast rpc --rpc-url "$rpc_url" zkevm_verifiedBatchNumber | sed 's/"//g')")" From ce585edb17126b48978948489962884f201e943a Mon Sep 17 00:00:00 2001 From: Victor Castell <0x@vcastellm.xyz> Date: Fri, 8 Nov 2024 11:02:14 +0000 Subject: [PATCH 3/4] fix: update minter key --- test/bridge-e2e.bats | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/bridge-e2e.bats b/test/bridge-e2e.bats index d504c1c9..01411a11 100644 --- a/test/bridge-e2e.bats +++ b/test/bridge-e2e.bats @@ -76,6 +76,9 @@ setup() { local initial_receiver_balance=$(cast balance "$receiver" --rpc-url "$l2_rpc_url") echo "Initial receiver balance of native token on L2 $initial_receiver_balance" >&3 + local initial_mint_balance=$(cast balance "0x8943545177806ED17B9F23F0a21ee5948eCaa776" --rpc-url "$l1_rpc_url") + echo "Initial minter balance on L1 $initial_mint_balance" >&3 + # Query for initial sender balance run query_contract "$l1_rpc_url" "$gas_token_addr" "$balance_of_fn_sig" "$sender_addr" assert_success @@ -85,7 +88,7 @@ setup() { # Mint gas token on L1 local tokens_amount="0.1ether" local wei_amount=$(cast --to-unit $tokens_amount wei) - local minter_key=${MINTER_KEY:-"42b6e34dc21598a807dc19d7784c71b2a7a01f6480dc6f58258f78e539f1a1fa"} + local minter_key=${MINTER_KEY:-"bcdf20249abf0ed6d944c0288fad489e33f66b3960d9e6229c1cd214ed3bbe31"} run mint_erc20_tokens "$l1_rpc_url" "$gas_token_addr" "$minter_key" "$sender_addr" "$tokens_amount" assert_success From 6f3a98e13d35c58e2445baa54dfb8a6df28d96d3 Mon Sep 17 00:00:00 2001 From: Victor Castell Date: Fri, 8 Nov 2024 12:55:57 +0100 Subject: [PATCH 4/4] Apply feedback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stefan Negovanović <93934272+Stefan-Ethernal@users.noreply.github.com> --- test/bridge-e2e.bats | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/bridge-e2e.bats b/test/bridge-e2e.bats index 01411a11..ed599c7d 100644 --- a/test/bridge-e2e.bats +++ b/test/bridge-e2e.bats @@ -76,8 +76,8 @@ setup() { local initial_receiver_balance=$(cast balance "$receiver" --rpc-url "$l2_rpc_url") echo "Initial receiver balance of native token on L2 $initial_receiver_balance" >&3 - local initial_mint_balance=$(cast balance "0x8943545177806ED17B9F23F0a21ee5948eCaa776" --rpc-url "$l1_rpc_url") - echo "Initial minter balance on L1 $initial_mint_balance" >&3 + local l1_minter_balance=$(cast balance "0x8943545177806ED17B9F23F0a21ee5948eCaa776" --rpc-url "$l1_rpc_url") + echo "Initial minter balance on L1 $l1_minter_balance" >&3 # Query for initial sender balance run query_contract "$l1_rpc_url" "$gas_token_addr" "$balance_of_fn_sig" "$sender_addr"