feat: add tracing support for StateSyncTx #1218
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Kurtosis E2E Tests | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| - 'develop' | |
| pull_request: | |
| branches: | |
| - 'master' | |
| - 'develop' | |
| types: [opened, synchronize] | |
| concurrency: | |
| group: kurtosis-e2e-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| ENCLAVE_NAME: kurtosis-e2e | |
| POLYCLI_VERSION: v0.1.103 | |
| jobs: | |
| build-bor: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout bor | |
| uses: actions/checkout@v5 | |
| - name: Build bor docker image | |
| run: docker build -t bor:local --file Dockerfile . | |
| - name: Save bor docker image | |
| run: docker save bor:local | gzip > bor-image.tar.gz | |
| - name: Upload bor docker image | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bor-image | |
| path: bor-image.tar.gz | |
| retention-days: 1 | |
| build-heimdall-v2: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout heimdall-v2 | |
| uses: actions/checkout@v5 | |
| with: | |
| repository: 0xPolygon/heimdall-v2 | |
| ref: develop | |
| - name: Build heimdall-v2 docker image | |
| run: docker build -t heimdall-v2:local --file Dockerfile . | |
| - name: Save heimdall-v2 docker image | |
| run: docker save heimdall-v2:local | gzip > heimdall-v2-image.tar.gz | |
| - name: Upload heimdall-v2 docker image | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: heimdall-v2-image | |
| path: heimdall-v2-image.tar.gz | |
| retention-days: 1 | |
| e2e-tests: | |
| needs: | |
| - build-bor | |
| - build-heimdall-v2 | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| # These permissions are required to log in to GCR | |
| permissions: | |
| contents: read | |
| actions: write | |
| id-token: write | |
| steps: | |
| # Set up kurtosis | |
| - name: Checkout kurtosis-pos | |
| uses: actions/checkout@v5 | |
| with: | |
| repository: 0xPolygon/kurtosis-pos | |
| ref: hv2/eip1559-and-rio-at-128 | |
| # This step will free disk space and thus remove any docker images previously built | |
| - name: Pre kurtosis run | |
| uses: ./.github/actions/setup | |
| with: | |
| main_branch: develop | |
| docker_username: ${{ secrets.DOCKERHUB }} | |
| docker_token: ${{ secrets.DOCKERHUB_KEY }} | |
| - name: Checkout pos-workflows | |
| uses: actions/checkout@v5 | |
| with: | |
| repository: 0xPolygon/pos-workflows | |
| ref: main | |
| path: pos-workflows | |
| - name: Copy kurtosis config | |
| run: cp ./pos-workflows/configs/kurtosis-e2e.yml ./kurtosis-e2e.yml | |
| # Load images | |
| - name: Download bor docker image | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: bor-image | |
| - name: Download heimdall-v2 docker image | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: heimdall-v2-image | |
| - name: Load bor docker image | |
| run: | | |
| gunzip -c bor-image.tar.gz | docker load | |
| echo "Loaded bor docker image:" | |
| docker images bor:local --format "{{.ID}} {{.CreatedAt}}" | |
| - name: Load heimdall-v2 docker image | |
| run: | | |
| gunzip -c heimdall-v2-image.tar.gz | docker load | |
| echo "Loaded heimdall-v2 docker image:" | |
| docker images heimdall-v2:local --format "{{.ID}} {{.CreatedAt}}" | |
| # Deploy kurtosis enclave | |
| - name: Kurtosis run | |
| run: kurtosis run --args-file=kurtosis-e2e.yml --enclave=${{ env.ENCLAVE_NAME }} . | |
| - name: Inspect enclave | |
| run: kurtosis enclave inspect ${{ env.ENCLAVE_NAME }} | |
| - name: Install polycli | |
| run: | | |
| tmp_dir=$(mktemp -d) | |
| curl -L https://github.com/0xPolygon/polygon-cli/releases/download/${{ env.POLYCLI_VERSION }}/polycli_${{ env.POLYCLI_VERSION }}_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 | |
| polycli version | |
| - name: Run smoke tests | |
| id: smoke-tests | |
| working-directory: pos-workflows/tests | |
| run: bash kurtosis_smoke_test.sh | |
| - name: Install Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 'stable' | |
| - name: Run RPC tests | |
| id: rpc-tests | |
| working-directory: pos-workflows/tests/rpc_tests | |
| run: | | |
| export RPC_URL=$(kurtosis port print ${{ env.ENCLAVE_NAME }} l2-el-1-bor-heimdall-v2-validator rpc) | |
| export PRIV_KEY="0xd40311b5a5ca5eaeb48dfba5403bde4993ece8eccf4190e98e19fcd4754260ea" | |
| go run . --priv-key "$PRIV_KEY" --rpc-url "$RPC_URL" --log-req-res true | |
| # Collect diagnostics on failure | |
| - name: Collect network diagnostics and state dump | |
| if: >- | |
| always() && ( | |
| steps.smoke-tests.outcome == 'failure' || | |
| steps.rpc-tests.outcome == 'failure') | |
| uses: ./pos-workflows/.github/actions/network-diagnostics-and-state-dump | |
| with: | |
| enclave_name: ${{ env.ENCLAVE_NAME }} | |
| # Clean up | |
| - name: Post kurtosis run | |
| if: always() | |
| uses: ./.github/actions/cleanup | |
| with: | |
| main_branch: develop | |
| enclave_name: ${{ env.ENCLAVE_NAME }} |