Skip to content

Commit 9fce57d

Browse files
authored
Merge pull request #4346 from ethereum/dev
Release v1.6.0-alpha.1
2 parents e14deee + 33e1820 commit 9fce57d

File tree

114 files changed

+2369
-1216
lines changed

Some content is hidden

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

114 files changed

+2369
-1216
lines changed

.github/workflows/generate_vectors.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@ name: Run test vector generation
22

33
defaults:
44
run:
5-
shell: zsh {0}
5+
shell: zsh -e {0}
66

77
on:
88
workflow_dispatch:
99
inputs:
10+
repo:
11+
description: The repository to use (e.g. user/consensus-specs)
12+
default: ethereum/consensus-specs
13+
type: string
14+
required: true
1015
ref:
1116
description: The branch, tag or SHA to checkout and build from
1217
default: dev
@@ -23,9 +28,9 @@ jobs:
2328
- name: Checkout repository
2429
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2530
with:
26-
repository: 'ethereum/consensus-specs'
31+
repository: ${{ inputs.repo }}
2732
path: 'consensus-specs'
28-
ref: ${{ inputs.ref || 'dev' }}
33+
ref: ${{ inputs.ref }}
2934
- name: Setup Python
3035
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
3136
with:

.github/workflows/nightly-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Nightly mainnet tests
22

33
defaults:
44
run:
5-
shell: zsh {0}
5+
shell: zsh -e {0}
66

77
on:
88
workflow_dispatch:

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Run tests
22

33
defaults:
44
run:
5-
shell: zsh {0}
5+
shell: zsh -e {0}
66

77
on:
88
push:

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ test: pyspec
112112
$(PRESET) \
113113
$(BLS) \
114114
--junitxml=$(TEST_REPORT_DIR)/test_results.xml \
115+
$(CURDIR)/tests/infra \
115116
$(PYSPEC_DIR)/eth2spec
116117

117118
###############################################################################
@@ -186,9 +187,8 @@ MARKDOWN_FILES = $(CURDIR)/README.md \
186187
lint: pyspec
187188
@$(MDFORMAT_VENV) --number --wrap=80 $(MARKDOWN_FILES)
188189
@$(CODESPELL_VENV) . --skip "./.git,$(VENV),$(PYSPEC_DIR)/.mypy_cache" -I .codespell-whitelist
189-
@$(PYTHON_VENV) -m isort --quiet $(CURDIR)/tests
190-
@$(PYTHON_VENV) -m black --quiet $(CURDIR)/tests
191-
@$(PYTHON_VENV) -m pylint --rcfile $(PYLINT_CONFIG) $(PYLINT_SCOPE)
190+
@$(PYTHON_VENV) -m ruff check --fix --quiet $(CURDIR)/tests $(CURDIR)/pysetup $(CURDIR)/setup.py
191+
@$(PYTHON_VENV) -m ruff format --quiet $(CURDIR)/tests $(CURDIR)/pysetup $(CURDIR)/setup.py
192192
@$(PYTHON_VENV) -m mypy --config-file $(MYPY_CONFIG) $(MYPY_SCOPE)
193193

194194
###############################################################################

configs/mainnet.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,4 @@ MAX_BYTES_PER_INCLUSION_LIST: 8192
194194
# Blob Scheduling
195195
# ---------------------------------------------------------------
196196

197-
BLOB_SCHEDULE:
198-
# Deneb
199-
- EPOCH: 269568
200-
MAX_BLOBS_PER_BLOCK: 6
201-
# Electra
202-
- EPOCH: 364032
203-
MAX_BLOBS_PER_BLOCK: 9
197+
BLOB_SCHEDULE: []

configs/minimal.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,4 @@ MAX_BYTES_PER_INCLUSION_LIST: 8192
191191
# Blob Scheduling
192192
# ---------------------------------------------------------------
193193

194-
BLOB_SCHEDULE:
195-
# Deneb
196-
- EPOCH: 18446744073709551615
197-
MAX_BLOBS_PER_BLOCK: 6
198-
# Electra
199-
- EPOCH: 18446744073709551615
200-
MAX_BLOBS_PER_BLOCK: 9
194+
BLOB_SCHEDULE: []

pyproject.toml

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[build-system]
22
requires = [
33
"marko==2.1.3",
4-
"ruamel.yaml==0.18.10",
5-
"setuptools==80.4.0",
4+
"ruamel.yaml==0.18.12",
5+
"setuptools==80.9.0",
66
"wheel==0.45.1",
77
]
88

@@ -12,7 +12,7 @@ dynamic = ["version"]
1212
authors = [{ name = "ethereum" }]
1313
description = "Ethereum consensus layer specifications package"
1414
readme = { file = "README.md", content-type = "text/markdown" }
15-
requires-python = ">=3.9,<4.0"
15+
requires-python = ">=3.10,<4.0"
1616
dependencies = [
1717
"curdleproofs==0.1.2",
1818
"eth-typing==5.2.1",
@@ -23,54 +23,65 @@ dependencies = [
2323
"milagro_bls_binding==1.9.0",
2424
"py_arkworks_bls12381==0.3.8",
2525
"py_ecc==7.0.1",
26-
"pycryptodome==3.22.0",
26+
"pycryptodome==3.23.0",
2727
"remerkleable==0.1.28",
28-
"ruamel.yaml==0.18.10",
29-
"setuptools==80.4.0",
28+
"ruamel.yaml==0.18.12",
29+
"setuptools==80.9.0",
3030
"trie==3.1.0",
3131
]
3232

3333
[project.optional-dependencies]
3434
test = [
3535
"pytest-cov==6.1.1",
36-
"pytest-xdist==3.6.1",
37-
"pytest==8.3.5",
36+
"pytest-xdist==3.7.0",
37+
"pytest==8.4.0",
3838
]
3939
lint = [
40-
"black==25.1.0",
4140
"codespell==2.4.1",
42-
"isort==6.0.1",
43-
"mdformat-gfm-alerts==1.0.1",
41+
"mdformat-gfm-alerts==1.0.2",
4442
"mdformat-gfm==0.4.1",
4543
"mdformat-toc==0.3.0",
4644
"mdformat==0.7.22",
47-
"mypy==1.15.0",
48-
"pylint==3.3.7",
45+
"mypy==1.16.0",
46+
"ruff==0.11.12",
4947
]
5048
generator = [
5149
"filelock==3.18.0",
5250
"pathos==0.3.4",
53-
"pytest==8.3.5",
51+
"pytest==8.4.0",
5452
"python-snappy==0.7.3",
5553
"rich==14.0.0",
5654
]
5755
docs = [
5856
"mdx-truly-sane-lists==1.3",
5957
"mkdocs-awesome-pages-plugin==2.10.1",
60-
"mkdocs-material==9.6.13",
58+
"mkdocs-material==9.6.14",
6159
"mkdocs==1.6.1",
6260
]
6361

64-
[tool.black]
62+
[tool.ruff]
6563
line-length = 100
6664

67-
[tool.isort]
68-
profile = "black"
69-
line_length = 100
70-
combine_as_imports = true
71-
known_first_party = ["eth2spec"]
72-
order_by_type = false
73-
skip_glob = [
74-
"tests/core/pyspec/eth2spec/*/mainnet.py",
75-
"tests/core/pyspec/eth2spec/*/minimal.py",
65+
[tool.ruff.lint]
66+
select = [
67+
"F", # https://docs.astral.sh/ruff/rules/#pyflakes-f
68+
"I", # https://docs.astral.sh/ruff/rules/#isort-i
69+
"PL", # https://docs.astral.sh/ruff/rules/#pylint-pl
70+
"UP", # https://docs.astral.sh/ruff/rules/#pyupgrade-up
7671
]
72+
ignore = [
73+
"PLR0911", # https://docs.astral.sh/ruff/rules/too-many-return-statements/
74+
"PLR0912", # https://docs.astral.sh/ruff/rules/too-many-branches/
75+
"PLR0913", # https://docs.astral.sh/ruff/rules/too-many-arguments/
76+
"PLR0915", # https://docs.astral.sh/ruff/rules/too-many-statements/
77+
"PLR1714", # https://docs.astral.sh/ruff/rules/repeated-equality-comparison/
78+
"PLR2004", # https://docs.astral.sh/ruff/rules/magic-value-comparison/
79+
"PLW0128", # https://docs.astral.sh/ruff/rules/redeclared-assigned-name/
80+
"PLW0603", # https://docs.astral.sh/ruff/rules/global-statement/
81+
"PLW2901", # https://docs.astral.sh/ruff/rules/redefined-loop-name/
82+
]
83+
84+
[tool.ruff.lint.isort]
85+
combine-as-imports = true
86+
known-first-party = ["eth2spec"]
87+
order-by-type = false

pysetup/constants.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# Definitions in context.py
2-
PHASE0 = 'phase0'
3-
ALTAIR = 'altair'
4-
BELLATRIX = 'bellatrix'
5-
CAPELLA = 'capella'
6-
DENEB = 'deneb'
7-
ELECTRA = 'electra'
8-
FULU = 'fulu'
9-
EIP6800 = 'eip6800'
10-
EIP7441 = 'eip7441'
11-
EIP7732 = 'eip7732'
12-
EIP7805 = 'eip7805'
2+
PHASE0 = "phase0"
3+
ALTAIR = "altair"
4+
BELLATRIX = "bellatrix"
5+
CAPELLA = "capella"
6+
DENEB = "deneb"
7+
ELECTRA = "electra"
8+
FULU = "fulu"
9+
EIP6800 = "eip6800"
10+
EIP7441 = "eip7441"
11+
EIP7732 = "eip7732"
12+
EIP7805 = "eip7805"
1313

1414

1515
# The helper functions that are used when defining constants
16-
CONSTANT_DEP_SUNDRY_CONSTANTS_FUNCTIONS = '''
16+
CONSTANT_DEP_SUNDRY_CONSTANTS_FUNCTIONS = """
1717
def ceillog2(x: int) -> uint64:
1818
if x < 1:
1919
raise ValueError(f"ceillog2 accepts only positive values, x={x}")
@@ -24,10 +24,10 @@ def floorlog2(x: int) -> uint64:
2424
if x < 1:
2525
raise ValueError(f"floorlog2 accepts only positive values, x={x}")
2626
return uint64(x.bit_length() - 1)
27-
'''
27+
"""
2828

2929

30-
OPTIMIZED_BLS_AGGREGATE_PUBKEYS = '''
30+
OPTIMIZED_BLS_AGGREGATE_PUBKEYS = """
3131
def eth_aggregate_pubkeys(pubkeys: Sequence[BLSPubkey]) -> BLSPubkey:
3232
return bls.AggregatePKs(pubkeys)
33-
'''
33+
"""

0 commit comments

Comments
 (0)