Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
453214f
Bump the actions group with 3 updates
dependabot[bot] May 19, 2025
ad88450
Merge pull request #4334 from ethereum/dependabot/pip/actions-7e473ec406
jtraglia May 20, 2025
14da059
Run linting on pysetup directory (#4335)
jtraglia May 20, 2025
a94d85b
Delete unnecessary eth2spec/eip7732/__init__.py file (#4336)
jtraglia May 20, 2025
1752174
Bump the actions group with 4 updates
dependabot[bot] May 26, 2025
e006240
Merge pull request #4338 from ethereum/dependabot/pip/actions-9a2370342f
GabrielAstieres May 27, 2025
b558308
Allow custom arg parser in test generators (#4339)
ericsson49 May 27, 2025
868d9fb
Markdown to SpecObject refactoring (#4330)
leolara May 28, 2025
c9269eb
Remove deneb/electra from blob schedule and default to electra limit …
jtraglia May 28, 2025
a58c80d
Set blob schedule to an empty list (#4342)
jtraglia May 28, 2025
a5c256f
Fix handling of multiple Python definitions in code blocks (#4344)
leolara May 29, 2025
92a5619
Updated minimum python version to 3.10 (#4345)
leolara May 29, 2025
6507cd1
Bump version to v1.6.0-alpha.1 (#4347)
jtraglia May 29, 2025
5819ea2
Update default shell to bail on error (#4349)
jtraglia May 30, 2025
74a077e
Run linter on setup.py (#4348)
jtraglia May 30, 2025
796c278
Bump the actions group with 4 updates (#4355)
dependabot[bot] Jun 2, 2025
1ff0d27
Add repo input to reftest generator action (#4356)
jtraglia Jun 3, 2025
43e7167
EIP-7917: Deterministic proposer lookahead (#4190)
linoscope Jun 3, 2025
1c39288
Validator custody: Increase only and optional dynamic backfill. (#4357)
nalepae Jun 3, 2025
33e1820
Replace black/pylint/isort with ruff (#4350)
jtraglia Jun 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/generate_vectors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@ name: Run test vector generation

defaults:
run:
shell: zsh {0}
shell: zsh -e {0}

on:
workflow_dispatch:
inputs:
repo:
description: The repository to use (e.g. user/consensus-specs)
default: ethereum/consensus-specs
type: string
required: true
ref:
description: The branch, tag or SHA to checkout and build from
default: dev
Expand All @@ -23,9 +28,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: 'ethereum/consensus-specs'
repository: ${{ inputs.repo }}
path: 'consensus-specs'
ref: ${{ inputs.ref || 'dev' }}
ref: ${{ inputs.ref }}
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Nightly mainnet tests

defaults:
run:
shell: zsh {0}
shell: zsh -e {0}

on:
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Run tests

defaults:
run:
shell: zsh {0}
shell: zsh -e {0}

on:
push:
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ test: pyspec
$(PRESET) \
$(BLS) \
--junitxml=$(TEST_REPORT_DIR)/test_results.xml \
$(CURDIR)/tests/infra \
$(PYSPEC_DIR)/eth2spec

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

###############################################################################
Expand Down
8 changes: 1 addition & 7 deletions configs/mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,4 @@ MAX_BYTES_PER_INCLUSION_LIST: 8192
# Blob Scheduling
# ---------------------------------------------------------------

BLOB_SCHEDULE:
# Deneb
- EPOCH: 269568
MAX_BLOBS_PER_BLOCK: 6
# Electra
- EPOCH: 364032
MAX_BLOBS_PER_BLOCK: 9
BLOB_SCHEDULE: []
8 changes: 1 addition & 7 deletions configs/minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,4 @@ MAX_BYTES_PER_INCLUSION_LIST: 8192
# Blob Scheduling
# ---------------------------------------------------------------

BLOB_SCHEDULE:
# Deneb
- EPOCH: 18446744073709551615
MAX_BLOBS_PER_BLOCK: 6
# Electra
- EPOCH: 18446744073709551615
MAX_BLOBS_PER_BLOCK: 9
BLOB_SCHEDULE: []
61 changes: 36 additions & 25 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build-system]
requires = [
"marko==2.1.3",
"ruamel.yaml==0.18.10",
"setuptools==80.4.0",
"ruamel.yaml==0.18.12",
"setuptools==80.9.0",
"wheel==0.45.1",
]

Expand All @@ -12,7 +12,7 @@ dynamic = ["version"]
authors = [{ name = "ethereum" }]
description = "Ethereum consensus layer specifications package"
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.9,<4.0"
requires-python = ">=3.10,<4.0"
dependencies = [
"curdleproofs==0.1.2",
"eth-typing==5.2.1",
Expand All @@ -23,54 +23,65 @@ dependencies = [
"milagro_bls_binding==1.9.0",
"py_arkworks_bls12381==0.3.8",
"py_ecc==7.0.1",
"pycryptodome==3.22.0",
"pycryptodome==3.23.0",
"remerkleable==0.1.28",
"ruamel.yaml==0.18.10",
"setuptools==80.4.0",
"ruamel.yaml==0.18.12",
"setuptools==80.9.0",
"trie==3.1.0",
]

[project.optional-dependencies]
test = [
"pytest-cov==6.1.1",
"pytest-xdist==3.6.1",
"pytest==8.3.5",
"pytest-xdist==3.7.0",
"pytest==8.4.0",
]
lint = [
"black==25.1.0",
"codespell==2.4.1",
"isort==6.0.1",
"mdformat-gfm-alerts==1.0.1",
"mdformat-gfm-alerts==1.0.2",
"mdformat-gfm==0.4.1",
"mdformat-toc==0.3.0",
"mdformat==0.7.22",
"mypy==1.15.0",
"pylint==3.3.7",
"mypy==1.16.0",
"ruff==0.11.12",
]
generator = [
"filelock==3.18.0",
"pathos==0.3.4",
"pytest==8.3.5",
"pytest==8.4.0",
"python-snappy==0.7.3",
"rich==14.0.0",
]
docs = [
"mdx-truly-sane-lists==1.3",
"mkdocs-awesome-pages-plugin==2.10.1",
"mkdocs-material==9.6.13",
"mkdocs-material==9.6.14",
"mkdocs==1.6.1",
]

[tool.black]
[tool.ruff]
line-length = 100

[tool.isort]
profile = "black"
line_length = 100
combine_as_imports = true
known_first_party = ["eth2spec"]
order_by_type = false
skip_glob = [
"tests/core/pyspec/eth2spec/*/mainnet.py",
"tests/core/pyspec/eth2spec/*/minimal.py",
[tool.ruff.lint]
select = [
"F", # https://docs.astral.sh/ruff/rules/#pyflakes-f
"I", # https://docs.astral.sh/ruff/rules/#isort-i
"PL", # https://docs.astral.sh/ruff/rules/#pylint-pl
"UP", # https://docs.astral.sh/ruff/rules/#pyupgrade-up
]
ignore = [
"PLR0911", # https://docs.astral.sh/ruff/rules/too-many-return-statements/
"PLR0912", # https://docs.astral.sh/ruff/rules/too-many-branches/
"PLR0913", # https://docs.astral.sh/ruff/rules/too-many-arguments/
"PLR0915", # https://docs.astral.sh/ruff/rules/too-many-statements/
"PLR1714", # https://docs.astral.sh/ruff/rules/repeated-equality-comparison/
"PLR2004", # https://docs.astral.sh/ruff/rules/magic-value-comparison/
"PLW0128", # https://docs.astral.sh/ruff/rules/redeclared-assigned-name/
"PLW0603", # https://docs.astral.sh/ruff/rules/global-statement/
"PLW2901", # https://docs.astral.sh/ruff/rules/redefined-loop-name/
]

[tool.ruff.lint.isort]
combine-as-imports = true
known-first-party = ["eth2spec"]
order-by-type = false
30 changes: 15 additions & 15 deletions pysetup/constants.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Definitions in context.py
PHASE0 = 'phase0'
ALTAIR = 'altair'
BELLATRIX = 'bellatrix'
CAPELLA = 'capella'
DENEB = 'deneb'
ELECTRA = 'electra'
FULU = 'fulu'
EIP6800 = 'eip6800'
EIP7441 = 'eip7441'
EIP7732 = 'eip7732'
EIP7805 = 'eip7805'
PHASE0 = "phase0"
ALTAIR = "altair"
BELLATRIX = "bellatrix"
CAPELLA = "capella"
DENEB = "deneb"
ELECTRA = "electra"
FULU = "fulu"
EIP6800 = "eip6800"
EIP7441 = "eip7441"
EIP7732 = "eip7732"
EIP7805 = "eip7805"


# The helper functions that are used when defining constants
CONSTANT_DEP_SUNDRY_CONSTANTS_FUNCTIONS = '''
CONSTANT_DEP_SUNDRY_CONSTANTS_FUNCTIONS = """
def ceillog2(x: int) -> uint64:
if x < 1:
raise ValueError(f"ceillog2 accepts only positive values, x={x}")
Expand All @@ -24,10 +24,10 @@ def floorlog2(x: int) -> uint64:
if x < 1:
raise ValueError(f"floorlog2 accepts only positive values, x={x}")
return uint64(x.bit_length() - 1)
'''
"""


OPTIMIZED_BLS_AGGREGATE_PUBKEYS = '''
OPTIMIZED_BLS_AGGREGATE_PUBKEYS = """
def eth_aggregate_pubkeys(pubkeys: Sequence[BLSPubkey]) -> BLSPubkey:
return bls.AggregatePKs(pubkeys)
'''
"""
Loading