Skip to content

Commit

Permalink
Merge branch 'main' into l2_fix_nonce_state_diff
Browse files Browse the repository at this point in the history
  • Loading branch information
fborello-lambda committed Nov 28, 2024
2 parents f5beb7b + 0941ec3 commit 3610b52
Show file tree
Hide file tree
Showing 85 changed files with 3,348 additions and 1,405 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $(jq -n --arg text "$(cat results.md)" '{
"type": "header",
"text": {
"type": "plain_text",
"text": "Daily report"
"text": "Daily Hive Coverage report"
}
},
{
Expand Down
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 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
7 changes: 5 additions & 2 deletions .github/scripts/publish_loc.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
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": {
Expand Down
40 changes: 0 additions & 40 deletions .github/workflows/asertoor.yaml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/docker_build.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/docker_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ jobs:
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
61 changes: 48 additions & 13 deletions .github/workflows/hive_coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,25 @@ env:
RUST_VERSION: 1.80.1

jobs:
hive-coverage:
name: Daily Hive Coverage
run-hive:
name: Run engine hive simulator to gather coverage information.
runs-on: ubuntu-latest
strategy:
matrix:
include:
- simulation: rpc-compat
name: "Rpc Compat tests"
run_command: make run-hive-on-latest SIMULATION=ethereum/rpc-compat HIVE_EXTRA_ARGS="--sim.parallelism 4"
- simulation: devp2p
name: "Devp2p eth tests"
run_command: make run-hive-on-latest SIMULATION=devp2p HIVE_EXTRA_ARGS="--sim.parallelism 4"
- simulation: engine
name: "Cancun Engine tests"
run_command: make run-hive-on-latest SIMULATION=ethereum/engine HIVE_EXTRA_ARGS="--sim.parallelism 4"
- simulation: sync
name: "Sync tests"
run_command: make run-hive-on-latest SIMULATION=ethereum/sync HIVE_EXTRA_ARGS="--sim.parallelism 4"

steps:
- name: Pull image
run: |
Expand All @@ -22,25 +38,44 @@ jobs:
- 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: Run Hive Simulation
run: make run-hive-on-latest SIMULATION=ethereum/engine
run: ${{ matrix.run_command }}
continue-on-error: true

- name: Upload results
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.simulation }}_logs
path: hive/workspace/logs/*-*.json

hive-report:
name: Generate report and upload to summary and slack
needs: run-hive
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3

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

- name: Download all results
uses: actions/download-artifact@v4
with:
path: hive/workspace/logs
pattern: "*_logs"
merge-multiple: true

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

- name: Generate the hive report
id: report
run: |
cargo run -p hive_report > results.md
run: cargo run -p hive_report > results.md

- name: Post results in summary
run: |
Expand All @@ -50,12 +85,12 @@ jobs:
- name: Post results to ethrex L1 slack channel
env:
url: ${{ secrets.ETHREX_L1_SLACK_WEBHOOK }}
run: sh publish.sh
run: sh .github/scripts/publish.sh

- name: Post results to ethrex L2 slack channel
env:
url: ${{ secrets.ETHREX_L2_SLACK_WEBHOOK }}
run: sh publish.sh
run: sh .github/scripts/publish.sh

- name: Post results to levm slack channel
env:
Expand Down
67 changes: 58 additions & 9 deletions .github/workflows/hive.yaml → .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Hive
name: Integration Test
on:
workflow_run:
workflows: [Docker build]
types: [completed]
push:
branches: ["main"]
merge_group:
pull_request:
branches: ["**"]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -12,10 +14,59 @@ env:
RUST_VERSION: 1.80.1

jobs:
docker_build:
name: Docker Build image
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:
name: Assertoor - 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: Setup kurtosis testnet and run assertoor tests
uses: ethpandaops/kurtosis-assertoor-github-action@v1
with:
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"

run-hive:
name: ${{ matrix.name }}
name: Hive - ${{ matrix.name }}
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
needs: [docker_build]
strategy:
matrix:
include:
Expand All @@ -33,7 +84,7 @@ jobs:
run_command: make run-hive-on-latest SIMULATION=devp2p TEST_PATTERN="/AccountRange|StorageRanges|ByteCodes|TrieNodes"
- simulation: eth
name: "Devp2p eth tests"
run_command: make run-hive-on-latest SIMULATION=devp2p TEST_PATTERN="eth/Status|GetBlockHeaders|SimultaneousRequests|SameRequestID|ZeroRequestID|GetBlockBodies|MaliciousHandshake|MaliciousStatus|Transaction"
run_command: make run-hive-on-latest SIMULATION=devp2p TEST_PATTERN="eth/Status|GetBlockHeaders|SimultaneousRequests|SameRequestID|ZeroRequestID|GetBlockBodies|MaliciousHandshake|MaliciousStatus|Transaction|InvalidTxs"
- simulation: engine
name: "Engine Auth and EC tests"
run_command: make run-hive-on-latest SIMULATION=ethereum/engine TEST_PATTERN="engine-(auth|exchange-capabilities)/"
Expand All @@ -46,8 +97,6 @@ jobs:
with:
name: ethrex_image
path: /tmp
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}

- name: Load image
run: |
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/levm_reporter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Daily LEVM Reporter

on:
schedule:
# Every day at midnight
- cron: "0 0 * * *"
workflow_dispatch:

env:
RUST_VERSION: 1.80.1

jobs:
ef-test:
name: Generate Report for EF Tests
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 EF Tests
run: |
cd crates/vm/levm
make download-evm-ef-tests
- name: Run tests
run: |
cd crates/vm/levm
make generate-evm-ef-tests-report
- name: Post results in summary
run: |
echo "# Daily LEVM EF Tests Run Report" >> $GITHUB_STEP_SUMMARY
cat levm_ef_tests_summary_github.txt >> $GITHUB_STEP_SUMMARY
- name: Post results to ethrex L1 slack channel
env:
url: ${{ secrets.ETHREX_L1_SLACK_WEBHOOK }}
run: sh .github/scripts/publish_levm_ef_tests_summary.sh

- name: Post results to ethrex L2 slack channel
env:
url: ${{ secrets.ETHREX_L2_SLACK_WEBHOOK }}
run: sh .github/scripts/publish_levm_ef_tests_summary.sh

- name: Post results to levm slack channel
env:
url: ${{ secrets.LEVM_SLACK_WEBHOOK }}
run: sh .github/scripts/publish_levm_ef_tests_summary.sh
Loading

0 comments on commit 3610b52

Please sign in to comment.