From f12c32a6904417a4b8ed4b8bbbae2f6193c0f835 Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Fri, 21 Jun 2019 14:18:28 -0600 Subject: [PATCH 1/3] Xdist tests for parallelism (#1201) * add xdist parallelization * reduce circleci cpus to 8 * reduce cpus to 4 * reduce circleci cpus to 2 * circleci back to 4 cpus --- Makefile | 4 ++-- test_libs/pyspec/requirements-testing.txt | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9764b3528..9090c3ef0 100644 --- a/Makefile +++ b/Makefile @@ -48,11 +48,11 @@ install_test: test: $(PY_SPEC_ALL_TARGETS) cd $(PY_SPEC_DIR); . venv/bin/activate; export PYTHONPATH="./"; \ - python -m pytest --cov=eth2spec.phase0.spec --cov=eth2spec.phase1.spec --cov-report="html:$(COV_HTML_OUT)" --cov-branch eth2spec + python -m pytest -n 4 --cov=eth2spec.phase0.spec --cov=eth2spec.phase1.spec --cov-report="html:$(COV_HTML_OUT)" --cov-branch eth2spec citest: $(PY_SPEC_ALL_TARGETS) cd $(PY_SPEC_DIR); mkdir -p test-reports/eth2spec; . venv/bin/activate; \ - python -m pytest --junitxml=test-reports/eth2spec/test_results.xml eth2spec + python -m pytest -n 4 --junitxml=test-reports/eth2spec/test_results.xml eth2spec open_cov: ((open "$(COV_INDEX_FILE)" || xdg-open "$(COV_INDEX_FILE)") &> /dev/null) & diff --git a/test_libs/pyspec/requirements-testing.txt b/test_libs/pyspec/requirements-testing.txt index ad9c4de3b..b5229ae20 100644 --- a/test_libs/pyspec/requirements-testing.txt +++ b/test_libs/pyspec/requirements-testing.txt @@ -1,6 +1,7 @@ -r requirements.txt -pytest>=3.6,<3.7 +pytest>=4.4 ../config_helpers flake8==3.7.7 mypy==0.701 pytest-cov +pytest-xdist From f55499c0baad5d22a6f7749a9153374c7edf9267 Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Fri, 21 Jun 2019 14:30:22 -0600 Subject: [PATCH 2/3] Fix Gwei value table (#1203) --- specs/core/0_beacon-chain.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index 1dcdbdef9..5081dbf74 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -200,7 +200,7 @@ These configurations are updated for releases, but may be out of sync during `de ### Gwei values | Name | Value | -| - | - | :-: | +| - | - | | `MIN_DEPOSIT_AMOUNT` | `Gwei(2**0 * 10**9)` (= 1,000,000,000) | | `MAX_EFFECTIVE_BALANCE` | `Gwei(2**5 * 10**9)` (= 32,000,000,000) | | `EJECTION_BALANCE` | `Gwei(2**4 * 10**9)` (= 16,000,000,000) | From e15a649f37680ab086801f02b408e1b562381d6f Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Fri, 21 Jun 2019 15:34:36 -0600 Subject: [PATCH 3/3] reduce MAX_EPOCHS_PER_CROSSLINK in minimal config for testing purposes --- configs/constant_presets/minimal.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/constant_presets/minimal.yaml b/configs/constant_presets/minimal.yaml index c8c2853c7..201ac475f 100644 --- a/configs/constant_presets/minimal.yaml +++ b/configs/constant_presets/minimal.yaml @@ -64,8 +64,8 @@ SLOTS_PER_HISTORICAL_ROOT: 64 MIN_VALIDATOR_WITHDRAWABILITY_DELAY: 256 # 2**11 (= 2,048) epochs PERSISTENT_COMMITTEE_PERIOD: 2048 -# 2**6 (= 64) epochs -MAX_EPOCHS_PER_CROSSLINK: 64 +# [customized] fast catchup crosslinks +MAX_EPOCHS_PER_CROSSLINK: 4 # 2**2 (= 4) epochs MIN_EPOCHS_TO_INACTIVITY_PENALTY: 4 # [customized] 2**12 (= 4,096) epochs