diff --git a/.github/actions/setup-kurtosis/action.yml b/.github/actions/setup-kurtosis/action.yml new file mode 100644 index 00000000000..478a139e267 --- /dev/null +++ b/.github/actions/setup-kurtosis/action.yml @@ -0,0 +1,52 @@ + +name: "Setup Kurtosis" +description: "Setup Kurtosis CDK for tests" +runs: + using: 'composite' + steps: + - name: Checkout cdk-erigon + uses: actions/checkout@v4 + with: + path: cdk-erigon + + - name: Checkout kurtosis-cdk + uses: actions/checkout@v4 + with: + repository: 0xPolygon/kurtosis-cdk + ref: v0.2.24 + path: kurtosis-cdk + + - name: Install Kurtosis CDK tools + uses: ./kurtosis-cdk/.github/actions/setup-kurtosis-cdk + + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + + - name: Install polycli + run: | + tmp_dir=$(mktemp -d) && curl -L https://github.com/0xPolygon/polygon-cli/releases/download/v0.1.48/polycli_v0.1.48_linux_amd64.tar.gz | tar -xz -C "$tmp_dir" && mv "$tmp_dir"/* /usr/local/bin/polycli && rm -rf "$tmp_dir" + sudo chmod +x /usr/local/bin/polycli + /usr/local/bin/polycli version + - name: Build docker image + working-directory: ./cdk-erigon + run: docker build -t cdk-erigon:local --file Dockerfile . + + - name: Remove unused flags + working-directory: ./kurtosis-cdk + run: | + sed -i '/zkevm.sequencer-batch-seal-time:/d' templates/cdk-erigon/config.yml + sed -i '/zkevm.sequencer-non-empty-batch-seal-time:/d' templates/cdk-erigon/config.yml + sed -i '/sentry.drop-useless-peers:/d' templates/cdk-erigon/config.yml + sed -i '/zkevm.pool-manager-url/d' templates/cdk-erigon/config.yml + sed -i '/zkevm.l2-datastreamer-timeout:/d' templates/cdk-erigon/config.yml + + - name: Create params.yml overrides + working-directory: ./kurtosis-cdk + run: | + echo 'args:' > params.yml + echo ' cdk_erigon_node_image: cdk-erigon:local' >> params.yml + echo ' el-1-geth-lighthouse: ethpandaops/lighthouse@sha256:4902d9e4a6b6b8d4c136ea54f0e51582a32f356f3dec7194a1adee13ed2d662e' >> params.yml + + - name: Deploy Kurtosis CDK package + working-directory: ./kurtosis-cdk + run: kurtosis run --enclave cdk-v1 --args-file params.yml --image-download always . diff --git a/.github/workflows/ci_zkevm.yml b/.github/workflows/ci_zkevm.yml index 9788c4a8376..c10965045d3 100644 --- a/.github/workflows/ci_zkevm.yml +++ b/.github/workflows/ci_zkevm.yml @@ -74,46 +74,8 @@ jobs: - name: Checkout cdk-erigon uses: actions/checkout@v4 with: - path: cdk-erigon - - - name: Checkout kurtosis-cdk - uses: actions/checkout@v4 - with: - repository: 0xPolygon/kurtosis-cdk - ref: v0.2.21 - path: kurtosis-cdk - - - name: Install Kurtosis CDK tools (Kurtosis, yq, Foundry, disable analytics) - uses: ./kurtosis-cdk/.github/actions/setup-kurtosis-cdk - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - - - - name: Build docker image - working-directory: ./cdk-erigon - run: docker build -t cdk-erigon:local --file Dockerfile . - - - name: Remove unused flags - working-directory: ./kurtosis-cdk - run: | - sed -i '/zkevm.sequencer-batch-seal-time:/d' templates/cdk-erigon/config.yml - sed -i '/zkevm.sequencer-non-empty-batch-seal-time:/d' templates/cdk-erigon/config.yml - sed -i '/sentry.drop-useless-peers:/d' templates/cdk-erigon/config.yml - sed -i '/zkevm.l2-datastreamer-timeout:/d' templates/cdk-erigon/config.yml - - - - name: Create params.yml overrides - working-directory: ./kurtosis-cdk - run: | - echo 'args:' > params.yml - echo ' data_availability_mode: '"${{ matrix.da-mode }}" >> params.yml - echo ' cdk_erigon_node_image: cdk-erigon:local' >> params.yml - - - name: Deploy Kurtosis CDK package - working-directory: ./kurtosis-cdk - run: | - kurtosis run --enclave cdk-v1 --image-download always --args-file params.yml . + - name: Setup kurtosis + uses: ./.github/actions/setup-kurtosis - name: Run process with CPU monitoring working-directory: ./cdk-erigon @@ -206,64 +168,9 @@ jobs: - name: Checkout cdk-erigon uses: actions/checkout@v4 with: - path: cdk-erigon - - - name: Checkout kurtosis-cdk - uses: actions/checkout@v4 - with: - repository: 0xPolygon/kurtosis-cdk - ref: v0.2.21 - path: kurtosis-cdk - - - name: Install Kurtosis CDK tools - uses: ./kurtosis-cdk/.github/actions/setup-kurtosis-cdk - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - - - name: Install polycli - run: | - tmp_dir=$(mktemp -d) && curl -L https://github.com/0xPolygon/polygon-cli/releases/download/v0.1.48/polycli_v0.1.48_linux_amd64.tar.gz | tar -xz -C "$tmp_dir" && mv "$tmp_dir"/* /usr/local/bin/polycli && rm -rf "$tmp_dir" - sudo chmod +x /usr/local/bin/polycli - /usr/local/bin/polycli version - - - name: Build docker image - working-directory: ./cdk-erigon - run: docker build -t cdk-erigon:local --file Dockerfile . - - - name: Modify cdk-erigon flags - working-directory: ./kurtosis-cdk - run: | - sed -i '/zkevm.sequencer-batch-seal-time:/d' templates/cdk-erigon/config.yml - sed -i '/zkevm.sequencer-non-empty-batch-seal-time:/d' templates/cdk-erigon/config.yml - sed -i '/zkevm\.sequencer-initial-fork-id/d' ./templates/cdk-erigon/config.yml - sed -i '/sentry.drop-useless-peers:/d' templates/cdk-erigon/config.yml - sed -i '/zkevm\.pool-manager-url/d' ./templates/cdk-erigon/config.yml - sed -i '$a\zkevm.disable-virtual-counters: true' ./templates/cdk-erigon/config.yml - sed -i '/zkevm.l2-datastreamer-timeout:/d' templates/cdk-erigon/config.yml - - - - name: Configure Kurtosis CDK - working-directory: ./kurtosis-cdk - run: | - sed -i 's/"londonBlock": [0-9]\+/"londonBlock": 0/' ./templates/cdk-erigon/chainspec.json - sed -i 's/"normalcyBlock": [0-9]\+/"normalcyBlock": 0/' ./templates/cdk-erigon/chainspec.json - sed -i 's/"shanghaiTime": [0-9]\+/"shanghaiTime": 0/' ./templates/cdk-erigon/chainspec.json - sed -i 's/"cancunTime": [0-9]\+/"cancunTime": 0/' ./templates/cdk-erigon/chainspec.json - sed -i '/"terminalTotalDifficulty"/d' ./templates/cdk-erigon/chainspec.json - - - name: Create params.yml overrides - working-directory: ./kurtosis-cdk - run: | - echo 'args:' > params.yml - echo ' erigon_strict_mode: false' >> params.yml - echo ' cdk_erigon_node_image: cdk-erigon:local' >> params.yml - - - name: Deploy Kurtosis CDK package - working-directory: ./kurtosis-cdk - run: | - kurtosis run --enclave cdk-v1 --image-download always --args-file params.yml . - + - name: Setup kurtosis + uses: ./.github/actions/setup-kurtosis + - name: Dynamic gas fee tx load test working-directory: ./kurtosis-cdk run: /usr/local/bin/polycli loadtest --rpc-url "$(kurtosis port print cdk-v1 cdk-erigon-rpc-001 rpc)" --private-key "0x12d7de8621a77640c9241b2595ba78ce443d05e94090365ab3bb5e19df82c625" --verbosity 700 --requests 500 --rate-limit 50 --mode uniswapv3 --legacy diff --git a/.github/workflows/test-resequence.yml b/.github/workflows/test-resequence.yml index eece01ceb94..cee0118e0e1 100644 --- a/.github/workflows/test-resequence.yml +++ b/.github/workflows/test-resequence.yml @@ -18,49 +18,8 @@ jobs: steps: - name: Checkout cdk-erigon uses: actions/checkout@v4 - with: - path: cdk-erigon - - - name: Checkout kurtosis-cdk - uses: actions/checkout@v4 - with: - repository: 0xPolygon/kurtosis-cdk - ref: v0.2.21 - path: kurtosis-cdk - - - name: Install Kurtosis CDK tools - uses: ./kurtosis-cdk/.github/actions/setup-kurtosis-cdk - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - - - name: Install polycli - run: | - tmp_dir=$(mktemp -d) && curl -L https://github.com/0xPolygon/polygon-cli/releases/download/v0.1.48/polycli_v0.1.48_linux_amd64.tar.gz | tar -xz -C "$tmp_dir" && mv "$tmp_dir"/* /usr/local/bin/polycli && rm -rf "$tmp_dir" - sudo chmod +x /usr/local/bin/polycli - /usr/local/bin/polycli version - - name: Build docker image - working-directory: ./cdk-erigon - run: docker build -t cdk-erigon:local --file Dockerfile . - - - name: Remove unused flags - working-directory: ./kurtosis-cdk - run: | - sed -i '/zkevm.sequencer-batch-seal-time:/d' templates/cdk-erigon/config.yml - sed -i '/zkevm.sequencer-non-empty-batch-seal-time:/d' templates/cdk-erigon/config.yml - sed -i '/sentry.drop-useless-peers:/d' templates/cdk-erigon/config.yml - sed -i '/zkevm.pool-manager-url/d' templates/cdk-erigon/config.yml - sed -i '/zkevm.l2-datastreamer-timeout:/d' templates/cdk-erigon/config.yml - - - name: Create params.yml overrides - working-directory: ./kurtosis-cdk - run: | - echo 'args:' > params.yml - echo ' cdk_erigon_node_image: cdk-erigon:local' >> params.yml - - - name: Deploy Kurtosis CDK package - working-directory: ./kurtosis-cdk - run: kurtosis run --enclave cdk-v1 --args-file params.yml --image-download always . + - name: Setup kurtosis + uses: ./.github/actions/setup-kurtosis - name: Test resequence working-directory: ./cdk-erigon