Skip to content

Commit

Permalink
Merge branch 'levm/fix/vmTests-fix-changes' into levm/fix/vmArithmeti…
Browse files Browse the repository at this point in the history
…cTests-changes
  • Loading branch information
maximopalopoli committed Nov 29, 2024
2 parents fd59340 + 2efb821 commit 6c87ce0
Show file tree
Hide file tree
Showing 109 changed files with 15,509 additions and 1,623 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
25 changes: 25 additions & 0 deletions .github/scripts/publish_levm_ef_tests_summary.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
curl -X POST $url \
-H 'Content-Type: application/json; charset=utf-8' \
--data @- <<EOF
$(jq -n --arg text "$(cat cmd/ef_tests/levm/levm_ef_tests_summary_slack.txt)" '{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "Daily LEVM EF Tests Run Report"
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "$text"
}
}
]
}')
EOF
9 changes: 6 additions & 3 deletions .github/scripts/publish_loc.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
curl -X POST $url \
-H 'Content-Type: application/json; charset=utf-8' \
--data @- <<EOF
$(jq -n --arg text "$(cat loc_report.md)" '{
$(jq -n --arg text "$(cat loc_report_slack.txt)" '{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "Weekly ethrex lines of code report"
"text": "Lines of Code Report"
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": $text
"text": "$text"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:
cancel-in-progress: true

env:
RUST_VERSION: 1.80.1
RUST_VERSION: 1.81.0

jobs:
lint:
Expand Down
234 changes: 234 additions & 0 deletions .github/workflows/ci_l1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
name: L1
on:
push:
branches: ["main"]
merge_group:
pull_request:
branches: ["**"]
paths-ignore:
- "README.md"
- "LICENSE"
- "**/README.md"
- "**/docs/**"
- "crates/vm/levm/**" # We run this in a separate workflow

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
RUST_VERSION: 1.81.0

jobs:
lint:
# "Lint" is a required check, don't change the name
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Rustup toolchain install
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
components: rustfmt, clippy

- name: Add Rust Cache
uses: Swatinem/rust-cache@v2

- name: Run cargo check
run: cargo check

- name: Run cargo build
run: |
cargo build
- name: Run cargo clippy
run: |
cargo clippy --all-targets --all-features --workspace --exclude ethrex-prover -- -D warnings
- name: Run cargo fmt
run: |
cargo fmt --all -- --check
test:
# "Test" is a required check, don't change the name
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Rustup toolchain install
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}

- name: Caching
uses: Swatinem/rust-cache@v2

- name: Download test vectors
run: |
make download-test-vectors
- name: Run tests
run: |
make test
docker_build:
# "Build Docker" is a required check, don't change the name
name: Build Docker
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
tags: ethrex
outputs: type=docker,dest=/tmp/ethrex_image.tar

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ethrex_image
path: /tmp/ethrex_image.tar

run-assertoor-tx-check:
name: Assertoor - Transaction 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-tx"
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_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 }}
runs-on: ubuntu-latest
needs: [docker_build]
if: ${{ github.event_name != 'merge_group' }}
strategy:
matrix:
include:
- name: "Rpc Compat tests"
simulation: ethereum/rpc-compat
test_pattern: /eth_chainId|eth_getTransactionByBlockHashAndIndex|eth_getTransactionByBlockNumberAndIndex|eth_getCode|eth_getStorageAt|eth_call|eth_getTransactionByHash|eth_getBlockByHash|eth_getBlockByNumber|eth_createAccessList|eth_getBlockTransactionCountByNumber|eth_getBlockTransactionCountByHash|eth_getBlockReceipts|eth_getTransactionReceipt|eth_blobGasPrice|eth_blockNumber|ethGetTransactionCount|debug_getRawHeader|debug_getRawBlock|debug_getRawTransaction|debug_getRawReceipts|eth_estimateGas|eth_getBalance|eth_sendRawTransaction|eth_getProof|eth_getLogs
- name: "Devp2p discv4 tests"
simulation: devp2p
test_pattern: discv4
- name: "Devp2p snap tests"
simulation: devp2p
test_pattern: /AccountRange|StorageRanges|ByteCodes|TrieNodes
- name: "Devp2p eth tests"
simulation: devp2p
test_pattern: eth/Status|GetBlockHeaders|SimultaneousRequests|SameRequestID|ZeroRequestID|GetBlockBodies|MaliciousHandshake|MaliciousStatus|Transaction|InvalidTxs
- name: "Engine Auth and EC tests"
simulation: ethereum/engine
test_pattern: engine-(auth|exchange-capabilities)/
- name: "Cancun Engine tests"
simulation: ethereum/engine
test_pattern: engine-cancun/Blob Transactions On Block 1|Blob Transaction Ordering, Single|Blob Transaction Ordering, Multiple Accounts|Replace Blob Transactions|Parallel Blob Transactions|ForkchoiceUpdatedV3 Modifies Payload ID on Different Beacon Root|NewPayloadV3 After Cancun|NewPayloadV3 Versioned Hashes|Incorrect BlobGasUsed|Bad Hash|ParentHash equals BlockHash|RPC:|in ForkchoiceState|Unknown|Invalid PayloadAttributes|Unique|ForkchoiceUpdated Version on Payload Request|Re-Execute Payload|In-Order Consecutive Payload|Multiple New Payloads|Valid NewPayload->|NewPayload with|Payload Build after|Build Payload with|Invalid Missing Ancestor ReOrg, StateRoot|Re-Org Back to|Re-org to Previously|Safe Re-Org to Side Chain|Transaction Re-Org, Re-Org Back In|Re-Org Back into Canonical Chain, Depth=5|Suggested Fee Recipient Test|PrevRandao Opcode|Invalid NewPayload, [^R][^e]|Fork ID Genesis=0, Cancun=0|Fork ID Genesis=0, Cancun=1|Fork ID Genesis=1, Cancun=0|Fork ID Genesis=1, Cancun=2, Shanghai=2
steps:
- 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: Checkout sources
uses: actions/checkout@v3

- name: Rustup toolchain install
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}

- name: Setup Go
uses: actions/setup-go@v3

- name: Setup Hive
run: make setup-hive

- name: Run Hive Simulation
run: cd hive && ./hive --client ethrex --sim ${{ matrix.simulation }} --sim.limit "${{ matrix.test_pattern }}" --sim.parallelism 4

# The purpose of this job is to add it as a required check in GitHub so that we don't have to add every individual job as a required check
all-tests:
# "Integration Test" is a required check, don't change the name
name: Integration Test
runs-on: ubuntu-latest
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-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
if [ "${{ needs.run-hive.result }}" != "success" ]; then
echo "Job Hive failed"
exit 1
fi
8 changes: 4 additions & 4 deletions .github/workflows/ci_l2.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: CI (L2)
name: L2
on:
push:
branches: ["main"]
merge_group:
pull_request:
branches: ["**"]
paths:
Expand All @@ -13,11 +12,12 @@ concurrency:
cancel-in-progress: true

env:
RUST_VERSION: 1.80.1
RUST_VERSION: 1.81.0

jobs:
test:
name: Test
# "Integration Test" is a required check, don't change the name
name: Integration Test
runs-on: ubuntu-latest
steps:
- name: Checkout sources
Expand Down
Loading

0 comments on commit 6c87ce0

Please sign in to comment.