@@ -21,9 +21,7 @@ ALL_EXECUTABLE_SPEC_NAMES = \
2121 clean \
2222 coverage \
2323 help \
24- kzg_setups \
2524 lint \
26- pyspec \
2725 reftests \
2826 serve_docs \
2927 test
@@ -48,9 +46,7 @@ help-nonverbose:
4846 @echo " make $( BOLD) clean$( NORM) -- delete all untracked files"
4947 @echo " make $( BOLD) comptests$( NORM) -- generate compliance tests"
5048 @echo " make $( BOLD) coverage$( NORM) -- run pyspec tests with coverage"
51- @echo " make $( BOLD) kzg_setups$( NORM) -- generate trusted setups"
5249 @echo " make $( BOLD) lint$( NORM) -- run the linters"
53- @echo " make $( BOLD) pyspec$( NORM) -- build python specifications"
5450 @echo " make $( BOLD) reftests$( NORM) -- generate reference tests"
5551 @echo " make $( BOLD) serve_docs$( NORM) -- start a local docs web server"
5652 @echo " make $( BOLD) test$( NORM) -- run pyspec tests"
@@ -60,16 +56,6 @@ help-nonverbose:
6056
6157# Print verbose help output.
6258help-verbose :
63- @echo " "
64- @echo " $( BOLD) BUILDING$( NORM) "
65- @echo " $( BOLD) --------------------------------------------------------------------------------$( NORM) "
66- @echo " "
67- @echo " $( BOLD) make pyspec$( NORM) "
68- @echo " "
69- @echo " Builds Python specifications for all consensus phases. This command installs"
70- @echo " the eth2spec package and copies mainnet/minimal configs to the test directory."
71- @echo " "
72- @echo " Example: make pyspec"
7359 @echo " "
7460 @echo " $( BOLD) TESTING$( NORM) "
7561 @echo " $( BOLD) --------------------------------------------------------------------------------$( NORM) "
@@ -167,13 +153,6 @@ help-verbose:
167153 @echo " make comptests fc_gen_config=standard"
168154 @echo " make comptests fc_gen_config=standard fork=deneb preset=mainnet threads=8"
169155 @echo " "
170- @echo " $( BOLD) make kzg_setups$( NORM) "
171- @echo " "
172- @echo " Generates KZG trusted setup files for testing. Creates trusted setups for"
173- @echo " both minimal and mainnet presets with predefined parameters."
174- @echo " "
175- @echo " Example: make kzg_setups"
176- @echo " "
177156 @echo " $( BOLD) DOCUMENTATION$( NORM) "
178157 @echo " $( BOLD) --------------------------------------------------------------------------------$( NORM) "
179158 @echo " "
@@ -226,7 +205,7 @@ TEST_LIBS_DIR = $(CURDIR)/tests/core
226205PYSPEC_DIR = $(TEST_LIBS_DIR ) /pyspec
227206
228207# Create the pyspec for all phases.
229- pyspec : $(VENV ) setup.py pyproject.toml
208+ _pyspec : $(VENV ) setup.py pyproject.toml
230209 @$(PYTHON_VENV ) -m uv pip install --reinstall-package=eth2spec .[docs,lint,test,generator]
231210 @for dir in $(ALL_EXECUTABLE_SPEC_NAMES ) ; do \
232211 mkdir -p " ./tests/core/pyspec/eth2spec/$$ dir" ; \
@@ -248,7 +227,7 @@ test: MAYBE_PARALLEL := $(if $(k),,-n auto)
248227test : MAYBE_FORK := $(if $(fork ) ,--fork=$(fork ) )
249228test : PRESET := --preset=$(if $(preset ) ,$(preset ) ,minimal)
250229test : BLS := --bls-type=$(if $(bls ) ,$(bls ) ,fastest)
251- test : pyspec
230+ test : _pyspec
252231 @mkdir -p $(TEST_REPORT_DIR )
253232 @$(PYTHON_VENV ) -m pytest \
254233 $(MAYBE_PARALLEL ) \
@@ -273,7 +252,7 @@ COVERAGE_SCOPE := $(foreach S,$(ALL_EXECUTABLE_SPEC_NAMES), --cov=eth2spec.$S.$(
273252# Run pytest with coverage tracking
274253_test_with_coverage : MAYBE_TEST := $(if $(k ) ,-k=$(k ) )
275254_test_with_coverage : MAYBE_FORK := $(if $(fork ) ,--fork=$(fork ) )
276- _test_with_coverage : pyspec
255+ _test_with_coverage : _pyspec
277256 @$(PYTHON_VENV ) -m pytest \
278257 -n auto \
279258 $(MAYBE_TEST ) \
@@ -311,7 +290,7 @@ _copy_docs:
311290 @cp $(CURDIR ) /README.md $(DOCS_DIR ) /README.md
312291
313292# Start a local documentation server.
314- serve_docs : pyspec _copy_docs
293+ serve_docs : _pyspec _copy_docs
315294 @$(MKDOCS_VENV ) build
316295 @$(MKDOCS_VENV ) serve
317296
@@ -327,7 +306,7 @@ MYPY_SCOPE := $(foreach S,$(ALL_EXECUTABLE_SPEC_NAMES), -p eth2spec.$S)
327306MARKDOWN_FILES := $(shell find $(CURDIR ) -name '* .md')
328307
329308# Check for mistakes.
330- lint : pyspec
309+ lint : _pyspec
331310 @$(MDFORMAT_VENV ) --number --wrap=80 $(MARKDOWN_FILES )
332311 @$(CODESPELL_VENV ) . --skip " ./.git,$( VENV) ,$( PYSPEC_DIR) /.mypy_cache" -I .codespell-whitelist
333312 @$(PYTHON_VENV ) -m ruff check --fix --quiet $(CURDIR ) /tests $(CURDIR ) /pysetup $(CURDIR ) /setup.py
@@ -340,6 +319,7 @@ lint: pyspec
340319
341320COMMA: = ,
342321TEST_VECTOR_DIR = $(CURDIR ) /../consensus-spec-tests/tests
322+ COMP_TEST_VECTOR_DIR = $(CURDIR ) /../compliance-spec-tests/tests
343323
344324# Generate reference tests.
345325reftests : MAYBE_VERBOSE := $(if $(filter true,$(verbose ) ) ,--verbose)
@@ -348,7 +328,7 @@ reftests: MAYBE_RUNNERS := $(if $(runner),--runners $(subst ${COMMA}, ,$(runner)
348328reftests : MAYBE_TESTS := $(if $(k ) ,--cases $(subst ${COMMA}, ,$(k ) ) )
349329reftests : MAYBE_FORKS := $(if $(fork ) ,--forks $(subst ${COMMA}, ,$(fork ) ) )
350330reftests : MAYBE_PRESETS := $(if $(preset ) ,--presets $(subst ${COMMA}, ,$(preset ) ) )
351- reftests : pyspec
331+ reftests : _pyspec
352332 @$(PYTHON_VENV ) -m tests.generators.main \
353333 --output $(TEST_VECTOR_DIR ) \
354334 $(MAYBE_VERBOSE ) \
@@ -358,24 +338,12 @@ reftests: pyspec
358338 $(MAYBE_FORKS ) \
359339 $(MAYBE_PRESETS )
360340
361- # Generate KZG trusted setups for testing.
362- kzg_setups : pyspec
363- @for preset in minimal mainnet; do \
364- $(PYTHON_VENV ) $(CURDIR ) /scripts/gen_kzg_trusted_setups.py \
365- --secret=1337 \
366- --g1-length=4096 \
367- --g2-length=65 \
368- --output-dir $(CURDIR ) /presets/$$ preset/trusted_setups; \
369- done
370-
371- COMP_TEST_VECTOR_DIR = $(CURDIR ) /../compliance-spec-tests/tests
372-
373341# Generate compliance tests (fork choice).
374342comptests : FC_GEN_CONFIG := $(if $(fc_gen_config ) ,$(fc_gen_config ) ,tiny)
375343comptests : MAYBE_THREADS := $(if $(threads ) ,--threads=$(threads ) ,--fc-gen-multi-processing)
376344comptests : MAYBE_FORKS := $(if $(fork ) ,--forks $(subst ${COMMA}, ,$(fork ) ) )
377345comptests : MAYBE_PRESETS := $(if $(preset ) ,--presets $(subst ${COMMA}, ,$(preset ) ) )
378- comptests : pyspec
346+ comptests : _pyspec
379347 @$(PYTHON_VENV ) -m tests.generators.compliance_runners.fork_choice.test_gen \
380348 --output $(COMP_TEST_VECTOR_DIR ) \
381349 --fc-gen-config $(FC_GEN_CONFIG ) \
0 commit comments