Skip to content

Commit

Permalink
Merge branch 'main' into l2/multiple_provers
Browse files Browse the repository at this point in the history
  • Loading branch information
fborello-lambda committed Dec 30, 2024
2 parents c7aa3b7 + f204cd9 commit cb992f6
Show file tree
Hide file tree
Showing 103 changed files with 5,676 additions and 2,701 deletions.
1 change: 1 addition & 0 deletions .github/config/assertoor/network_params_blob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ participants:
additional_services:
- assertoor
- tx_spammer
- dora

assertoor_params:
run_stability_check: false
Expand Down
3 changes: 3 additions & 0 deletions .github/config/assertoor/network_params_tx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ participants:
validator_count: 32

additional_services:
# In the future we may want to run the blob spammer in this check if possible
# through the tx_spammer addition service config.
- assertoor
- dora

assertoor_params:
run_stability_check: false
Expand Down
22 changes: 22 additions & 0 deletions .github/scripts/publish_levm_hive.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
curl -X POST $url \
-H 'Content-Type: application/json; charset=utf-8' \
--data @- <<EOF
$(jq -n --arg text "$(cat results.md)" '{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "LEVM Hive Coverage Report"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": $text
}
}
]
}')
EOF
58 changes: 36 additions & 22 deletions .github/workflows/ci_l1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
- name: Run tests
run: |
make test
docker_build:
# "Build Docker" is a required check, don't change the name
name: Build Docker
Expand All @@ -101,6 +101,20 @@ jobs:
name: ethrex_image
path: /tmp/ethrex_image.tar

setup-hive:
name: "Setup Hive"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Hive
run: make setup-hive
- name: Upload hive artifacts
uses: actions/upload-artifact@v4
with:
name: hive
path: hive


run-assertoor:
name: Assertoor - ${{ matrix.name }}
runs-on: ubuntu-latest
Expand All @@ -119,7 +133,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Download artifacts
- name: Download etherex image artifact
uses: actions/download-artifact@v4
with:
name: ethrex_image
Expand All @@ -141,7 +155,7 @@ jobs:
run-hive:
name: Hive - ${{ matrix.name }}
runs-on: ubuntu-latest
needs: [docker_build]
needs: [docker_build, setup-hive]
if: ${{ github.event_name != 'merge_group' }}
strategy:
matrix:
Expand All @@ -157,48 +171,48 @@ jobs:
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|NewPooledTxs
test_pattern: eth/Status|GetBlockHeaders|SimultaneousRequests|SameRequestID|ZeroRequestID|GetBlockBodies|MaliciousHandshake|MaliciousStatus|Transaction|InvalidTxs|NewPooledTxs|GetBlockReceipts
- 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|ForkchoiceUpdated|GetPayload|NewPayloadV3 After Cancun|NewPayloadV3 Before Cancun|NewPayloadV3 Versioned Hashes|Incorrect BlobGasUsed|Bad Hash|ParentHash equals BlockHash|RPC:|in ForkchoiceState|Unknown|Invalid PayloadAttributes|Unique|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=0, Cancun=2 |Fork ID: Genesis=0, Cancun=2, BlocksBeforePeering=1|Fork ID: Genesis=0, Cancun=2, Shanghai=[^2]|Fork ID Genesis=1, Cancun=2, Shanghai=2"
test_pattern: "engine-cancun/Blob Transactions On Block 1|Blob Transaction Ordering, Single|Blob Transaction Ordering, Multiple Accounts|Replace Blob Transactions|Parallel Blob Transactions|ForkchoiceUpdated|GetPayload|NewPayloadV3 After Cancun|NewPayloadV3 Before Cancun|NewPayloadV3 Versioned Hashes|Incorrect BlobGasUsed|Bad Hash|ParentHash equals BlockHash|RPC:|in ForkchoiceState|Unknown|Invalid PayloadAttributes|Unique|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 into Canonical Chain, Depth=5|Suggested Fee Recipient Test|PrevRandao Opcode|Invalid NewPayload|Fork ID: Genesis=0|Fork ID: Genesis=1, Cancun=0|Fork ID: Genesis=1, Cancun=2 |Fork ID: Genesis=1, Cancun=2, BlocksBeforePeering=1|Fork ID: Genesis=1, Cancun=2, Shanghai=[^1]|Pre-Merge"
- name: "Paris Engine tests"
simulation: ethereum/engine
test_pattern: "engine-api/RPC|Re-Org Back to Canonical Chain From Syncing Chain|Re-org to Previously Validated Sidechain Payload|Re-Org Back into Canonical Chain, Depth=5|Safe Re-Org|Transaction Re-Org|Inconsistent|Suggested Fee|PrevRandao|Fork ID|Unknown|Invalid PayloadAttributes|Bad Hash|Unique Payload ID|Re-Execute Payload|In-Order|Multiple New Payloads|Valid NewPayload|NewPayload with|Invalid NewPayload|Payload Build|Invalid NewPayload, Transaction|ParentHash equals|Build Payload|Invalid Missing Ancestor ReOrg"
- name: "Sync"
simulation: ethereum/sync
test_pattern: ""
steps:
- name: Download artifacts
- name: Checkout sources
uses: actions/checkout@v4

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

- name: Download hive artifacts
uses: actions/download-artifact@v4
with:
name: hive

- name: Load image
run: |
docker load --input /tmp/ethrex_image.tar
- name: Checkout sources
uses: actions/checkout@v4

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

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

- 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
run: chmod +x 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, run-hive]
# Make sure this job runs even if the previous jobs failed or were skipped
# 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
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/ci_levm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ jobs:
- name: Run tests
run: |
cd crates/vm/levm
make run-evm-ef-tests-ci
make run-evm-ef-tests-ci | tee test_result.txt
- name: Show test summary
run: |
cd crates/vm/levm
awk '/Summary: /,0' test_result.txt
test:
# "Test" is a required check, don't change the name
name: Test
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/daily_reports.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:

jobs:
run-hive:
name: Run engine hive simulator to gather coverage information.
name: Hive - ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
run: make setup-hive

- name: Run Hive Simulation
run: cd hive && ./hive --client ethrex --sim ${{ matrix.simulation }} --sim.parallelism 4
run: cd hive && ./hive --client ethrex --sim ${{ matrix.simulation }} --sim.parallelism 16
continue-on-error: true

- name: Upload results
Expand Down Expand Up @@ -124,12 +124,8 @@ jobs:
restore-keys: |
loc-report-
- name: Check previous loc report
run: |
cat loc_report.json
- name: Rename cached loc_report.json to loc_report.json.old
if: steps.cache-loc-report.outputs.cache-hit == 'true'
if: steps.cache-loc-report.outputs.cache-hit != ''
run: mv loc_report.json loc_report.json.old

- name: Generate the loc report
Expand Down
92 changes: 92 additions & 0 deletions .github/workflows/daily_reports_levm_hive.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Daily Reports Hive LEVM

on:
schedule:
# Every day at UTC midnight
- cron: "0 0 * * 1,2,3,4,5"
workflow_dispatch:

env:
RUST_VERSION: 1.81.0

jobs:
run-hive:
name: Hive
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@v4

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

- name: Build Image with LEVM
run: cd crates/vm/levm && make build-image-levm

- name: Setup Hive
run: make setup-hive

- name: Run Hive RPC Simulation
run: cd hive && ./hive --sim ethereum/rpc-compat --client ethrex --sim.limit "*" --sim.parallelism 16
continue-on-error: true

- name: Run Hive Sync Simulation
run: cd hive && ./hive --sim ethereum/sync --client ethrex --sim.limit "*" --sim.parallelism 16
continue-on-error: true

- name: Run Hive Engine Simulation
run: cd hive && ./hive --sim ethereum/engine --client ethrex --sim.limit "*" --sim.parallelism 16
continue-on-error: true

- name: Run Hive P2P Simulation
run: cd hive && ./hive --sim devp2p --client ethrex --sim.limit "*" --sim.parallelism 16
continue-on-error: true

- name: Upload results
uses: actions/upload-artifact@v4
with:
name: testing_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@v4

- 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
run: cargo run -p hive_report > results.md

- name: Post results in summary
run: |
echo "# LEVM Hive coverage report" >> $GITHUB_STEP_SUMMARY
cat results.md >> $GITHUB_STEP_SUMMARY
- name: Post results to levm slack channel
env:
url: ${{ secrets.LEVM_SLACK_WEBHOOK }}
run: sh .github/scripts/publish_levm_hive.sh

# Note: Leave this commented, as it is for testing purposes.
# - name: Post results to test channel for debugging
# env:
# url: ${{ secrets.TEST_CHANNEL_SLACK }}
# run: sh .github/scripts/publish_levm_hive.sh
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ levm_ef_tests_summary_slack.txt
levm_ef_tests_summary_github.txt
levm_ef_tests_summary.txt

results.md
loc_report.md
loc_report_slack.txt
loc_report_github.txt
Expand Down
Loading

0 comments on commit cb992f6

Please sign in to comment.