Skip to content

Commit c6090cc

Browse files
authored
Merge branch 'dev' into cl-drives-blob-limit
2 parents e3eb09b + 148ccca commit c6090cc

Some content is hidden

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

59 files changed

+1928
-249
lines changed

.github/workflows/run-tests.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,18 @@ jobs:
110110
with:
111111
name: test-reports-${{ matrix.version }}
112112
path: tests/core/pyspec/test-reports
113+
114+
gen-modcheck:
115+
runs-on: [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs]
116+
steps:
117+
- name: Checkout repository
118+
uses: actions/checkout@v4
119+
- name: Setup Python
120+
uses: actions/setup-python@v5
121+
with:
122+
python-version: '3.12.4'
123+
cache: ''
124+
- name: Install pyspec requirements
125+
run: make install_test
126+
- name: Run generators with --modcheck
127+
run: make generate_tests modcheck=true

Makefile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ COV_HTML_OUT_DIR=$(PY_SPEC_DIR)/$(COV_HTML_OUT)
4141
COV_INDEX_FILE=$(COV_HTML_OUT_DIR)/index.html
4242

4343
CURRENT_DIR = ${CURDIR}
44-
LINTER_CONFIG_FILE = $(CURRENT_DIR)/linter.ini
4544
GENERATOR_ERROR_LOG_FILE = $(CURRENT_DIR)/$(TEST_VECTOR_DIR)/testgen_error_log.txt
4645

4746
SCRIPTS_DIR = ${CURRENT_DIR}/scripts
@@ -151,13 +150,16 @@ codespell:
151150

152151
lint: pyspec
153152
. venv/bin/activate; cd $(PY_SPEC_DIR); \
154-
flake8 --config $(LINTER_CONFIG_FILE) ./eth2spec \
155-
&& python -m pylint --rcfile $(LINTER_CONFIG_FILE) $(PYLINT_SCOPE) \
156-
&& python -m mypy --config-file $(LINTER_CONFIG_FILE) $(MYPY_SCOPE)
153+
flake8 --config $(CURRENT_DIR)/flake8.ini ./eth2spec \
154+
&& python -m pylint --rcfile $(CURRENT_DIR)/pylint.ini $(PYLINT_SCOPE) \
155+
&& python -m mypy --config-file $(CURRENT_DIR)/mypy.ini $(MYPY_SCOPE)
157156

158157
lint_generators: pyspec
159158
. venv/bin/activate; cd $(TEST_GENERATORS_DIR); \
160-
flake8 --config $(LINTER_CONFIG_FILE)
159+
flake8 --config $(CURRENT_DIR)/flake8.ini
160+
161+
# If set to true, it will not run generator tests.
162+
modcheck ?= false
161163

162164
# Runs a generator, identified by param 1
163165
define run_generator
@@ -177,7 +179,7 @@ define run_generator
177179
. venv/bin/activate; \
178180
pip3 install ../../../dist/eth2spec-*.whl; \
179181
pip3 install 'eth2spec[generator]'; \
180-
python3 main.py -o $(CURRENT_DIR)/$(TEST_VECTOR_DIR); \
182+
python3 main.py -o $(CURRENT_DIR)/$(TEST_VECTOR_DIR) $(if $(filter true,$(modcheck)),--modcheck); \
181183
echo "generator $(1) finished"
182184
endef
183185

configs/mainnet.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ DATA_COLUMN_SIDECAR_SUBNET_COUNT: 128
165165
MAX_REQUEST_DATA_COLUMN_SIDECARS: 16384
166166
SAMPLES_PER_SLOT: 8
167167
CUSTODY_REQUIREMENT: 4
168+
BLOB_SIDECAR_SUBNET_COUNT_EIP7594: 8
169+
MAX_BLOBS_PER_BLOCK_EIP7594: 8
170+
# `MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK_EIP7594`
171+
MAX_REQUEST_BLOB_SIDECARS_EIP7594: 1024
168172

169173
# [New in Electra:EIP7251]
170174
MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA: 128000000000 # 2**7 * 10**9 (= 128,000,000,000)

configs/minimal.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@ DATA_COLUMN_SIDECAR_SUBNET_COUNT: 128
164164
MAX_REQUEST_DATA_COLUMN_SIDECARS: 16384
165165
SAMPLES_PER_SLOT: 8
166166
CUSTODY_REQUIREMENT: 4
167+
BLOB_SIDECAR_SUBNET_COUNT_EIP7594: 8
168+
MAX_BLOBS_PER_BLOCK_EIP7594: 8
169+
# `MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK_EIP7594`
170+
MAX_REQUEST_BLOB_SIDECARS_EIP7594: 1024
167171

168172
# [New in Electra:EIP7251]
169173
MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA: 64000000000 # 2**6 * 10**9 (= 64,000,000,000)

flake8.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
ignore = E252,W504,W503
3+
max-line-length = 120

linter.ini

Lines changed: 0 additions & 18 deletions
This file was deleted.

mypy.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[mypy]
2+
disallow_incomplete_defs = True
3+
disallow_untyped_defs = True
4+
warn_unused_ignores = True
5+
warn_unused_configs = True
6+
warn_redundant_casts = True
7+
ignore_missing_imports = True

pylint.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[MESSAGES CONTROL]
2+
disable = all
3+
enable = unused-argument

pysetup/md_doc_paths.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
DENEB: CAPELLA,
2323
ELECTRA: DENEB,
2424
WHISK: CAPELLA,
25-
EIP7594: DENEB,
25+
EIP7594: ELECTRA,
2626
EIP6800: DENEB,
2727
EIP7732: ELECTRA,
2828
}

pysetup/spec_builders/eip7594.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class EIP7594SpecBuilder(BaseSpecBuilder):
1010
@classmethod
1111
def imports(cls, preset_name: str):
1212
return f'''
13-
from eth2spec.deneb import {preset_name} as deneb
13+
from eth2spec.electra import {preset_name} as electra
1414
'''
1515

1616

0 commit comments

Comments
 (0)