Skip to content

Commit 7deecbb

Browse files
authored
Merge pull request #4036 from ethereum/dev
Release v1.5.0-alpha.10
2 parents e262b34 + 001caab commit 7deecbb

File tree

126 files changed

+1900
-1966
lines changed

Some content is hidden

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

126 files changed

+1900
-1966
lines changed

.circleci/config.yml

Lines changed: 29 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,19 @@ commands:
3535
description: "Restore the cache with pyspec keys"
3636
steps:
3737
- restore_cached_venv:
38-
venv_name: v25-pyspec
38+
venv_name: v30-pyspec
3939
reqs_checksum: cache-{{ checksum "setup.py" }}-{{ checksum "requirements_preinstallation.txt" }}
4040
save_pyspec_cached_venv:
4141
description: Save a venv into a cache with pyspec keys"
4242
steps:
4343
- save_cached_venv:
44-
venv_name: v25-pyspec
44+
venv_name: v30-pyspec
4545
reqs_checksum: cache-{{ checksum "setup.py" }}-{{ checksum "requirements_preinstallation.txt" }}
4646
venv_path: ./venv
4747
jobs:
4848
checkout_specs:
4949
docker:
50-
- image: cimg/python:3.12.4
50+
- image: cimg/python:3.12-node
5151
working_directory: ~/specs-repo
5252
steps:
5353
# Restore git repo at point close to target branch/revision, to speed up checkout
@@ -67,152 +67,134 @@ jobs:
6767
- ~/specs-repo
6868
install_pyspec_test:
6969
docker:
70-
- image: cimg/python:3.12.4
70+
- image: cimg/python:3.12-node
7171
working_directory: ~/specs-repo
7272
steps:
7373
- restore_cache:
7474
key: v3-specs-repo-{{ .Branch }}-{{ .Revision }}
7575
- restore_pyspec_cached_venv
7676
- run:
7777
name: Install pyspec requirements
78-
command: make install_test
78+
command: make eth2spec
7979
- save_pyspec_cached_venv
8080
test-phase0:
8181
docker:
82-
- image: cimg/python:3.12.4
82+
- image: cimg/python:3.12-node
8383
working_directory: ~/specs-repo
8484
steps:
8585
- restore_cache:
8686
key: v3-specs-repo-{{ .Branch }}-{{ .Revision }}
8787
- restore_pyspec_cached_venv
8888
- run:
8989
name: Run py-tests
90-
command: make citest fork=phase0
90+
command: make test fork=phase0
9191
- store_test_results:
9292
path: tests/core/pyspec/test-reports
9393
test-altair:
9494
docker:
95-
- image: cimg/python:3.12.4
95+
- image: cimg/python:3.12-node
9696
working_directory: ~/specs-repo
9797
steps:
9898
- restore_cache:
9999
key: v3-specs-repo-{{ .Branch }}-{{ .Revision }}
100100
- restore_pyspec_cached_venv
101101
- run:
102102
name: Run py-tests
103-
command: make citest fork=altair
103+
command: make test fork=altair
104104
- store_test_results:
105105
path: tests/core/pyspec/test-reports
106106
test-bellatrix:
107107
docker:
108-
- image: cimg/python:3.12.4
108+
- image: cimg/python:3.12-node
109109
working_directory: ~/specs-repo
110110
steps:
111111
- restore_cache:
112112
key: v3-specs-repo-{{ .Branch }}-{{ .Revision }}
113113
- restore_pyspec_cached_venv
114114
- run:
115115
name: Run py-tests
116-
command: make citest fork=bellatrix
116+
command: make test fork=bellatrix
117117
- store_test_results:
118118
path: tests/core/pyspec/test-reports
119119
test-capella:
120120
docker:
121-
- image: cimg/python:3.12.4
121+
- image: cimg/python:3.12-node
122122
working_directory: ~/specs-repo
123123
steps:
124124
- restore_cache:
125125
key: v3-specs-repo-{{ .Branch }}-{{ .Revision }}
126126
- restore_pyspec_cached_venv
127127
- run:
128128
name: Run py-tests
129-
command: make citest fork=capella
129+
command: make test fork=capella
130130
- store_test_results:
131131
path: tests/core/pyspec/test-reports
132132
test-deneb:
133133
docker:
134-
- image: cimg/python:3.12.4
134+
- image: cimg/python:3.12-node
135135
working_directory: ~/specs-repo
136136
steps:
137137
- restore_cache:
138138
key: v3-specs-repo-{{ .Branch }}-{{ .Revision }}
139139
- restore_pyspec_cached_venv
140140
- run:
141141
name: Run py-tests
142-
command: make citest fork=deneb
142+
command: make test fork=deneb
143143
- store_test_results:
144144
path: tests/core/pyspec/test-reports
145145
test-electra:
146146
docker:
147-
- image: cimg/python:3.12.4
147+
- image: cimg/python:3.12-node
148148
working_directory: ~/specs-repo
149149
steps:
150150
- restore_cache:
151151
key: v3-specs-repo-{{ .Branch }}-{{ .Revision }}
152152
- restore_pyspec_cached_venv
153153
- run:
154154
name: Run py-tests
155-
command: make citest fork=electra
155+
command: make test fork=electra
156156
- store_test_results:
157157
path: tests/core/pyspec/test-reports
158-
test-whisk:
158+
test-fulu:
159159
docker:
160-
- image: cimg/python:3.12.4
160+
- image: cimg/python:3.12-node
161161
working_directory: ~/specs-repo
162162
steps:
163163
- restore_cache:
164164
key: v3-specs-repo-{{ .Branch }}-{{ .Revision }}
165165
- restore_pyspec_cached_venv
166166
- run:
167167
name: Run py-tests
168-
command: make citest fork=whisk
168+
command: make test fork=fulu
169169
- store_test_results:
170170
path: tests/core/pyspec/test-reports
171-
test-eip7594:
171+
test-whisk:
172172
docker:
173-
- image: cimg/python:3.12.4
173+
- image: cimg/python:3.12-node
174174
working_directory: ~/specs-repo
175175
steps:
176176
- restore_cache:
177177
key: v3-specs-repo-{{ .Branch }}-{{ .Revision }}
178178
- restore_pyspec_cached_venv
179179
- run:
180180
name: Run py-tests
181-
command: make citest fork=eip7594
181+
command: make test fork=whisk
182182
- store_test_results:
183183
path: tests/core/pyspec/test-reports
184-
table_of_contents:
185-
docker:
186-
- image: circleci/node:10.16.3
187-
working_directory: ~/specs-repo
188-
steps:
189-
- checkout
190-
- run:
191-
name: Check table of contents
192-
command: sudo npm install -g [email protected] && make check_toc
193-
codespell:
194-
docker:
195-
- image: cimg/python:3.12.4
196-
working_directory: ~/specs-repo
197-
steps:
198-
- checkout
199-
- run:
200-
name: Check codespell
201-
command: pip install 'codespell<3.0.0,>=2.0.0' --user && make codespell
202184
lint:
203185
docker:
204-
- image: cimg/python:3.12.4
186+
- image: cimg/python:3.12-node
205187
working_directory: ~/specs-repo
206188
steps:
207189
- restore_cache:
208190
key: v3-specs-repo-{{ .Branch }}-{{ .Revision }}
209191
- restore_pyspec_cached_venv
192+
- run:
193+
name: Install doctoc
194+
command: sudo npm install -g [email protected]
210195
- run:
211196
name: Run linter for pyspec
212197
command: make lint
213-
- run:
214-
name: Run linter for test generators
215-
command: make lint_generators
216198
workflows:
217199
version: 2.1
218200
test_spec:
@@ -239,14 +221,12 @@ workflows:
239221
- test-electra:
240222
requires:
241223
- install_pyspec_test
242-
- test-whisk:
224+
- test-fulu:
243225
requires:
244226
- install_pyspec_test
245-
- test-eip7594:
227+
- test-whisk:
246228
requires:
247229
- install_pyspec_test
248-
- table_of_contents
249-
- codespell
250230
- lint:
251231
requires:
252232
- install_pyspec_test

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Publish docs
33
on:
44
push:
55
branches:
6-
- master
6+
- master
77
permissions:
88
contents: write
99
jobs:
@@ -12,7 +12,7 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v3
1414
- name: Build docs
15-
run: make copy_docs
15+
run: make _copy_docs
1616
- uses: actions/setup-python@v4
1717
with:
1818
python-version: 3.x

.github/workflows/generate_vectors.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,10 @@ jobs:
3636
with:
3737
python-version: '3.12.4'
3838
cache: ''
39-
- name: Clean up Spec Repository
40-
run: |
41-
cd consensus-specs
42-
make clean
43-
- name: Install dependencies and generate pyspec
44-
run: |
45-
cd consensus-specs
46-
make install_test
47-
make -B pyspec
4839
- name: Generate tests
4940
run: |
5041
cd consensus-specs
51-
make -j 16 generate_tests 2>&1 | tee ../consensustestgen.log
42+
make -j 16 gen_all 2>&1 | tee ../consensustestgen.log
5243
cp -r presets/ ../consensus-spec-tests/presets
5344
cp -r configs/ ../consensus-spec-tests/configs
5445
find . -type d -empty -delete

.github/workflows/run-tests.yml

Lines changed: 29 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -24,57 +24,44 @@ on:
2424
- cron: '0 0 * * *'
2525

2626
jobs:
27-
table_of_contents:
28-
runs-on: [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs]
29-
steps:
27+
lint:
28+
runs-on: [self-hosted-ghr-custom, size-l-x64, profile-consensusSpecs]
29+
steps:
3030
- name: Checkout repository
3131
uses: actions/checkout@v4
3232
- name: Setup Node.js
3333
uses: actions/setup-node@v4
3434
with:
3535
node-version: '20'
3636
cache: ''
37-
- name: Check table of contents
38-
run: npm install -g [email protected] && make check_toc
39-
40-
codespell:
41-
runs-on: [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs]
42-
steps:
43-
- name: Checkout repository
44-
uses: actions/checkout@v4
4537
- name: Setup Python
4638
uses: actions/setup-python@v5
4739
with:
4840
python-version: '3.12.4'
4941
cache: ''
50-
- name: Check codespell
51-
run: make codespell
42+
- name: Install doctoc
43+
run: npm install -g [email protected]
44+
- name: Run linter for pyspec
45+
run: make lint
5246

53-
lint:
47+
whitespace:
5448
runs-on: [self-hosted-ghr-custom, size-l-x64, profile-consensusSpecs]
5549
steps:
5650
- name: Checkout repository
5751
uses: actions/checkout@v4
58-
- name: Setup Rust for dependencies
59-
uses: actions-rust-lang/setup-rust-toolchain@v1
60-
- name: Setup Python
61-
uses: actions/setup-python@v5
62-
with:
63-
python-version: '3.12.4'
64-
cache: ''
65-
- name: Install pyspec requirements
66-
run: make install_test
67-
- name: Run linter for pyspec
68-
run: make lint
69-
- name: Run linter for test generators
70-
run: make lint_generators
52+
- name: Check for trailing whitespace
53+
run: |
54+
if git grep -n '[[:blank:]]$'; then
55+
echo "Trailing whitespace found. Please fix it."
56+
exit 1
57+
fi
7158
7259
pyspec-tests:
7360
runs-on: [self-hosted-ghr-custom, size-xl-x64, profile-consensusSpecs]
74-
needs: [lint,codespell,table_of_contents]
61+
needs: [lint]
7562
strategy:
7663
matrix:
77-
version: ["phase0", "altair", "bellatrix", "capella", "deneb", "electra", "whisk", "eip7594"]
64+
version: ["phase0", "altair", "bellatrix", "capella", "deneb", "electra", "fulu", "whisk"]
7865
steps:
7966
- name: Checkout repository
8067
uses: actions/checkout@v4
@@ -85,26 +72,24 @@ jobs:
8572
with:
8673
python-version: '3.12.4'
8774
cache: ''
88-
- name: set TEST_PRESET_TYPE
75+
- name: set preset
8976
if: github.event.inputs.test_preset_type != ''
9077
run: |
9178
echo "spec_test_preset_type=${{ github.event.inputs.test_preset_type || env.TEST_PRESET_TYPE }}" >> $GITHUB_ENV
92-
- name: set TEST_PRESET_TYPE
79+
- name: set preset
9380
if: ${{ (github.event_name == 'push' && github.ref_name != 'master') || github.event_name == 'pull_request' }}
9481
run: |
95-
echo "spec_test_preset_type=${{ env.TEST_PRESET_TYPE}}" >> $GITHUB_ENV
96-
- name: set TEST_PRESET_TYPE
82+
echo "spec_test_preset_type=${{ env.TEST_PRESET_TYPE }}" >> $GITHUB_ENV
83+
- name: set preset
9784
if: ${{ github.event_name == 'push' && github.ref_name == 'master' }}
9885
run: |
9986
echo "spec_test_preset_type=mainnet" >> $GITHUB_ENV
100-
- name: set TEST_PRESET_TYPE
87+
- name: set preset
10188
if: github.event.schedule=='0 0 * * *'
10289
run: |
10390
echo "spec_test_preset_type=mainnet" >> $GITHUB_ENV
104-
- name: Install pyspec requirements
105-
run: make install_test
10691
- name: test-${{ matrix.version }}
107-
run: make citest fork=${{ matrix.version }} TEST_PRESET_TYPE=${{env.spec_test_preset_type}}
92+
run: make test fork=${{ matrix.version }} preset=${{ env.spec_test_preset_type }}
10893
- uses: actions/upload-artifact@v4
10994
if: always()
11095
with:
@@ -121,7 +106,11 @@ jobs:
121106
with:
122107
python-version: '3.12.4'
123108
cache: ''
124-
- name: Install pyspec requirements
125-
run: make install_test
126109
- name: Run generators with --modcheck
127-
run: make generate_tests modcheck=true
110+
run: make gen_all modcheck=true 2>&1 | tee consensustestgen.log
111+
- name: Check for errors
112+
run: |
113+
if grep -q "\[ERROR\]" consensustestgen.log; then
114+
echo "There is an error in the log"
115+
exit 1
116+
fi

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ venv
55
.venv
66
/.pytest_cache
77
*.swp
8+
.eth2spec
89

910
build/
1011
output/
@@ -22,8 +23,8 @@ tests/core/pyspec/eth2spec/bellatrix/
2223
tests/core/pyspec/eth2spec/capella/
2324
tests/core/pyspec/eth2spec/deneb/
2425
tests/core/pyspec/eth2spec/electra/
26+
tests/core/pyspec/eth2spec/fulu/
2527
tests/core/pyspec/eth2spec/whisk/
26-
tests/core/pyspec/eth2spec/eip7594/
2728
tests/core/pyspec/eth2spec/eip6800/
2829
tests/core/pyspec/eth2spec/eip7732/
2930

0 commit comments

Comments
 (0)