Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(l1): add paralellism on hive test in CI. #1237

Merged
merged 4 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/asertoor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: "Assertoor"
on:
merge_group:
pull_request:
branches: ["**"]
paths-ignore:
- 'README.md'
- 'LICENSE'
- "**/README.md"
- "**/docs/**"

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

env:
RUST_VERSION: 1.80.1

jobs:
build:
uses: ./.github/workflows/docker_build.yaml

run-assertoor:
name: Stability Check
runs-on: ubuntu-latest
needs: [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.3.1'
ethereum_package_url: 'github.com/lambdaclass/ethereum-package'
ethereum_package_branch: 'ethrex-integration'
ethereum_package_args: './test_data/network_params.yaml'
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
run: |
make test

docker-build:
docker_build:
name: Build Docker image
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/ci_levm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: CI LEVM

on:
merge_group:
paths:
- "crates/vm/levm/**"
pull_request:
paths:
- "crates/vm/levm/**"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_skipped.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
if: false
steps: [run: true]

docker-build:
docker_build:
name: Build Docker image
runs-on: ubuntu-latest
if: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_call:

jobs:
docker-build:
docker_build:
name: Docker Build image
runs-on: ubuntu-latest
steps:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
name: "Hive & Assertoor"
name: "Hive"
on:
merge_group:
paths-ignore:
- 'README.md'
- 'LICENSE'
- "**/README.md"
- "**/docs/**"
pull_request:
branches: ["**"]
paths-ignore:
Expand All @@ -23,10 +18,10 @@ env:

jobs:
build:
uses: ./.github/workflows/docker-build.yaml
uses: ./.github/workflows/docker_build.yaml

run-hive:
name: Hive - ${{ matrix.name }}
name: ${{ matrix.name }}
needs: [build]
runs-on: ubuntu-latest
strategy:
Expand All @@ -36,8 +31,8 @@ jobs:
name: "Rpc Compat tests"
run_command: make run-hive-on-latest 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"
- simulation: rpc-auth
name: "Rpc Auth tests"
run_command: make run-hive-on-latest SIMULATION=ethereum/rpc-compat TEST_PATTERN="/engine-auth"
name: "Engine Auth tests"
run_command: make run-hive-on-latest SIMULATION=ethereum/engine TEST_PATTERN="auth/engine-auth"
- simulation: discv4
name: "Devp2p discv4 tests"
run_command: make run-hive-on-latest SIMULATION=devp2p TEST_PATTERN="discv4"
Expand All @@ -46,13 +41,13 @@ 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 SIMULATION=devp2p TEST_PATTERN="eth/status|getblockheaders|getblockbodies|transaction"
run_command: make run-hive-on-latest SIMULATION=devp2p TEST_PATTERN="eth/Status|GetBlockHeaders|SimultaneousRequests|SameRequestID|ZeroRequestID|GetBlockBodies|MaliciousHandshake|MaliciousStatus|Transaction"
- simulation: engine
name: "Engine tests"
run_command: make run-hive-on-latest SIMULATION=ethereum/engine TEST_PATTERN="/Blob Transactions On Block 1, Cancun Genesis|Blob Transactions On Block 1, Shanghai Genesis|Blob Transaction Ordering, Single Account, Single Blob|Blob Transaction Ordering, Single Account, Dual Blob|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|ForkchoiceUpdated Version on Payload Request"
- simulation: engine-cancun
name: "Cancun Engine tests"
run_command: make run-hive-on-latest SIMULATION=ethereum/engine TEST_PATTERN="cancun/Unique Payload ID|ParentHash equals BlockHash on NewPayload|Re-Execute Payload|Payload Build after New Invalid Payload|RPC|Build Payload with Invalid ChainID|Invalid PayloadAttributes, Zero timestamp, Syncing=False|Invalid PayloadAttributes, Parent timestamp, Syncing=False|Invalid PayloadAttributes, Missing BeaconRoot, Syncing=False|Suggested Fee Recipient Test|PrevRandao Opcode Transactions Test|Invalid Missing Ancestor ReOrg, StateRoot"
run_command: make run-hive-on-latest SIMULATION=ethereum/engine HIVE_EXTRA_ARGS="--sim.parallelism 4" TEST_PATTERN="cancun/Unique Payload ID|ParentHash equals BlockHash on NewPayload|Re-Execute Payload|Payload Build after New Invalid Payload|RPC|Build Payload with Invalid ChainID|Invalid PayloadAttributes, Zero timestamp, Syncing=False|Invalid PayloadAttributes, Parent timestamp, Syncing=False|Invalid PayloadAttributes, Missing BeaconRoot, Syncing=False|Suggested Fee Recipient Test|PrevRandao Opcode Transactions Test|Invalid Missing Ancestor ReOrg, StateRoot"
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
Expand All @@ -77,28 +72,3 @@ jobs:

- name: Run Hive Simulation
run: ${{ matrix.run_command }}

run-assertoor:
name: Assertoor - Stability Check
runs-on: ubuntu-latest
needs: [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.3.1'
ethereum_package_url: 'github.com/lambdaclass/ethereum-package'
ethereum_package_branch: 'ethrex-integration'
ethereum_package_args: './test_data/network_params.yaml'
2 changes: 1 addition & 1 deletion .github/workflows/hive_coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:

jobs:
build:
uses: ./.github/workflows/docker-build.yaml
uses: ./.github/workflows/docker_build.yaml

hive-coverage:
name: Run engine hive simulator to gather coverage information.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ run-hive: build-image setup-hive ## 🧪 Run Hive testing suite
cd hive && ./hive --sim $(SIMULATION) --client ethrex --sim.limit "$(TEST_PATTERN)"

run-hive-on-latest: setup-hive ## 🧪 Run Hive testing suite with the latest docker image
cd hive && ./hive --sim $(SIMULATION) --client ethrex --sim.limit "$(TEST_PATTERN)"
cd hive && ./hive --sim $(SIMULATION) --client ethrex --sim.limit "$(TEST_PATTERN)" $(HIVE_EXTRA_ARGS)

run-hive-debug: build-image setup-hive ## 🐞 Run Hive testing suite in debug mode
cd hive && ./hive --sim $(SIMULATION) --client ethrex --sim.limit "$(TEST_PATTERN)" --docker.output
Expand Down
Loading