From 2ff81c8da022a2669b7b1f0239c2a64d88847b92 Mon Sep 17 00:00:00 2001 From: Martin Paulucci Date: Fri, 22 Nov 2024 18:07:29 +0100 Subject: [PATCH 1/4] build(l1): Add paralellism on hive test in CI. --- .github/workflows/hive_and_assertoor.yaml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/hive_and_assertoor.yaml b/.github/workflows/hive_and_assertoor.yaml index 78287eab7..edf01c811 100644 --- a/.github/workflows/hive_and_assertoor.yaml +++ b/.github/workflows/hive_and_assertoor.yaml @@ -52,7 +52,7 @@ jobs: 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 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 diff --git a/Makefile b/Makefile index 706a9c7b0..38367ba89 100644 --- a/Makefile +++ b/Makefile @@ -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 From 69891bb8054cb375dcf04cce7c86eccf00dd599d Mon Sep 17 00:00:00 2001 From: Martin Paulucci Date: Fri, 22 Nov 2024 18:33:08 +0100 Subject: [PATCH 2/4] Separate hive and assertoor jobs. --- .github/workflows/asertoor.yaml | 51 +++++++++++++++++++++++ .github/workflows/hive_and_assertoor.yaml | 29 +------------ 2 files changed, 53 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/asertoor.yaml diff --git a/.github/workflows/asertoor.yaml b/.github/workflows/asertoor.yaml new file mode 100644 index 000000000..e2835dcec --- /dev/null +++ b/.github/workflows/asertoor.yaml @@ -0,0 +1,51 @@ +name: "Assertoor" +on: + merge_group: + paths-ignore: + - 'README.md' + - 'LICENSE' + - "**/README.md" + - "**/docs/**" + 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: 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' diff --git a/.github/workflows/hive_and_assertoor.yaml b/.github/workflows/hive_and_assertoor.yaml index edf01c811..26b6d79c8 100644 --- a/.github/workflows/hive_and_assertoor.yaml +++ b/.github/workflows/hive_and_assertoor.yaml @@ -1,4 +1,4 @@ -name: "Hive & Assertoor" +name: "Hive" on: merge_group: paths-ignore: @@ -52,7 +52,7 @@ jobs: 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 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" + 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 @@ -77,28 +77,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' From 2c90db900c6bc1d8c2b425b6ad0a402bcef64772 Mon Sep 17 00:00:00 2001 From: Martin Paulucci Date: Fri, 22 Nov 2024 19:15:38 +0100 Subject: [PATCH 3/4] Naming fixes. --- .github/workflows/asertoor.yaml | 9 ++------- .github/workflows/ci.yaml | 2 +- .github/workflows/ci_levm.yaml | 2 -- .github/workflows/ci_skipped.yaml | 2 +- .../{docker-build.yaml => docker_build.yaml} | 2 +- .../{hive_and_assertoor.yaml => hive.yaml} | 13 ++++--------- .github/workflows/hive_coverage.yaml | 2 +- .../{lint-pr-title.yml => lint_pr_title.yml} | 0 8 files changed, 10 insertions(+), 22 deletions(-) rename .github/workflows/{docker-build.yaml => docker_build.yaml} (97%) rename .github/workflows/{hive_and_assertoor.yaml => hive.yaml} (90%) rename .github/workflows/{lint-pr-title.yml => lint_pr_title.yml} (100%) diff --git a/.github/workflows/asertoor.yaml b/.github/workflows/asertoor.yaml index e2835dcec..f08a1609f 100644 --- a/.github/workflows/asertoor.yaml +++ b/.github/workflows/asertoor.yaml @@ -1,11 +1,6 @@ name: "Assertoor" on: merge_group: - paths-ignore: - - 'README.md' - - 'LICENSE' - - "**/README.md" - - "**/docs/**" pull_request: branches: ["**"] paths-ignore: @@ -23,10 +18,10 @@ env: jobs: build: - uses: ./.github/workflows/docker-build.yaml + uses: ./.github/workflows/docker_build.yaml run-assertoor: - name: Assertoor - Stability Check + name: Stability Check runs-on: ubuntu-latest needs: [build] steps: diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b98a92d72..33087270f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -78,7 +78,7 @@ jobs: run: | make test - docker-build: + docker_build: name: Build Docker image runs-on: ubuntu-latest steps: diff --git a/.github/workflows/ci_levm.yaml b/.github/workflows/ci_levm.yaml index 05b500e4d..f5d3a3a77 100644 --- a/.github/workflows/ci_levm.yaml +++ b/.github/workflows/ci_levm.yaml @@ -2,8 +2,6 @@ name: CI LEVM on: merge_group: - paths: - - "crates/vm/levm/**" pull_request: paths: - "crates/vm/levm/**" diff --git a/.github/workflows/ci_skipped.yaml b/.github/workflows/ci_skipped.yaml index dd034fdfd..5488778a9 100644 --- a/.github/workflows/ci_skipped.yaml +++ b/.github/workflows/ci_skipped.yaml @@ -21,7 +21,7 @@ jobs: if: false steps: [run: true] - docker-build: + docker_build: name: Build Docker image runs-on: ubuntu-latest if: false diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker_build.yaml similarity index 97% rename from .github/workflows/docker-build.yaml rename to .github/workflows/docker_build.yaml index 4ae4be06e..4b59ed342 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker_build.yaml @@ -4,7 +4,7 @@ on: workflow_call: jobs: - docker-build: + docker_build: name: Docker Build image runs-on: ubuntu-latest steps: diff --git a/.github/workflows/hive_and_assertoor.yaml b/.github/workflows/hive.yaml similarity index 90% rename from .github/workflows/hive_and_assertoor.yaml rename to .github/workflows/hive.yaml index 26b6d79c8..592a3c76b 100644 --- a/.github/workflows/hive_and_assertoor.yaml +++ b/.github/workflows/hive.yaml @@ -1,11 +1,6 @@ name: "Hive" on: merge_group: - paths-ignore: - - 'README.md' - - 'LICENSE' - - "**/README.md" - - "**/docs/**" pull_request: branches: ["**"] paths-ignore: @@ -23,7 +18,7 @@ env: jobs: build: - uses: ./.github/workflows/docker-build.yaml + uses: ./.github/workflows/docker_build.yaml run-hive: name: Hive - ${{ matrix.name }} @@ -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" @@ -46,7 +41,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 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" diff --git a/.github/workflows/hive_coverage.yaml b/.github/workflows/hive_coverage.yaml index b11ec2ffb..0bd6eee0f 100644 --- a/.github/workflows/hive_coverage.yaml +++ b/.github/workflows/hive_coverage.yaml @@ -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. diff --git a/.github/workflows/lint-pr-title.yml b/.github/workflows/lint_pr_title.yml similarity index 100% rename from .github/workflows/lint-pr-title.yml rename to .github/workflows/lint_pr_title.yml From 92f05260ce8cb3ac86475c7991e30e6b22150d1b Mon Sep 17 00:00:00 2001 From: Martin Paulucci Date: Fri, 22 Nov 2024 19:37:50 +0100 Subject: [PATCH 4/4] Remove duplicated hive name. --- .github/workflows/hive.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hive.yaml b/.github/workflows/hive.yaml index 592a3c76b..5e8cce178 100644 --- a/.github/workflows/hive.yaml +++ b/.github/workflows/hive.yaml @@ -21,7 +21,7 @@ jobs: uses: ./.github/workflows/docker_build.yaml run-hive: - name: Hive - ${{ matrix.name }} + name: ${{ matrix.name }} needs: [build] runs-on: ubuntu-latest strategy: