hive #7
This file contains hidden or 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
| # Runs `ethereum/hive` tests. | |
| name: hive | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| env: | |
| CARGO_TERM_COLOR: always | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| permissions: {} | |
| jobs: | |
| build-reth: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| uses: ./.github/workflows/docker-test.yml | |
| with: | |
| hive_target: hive | |
| artifact_name: "reth" | |
| secrets: inherit | |
| prepare-hive: | |
| if: github.repository == 'paradigmxyz/reth' | |
| timeout-minutes: 45 | |
| runs-on: ${{ github.repository == 'paradigmxyz/reth' && 'depot-ubuntu-latest-16' || 'ubuntu-latest' }} | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| variant: | |
| - amsterdam | |
| - osaka | |
| name: Prepare Hive - ${{ matrix.variant == 'amsterdam' && 'Amsterdam' || 'Osaka' }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Checkout hive tests | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| repository: ethereum/hive | |
| path: hivetests | |
| persist-credentials: false | |
| - name: Get hive commit hash | |
| id: hive-commit | |
| run: echo "hash=$(cd hivetests && git rev-parse HEAD)" >> $GITHUB_OUTPUT | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version: "^1.13.1" | |
| - run: go version | |
| - name: Restore hive assets cache | |
| id: cache-hive | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ./hive_assets | |
| key: hive-assets-${{ matrix.variant }}-${{ steps.hive-commit.outputs.hash }}-${{ hashFiles('.github/scripts/hive/build_simulators.sh') }} | |
| - name: Build hive assets | |
| if: steps.cache-hive.outputs.cache-hit != 'true' | |
| run: .github/scripts/hive/build_simulators.sh ${{ matrix.variant }} | |
| - name: Load cached Docker images | |
| if: steps.cache-hive.outputs.cache-hit == 'true' | |
| run: | | |
| cd hive_assets | |
| for tar_file in *.tar; do | |
| if [ -f "$tar_file" ]; then | |
| echo "Loading $tar_file..." | |
| docker load -i "$tar_file" | |
| fi | |
| done | |
| # Make hive binary executable | |
| chmod +x hive | |
| - name: Upload hive assets | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: hive_assets_${{ matrix.variant }} | |
| path: ./hive_assets | |
| test-amsterdam: | |
| timeout-minutes: 120 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # ethereum/rpc to be deprecated: | |
| # https://github.com/ethereum/hive/pull/1117 | |
| scenario: | |
| - sim: smoke/genesis | |
| - sim: smoke/network | |
| - sim: ethereum/sync | |
| - sim: devp2p | |
| limit: discv4 | |
| # started failing after https://github.com/ethereum/go-ethereum/pull/31843, no | |
| # action on our side, remove from here when we get unexpected passes on these tests | |
| # - sim: devp2p | |
| # limit: eth | |
| # include: | |
| # - MaliciousHandshake | |
| # # failures tracked in https://github.com/paradigmxyz/reth/issues/14825 | |
| # - Status | |
| # - GetBlockHeaders | |
| # - ZeroRequestID | |
| # - GetBlockBodies | |
| # - Transaction | |
| # - NewPooledTxs | |
| - sim: devp2p | |
| limit: discv5 | |
| include: | |
| # failures tracked at https://github.com/paradigmxyz/reth/issues/14825 | |
| - PingLargeRequestID | |
| - sim: ethereum/engine | |
| limit: engine-exchange-capabilities | |
| - sim: ethereum/engine | |
| limit: engine-withdrawals | |
| - sim: ethereum/engine | |
| limit: engine-auth | |
| - sim: ethereum/engine | |
| limit: engine-api | |
| - sim: ethereum/engine | |
| limit: cancun | |
| # eth_ rpc methods | |
| - sim: ethereum/rpc-compat | |
| include: | |
| - eth_blockNumber | |
| - eth_call | |
| - eth_chainId | |
| - eth_createAccessList | |
| - eth_estimateGas | |
| - eth_feeHistory | |
| - eth_getBalance | |
| - eth_getBlockBy | |
| - eth_getBlockTransactionCountBy | |
| - eth_getCode | |
| - eth_getProof | |
| - eth_getStorage | |
| - eth_getTransactionBy | |
| - eth_getTransactionCount | |
| - eth_getTransactionReceipt | |
| - eth_sendRawTransaction | |
| - eth_syncing | |
| # debug_ rpc methods | |
| - debug_ | |
| # consume-engine | |
| - sim: ethereum/eels/consume-engine | |
| limit: .*tests/amsterdam.* | |
| - sim: ethereum/eels/consume-engine | |
| limit: .*tests/osaka.* | |
| - sim: ethereum/eels/consume-engine | |
| limit: .*tests/prague.* | |
| - sim: ethereum/eels/consume-engine | |
| limit: .*tests/cancun.* | |
| - sim: ethereum/eels/consume-engine | |
| limit: .*tests/shanghai.* | |
| - sim: ethereum/eels/consume-engine | |
| limit: .*tests/berlin.* | |
| - sim: ethereum/eels/consume-engine | |
| limit: .*tests/istanbul.* | |
| - sim: ethereum/eels/consume-engine | |
| limit: .*tests/homestead.* | |
| - sim: ethereum/eels/consume-engine | |
| limit: .*tests/frontier.* | |
| - sim: ethereum/eels/consume-engine | |
| limit: .*tests/paris.* | |
| # consume-rlp | |
| - sim: ethereum/eels/consume-rlp | |
| limit: .*tests/amsterdam.* | |
| - sim: ethereum/eels/consume-rlp | |
| limit: .*tests/osaka.* | |
| - sim: ethereum/eels/consume-rlp | |
| limit: .*tests/prague.* | |
| - sim: ethereum/eels/consume-rlp | |
| limit: .*tests/cancun.* | |
| - sim: ethereum/eels/consume-rlp | |
| limit: .*tests/shanghai.* | |
| - sim: ethereum/eels/consume-rlp | |
| limit: .*tests/berlin.* | |
| - sim: ethereum/eels/consume-rlp | |
| limit: .*tests/istanbul.* | |
| - sim: ethereum/eels/consume-rlp | |
| limit: .*tests/homestead.* | |
| - sim: ethereum/eels/consume-rlp | |
| limit: .*tests/frontier.* | |
| - sim: ethereum/eels/consume-rlp | |
| limit: .*tests/paris.* | |
| # execute-blobs | |
| - sim: ethereum/eels/execute-blobs | |
| limit: .*tests/amsterdam.* | |
| - sim: ethereum/eels/execute-blobs | |
| limit: .*tests/osaka.* | |
| needs: | |
| - build-reth | |
| - prepare-hive | |
| name: Hive-Amsterdam / ${{ matrix.scenario.sim }}${{ matrix.scenario.limit && format(' - {0}', matrix.scenario.limit) }} | |
| # Use larger runners for eels tests to avoid OOM runner crashes | |
| runs-on: ${{ github.repository == 'paradigmxyz/reth' && (contains(matrix.scenario.sim, 'eels') && 'depot-ubuntu-latest-8' || 'depot-ubuntu-latest-4') || 'ubuntu-latest' }} | |
| permissions: | |
| contents: read | |
| issues: write | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - name: Download hive assets | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: hive_assets_amsterdam | |
| path: /tmp | |
| - name: Download reth image | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: reth | |
| path: /tmp | |
| - name: Load Docker images | |
| run: .github/scripts/hive/load_images.sh | |
| - name: Move hive binary | |
| run: | | |
| mv /tmp/hive /usr/local/bin | |
| chmod +x /usr/local/bin/hive | |
| - name: Checkout hive tests | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| repository: ethereum/hive | |
| ref: master | |
| path: hivetests | |
| persist-credentials: false | |
| - name: Run simulator | |
| env: | |
| SCENARIO_SIM: ${{ matrix.scenario.sim }} | |
| SCENARIO_LIMIT: ${{ matrix.scenario.limit }} | |
| SCENARIO_TESTS: ${{ join(matrix.scenario.include, '|') }} | |
| run: | | |
| LIMIT="$SCENARIO_LIMIT" | |
| TESTS="$SCENARIO_TESTS" | |
| if [ -n "$LIMIT" ] && [ -n "$TESTS" ]; then | |
| FILTER="$LIMIT/$TESTS" | |
| elif [ -n "$LIMIT" ]; then | |
| FILTER="$LIMIT" | |
| elif [ -n "$TESTS" ]; then | |
| FILTER="/$TESTS" | |
| else | |
| FILTER="/" | |
| fi | |
| echo "filter: $FILTER" | |
| .github/scripts/hive/run_simulator.sh "$SCENARIO_SIM" "$FILTER" "amsterdam" | |
| - name: Parse hive output | |
| run: | | |
| find hivetests/workspace/logs -type f -name "*.json" ! -name "hive.json" | xargs -I {} python .github/scripts/hive/parse.py {} --exclusion .github/scripts/hive/expected_failures.yaml --ignored .github/scripts/hive/ignored_tests.yaml | |
| - name: Print simulator output | |
| if: ${{ failure() }} | |
| run: | | |
| cat hivetests/workspace/logs/*simulator*.log | |
| - name: Print reth client logs | |
| if: ${{ failure() }} | |
| run: .github/scripts/hive/print_client_logs.sh | |
| test-osaka: | |
| timeout-minutes: 120 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # ethereum/rpc to be deprecated: | |
| # https://github.com/ethereum/hive/pull/1117 | |
| scenario: | |
| - sim: smoke/genesis | |
| - sim: smoke/network | |
| - sim: ethereum/sync | |
| - sim: devp2p | |
| limit: discv4 | |
| # started failing after https://github.com/ethereum/go-ethereum/pull/31843, no | |
| # action on our side, remove from here when we get unexpected passes on these tests | |
| # - sim: devp2p | |
| # limit: eth | |
| # include: | |
| # - MaliciousHandshake | |
| # # failures tracked in https://github.com/paradigmxyz/reth/issues/14825 | |
| # - Status | |
| # - GetBlockHeaders | |
| # - ZeroRequestID | |
| # - GetBlockBodies | |
| # - Transaction | |
| # - NewPooledTxs | |
| - sim: devp2p | |
| limit: discv5 | |
| include: | |
| # failures tracked at https://github.com/paradigmxyz/reth/issues/14825 | |
| - PingLargeRequestID | |
| - sim: ethereum/engine | |
| limit: engine-exchange-capabilities | |
| - sim: ethereum/engine | |
| limit: engine-withdrawals | |
| - sim: ethereum/engine | |
| limit: engine-auth | |
| - sim: ethereum/engine | |
| limit: engine-api | |
| - sim: ethereum/engine | |
| limit: cancun | |
| # eth_ rpc methods | |
| - sim: ethereum/rpc-compat | |
| include: | |
| - eth_blockNumber | |
| - eth_call | |
| - eth_chainId | |
| - eth_createAccessList | |
| - eth_estimateGas | |
| - eth_feeHistory | |
| - eth_getBalance | |
| - eth_getBlockBy | |
| - eth_getBlockTransactionCountBy | |
| - eth_getCode | |
| - eth_getProof | |
| - eth_getStorage | |
| - eth_getTransactionBy | |
| - eth_getTransactionCount | |
| - eth_getTransactionReceipt | |
| - eth_sendRawTransaction | |
| - eth_syncing | |
| # debug_ rpc methods | |
| - debug_ | |
| # consume-engine | |
| - sim: ethereum/eels/consume-engine | |
| limit: .*tests/osaka.* | |
| - sim: ethereum/eels/consume-engine | |
| limit: .*tests/prague.* | |
| - sim: ethereum/eels/consume-engine | |
| limit: .*tests/cancun.* | |
| - sim: ethereum/eels/consume-engine | |
| limit: .*tests/shanghai.* | |
| - sim: ethereum/eels/consume-engine | |
| limit: .*tests/berlin.* | |
| - sim: ethereum/eels/consume-engine | |
| limit: .*tests/istanbul.* | |
| - sim: ethereum/eels/consume-engine | |
| limit: .*tests/homestead.* | |
| - sim: ethereum/eels/consume-engine | |
| limit: .*tests/frontier.* | |
| - sim: ethereum/eels/consume-engine | |
| limit: .*tests/paris.* | |
| # consume-rlp | |
| - sim: ethereum/eels/consume-rlp | |
| limit: .*tests/osaka.* | |
| - sim: ethereum/eels/consume-rlp | |
| limit: .*tests/prague.* | |
| - sim: ethereum/eels/consume-rlp | |
| limit: .*tests/cancun.* | |
| - sim: ethereum/eels/consume-rlp | |
| limit: .*tests/shanghai.* | |
| - sim: ethereum/eels/consume-rlp | |
| limit: .*tests/berlin.* | |
| - sim: ethereum/eels/consume-rlp | |
| limit: .*tests/istanbul.* | |
| - sim: ethereum/eels/consume-rlp | |
| limit: .*tests/homestead.* | |
| - sim: ethereum/eels/consume-rlp | |
| limit: .*tests/frontier.* | |
| - sim: ethereum/eels/consume-rlp | |
| limit: .*tests/paris.* | |
| # execute-blobs | |
| - sim: ethereum/eels/execute-blobs | |
| limit: .*tests/osaka.* | |
| needs: | |
| - build-reth | |
| - prepare-hive | |
| name: Hive-Osaka / ${{ matrix.scenario.sim }}${{ matrix.scenario.limit && format(' - {0}', matrix.scenario.limit) }} | |
| # Use larger runners for eels tests to avoid OOM runner crashes | |
| runs-on: ${{ github.repository == 'paradigmxyz/reth' && (contains(matrix.scenario.sim, 'eels') && 'depot-ubuntu-latest-8' || 'depot-ubuntu-latest-4') || 'ubuntu-latest' }} | |
| permissions: | |
| contents: read | |
| issues: write | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - name: Download hive assets | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: hive_assets_osaka | |
| path: /tmp | |
| - name: Download reth image | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: reth | |
| path: /tmp | |
| - name: Load Docker images | |
| run: .github/scripts/hive/load_images.sh | |
| - name: Move hive binary | |
| run: | | |
| mv /tmp/hive /usr/local/bin | |
| chmod +x /usr/local/bin/hive | |
| - name: Checkout hive tests | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| repository: ethereum/hive | |
| ref: master | |
| path: hivetests | |
| persist-credentials: false | |
| - name: Run simulator | |
| env: | |
| SCENARIO_SIM: ${{ matrix.scenario.sim }} | |
| SCENARIO_LIMIT: ${{ matrix.scenario.limit }} | |
| SCENARIO_TESTS: ${{ join(matrix.scenario.include, '|') }} | |
| run: | | |
| LIMIT="$SCENARIO_LIMIT" | |
| TESTS="$SCENARIO_TESTS" | |
| if [ -n "$LIMIT" ] && [ -n "$TESTS" ]; then | |
| FILTER="$LIMIT/$TESTS" | |
| elif [ -n "$LIMIT" ]; then | |
| FILTER="$LIMIT" | |
| elif [ -n "$TESTS" ]; then | |
| FILTER="/$TESTS" | |
| else | |
| FILTER="/" | |
| fi | |
| echo "filter: $FILTER" | |
| .github/scripts/hive/run_simulator.sh "$SCENARIO_SIM" "$FILTER" "osaka" | |
| - name: Parse hive output | |
| run: | | |
| find hivetests/workspace/logs -type f -name "*.json" ! -name "hive.json" | xargs -I {} python .github/scripts/hive/parse.py {} --exclusion .github/scripts/hive/expected_failures.yaml --ignored .github/scripts/hive/ignored_tests.yaml | |
| - name: Print simulator output | |
| if: ${{ failure() }} | |
| run: | | |
| cat hivetests/workspace/logs/*simulator*.log | |
| - name: Print reth client logs | |
| if: ${{ failure() }} | |
| run: .github/scripts/hive/print_client_logs.sh | |
| notify-on-error: | |
| needs: | |
| - test-amsterdam | |
| - test-osaka | |
| if: failure() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Slack Webhook Action | |
| uses: rtCamp/action-slack-notify@33ca3be66c6f378fe1610fd1d5258632dbed5e58 # v2.4.0 | |
| env: | |
| SLACK_COLOR: ${{ job.status }} | |
| SLACK_MESSAGE: "Failed run: https://github.com/paradigmxyz/reth/actions/runs/${{ github.run_id }}" | |
| SLACK_WEBHOOK: ${{ secrets.SLACK_HIVE_WEBHOOK_URL }} |