hive #347
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
# Runs `ethereum/hive` tests. | |
name: hive | |
on: | |
workflow_dispatch: | |
schedule: | |
# run every 12 hours | |
- cron: "0 */12 * * *" | |
env: | |
CARGO_TERM_COLOR: always | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
prepare-reth: | |
uses: ./.github/workflows/prepare-reth.yml | |
with: | |
image_tag: ghcr.io/paradigmxyz/reth:latest | |
binary_name: reth | |
prepare-hive: | |
if: github.repository == 'paradigmxyz/reth' | |
timeout-minutes: 45 | |
runs-on: | |
group: Reth | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Checkout hive tests | |
uses: actions/checkout@v4 | |
with: | |
repository: ethereum/hive | |
ref: master | |
path: hivetests | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "^1.13.1" | |
- run: go version | |
- name: Build hive assets | |
run: .github/assets/hive/build_simulators.sh | |
- name: Upload hive assets | |
uses: actions/upload-artifact@v4 | |
with: | |
name: hive_assets | |
path: ./hive_assets | |
test: | |
timeout-minutes: 60 | |
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 | |
- sim: devp2p | |
limit: eth | |
include: | |
# failures tracked in https://github.com/paradigmxyz/reth/issues/14825 | |
- Status | |
- GetBlockHeaders | |
- ZeroRequestID | |
- GetBlockBodies | |
- MaliciousHandshake | |
- 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/eest/consume-engine | |
limit: .*tests/prague | |
- sim: ethereum/eest/consume-engine | |
limit: .*tests/cancun | |
- sim: ethereum/eest/consume-engine | |
limit: .*tests/shanghai | |
- sim: ethereum/eest/consume-engine | |
limit: .*tests/berlin | |
- sim: ethereum/eest/consume-engine | |
limit: .*tests/istanbul | |
- sim: ethereum/eest/consume-engine | |
limit: .*tests/homestead | |
- sim: ethereum/eest/consume-engine | |
limit: .*tests/frontier | |
# consume-rlp | |
- sim: ethereum/eest/consume-rlp | |
limit: .*tests/prague | |
- sim: ethereum/eest/consume-rlp | |
limit: .*tests/cancun | |
- sim: ethereum/eest/consume-rlp | |
limit: .*tests/shanghai | |
- sim: ethereum/eest/consume-rlp | |
limit: .*tests/berlin | |
- sim: ethereum/eest/consume-rlp | |
limit: .*tests/istanbul | |
- sim: ethereum/eest/consume-rlp | |
limit: .*tests/homestead | |
- sim: ethereum/eest/consume-rlp | |
limit: .*tests/frontier | |
needs: | |
- prepare-reth | |
- prepare-hive | |
name: run ${{ matrix.scenario.sim }}${{ matrix.scenario.limit && format(' - {0}', matrix.scenario.limit) }} | |
runs-on: | |
group: Reth | |
permissions: | |
issues: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Download hive assets | |
uses: actions/download-artifact@v4 | |
with: | |
name: hive_assets | |
path: /tmp | |
- name: Download reth image | |
uses: actions/download-artifact@v4 | |
with: | |
name: artifacts | |
path: /tmp | |
- name: Load Docker images | |
run: .github/assets/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@v4 | |
with: | |
repository: ethereum/hive | |
ref: master | |
path: hivetests | |
- name: Run simulator | |
run: | | |
LIMIT="${{ matrix.scenario.limit }}" | |
TESTS="${{ join(matrix.scenario.include, '|') }}" | |
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/assets/hive/run_simulator.sh "${{ matrix.scenario.sim }}" "$FILTER" | |
- name: Parse hive output | |
run: | | |
find hivetests/workspace/logs -type f -name "*.json" ! -name "hive.json" | xargs -I {} python .github/assets/hive/parse.py {} --exclusion .github/assets/hive/expected_failures.yaml | |
- name: Print simulator output | |
if: ${{ failure() }} | |
run: | | |
cat hivetests/workspace/logs/*simulator*.log | |
- name: Print reth client logs | |
if: ${{ failure() }} | |
run: | | |
cat hivetests/workspace/logs/reth/client-*.log | |
notify-on-error: | |
needs: test | |
if: failure() | |
runs-on: | |
group: Reth | |
steps: | |
- name: Slack Webhook Action | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_MESSAGE: "Failed run: https://github.com/paradigmxyz/reth/actions/runs/${{ github.run_id }}" | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} |