Skip to content

Commit

Permalink
build(core): all-around tx check in assertoor (#1259)
Browse files Browse the repository at this point in the history
**Motivation**

We want to have more checks regarding transactions, this PR accomplish
that through assertoor

**Description**

This PR tackles 2 main things:
- Having a way to validate the tx spammer is working as expected.
- Add [additional transaction
checks](https://github.com/lambdaclass/ethrex/blob/f76c491700f1feda7741c7bd6b85d1e34493f49f/test_data/assertoor/el-stability-check.yml#L24-L29)
to the assertoor suite to not just validate blob transactions.
- `eoa-transactions-test` [[Link to
playbook](https://github.com/ethpandaops/assertoor/blob/master/playbooks/stable/eoa-transactions-test.yaml)]

To do it, I separated the `network_params.yaml` used for the `make
localnet` from 2 new ones used just for the assertoor workflow, one for
the blobs + stability check and the other for the new tx checks.

Also during the stability check we make sure at least one block is
proposed by us with more than 50tx validating that the tx spammer is
working as expected. The separation was done due to timing, it wasn't
possible to parallelize the test as far as I checked without creating a
new playbook and I preferred to use the already provided in parallel
steps.

Apart from creating the 2 new files, I removed assertoor from the one
used by `make localnet`.

**TIME**
Right now the new job takes ~15min, and added to the ~5min for the build
it accounts to ~20min.

Closes #1128
  • Loading branch information
rodrigo-o authored Nov 28, 2024
1 parent f461511 commit 4444f8b
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,27 @@

id: el-stability-check
name: "Check Execution Stability"
timeout: 2h
timeout: 18m
tasks:
- name: check_clients_are_healthy
title: "Check if all clients are ready"
timeout: 1m

- name: run_tasks_concurrent
title: "Check if all EL & CL clients are synced"
title: "Check if all EL & CL clients are synced and the tx spammer is working"
timeout: 5m
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"
- name: check_consensus_block_proposals
title: "Check the tx spammer is working as expected for block proposal with >= 50 transactions"
config:
minTransactionCount: 50
configVars:
clientPattern: "1-ethrex-lighthouse"

- name: run_task_matrix
title: "Check block proposals from all client pairs"
Expand All @@ -45,3 +51,5 @@ tasks:
title: "Check consensus reorgs"
- name: check_consensus_forks
title: "Check consensus forks"


21 changes: 21 additions & 0 deletions .github/config/assertoor/network_params_blob.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
participants:
- el_type: ethrex
cl_type: lighthouse
validator_count: 32
- el_type: geth
cl_type: lighthouse
validator_count: 32
- el_type: geth
cl_type: lighthouse
validator_count: 32

additional_services:
- assertoor
- tx_spammer

assertoor_params:
run_stability_check: false
run_block_proposal_check: false
tests:
- https://raw.githubusercontent.com/ethpandaops/assertoor/refs/heads/master/playbooks/stable/blob-transactions-test.yaml
- https://raw.githubusercontent.com/lambdaclass/ethrex/refs/heads/main/.github/config/assertoor/el-stability-check.yaml
16 changes: 16 additions & 0 deletions .github/config/assertoor/network_params_tx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
participants:
- el_type: ethrex
cl_type: lighthouse
validator_count: 32
- el_type: geth
cl_type: lighthouse
validator_count: 32

additional_services:
- assertoor

assertoor_params:
run_stability_check: false
run_block_proposal_check: false
tests:
- https://raw.githubusercontent.com/ethpandaops/assertoor/refs/heads/master/playbooks/stable/eoa-transactions-test.yaml
47 changes: 39 additions & 8 deletions .github/workflows/ci_l1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,10 @@ jobs:
name: ethrex_image
path: /tmp/ethrex_image.tar

run-assertoor:
name: Assertoor - Stability Check
run-assertoor-tx-check:
name: Assertoor - Transaction Check
runs-on: ubuntu-latest
needs: [docker_build]
if: ${{ github.event_name != 'merge_group' }}
steps:
- uses: actions/checkout@v4

Expand All @@ -119,13 +118,40 @@ jobs:
run: |
docker load --input /tmp/ethrex_image.tar
- name: Setup kurtosis testnet and run assertoor tests
- name: Run assertoor
uses: ethpandaops/kurtosis-assertoor-github-action@v1
with:
enclave_name: "ethrex-assertoor-tx"
kurtosis_version: "1.4.2"
ethereum_package_url: "github.com/lambdaclass/ethereum-package"
ethereum_package_branch: "ethrex-integration"
ethereum_package_args: "./test_data/network_params.yaml"
ethereum_package_args: "./.github/config/assertoor/network_params_tx.yaml"

run-assertoor-blob-check:
name: Assertoor - Blobs & Stability Check
runs-on: ubuntu-latest
needs: [docker_build]
steps:
- uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: ethrex_image
path: /tmp

- name: Load image
run: |
docker load --input /tmp/ethrex_image.tar
- name: Run assertoor
uses: ethpandaops/kurtosis-assertoor-github-action@v1
with:
enclave_name: "ethrex-assertoor-blob"
kurtosis_version: "1.4.2"
ethereum_package_url: "github.com/lambdaclass/ethereum-package"
ethereum_package_branch: "ethrex-integration"
ethereum_package_args: "./.github/config/assertoor/network_params_blob.yaml"

run-hive:
name: Hive - ${{ matrix.name }}
Expand Down Expand Up @@ -186,14 +212,19 @@ jobs:
# "Integration Test" is a required check, don't change the name
name: Integration Test
runs-on: ubuntu-latest
needs: [run-assertoor, run-hive]
needs: [run-assertoor-tx-check, run-assertoor-blob-check, run-hive]
# Make sure this job runs even if the previous jobs failed or were skipped
if: ${{ always() && needs.run-assertoor.result != 'skipped' && needs.run-hive.result != 'skipped' }}
steps:
- name: Check if any job failed
run: |
if [ "${{ needs.run-assertoor.result }}" != "success" ]; then
echo "Job Assertoor failed"
if [ "${{ needs.run-assertoor-tx-check.result }}" != "success" ]; then
echo "Job Assertoor Tx Check failed"
exit 1
fi
if [ "${{ needs.run-assertoor-blob-check.result }}" != "success" ]; then
echo "Job Assertoor Blob Check failed"
exit 1
fi
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/ci_skipped.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@ name: CI Skipped
on:
pull_request:
branches: ["**"]
paths-ignore:
- '**/*.rs'
- '**/*.toml'
- '**/*.yaml'
- '**/*.sh'
- '**/*.json'
- '**/*.rlp'
- 'Dockefile*'

paths:
- 'README.md'
- 'LICENSE'
- "**/README.md"
- "**/docs/**"
jobs:
lint:
# "Lint" is a required check, don't change the name
Expand Down
8 changes: 0 additions & 8 deletions test_data/network_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@ participants:
validator_count: 32

additional_services:
- assertoor
- dora
- el_forkmon
- tx_spammer

assertoor_params:
run_stability_check: false
run_block_proposal_check: false
run_blob_transaction_test: true
tests:
- 'https://raw.githubusercontent.com/lambdaclass/ethrex/refs/heads/main/test_data/el-stability-check.yml'

0 comments on commit 4444f8b

Please sign in to comment.