Skip to content

Commit

Permalink
feat(l1): assertoor CI integration (#943)
Browse files Browse the repository at this point in the history
**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](lambdaclass/ethereum-package@811581e)
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
  • Loading branch information
rodrigo-o authored Oct 24, 2024
1 parent f648387 commit 22e3cff
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 3 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/assertoor.yaml
Original file line number Diff line number Diff line change
@@ -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'
5 changes: 5 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/hive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
28 changes: 28 additions & 0 deletions test_data/el-stability-check.yml
Original file line number Diff line number Diff line change
@@ -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"
5 changes: 4 additions & 1 deletion test_data/network_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit 22e3cff

Please sign in to comment.