Skip to content

Commit edb01ee

Browse files
jtraglialinoscopeleolaradependabot[bot]nalepae
authored
Release v1.6.0-alpha.2 (#4367)
* Delete unnecessary container comments (#4358) * Run linter on code in markdown files (#4359) * EIP-7917: Refactor return types from List to Vector (#4361) * Increase mainnet tests timeout to 12 hours (#4362) * Use python 3.13 in CI actions (#4363) * Fix epoch processing tests for proposer lookahead (#4364) * Alias new test to blocks handler (#4365) * Fix a few things in setup.py (#4360) * Detect errors in reference test generator action (#4366) * Bump version to v1.6.0-alpha.2 (#4368) * Suggest using getBlobsV2 to get blobs/proofs * Use getPayloadV5 * Bump the actions group with 3 updates (#4372) * Define requirements for the blob schedule (#4370) * CGC: Update before Fulu (#4373) * Modify fork digest to distinguish BPO forks + add entry to ENR (#4354) * Introduce Status v2 with `earliest_available_slot` (#4374) --------- Co-authored-by: Lin Oshitani <[email protected]> Co-authored-by: Leo Lara <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Manu NALEPA <[email protected]> Co-authored-by: Alex Stokes <[email protected]> Co-authored-by: raulk <[email protected]>
1 parent 9fce57d commit edb01ee

File tree

82 files changed

+2672
-1704
lines changed

Some content is hidden

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

82 files changed

+2672
-1704
lines changed

.github/workflows/generate_vectors.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run test vector generation
1+
name: Generate reference tests
22

33
defaults:
44
run:
@@ -34,20 +34,15 @@ jobs:
3434
- name: Setup Python
3535
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
3636
with:
37-
python-version: '3.12.4'
37+
python-version: '3.13'
3838
cache: ''
3939
- name: Generate tests
4040
run: |
4141
cd consensus-specs
42+
set -o pipefail
4243
make reftests verbose=true 2>&1 | tee ../consensustestgen.log
4344
cp -r presets/ ../consensus-spec-tests/presets
4445
cp -r configs/ ../consensus-spec-tests/configs
45-
- name: Check for errors
46-
run: |
47-
if grep -q "\[ERROR\]" consensustestgen.log; then
48-
echo "There is an error in the log"
49-
exit 1
50-
fi
5146
- name: Archive configurations
5247
run: |
5348
cd consensus-spec-tests

.github/workflows/nightly-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818

1919
jobs:
2020
tests:
21+
timeout-minutes: 720 # 12 hours
2122
runs-on: [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs]
2223
strategy:
2324
fail-fast: false
@@ -38,6 +39,6 @@ jobs:
3839
- name: Setup Python
3940
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
4041
with:
41-
python-version: '3.12'
42+
python-version: '3.13'
4243
- name: test-${{ matrix.fork }}
4344
run: make test preset=mainnet fork=${{ matrix.fork }}

.github/workflows/run-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup python
1919
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
2020
with:
21-
python-version: '3.12'
21+
python-version: '3.13'
2222
cache: 'pip'
2323
- name: Run linter for pyspec
2424
run: |
@@ -58,7 +58,7 @@ jobs:
5858
- name: Setup python
5959
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
6060
with:
61-
python-version: '3.12'
61+
python-version: '3.13'
6262
cache: 'pip'
6363
- name: Run pyspec tests for ${{ matrix.fork }}
6464
run: make test preset=minimal fork=${{ matrix.fork }}

pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[build-system]
22
requires = [
33
"marko==2.1.3",
4-
"ruamel.yaml==0.18.12",
4+
"ruamel.yaml==0.18.14",
55
"setuptools==80.9.0",
66
"wheel==0.45.1",
77
]
@@ -25,7 +25,7 @@ dependencies = [
2525
"py_ecc==7.0.1",
2626
"pycryptodome==3.23.0",
2727
"remerkleable==0.1.28",
28-
"ruamel.yaml==0.18.12",
28+
"ruamel.yaml==0.18.14",
2929
"setuptools==80.9.0",
3030
"trie==3.1.0",
3131
]
@@ -38,12 +38,13 @@ test = [
3838
]
3939
lint = [
4040
"codespell==2.4.1",
41-
"mdformat-gfm-alerts==1.0.2",
41+
"mdformat-gfm-alerts==2.0.0",
4242
"mdformat-gfm==0.4.1",
43+
"mdformat-ruff==0.1.3",
4344
"mdformat-toc==0.3.0",
4445
"mdformat==0.7.22",
4546
"mypy==1.16.0",
46-
"ruff==0.11.12",
47+
"ruff==0.11.13",
4748
]
4849
generator = [
4950
"filelock==3.18.0",

setup.py

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
# Ignore 'running' and 'creating' messages
4040
class PyspecFilter(logging.Filter):
41-
def filter(self, record):
41+
def filter(self, record: logging.LogRecord) -> bool:
4242
return not record.getMessage().startswith(("running ", "creating "))
4343

4444

@@ -59,7 +59,7 @@ def load_preset(preset_files: Sequence[Path]) -> dict[str, str]:
5959
"""
6060
Loads a directory of preset files, merges the result into one preset.
6161
"""
62-
preset = {}
62+
preset: dict[str, str] = {}
6363
for fork_file in preset_files:
6464
yaml = YAML(typ="base")
6565
fork_preset: dict = yaml.load(fork_file)
@@ -101,7 +101,7 @@ def build_spec(
101101
class_objects = {**spec_object.ssz_objects, **spec_object.dataclasses}
102102

103103
# Ensure it's ordered after multiple forks
104-
new_objects = {}
104+
new_objects: dict[str, str] = {}
105105
while OrderedDict(new_objects) != OrderedDict(class_objects):
106106
new_objects = copy.deepcopy(class_objects)
107107
dependency_order_class_objects(
@@ -119,7 +119,7 @@ class PySpecCommand(Command):
119119

120120
spec_fork: str
121121
md_doc_paths: str
122-
parsed_md_doc_paths: list[str]
122+
parsed_md_doc_paths: list[Path]
123123
build_targets: str
124124
parsed_build_targets: list[BuildTarget]
125125
out_dir: str
@@ -136,7 +136,7 @@ class PySpecCommand(Command):
136136
("out-dir=", None, "Output directory to write spec package to"),
137137
]
138138

139-
def initialize_options(self):
139+
def initialize_options(self) -> None:
140140
"""Set default values for options."""
141141
# Each user option must be listed here with their default value.
142142
self.spec_fork = PHASE0
@@ -147,7 +147,7 @@ def initialize_options(self):
147147
mainnet:presets/mainnet:configs/mainnet.yaml
148148
"""
149149

150-
def finalize_options(self):
150+
def finalize_options(self) -> None:
151151
"""Post-process options."""
152152
if len(self.md_doc_paths) == 0:
153153
self.md_doc_paths = get_md_doc_paths(self.spec_fork)
@@ -156,7 +156,7 @@ def finalize_options(self):
156156
f"No markdown files specified, and spec fork {self.spec_fork!r} is unknown"
157157
)
158158

159-
self.parsed_md_doc_paths = self.md_doc_paths.split()
159+
self.parsed_md_doc_paths = [Path(p) for p in self.md_doc_paths.split()]
160160

161161
for filename in self.parsed_md_doc_paths:
162162
if not os.path.exists(filename):
@@ -182,7 +182,7 @@ def finalize_options(self):
182182
raise Exception(f"Config file {config_path!r} does not exist")
183183
self.parsed_build_targets.append(BuildTarget(name, preset_paths, Path(config_path)))
184184

185-
def run(self):
185+
def run(self) -> None:
186186
if not self.dry_run:
187187
dir_util.mkpath(self.out_dir)
188188

@@ -214,18 +214,16 @@ def run(self):
214214
class BuildPyCommand(build_py):
215215
"""Customize the build command to run the spec-builder on setup.py build"""
216216

217-
def initialize_options(self):
217+
def initialize_options(self) -> None:
218218
super().initialize_options()
219219

220-
def run_pyspec_cmd(self, spec_fork: str, **opts):
221-
cmd_obj: PySpecCommand = self.distribution.reinitialize_command("pyspec")
220+
def run_pyspec_cmd(self, spec_fork: str) -> None:
221+
cmd_obj = cast(PySpecCommand, self.distribution.reinitialize_command("pyspec"))
222222
cmd_obj.spec_fork = spec_fork
223223
cmd_obj.out_dir = os.path.join(self.build_lib, "eth2spec", spec_fork)
224-
for k, v in opts.items():
225-
setattr(cmd_obj, k, v)
226224
self.run_command("pyspec")
227225

228-
def run(self):
226+
def run(self) -> None:
229227
for spec_fork in spec_builders:
230228
self.run_pyspec_cmd(spec_fork=spec_fork)
231229

@@ -236,24 +234,21 @@ class PyspecDevCommand(Command):
236234
"""Build the markdown files in-place to their source location for testing."""
237235

238236
description = "Build the markdown files in-place to their source location for testing."
239-
user_options = []
240237

241-
def initialize_options(self):
238+
def initialize_options(self) -> None:
242239
pass
243240

244-
def finalize_options(self):
241+
def finalize_options(self) -> None:
245242
pass
246243

247-
def run_pyspec_cmd(self, spec_fork: str, **opts):
248-
cmd_obj: PySpecCommand = self.distribution.reinitialize_command("pyspec")
244+
def run_pyspec_cmd(self, spec_fork: str) -> None:
245+
cmd_obj = cast(PySpecCommand, self.distribution.reinitialize_command("pyspec"))
249246
cmd_obj.spec_fork = spec_fork
250247
eth2spec_dir = convert_path(self.distribution.package_dir["eth2spec"])
251248
cmd_obj.out_dir = os.path.join(eth2spec_dir, spec_fork)
252-
for k, v in opts.items():
253-
setattr(cmd_obj, k, v)
254249
self.run_command("pyspec")
255250

256-
def run(self):
251+
def run(self) -> None:
257252
for spec_fork in spec_builders:
258253
self.run_pyspec_cmd(spec_fork=spec_fork)
259254

0 commit comments

Comments
 (0)