-
Notifications
You must be signed in to change notification settings - Fork 212
305 lines (272 loc) · 10.8 KB
/
Copy pathpr-main_l1.yaml
File metadata and controls
305 lines (272 loc) · 10.8 KB
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
name: L1
on:
push:
branches: ["main"]
merge_group:
pull_request:
branches: ["**"]
paths-ignore:
- "crates/l2/**" # Behind a feature flag not used in this workflow
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
lint:
# "Lint" is a required check, don't change the name
name: Lint
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: false
large-packages: false
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Rust Environment
uses: ./.github/actions/setup-rust
with:
components: rustfmt, clippy
- name: Run cargo check
run: cargo check --workspace
- name: Run cargo clippy
run: |
cargo clippy --workspace -- -D warnings
cargo clippy -- -D warnings
- name: Run cargo fmt
run: |
cargo fmt --all -- --check
test:
# "Test" is a required check, don't change the name
name: Test
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: false
large-packages: false
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Rust Environment
uses: ./.github/actions/setup-rust
- name: Run unit tests
run: |
make test
- name: Run Blockchain EF tests
if: ${{ github.event_name != 'merge_group' }}
run: |
make -C tooling/ef_tests/blockchain test
docker_build:
name: Build Docker
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: false
large-packages: false
- uses: actions/checkout@v4
- id: docker
name: Build Ethrex Docker Image
uses: ./.github/actions/build-docker
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ethrex_image
path: /tmp/ethrex_image.tar
run-assertoor:
name: Assertoor - ${{ matrix.name }}
runs-on: ubuntu-latest
needs: [docker_build]
if: ${{ github.event_name != 'merge_group' }}
strategy:
fail-fast: true
matrix:
include:
- name: Transaction Check
enclave_name: "ethrex-assertoor-tx"
ethereum_package_args: "./.github/config/assertoor/network_params_tx.yaml"
- name: Blob & Stability Check
enclave_name: "ethrex-assertoor-blob"
ethereum_package_args: "./.github/config/assertoor/network_params_blob.yaml"
# Flaky, reenable when fixed
# - name: Ethrex Only With Different Consensus Clients Check
# enclave_name: "ethrex-different-consensus-assertoor"
# ethereum_package_args: "./.github/config/assertoor/network_params_ethrex_multiple_cl.yaml"
steps:
- uses: actions/checkout@v4
- name: Download etherex image artifact
uses: actions/download-artifact@v4
with:
name: ethrex_image
path: /tmp
- name: Load image
run: |
docker load --input /tmp/ethrex_image.tar
- name: Run assertoor
uses: ethpandaops/kurtosis-assertoor-github-action@v1
with:
enclave_name: ${{ matrix.enclave_name }}
kurtosis_version: "1.10.2"
ethereum_package_url: "github.com/ethpandaops/ethereum-package"
ethereum_package_branch: "82e5a7178138d892c0c31c3839c89d53ffd42d9a"
ethereum_package_args: ${{ matrix.ethereum_package_args }}
run-hive:
name: Hive - ${{ matrix.name }}
runs-on: ubuntu-latest
needs: [docker_build]
if: ${{ github.event_name != 'merge_group' }}
strategy:
fail-fast: false
matrix:
include:
- name: "Rpc Compat tests"
simulation: ethereum/rpc-compat
# https://github.com/ethereum/execution-apis/pull/627 changed the simulation to use a pre-merge genesis block, so we need to pin to a commit before that
buildarg: "branch=d08382ae5c808680e976fce4b73f4ba91647199b"
hive_repository: ethereum/hive
hive_version: 7709e5892146c793307da072e1593f48039a7e4b
artifact_prefix: rpc_compat
- name: "Devp2p tests"
simulation: devp2p
limit: discv4|eth|snap/Ping|Findnode/WithoutEndpointProof|Findnode/PastExpiration|Amplification|Status|StorageRanges|ByteCodes|GetBlockHeaders|SimultaneousRequests|SameRequestID|ZeroRequestID|GetBlockBodies|MaliciousHandshake|MaliciousStatus|NewPooledTxs|GetBlockReceipts|BlockRangeUpdate|GetTrieNodes
# Findnode/BasicFindnode fails due to packets being processed out of order
# Findnode/UnsolicitedNeighbors flaky in CI very occasionally. When fixed replace all "Findnode/<test>" with "Findnode"
hive_repository: ethereum/hive
hive_version: 7709e5892146c793307da072e1593f48039a7e4b
artifact_prefix: devp2p
- name: "Engine Auth and EC tests"
simulation: ethereum/engine
limit: engine-(auth|exchange-capabilities)/
hive_repository: ethereum/hive
hive_version: 7709e5892146c793307da072e1593f48039a7e4b
artifact_prefix: engine_auth_ec
# - name: "Cancun Engine tests"
# simulation: ethereum/engine
# limit: "engine-cancun"
# hive_repository: ethereum/hive
# hive_version: 7709e5892146c793307da072e1593f48039a7e4b
# artifact_prefix: engine_cancun
- name: "Paris Engine tests"
simulation: ethereum/engine
limit: "engine-api"
hive_repository: ethereum/hive
hive_version: 7709e5892146c793307da072e1593f48039a7e4b
artifact_prefix: engine_paris
- name: "Engine withdrawal tests"
simulation: ethereum/engine
limit: "engine-withdrawals/Corrupted Block Hash Payload|Empty Withdrawals|engine-withdrawals test loader|GetPayloadBodies|GetPayloadV2 Block Value|Max Initcode Size|Sync after 2 blocks - Withdrawals on Genesis|Withdraw many accounts|Withdraw to a single account|Withdraw to two accounts|Withdraw zero amount|Withdraw many accounts|Withdrawals Fork on Block 1 - 1 Block Re-Org|Withdrawals Fork on Block 1 - 8 Block Re-Org NewPayload|Withdrawals Fork on Block 2|Withdrawals Fork on Block 3|Withdrawals Fork on Block 8 - 10 Block Re-Org NewPayload|Withdrawals Fork on Canonical Block 8 / Side Block 7 - 10 Block Re-Org [^S]|Withdrawals Fork on Canonical Block 8 / Side Block 9 - 10 Block Re-Org [^S]"
hive_repository: ethereum/hive
hive_version: 7709e5892146c793307da072e1593f48039a7e4b
artifact_prefix: engine_withdrawals
# Investigate this test
# - name: "Sync"
# simulation: ethereum/sync
# limit: ""
# hive_repository: ethereum/hive
# hive_version: 7709e5892146c793307da072e1593f48039a7e4b
# artifact_prefix: sync
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: false
large-packages: false
- name: Checkout sources
uses: actions/checkout@v4
- name: Download ethrex image artifact
uses: actions/download-artifact@v4
with:
name: ethrex_image
path: /tmp
- name: Load image
run: |
docker load --input /tmp/ethrex_image.tar
- name: Load hive client config
id: client-config
shell: bash
run: |
{
echo "config<<EOF"
cat .github/config/hive/clients.yaml
echo "EOF"
} >>"$GITHUB_OUTPUT"
- name: Determine hive flags
id: hive-flags
shell: bash
env:
SIM_LIMIT: ${{ matrix.limit }}
SIM_BUILDARG: ${{ matrix.buildarg }}
run: |
FLAGS='--sim.parallelism 16 --sim.loglevel 1'
if [[ -n "$SIM_LIMIT" ]]; then
escaped_limit=${SIM_LIMIT//\'/\'\\\'\'}
FLAGS+=" --sim.limit '$escaped_limit'"
fi
if [[ -n "$SIM_BUILDARG" ]]; then
FLAGS+=" --sim.buildarg $SIM_BUILDARG"
fi
echo "flags=$FLAGS" >> "$GITHUB_OUTPUT"
- name: Run Hive Simulation
id: run-hive-action
uses: ethpandaops/hive-github-action@v0.5.0
with:
hive_repository: ${{ matrix.hive_repository }}
hive_version: ${{ matrix.hive_version }}
simulator: ${{ matrix.simulation }}
client: ethrex
client_config: ${{ steps.client-config.outputs.config }}
extra_flags: ${{ steps.hive-flags.outputs.flags }}
- name: Check Hive Results For Failures
id: verify-hive-results
if: ${{ success() }}
shell: bash
run: ./.github/scripts/check-hive-results.sh src/results
- name: Upload Hive Failure Logs
if: ${{ failure() && steps.verify-hive-results.conclusion == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: hive_failed_logs_${{ matrix.artifact_prefix }}
path: src/results/failed_logs
if-no-files-found: warn
# The purpose of this job is to add it as a required check in GitHub so that we don't have to add every individual job as a required check
all-tests:
# "Integration Test" is a required check, don't change the name
name: Integration Test
runs-on: ubuntu-latest
needs: [run-assertoor, run-hive]
# Make sure this job runs even if the previous jobs failed or were skipped
if: ${{ always() && needs.run-assertoor.result != 'skipped' && needs.run-hive.result != 'skipped' }}
steps:
- name: Check if any job failed
run: |
if [ "${{ needs.run-assertoor.result }}" != "success" ]; then
echo "Job Assertoor Tx Check failed"
exit 1
fi
if [ "${{ needs.run-hive.result }}" != "success" ]; then
echo "Job Hive failed"
exit 1
fi
reorg-tests:
name: Reorg Tests
runs-on: ubuntu-latest
if: ${{ github.event_name != 'merge_group' }}
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: false
large-packages: false
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Rust Environment
uses: ./.github/actions/setup-rust
- name: Compile ethrex binary
run: cargo build --bin ethrex
- name: Run reorg tests
run: cd tooling/reorgs && cargo run