forked from paradigmxyz/reth
-
Notifications
You must be signed in to change notification settings - Fork 0
232 lines (214 loc) · 6.57 KB
/
hive.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# 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:
# status
- TestStatus
# get block headers
- TestGetBlockHeaders
- TestSimultaneousRequests
- TestSameRequestID
- TestZeroRequestID
# get block bodies
- TestGetBlockBodies
# malicious handshakes + status
- TestMaliciousHandshake
- TestMaliciousStatus
# test transactions
- TestLargeTxRequest
- TestTransaction
- TestInvalidTxs
- TestNewPooledTxs
- TestBlobViolations
- 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_
# Pyspec cancun jobs
# TODO: uncomment when https://github.com/ethereum/hive/issues/1147 is fixed
#- sim: pyspec
# include: [cancun/eip4844]
#- sim: pyspec
# include: [cancun/eip4788]
#- sim: pyspec
# include: [cancun/eip6780]
#- sim: pyspec
# include: [cancun/eip5656]
#- sim: pyspec
# include: [cancun/eip1153]
#- sim: pyspec
# include: [cancun/eip7516]
# Pyspec shanghai jobs
#- sim: pyspec
# include: [shanghai/eip3651]
#- sim: pyspec
# include: [shanghai/eip3855]
#- sim: pyspec
# include: [shanghai/eip3860]
#- sim: pyspec
# include: [shanghai/eip4895]
# Pyspec merge and earlier jobs
#- sim: pyspec
# include: [merge/]
#- sim: pyspec
# include: [berlin/]
#- sim: pyspec
# include: [istanbul/]
#- sim: pyspec
# include: [homestead/]
#- sim: pyspec
# include: [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 }}