diff --git a/.github/workflows/assertoor.yaml b/.github/workflows/assertoor.yaml deleted file mode 100644 index 77431ed9c..000000000 --- a/.github/workflows/assertoor.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: Assertoor -on: - merge_group: - push: - branches: [ main ] - pull_request: - branches: [ '*' ] - paths-ignore: - - "crates/l2/**" - - '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: - test-run: - name: Stability Check - 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 # Important for building without pushing - tags: ethereum_rust - - 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: 'ethereum-rust-integration' - ethereum_package_args: './test_data/network_params.yaml' diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5e2648116..e5a31c14b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,8 +1,6 @@ name: CI on: merge_group: - push: - branches: [main] pull_request: branches: ["**"] paths-ignore: diff --git a/.github/workflows/hive.yaml b/.github/workflows/hive.yaml deleted file mode 100644 index 1f0fe044b..000000000 --- a/.github/workflows/hive.yaml +++ /dev/null @@ -1,67 +0,0 @@ -# Runs the specified hive testing suites -name: Hive -on: - merge_group: - push: - branches: [main] - pull_request: - branches: ["*"] - paths-ignore: - - "crates/l2/**" - - '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: - run-hive: - name: ${{ matrix.name }} - runs-on: ubuntu-latest - strategy: - matrix: - include: - - simulation: rpc-compat - name: "Rpc Compat tests" - run_command: make run-hive 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 SIMULATION=ethereum/rpc-compat TEST_PATTERN="/engine-auth" - - simulation: discv4 - name: "Devp2p discv4 tests" - run_command: make run-hive SIMULATION=devp2p TEST_PATTERN="discv4" - - simulation: snap - name: "Devp2p snap tests" - run_command: make run-hive SIMULATION=devp2p TEST_PATTERN="/AccountRange" - - simulation: engine - name: "Engine tests" - run_command: make run-hive 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 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" - steps: - - 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: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Download Hive - run: make setup-hive - - - name: Run Hive Simulation - run: ${{ matrix.run_command }} diff --git a/.github/workflows/hive_and_assertoor.yaml b/.github/workflows/hive_and_assertoor.yaml new file mode 100644 index 000000000..be66b53b0 --- /dev/null +++ b/.github/workflows/hive_and_assertoor.yaml @@ -0,0 +1,124 @@ +name: "Hive & Assertoor" +on: + merge_group: + paths-ignore: + - "crates/l2/**" + - 'README.md' + - 'LICENSE' + - "**/README.md" + - "**/docs/**" + pull_request: + branches: ["**"] + paths-ignore: + - "crates/l2/**" + - '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: + 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: ethereum_rust + outputs: type=docker,dest=/tmp/ethereum_rust_image.tar + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: ethereum_rust_image + path: /tmp/ethereum_rust_image.tar + + run-hive: + name: Hive - ${{ matrix.name }} + needs: [docker-build] + 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 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" + - simulation: discv4 + name: "Devp2p discv4 tests" + run_command: make run-hive-on-latest SIMULATION=devp2p TEST_PATTERN="discv4" + - simulation: snap + name: "Devp2p snap tests" + run_command: make run-hive-on-latest SIMULATION=devp2p TEST_PATTERN="/AccountRange" + - 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" + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: ethereum_rust_image + path: /tmp + + - name: Load image + run: | + docker load --input /tmp/ethereum_rust_image.tar + + - 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: ${{ matrix.run_command }} + + 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: ethereum_rust_image + path: /tmp + + - name: Load image + run: | + docker load --input /tmp/ethereum_rust_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: 'ethereum-rust-integration' + ethereum_package_args: './test_data/network_params.yaml' diff --git a/.github/workflows/levm_bench.yaml b/.github/workflows/levm_bench.yaml index 6a4aed5fa..d297972c2 100644 --- a/.github/workflows/levm_bench.yaml +++ b/.github/workflows/levm_bench.yaml @@ -2,10 +2,8 @@ name: LEVM benchmarks on: merge_group: - push: paths: - 'crates/vm/levm/**' - branches: [ main ] pull_request: paths: - 'crates/vm/levm/**' diff --git a/Makefile b/Makefile index 39440f534..4a6b3ff07 100644 --- a/Makefile +++ b/Makefile @@ -97,6 +97,9 @@ TEST_PATTERN ?= / run-hive: build-image setup-hive ## ๐Ÿงช Run Hive testing suite cd hive && ./hive --sim $(SIMULATION) --client ethereumrust --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 ethereumrust --sim.limit "$(TEST_PATTERN)" + run-hive-debug: build-image setup-hive ## ๐Ÿž Run Hive testing suite in debug mode cd hive && ./hive --sim $(SIMULATION) --client ethereumrust --sim.limit "$(TEST_PATTERN)" --docker.output