Skip to content

Commit 0450cfc

Browse files
authored
Merge pull request #7788 from dknopik/into-anchor
Anchor Pre-PR: `unstable`, #7783, #7761, #7016
2 parents 9b84dac + e7a803b commit 0450cfc

File tree

423 files changed

+15228
-15643
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

423 files changed

+15228
-15643
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/beacon_node/network/ @jxs
22
/beacon_node/lighthouse_network/ @jxs
3+
/beacon_node/store/ @michaelsproul

.github/mergify.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
pull_request_rules:
22
- name: Ask to resolve conflict
33
conditions:
4+
- -closed
45
- conflict
56
- -author=dependabot[bot]
7+
- label=ready-for-review
68
- or:
79
- -draft # Don't report conflicts on regular draft.
810
- and: # Do report conflicts on draft that are scheduled for the next major release.
@@ -12,6 +14,64 @@ pull_request_rules:
1214
comment:
1315
message: This pull request has merge conflicts. Could you please resolve them
1416
@{{author}}? 🙏
17+
label:
18+
add:
19+
- waiting-on-author
20+
remove:
21+
- ready-for-review
22+
23+
- name: Ask to resolve CI failures
24+
conditions:
25+
- -closed
26+
- label=ready-for-review
27+
- or:
28+
- check-skipped=test-suite-success
29+
- check-skipped=local-testnet-success
30+
- check-failure=test-suite-success
31+
- check-failure=local-testnet-success
32+
actions:
33+
comment:
34+
message: Some required checks have failed. Could you please take a look @{{author}}? 🙏
35+
label:
36+
add:
37+
- waiting-on-author
38+
remove:
39+
- ready-for-review
40+
41+
- name: Update labels when PR is unblocked
42+
conditions:
43+
- -closed
44+
- -draft
45+
- label=waiting-on-author
46+
- -conflict
47+
# Unfortunately, it doesn't look like there's an easy way to check for PRs pending
48+
# CI workflows approvals.
49+
- check-success=test-suite-success
50+
- check-success=local-testnet-success
51+
# Update the label only if there are no more change requests from any reviewers and no unresolved threads.
52+
# This rule ensures that a PR with passing CI can be marked as `waiting-on-author`.
53+
- "#changes-requested-reviews-by = 0"
54+
- "#review-threads-unresolved = 0"
55+
actions:
56+
label:
57+
remove:
58+
- waiting-on-author
59+
add:
60+
- ready-for-review
61+
62+
- name: Close stale pull request after 30 days of inactivity
63+
conditions:
64+
- -closed
65+
- label=waiting-on-author
66+
- updated-at<=30 days ago
67+
actions:
68+
close:
69+
message: >
70+
Hi @{{author}}, this pull request has been closed automatically due to 30 days of inactivity.
71+
If you’d like to continue working on it, feel free to reopen at any time.
72+
label:
73+
add:
74+
- stale
1575

1676
- name: Approve trivial maintainer PRs
1777
conditions:

.github/workflows/local-testnet.yml

Lines changed: 123 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
- name: Build Docker image
2222
run: |
23-
docker build --build-arg FEATURES=portable -t lighthouse:local .
23+
docker build --build-arg FEATURES=portable,spec-minimal -t lighthouse:local .
2424
docker save lighthouse:local -o lighthouse-docker.tar
2525
2626
- name: Upload Docker image artifact
@@ -52,30 +52,52 @@ jobs:
5252
- name: Load Docker image
5353
run: docker load -i lighthouse-docker.tar
5454

55-
- name: Start local testnet
56-
run: ./start_local_testnet.sh -e local -c -b false && sleep 60
55+
- name: Start local testnet with Assertoor
56+
run: ./start_local_testnet.sh -e local-assertoor -c -a -b false && sleep 60
5757
working-directory: scripts/local_testnet
5858

59-
- name: Stop local testnet and dump logs
60-
run: ./stop_local_testnet.sh local
61-
working-directory: scripts/local_testnet
62-
63-
- name: Start local testnet with blinded block production
64-
run: ./start_local_testnet.sh -e local-blinded -c -p -b false && sleep 60
65-
working-directory: scripts/local_testnet
59+
- name: Await Assertoor test result
60+
id: assertoor_test_result
61+
uses: ethpandaops/assertoor-github-action@v1
62+
with:
63+
kurtosis_enclave_name: local-assertoor
6664

6765
- name: Stop local testnet and dump logs
68-
run: ./stop_local_testnet.sh local-blinded
66+
run: ./stop_local_testnet.sh local-assertoor
6967
working-directory: scripts/local_testnet
7068

7169
- name: Upload logs artifact
70+
if: always()
7271
uses: actions/upload-artifact@v4
7372
with:
7473
name: logs-local-testnet
7574
path: |
7675
scripts/local_testnet/logs
7776
retention-days: 3
7877

78+
- name: Return Assertoor test result
79+
shell: bash
80+
run: |
81+
test_result="${{ steps.assertoor_test_result.outputs.result }}"
82+
test_status=$(
83+
cat <<"EOF"
84+
${{ steps.assertoor_test_result.outputs.test_overview }}
85+
EOF
86+
)
87+
failed_test_status=$(
88+
cat <<"EOF"
89+
${{ steps.assertoor_test_result.outputs.failed_test_details }}
90+
EOF
91+
)
92+
93+
echo "Test Result: $test_result"
94+
echo "$test_status"
95+
if ! [ "$test_result" == "success" ]; then
96+
echo "Failed Test Task Status:"
97+
echo "$failed_test_status"
98+
exit 1
99+
fi
100+
79101
doppelganger-protection-success-test:
80102
needs: dockerfile-ubuntu
81103
runs-on: ubuntu-22.04
@@ -104,6 +126,7 @@ jobs:
104126
working-directory: scripts/tests
105127

106128
- name: Upload logs artifact
129+
if: always()
107130
uses: actions/upload-artifact@v4
108131
with:
109132
name: logs-doppelganger-protection-success
@@ -139,13 +162,99 @@ jobs:
139162
working-directory: scripts/tests
140163

141164
- name: Upload logs artifact
165+
if: always()
142166
uses: actions/upload-artifact@v4
143167
with:
144168
name: logs-doppelganger-protection-failure
145169
path: |
146170
scripts/local_testnet/logs
147171
retention-days: 3
148172

173+
# Tests checkpoint syncing to a live network (current fork) and a running devnet (usually next scheduled fork)
174+
checkpoint-sync-test:
175+
name: checkpoint-sync-test-${{ matrix.network }}
176+
runs-on: ubuntu-latest
177+
needs: dockerfile-ubuntu
178+
if: contains(github.event.pull_request.labels.*.name, 'syncing')
179+
continue-on-error: true
180+
strategy:
181+
matrix:
182+
network: [sepolia, devnet]
183+
steps:
184+
- uses: actions/checkout@v4
185+
186+
- name: Install Kurtosis
187+
run: |
188+
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
189+
sudo apt update
190+
sudo apt install -y kurtosis-cli
191+
kurtosis analytics disable
192+
193+
- name: Download Docker image artifact
194+
uses: actions/download-artifact@v4
195+
with:
196+
name: lighthouse-docker
197+
path: .
198+
199+
- name: Load Docker image
200+
run: docker load -i lighthouse-docker.tar
201+
202+
- name: Run the checkpoint sync test script
203+
run: |
204+
./checkpoint-sync.sh "sync-${{ matrix.network }}" "checkpoint-sync-config-${{ matrix.network }}.yaml"
205+
working-directory: scripts/tests
206+
207+
- name: Upload logs artifact
208+
if: always()
209+
uses: actions/upload-artifact@v4
210+
with:
211+
name: logs-checkpoint-sync-${{ matrix.network }}
212+
path: |
213+
scripts/local_testnet/logs
214+
retention-days: 3
215+
216+
# Test syncing from genesis on a local testnet. Aims to cover forward syncing both short and long distances.
217+
genesis-sync-test:
218+
name: genesis-sync-test-${{ matrix.fork }}-${{ matrix.offline_secs }}s
219+
runs-on: ubuntu-latest
220+
needs: dockerfile-ubuntu
221+
if: contains(github.event.pull_request.labels.*.name, 'syncing')
222+
strategy:
223+
matrix:
224+
fork: [electra, fulu]
225+
offline_secs: [120, 300]
226+
steps:
227+
- uses: actions/checkout@v4
228+
229+
- name: Install Kurtosis
230+
run: |
231+
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
232+
sudo apt update
233+
sudo apt install -y kurtosis-cli
234+
kurtosis analytics disable
235+
236+
- name: Download Docker image artifact
237+
uses: actions/download-artifact@v4
238+
with:
239+
name: lighthouse-docker
240+
path: .
241+
242+
- name: Load Docker image
243+
run: docker load -i lighthouse-docker.tar
244+
245+
- name: Run the genesis sync test script
246+
run: |
247+
./genesis-sync.sh "sync-${{ matrix.fork }}-${{ matrix.offline_secs }}s" "genesis-sync-config-${{ matrix.fork }}.yaml" "${{ matrix.fork }}" "${{ matrix.offline_secs }}"
248+
working-directory: scripts/tests
249+
250+
- name: Upload logs artifact
251+
if: always()
252+
uses: actions/upload-artifact@v4
253+
with:
254+
name: logs-genesis-sync-${{ matrix.fork }}-${{ matrix.offline_secs }}s
255+
path: |
256+
scripts/local_testnet/logs
257+
retention-days: 3
149258

150259
# This job succeeds ONLY IF all others succeed. It is used by the merge queue to determine whether
151260
# a PR is safe to merge. New jobs should be added here.
@@ -161,4 +270,6 @@ jobs:
161270
steps:
162271
- uses: actions/checkout@v4
163272
- name: Check that success job is dependent on all others
164-
run: ./scripts/ci/check-success-job.sh ./.github/workflows/local-testnet.yml local-testnet-success
273+
run: |
274+
exclude_jobs='checkpoint-sync-test|genesis-sync-test'
275+
./scripts/ci/check-success-job.sh ./.github/workflows/local-testnet.yml local-testnet-success "$exclude_jobs"

.github/workflows/test-suite.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,28 @@ jobs:
159159
- name: Show cache stats
160160
if: env.SELF_HOSTED_RUNNERS == 'true'
161161
run: sccache --show-stats
162+
http-api-tests:
163+
name: http-api-tests
164+
needs: [check-labels]
165+
if: needs.check-labels.outputs.skip_ci != 'true'
166+
# Use self-hosted runners only on the sigp repo.
167+
runs-on: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "CI", "large"]') || 'ubuntu-latest' }}
168+
env:
169+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
170+
steps:
171+
- uses: actions/checkout@v4
172+
- name: Get latest version of stable Rust
173+
if: env.SELF_HOSTED_RUNNERS == 'false'
174+
uses: moonrepo/setup-rust@v1
175+
with:
176+
channel: stable
177+
cache-target: release
178+
bins: cargo-nextest
179+
- name: Run http_api tests for all recent forks
180+
run: make test-http-api
181+
- name: Show cache stats
182+
if: env.SELF_HOSTED_RUNNERS == 'true'
183+
run: sccache --show-stats
162184
op-pool-tests:
163185
name: op-pool-tests
164186
needs: [check-labels]
@@ -475,6 +497,7 @@ jobs:
475497
'op-pool-tests',
476498
'network-tests',
477499
'slasher-tests',
500+
'http-api-tests',
478501
'debug-tests-ubuntu',
479502
'state-transition-vectors-ubuntu',
480503
'ef-tests-ubuntu',

0 commit comments

Comments
 (0)