-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(levm): run hive tests with levm, generate and publish report (#1546
) **Motivation** <!-- Why does this pull request exist? What are its goals? --> **Description** <!-- A clear and concise general description of the changes this PR introduces --> - We now can execute multiple transactions in a block and commit them after execution of them all. - It refactors `get_state_transitions_levm`, now in `account_updates` we'll have only the things that have changed from the account, so that we don't have much redundant information - We build the client image with LEVM, we run hive tests and then we publish them - Add to the Dockerfile the possibility to add build flags. - Avoid panicking if setup wasn't completed successfully, as no tests will run in that scenario. We can run tests with hive but the problem is that these tests execute a lot of blocks at the beginning and we usually fail at some block because of a difference in state, I tried debugging some tests and I fixed some things in other PRs but at some point I got stuck and decided that it was a better idea to leave it as is and merge this to main.
- Loading branch information
Showing
13 changed files
with
241 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.