From 22e3cff1a2f65ecc4026dad31d1c3551f08874f6 Mon Sep 17 00:00:00 2001 From: Rodrigo Oliveri Date: Thu, 24 Oct 2024 09:37:54 -0300 Subject: [PATCH] feat(l1): assertoor CI integration (#943) **Motivation** Assertoor integration as part of the CI **Description** This PR adds the [Assertoor GHA](https://github.com/ethpandaops/kurtosis-assertoor-github-action) to have a local devnet running with some checks as part of the CI. Most of the time for the stability checks was related to consensus, after removing those checks in a custom playbook created from [`stability-check.yaml`](https://github.com/ethpandaops/assertoor-test/blob/master/assertoor-tests/stability-check.yaml) we are able to run it as part of the CI. For assertoor to run with our [fork of ethereum-package](https://github.com/lambdaclass/ethereum-package) a small [commit](https://github.com/lambdaclass/ethereum-package/commit/811581ee8ab42639e4e9ef7c1197041689bfdfd1) was needed to the `ethereum-rust-integration` branch. I've also added some entries to the `paths-ignore` on the push rules. _Note about time: Most of the time spent in this new job is not the assertoor run, which takes ~3-5 mins, but the actual building of the docker image, which take ~9mins before starting the tests. This is done in parallel to the docker build in the CI, but now it's done 2 times. Fortunately, this is not the longest run, since `Hive / Cancun Engine tests (pull_request)` takes ~19m_ Resolves #952 --- .github/workflows/assertoor.yaml | 41 ++++++++++++++++++++++++++++++++ .github/workflows/ci.yaml | 5 ++++ .github/workflows/hive.yaml | 8 +++++-- test_data/el-stability-check.yml | 28 ++++++++++++++++++++++ test_data/network_params.yaml | 5 +++- 5 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/assertoor.yaml create mode 100644 test_data/el-stability-check.yml diff --git a/.github/workflows/assertoor.yaml b/.github/workflows/assertoor.yaml new file mode 100644 index 000000000..bb5b8aa3e --- /dev/null +++ b/.github/workflows/assertoor.yaml @@ -0,0 +1,41 @@ +name: Assertoor +on: + merge_group: + push: + branches: [ main ] + pull_request: + branches: [ '*' ] + paths-ignore: + - 'README.md' + - 'LICENSE' + - "**/README.md" + - "**/docs/**" + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +env: + RUST_VERSION: 1.80.1 + +jobs: + test-run: + name: Stability Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build Docker image + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + load: true # Important for building without pushing + tags: ethereum_rust + - name: Setup kurtosis testnet and run assertoor tests + uses: ethpandaops/kurtosis-assertoor-github-action@v1 + with: + ethereum_package_url: 'github.com/lambdaclass/ethereum-package' + ethereum_package_branch: 'ethereum-rust-integration' + ethereum_package_args: './test_data/network_params.yaml' diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9bcb87eb0..c643500e5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,6 +5,11 @@ on: branches: [main] pull_request: branches: ["*"] + paths-ignore: + - 'README.md' + - 'LICENSE' + - "**/README.md" + - "**/docs/**" concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} diff --git a/.github/workflows/hive.yaml b/.github/workflows/hive.yaml index 210227485..7d3f90850 100644 --- a/.github/workflows/hive.yaml +++ b/.github/workflows/hive.yaml @@ -4,10 +4,14 @@ on: merge_group: push: branches: [main] - paths-ignore: ["crates/l2/**"] pull_request: branches: ["*"] - paths-ignore: ["crates/l2/**"] + paths-ignore: + - "crates/l2/**" + - 'README.md' + - 'LICENSE' + - "**/README.md" + - "**/docs/**" concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} diff --git a/test_data/el-stability-check.yml b/test_data/el-stability-check.yml new file mode 100644 index 000000000..5760091b3 --- /dev/null +++ b/test_data/el-stability-check.yml @@ -0,0 +1,28 @@ +# This file is based upon `assertoor-tests` stability check file: +# https://github.com/ethpandaops/assertoor-test/blob/master/assertoor-tests/stability-check.yaml +# +# We removed the consensus checks to keep it minimal. The checks removed were: +# - check_consensus_finality +# - check_consensus_attestation_stats +# - check_consensus_reorgs +# - check_consensus_forks + +id: el-stability-check +name: "Check Execution Stability" +timeout: 2h +tasks: +- name: check_clients_are_healthy + title: "Check if at least one client is ready" + timeout: 5m + config: + minClientCount: 1 + +- name: run_tasks_concurrent + title: "Check if all EL & CL clients are synced" + timeout: 30m + config: + tasks: + - name: check_consensus_sync_status + title: "Check if CL clients are synced" + - name: check_execution_sync_status + title: "Check if EL clients are synced" diff --git a/test_data/network_params.yaml b/test_data/network_params.yaml index 0799964ff..443e7082f 100644 --- a/test_data/network_params.yaml +++ b/test_data/network_params.yaml @@ -14,5 +14,8 @@ additional_services: - blob_spammer assertoor_params: - run_stability_check: true + run_stability_check: false run_block_proposal_check: false + tests: + - 'https://raw.githubusercontent.com/lambdaclass/lambda_ethereum_rust/refs/heads/assertoor-run-on-cd/test_data/el-stability-check.yml' +