Skip to content

Commit

Permalink
Add dynamic gas fee tx to CI for post-london
Browse files Browse the repository at this point in the history
  • Loading branch information
cffls committed Aug 5, 2024
1 parent 314996b commit 70e5603
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/ci_zkevm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,84 @@ jobs:
kurtosis service logs cdk-v1 zkevm-prover-001 --all > zkevm-prover-001.log
kurtosis service logs cdk-v1 zkevm-executor-pless-001 --all > zkevm-executor-pless-001.log
- name: Upload logs
if: failure()
uses: actions/upload-artifact@v3
with:
name: logs_${{ github.run_id }}
path: ./kurtosis-cdk/ci_logs

kurtosis-cdk-post-london:
runs-on: ubuntu-latest
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.3
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 yq
run: |
sudo curl -L https://github.com/mikefarah/yq/releases/download/v4.44.2/yq_linux_amd64 -o /usr/local/bin/yq
sudo chmod +x /usr/local/bin/yq
/usr/local/bin/yq --version
- 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: Configure Kurtosis CDK
working-directory: ./kurtosis-cdk
run: |
/usr/local/bin/yq -i '.args.cdk_erigon_node_image = "cdk-erigon:local"' cdk-erigon-sequencer-params.yml
/usr/local/bin/yq -i '.args.zkevm_bridge_service_image = "hermeznetwork/zkevm-bridge-service:v0.5.0-RC8"' cdk-erigon-sequencer-params.yml
sed -i '/zkevm\.sequencer-initial-fork-id/d' ./templates/cdk-erigon/config-sequencer.yaml
sed -i '$a\zkevm.disable-virtual-counters: true' ./templates/cdk-erigon/config-sequencer.yaml
sed -i '$a\zkevm.disable-virtual-counters: true' ./templates/cdk-erigon/config.yaml
jq '.londonBlock = 0 | .normalcyBlock = 0 | .shanghaiTime = 0 | .cancunTime = 0 | del(.terminalTotalDifficulty)' ./templates/cdk-erigon/chainspec.json > temp.json
mv temp.json ./templates/cdk-erigon/chainspec.json
- name: Deploy Kurtosis CDK package
working-directory: ./kurtosis-cdk
run: kurtosis run --enclave cdk-v1 --args-file cdk-erigon-sequencer-params.yml --image-download always .

- 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-node-001 http-rpc)" --private-key "0x12d7de8621a77640c9241b2595ba78ce443d05e94090365ab3bb5e19df82c625" --verbosity 700 --requests 500 --rate-limit 50 --mode uniswapv3

- name: Upload logs
uses: actions/upload-artifact@v3
with:
name: evm-rpc-tests-logs-${{ github.run_id }}
path: ./cdk-erigon/logs/evm-rpc-tests.log

- name: Prepare logs
working-directory: ./kurtosis-cdk
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
- name: Upload logs
if: failure()
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 70e5603

Please sign in to comment.