Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phase 0 spec freeze #1242

Merged
merged 508 commits into from
Jul 1, 2019
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
508 commits
Select commit Hold shift + click to select a range
ff2d711
test block application on same and on previous slot state
protolambda Jun 26, 2019
8445d1d
fix formatting for lint
protolambda Jun 26, 2019
f7b3c87
check invalid state root
protolambda Jun 26, 2019
235c3d6
re-enable test_empty_epoch_transition_not_finalizing for minimal config
protolambda Jun 26, 2019
23909ca
Fix line lengths
ralexstokes Jun 26, 2019
a62d026
merge with dev, fixed now
protolambda Jun 26, 2019
dbb697d
Small update to typing in BLS spec file
vbuterin Jun 26, 2019
aecaed7
move genesis tests, structure properly, add yield keys for future tes…
protolambda Jun 26, 2019
a0c2f5c
fix genesis testing code, add missing constant temporarily, fix py Ge…
protolambda Jun 26, 2019
e49519a
wrong end epoch test
protolambda Jun 27, 2019
d4209bb
Merge pull request #1222 from ethereum/vbuterin-patch-6
djrtwo Jun 27, 2019
bcfe383
WIP
JustinDrake Jun 27, 2019
02f6ba3
Add Bitvector and Bitlist
dankrad Jun 27, 2019
23c7435
Add some tests and fix pack
dankrad Jun 27, 2019
494984f
Fix linting errors
dankrad Jun 27, 2019
ee712ec
Make HW happy :)
JustinDrake Jun 27, 2019
d641e94
Cleanups
JustinDrake Jun 27, 2019
67c50cb
Changed attestation and custody bitfields
dankrad Jun 27, 2019
becb7a0
justification_bitfield -> Bitvector[4]
dankrad Jun 27, 2019
80c680e
Phase 1 to Bitvector/Bitlist
dankrad Jun 27, 2019
f57387c
Justification bitvector length to constant
dankrad Jun 27, 2019
a5154da
suggestion to implement bitfield like
protolambda Jun 27, 2019
b574a58
Remove not working py-ssz decoder tests
dankrad Jun 27, 2019
8ed638b
Linter fixes
dankrad Jun 27, 2019
2cb23d3
Merge remote-tracking branch 'origin/bitfield-suggestion' into dankra…
dankrad Jun 27, 2019
afd86f7
Fixes in ssz impl
dankrad Jun 27, 2019
93ce168
More linting fixes
dankrad Jun 27, 2019
543729c
Merge pull request #1198 from ethereum/fork-choice-epoch
CarlBeek Jun 27, 2019
853f5fc
Apply Danny's suggestions
JustinDrake Jun 27, 2019
7adf07e
A few more tests for Bitvector/Bitlist
dankrad Jun 27, 2019
384fa88
justification/finalization testing groundwork
protolambda Jun 27, 2019
990cc55
fix committee typing error
djrtwo Jun 27, 2019
237b41d
Slice notation for justification_bitfield shift
dankrad Jun 27, 2019
2677d23
Some more (shorter) Bitvector and Bitlist tests
dankrad Jun 27, 2019
2252142
padding version normal merkle tree
hwwhww Jun 28, 2019
140c69f
Merge branch 'dev' into checkpoints
djrtwo Jun 28, 2019
1a5de80
Merge pull request #1210 from ethereum/checkpoints
djrtwo Jun 28, 2019
2622548
Merge remote-tracking branch 'origin/dev' into dankrad-patch-8
dankrad Jun 28, 2019
0ba933e
Merge pull request #1209 from ethereum/early_secret_test
CarlBeek Jun 28, 2019
196ac42
Cleanup naming
JustinDrake Jun 28, 2019
6f9d374
Cleanups
JustinDrake Jun 28, 2019
e36593b
Add comment
JustinDrake Jun 28, 2019
c764202
Slashing penalty calculation change (#1217)
vbuterin Jun 28, 2019
2739767
Hardened Eth 1.0 voting strategy (#1218)
JustinDrake Jun 28, 2019
05842f8
Update 0_beacon-chain.md
JustinDrake Jun 28, 2019
5ff13dd
be explicit about limiting for HTR and chunk padding
protolambda Jun 28, 2019
dcb0244
get_attesting_indices set instead of sorted (#1225)
djrtwo Jun 28, 2019
128bbbc
fix slicing, and support partial slice bounds
protolambda Jun 28, 2019
25db397
fix line length lint problem in checkpoint
protolambda Jun 28, 2019
5f0e583
resolved merge conflicts, take attesters seq->set change from dev, ta…
protolambda Jun 28, 2019
5a8f3e4
set committees root for next epoch rather tahn ACTIVaTION_EXIT_DELAY …
djrtwo Jun 28, 2019
b40e228
use active index root for generate seed mix in
djrtwo Jun 28, 2019
9993a28
lint
djrtwo Jun 28, 2019
b88ab25
Merge branch 'dev' into committee-roots
djrtwo Jun 28, 2019
4dc526f
In the end, `get_merkle_root` is back
hwwhww Jun 28, 2019
cb2bfd6
Apply Proto's feedback of list(map(...))
hwwhww Jun 28, 2019
7bc6a46
Fix `build_deposit`
hwwhww Jun 28, 2019
fa84c49
Update specs/core/0_beacon-chain.md
dankrad Jun 28, 2019
6a2d2c8
Bitlist for attestation doc
dankrad Jun 28, 2019
4dcb47e
Update test_libs/pyspec/eth2spec/test/phase_0/block_processing/test_p…
dankrad Jun 28, 2019
be04eb2
Change copy style, and remove deepcopy import
dankrad Jun 28, 2019
4f31207
reword merkleize with limit / length
protolambda Jun 28, 2019
d5c2ecb
remove local notes files
djrtwo Jun 28, 2019
3a60f64
refactor finalization test helper func
protolambda Jun 28, 2019
b21c9cc
Merge pull request #1224 from ethereum/dankrad-patch-8
protolambda Jun 28, 2019
d31f1b2
Merge branch 'dev' into cov-hunt
protolambda Jun 29, 2019
518db42
fix attestation tests to work with checkpoints
protolambda Jun 29, 2019
efd9d17
update attester slashings processing tests
protolambda Jun 29, 2019
afb34c7
fix broken block test for checkpoint use
protolambda Jun 29, 2019
cfbdee7
finalization testing
protolambda Jun 29, 2019
f484b1e
some fixes to finality_12
djrtwo Jun 29, 2019
1885e28
fix source/target epochs in test_12
djrtwo Jun 29, 2019
bc5e947
aggregation_bitfield - bits
djrtwo Jun 29, 2019
022f1e7
fix source/target
djrtwo Jun 29, 2019
129fd62
add shard to mock crosslink to separate attestations from eachother
djrtwo Jun 29, 2019
ad943bb
Make deposit root the root of an SSZ vector
JustinDrake Jun 29, 2019
d820dbd
Compile contract
JustinDrake Jun 29, 2019
34b8d8a
Start modifying test
JustinDrake Jun 29, 2019
d5d3e49
Tests pass
JustinDrake Jun 29, 2019
a7ceec1
Uncomment tests
JustinDrake Jun 29, 2019
7fdf59d
`active_validator_count >= GENESIS_ACTIVE_VALIDATOR_COUNT`: per Eth1 …
hwwhww Jun 29, 2019
b05bebf
Fix list slicing
CarlBeek Jun 29, 2019
f9ca7c9
Fix 123 finalisation
CarlBeek Jun 29, 2019
2eca6ef
Corrects justification comments
CarlBeek Jun 29, 2019
0680d8c
Makes justification ratios more marginal
CarlBeek Jun 29, 2019
4ed7af7
mock attestation refactor
CarlBeek Jun 29, 2019
b162a8f
simplify list creation
protolambda Jun 29, 2019
0c29c51
Finnish refactor
CarlBeek Jun 29, 2019
5d633bf
bugfix attestation creation so that it works on mainnet with multiple…
protolambda Jun 29, 2019
b0510fe
Merge pull request #1228 from ethereum/cov-hunt-fix-ish
protolambda Jun 29, 2019
f0a8e39
WIP
JustinDrake Jun 29, 2019
bc8df3c
minor typo
djrtwo Jun 29, 2019
d0009b0
Pass `genesis_eth1_block_hash` instead of `genesis_eth1_data`
hwwhww Jun 29, 2019
2857324
Merge branch 'dev' into committee-roots
djrtwo Jun 29, 2019
e1826aa
Merge pull request #1219 from ethereum/committee-roots
djrtwo Jun 29, 2019
d475565
Merge branch 'deposit-root' into test_genesis
hwwhww Jun 29, 2019
1b66323
head to 1229
hwwhww Jun 29, 2019
6b81e74
Fix comment
JustinDrake Jun 29, 2019
c8dc30e
Recover from auto-merge
hwwhww Jun 29, 2019
354cd1c
Clean up leftover and linter
hwwhww Jun 29, 2019
e4eebef
fix broken deposits test, now same error as others
protolambda Jun 29, 2019
fb165dc
fixes a few tests, not all
protolambda Jun 29, 2019
33a0580
Merge pull request #1230 from ethereum/JustinDrake-patch-14
djrtwo Jun 29, 2019
ff185c3
fix deposit state mocking for tests
protolambda Jun 29, 2019
125660c
Update input `deposits` type from `Sequence[Deposit]` to `List[Deposi…
hwwhww Jun 29, 2019
56caa48
Should use Sequence
hwwhww Jun 29, 2019
302b3af
rename/fix roots in justification tests for consistency
protolambda Jun 29, 2019
afb33dd
fix typo in justification wording
protolambda Jun 29, 2019
12dff53
Renames:
hwwhww Jun 29, 2019
2247642
Cleanups; think about merging is_genesis_trigger into get_genesis_state
JustinDrake Jun 29, 2019
d00b5b9
Merge is_genesis_trigger into get_genesis_state
JustinDrake Jun 29, 2019
36dd977
fix finalize on double justification in 123 rule
protolambda Jun 29, 2019
3a5872f
Cleanups and fixes
JustinDrake Jun 29, 2019
ada3cb2
Fix genesis balance bug (git add -u)
JustinDrake Jun 29, 2019
43beb74
typo
JustinDrake Jun 29, 2019
a356fc9
Fixes
JustinDrake Jun 29, 2019
6d45513
Make timestamp a uint64
JustinDrake Jun 29, 2019
03a243e
fix basic test
hwwhww Jun 29, 2019
34ad123
Merge pull request #1206 from ethereum/cov-hunt
djrtwo Jun 29, 2019
ded936e
quick comment on avoiding underflow
djrtwo Jun 29, 2019
f0e6570
Merge branch 'dev' into ralexstokes-patch-3
djrtwo Jun 29, 2019
2a2bd72
Update 0_beacon-chain.md
JustinDrake Jun 29, 2019
aec9719
Merge pull request #1221 from ethereum/ralexstokes-patch-3
djrtwo Jun 29, 2019
47cdae4
Refactor
hwwhww Jun 29, 2019
8d2cbc9
add comments to make variations in genesis initialization clear, and …
protolambda Jun 30, 2019
4d5d597
fix genesis tests; sign deposit-datas, and lower min validator count …
protolambda Jun 30, 2019
f1749df
minor typo
djrtwo Jun 30, 2019
2f43f9c
Merge pull request #1202 from ethereum/test_genesis
djrtwo Jun 30, 2019
6cfd3b5
Fix typo
JustinDrake Jun 30, 2019
ae888e1
Minor copyedit
JustinDrake Jun 30, 2019
1d9fe90
Makes v-guide executable
CarlBeek Jun 30, 2019
d0acd81
WIP
JustinDrake Jun 30, 2019
14701aa
Merge pull request #1234 from ethereum/JustinDrake-patch-14
CarlBeek Jun 30, 2019
369c457
WIP2
JustinDrake Jun 30, 2019
2e41f2d
Merge pull request #1235 from ethereum/JustinDrake-patch-20
CarlBeek Jun 30, 2019
f6322e1
Fixes typing and Makefile
CarlBeek Jun 30, 2019
fa7f801
Merge branch 'dev' into exec_v_spec
CarlBeek Jun 30, 2019
e8532ce
WIP
JustinDrake Jun 30, 2019
58c864d
Push draft
JustinDrake Jun 30, 2019
abdcbc4
update epoch processing tests generation and format
protolambda Jun 30, 2019
992a51b
add note to block operatiosn test format
protolambda Jun 30, 2019
da090b6
document genesis test vector format, fix missing label and assertion …
protolambda Jun 30, 2019
64b02eb
fix genesis tests
protolambda Jun 30, 2019
83d91f8
update sanity slots description to match new transition naming
protolambda Jun 30, 2019
94404a5
A few more cleanups
JustinDrake Jun 30, 2019
c131764
genesis tests generator
protolambda Jun 30, 2019
b38802c
accept yielded lists, encode per item
protolambda Jun 30, 2019
e873bb6
ready for review
JustinDrake Jun 30, 2019
bdb372e
Merge branch 'dev' into helperscleanup
JustinDrake Jun 30, 2019
bf618f8
fix encoder to also encode bytes nicely
protolambda Jun 30, 2019
423d6dc
Fix bug
JustinDrake Jun 30, 2019
1daaf74
Merge branch 'helperscleanup' of github.com:ethereum/eth2.0-specs int…
JustinDrake Jun 30, 2019
91f55f5
make BLS test format and output consistent with spec
protolambda Jun 30, 2019
7b91c28
fix shuffling generator, convert ValidatorIndex output to normal int
protolambda Jun 30, 2019
0be2b8e
Cleanup
JustinDrake Jun 30, 2019
90bba03
Fix spelling error
CarlBeek Jun 30, 2019
4b93f5d
disable some super-long tests, and fix a few attestation signatures
protolambda Jun 30, 2019
cb01f3c
speed up remaining attestation tests by mocking slots
protolambda Jun 30, 2019
8415e6c
mark incompatible mainnet tests
protolambda Jun 30, 2019
6d5e4da
PR feedback
djrtwo Jun 30, 2019
ed182e5
disable mainnet transfer test output
protolambda Jun 30, 2019
3ae077a
'beacon state getters' -> ' beacon state accessors'
djrtwo Jun 30, 2019
d1bc2f0
remove 'int' types from spec typehints. replace with uint64
djrtwo Jun 30, 2019
6be1404
delayed_activation_exit_epoch -> compute_activation_exit_epoch
djrtwo Jun 30, 2019
daa624e
Merge pull request #1237 from ethereum/helperscleanup
djrtwo Jun 30, 2019
4aa676b
fix mainnet attestation test
djrtwo Jun 30, 2019
0fd1d38
`Misc` function rename
CarlBeek Jun 30, 2019
9deb409
Merge branch 'dev' into exec_v_spec
CarlBeek Jun 30, 2019
1ba955b
Update specs/test_formats/epoch_processing/README.md
protolambda Jun 30, 2019
e0a0f6e
Makes markdown comply with linter
CarlBeek Jun 30, 2019
83e961d
Merge branch 'dev' into update-generators
djrtwo Jun 30, 2019
c2a4838
Implments suggestions from review
CarlBeek Jun 30, 2019
9b5e18b
Last minute cleanups
JustinDrake Jun 30, 2019
c4971e5
Merge pull request #1243 from ethereum/markdown_lint
djrtwo Jun 30, 2019
e4a225b
BLS_WITHDRAWAL_PREFIX a Bytes1
JustinDrake Jun 30, 2019
361732f
merge in dev and resolve conflicts
CarlBeek Jun 30, 2019
f1931c0
Fix
JustinDrake Jun 30, 2019
3d2eaa2
Merge pull request #1238 from ethereum/update-generators
djrtwo Jun 30, 2019
cb71409
Merge in `dev`
CarlBeek Jun 30, 2019
fb598bc
Update ToC
hwwhww Jun 30, 2019
e53063c
type BLS domain and domain type
protolambda Jun 30, 2019
d45b733
update BLS test generator and format to reflect spec change in BLS
protolambda Jun 30, 2019
c42b26b
add back in active_index_roots
djrtwo Jun 30, 2019
d329e90
Fix effective balance
JustinDrake Jun 30, 2019
67b0b4a
Update other spec files
hwwhww Jun 30, 2019
fe68a8d
Minor python style tweaks
CarlBeek Jun 30, 2019
8b10ed5
Adds a lone space
CarlBeek Jun 30, 2019
f020bd1
Merge pull request #1245 from ethereum/toc
djrtwo Jun 30, 2019
db8bd07
Merge pull request #1249 from ethereum/format_binary_operations
djrtwo Jun 30, 2019
918192c
`compute_slot_epoch`->`compute_epoch_of_slot`
CarlBeek Jun 30, 2019
6e5f43c
merge in `dev` and resolve conflicts
CarlBeek Jun 30, 2019
cf59c30
Remove index_count
JustinDrake Jun 30, 2019
9df17f5
Explitcit zero byte
JustinDrake Jun 30, 2019
bde73b5
fix bls_verify_multiple
protolambda Jun 30, 2019
7f2eb81
minor BLS domain type related improvements
protolambda Jun 30, 2019
41897e7
validate_indexed_attestation -> is_valid_indexed_attestation`
CarlBeek Jun 30, 2019
5398281
fix typed constants in spec func puller
protolambda Jun 30, 2019
393c583
move endianness to be a constant
protolambda Jun 30, 2019
fdd1fd5
make config values reflect the withdrawal prefix is a byte
protolambda Jun 30, 2019
ca731d3
Merge in `dev` and resolve conflicts
CarlBeek Jun 30, 2019
84d8ca7
Improve fork choice rule test coverage
hwwhww Jun 30, 2019
b7e8733
fix usage of bls withdrawal byte in tests
protolambda Jun 30, 2019
6a79990
Simplify
JustinDrake Jun 30, 2019
b582afe
Add back effective balance initialisation
JustinDrake Jun 30, 2019
c79f93f
Merge pull request #1248 from ethereum/fix-effective-balance
protolambda Jun 30, 2019
7ef98f7
Compact `get_domain` calls
CarlBeek Jun 30, 2019
ab2001e
Merge branch 'dev' into last-minute-cleanups
protolambda Jun 30, 2019
4f47e30
separates out `domain`
CarlBeek Jun 30, 2019
aeba6ee
compute_domain for consistency with get_domain
JustinDrake Jun 30, 2019
1698263
BLS domain => domain
JustinDrake Jun 30, 2019
1869cfe
test finalized_checkpoint update
hwwhww Jun 30, 2019
5b2b3cf
class DomainType would be added in build_spec
hwwhww Jul 1, 2019
8da447f
Revert "5 slots is a `Slot`"
hwwhww Jul 1, 2019
b08d1d8
fix associtivity in conditional
djrtwo Jul 1, 2019
e061972
Revert State list lengths
hwwhww Jul 1, 2019
155158f
Merge pull request #1241 from ethereum/rename_misc
djrtwo Jul 1, 2019
2ab55bf
Merge pull request #1247 from ethereum/add-active-index-roots-back
djrtwo Jul 1, 2019
b29c751
Merge branch 'dev' into last-minute-cleanups-2
hwwhww Jul 1, 2019
9e5117a
Merge branch 'dev' into fork_choice_rule_test
hwwhww Jul 1, 2019
af57190
Merge branch 'dev' into fix-bls-domain-type
djrtwo Jul 1, 2019
e5ced03
Merge pull request #1246 from ethereum/fix-bls-domain-type
djrtwo Jul 1, 2019
8b65127
fix
hwwhww Jul 1, 2019
83a68fe
Merge branch 'dev' into last-minute-cleanups-2
hwwhww Jul 1, 2019
f4907d6
clean up commitee assignment typing
djrtwo Jul 1, 2019
f0027b7
Use `VALIDATOR_REGISTRY_LIMIT` in `compute_shuffled_index`
hwwhww Jul 1, 2019
f7ed186
Use `Checkpoint`
hwwhww Jul 1, 2019
4f360a5
Fix outdated `fork.slot` and `attestation_data.slot`
hwwhww Jul 1, 2019
2539406
Merge branch 'dev' into exec_v_spec
djrtwo Jul 1, 2019
350b9d7
Merge pull request #1250 from ethereum/fork_choice_rule_test
djrtwo Jul 1, 2019
2855e43
Merge pull request #1236 from ethereum/exec_v_spec
djrtwo Jul 1, 2019
200da4d
Merge branch 'dev' into v_guide_checkpoint
djrtwo Jul 1, 2019
e103084
Merge branch 'dev' into last-minute-cleanups-2
djrtwo Jul 1, 2019
476dbdb
add time param back tp units
djrtwo Jul 1, 2019
70ce7a1
Merge pull request #1253 from ethereum/v_guide_checkpoint
djrtwo Jul 1, 2019
aba7ee6
remove length check in compute shuffled index
djrtwo Jul 1, 2019
93fc81e
Use relative inner repo link
hwwhww Jul 1, 2019
82d3c4f
Merge pull request #1251 from ethereum/last-minute-cleanups-2
djrtwo Jul 1, 2019
d14c150
Merge pull request #1252 from ethereum/use_validator_registry_limit
djrtwo Jul 1, 2019
63d4653
remove unnecessary casting
djrtwo Jul 1, 2019
ac741c0
Fix ToC of SSZ spec
hwwhww Jul 1, 2019
126591b
scale inclusion reward properly
djrtwo Jul 1, 2019
417c978
Merge pull request #1255 from ethereum/minor-type-lint
djrtwo Jul 1, 2019
de95f54
Merge pull request #1256 from ethereum/misc_fix
djrtwo Jul 1, 2019
17b0bc3
add json encoding for bitlist and vector
djrtwo Jul 1, 2019
4ea79ee
Merge pull request #1257 from ethereum/scale-inclusion-reward
djrtwo Jul 1, 2019
eadd9f6
Merge pull request #1258 from ethereum/bit-json
djrtwo Jul 1, 2019
27d615c
Bump vyper to `0.1.0b10`
hwwhww Jul 1, 2019
ce336d4
last few config fixes to match spec
djrtwo Jul 1, 2019
019b068
Merge pull request #1259 from ethereum/constant-config-fix
djrtwo Jul 1, 2019
a63de3d
Merge pull request #1260 from ethereum/bump_vyper
djrtwo Jul 1, 2019
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
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,26 @@ commands:
description: "Restore the cache with pyspec keys"
steps:
- restore_cached_venv:
venv_name: v2-pyspec
venv_name: v3-pyspec-bump2
reqs_checksum: cache-{{ checksum "test_libs/pyspec/requirements.txt" }}-{{ checksum "test_libs/pyspec/requirements-testing.txt" }}
save_pyspec_cached_venv:
description: Save a venv into a cache with pyspec keys"
steps:
- save_cached_venv:
venv_name: v2-pyspec
venv_name: v3-pyspec-bump2
reqs_checksum: cache-{{ checksum "test_libs/pyspec/requirements.txt" }}-{{ checksum "test_libs/pyspec/requirements-testing.txt" }}
venv_path: ./test_libs/pyspec/venv
restore_deposit_contract_cached_venv:
description: "Restore the cache with deposit_contract keys"
steps:
- restore_cached_venv:
venv_name: v4-deposit-contract
venv_name: v6-deposit-contract
reqs_checksum: cache-{{ checksum "test_libs/pyspec/requirements.txt" }}-{{ checksum "deposit_contract/requirements-testing.txt" }}
save_deposit_contract_cached_venv:
description: Save a venv into a cache with deposit_contract keys"
steps:
- save_cached_venv:
venv_name: v4-deposit-contract
venv_name: v6-deposit-contract
reqs_checksum: cache-{{ checksum "test_libs/pyspec/requirements.txt" }}-{{ checksum "deposit_contract/requirements-testing.txt" }}
venv_path: ./deposit_contract/venv
jobs:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ build/
output/

eth2.0-spec-tests/

.pytest_cache
.mypy_cache

# Dynamically built from Markdown spec
test_libs/pyspec/eth2spec/phase0/spec.py
Expand Down
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,20 @@ 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) &

lint: $(PY_SPEC_ALL_TARGETS)
cd $(PY_SPEC_DIR); . venv/bin/activate; \
flake8 --ignore=E252,W504,W503 --max-line-length=120 ./eth2spec;
flake8 --ignore=E252,W504,W503 --max-line-length=120 ./eth2spec \
&& cd ./eth2spec && mypy --follow-imports=silent --warn-unused-ignores --ignore-missing-imports --check-untyped-defs --disallow-incomplete-defs --disallow-untyped-defs -p phase0 \
&& mypy --follow-imports=silent --warn-unused-ignores --ignore-missing-imports --check-untyped-defs --disallow-incomplete-defs --disallow-untyped-defs -p phase1;

install_deposit_contract_test: $(PY_SPEC_ALL_TARGETS)
cd $(DEPOSIT_CONTRACT_DIR); python3 -m venv venv; . venv/bin/activate; pip3 install -r requirements-testing.txt
Expand All @@ -76,10 +78,10 @@ test_deposit_contract:
pyspec: $(PY_SPEC_ALL_TARGETS)

$(PY_SPEC_PHASE_0_TARGETS): $(PY_SPEC_PHASE_0_DEPS)
python3 $(SCRIPT_DIR)/build_spec.py -p0 $(SPEC_DIR)/core/0_beacon-chain.md $@
python3 $(SCRIPT_DIR)/build_spec.py -p0 $(SPEC_DIR)/core/0_beacon-chain.md $(SPEC_DIR)/core/0_fork-choice.md $@

$(PY_SPEC_DIR)/eth2spec/phase1/spec.py: $(PY_SPEC_PHASE_1_DEPS)
python3 $(SCRIPT_DIR)/build_spec.py -p1 $(SPEC_DIR)/core/0_beacon-chain.md $(SPEC_DIR)/core/1_custody-game.md $(SPEC_DIR)/core/1_shard-data-chains.md $@
python3 $(SCRIPT_DIR)/build_spec.py -p1 $(SPEC_DIR)/core/0_beacon-chain.md $(SPEC_DIR)/core/1_custody-game.md $(SPEC_DIR)/core/1_shard-data-chains.md $(SPEC_DIR)/core/0_fork-choice.md $@

CURRENT_DIR = ${CURDIR}

Expand Down
26 changes: 12 additions & 14 deletions configs/constant_presets/mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,21 @@ SHARD_COUNT: 1024
# 2**7 (= 128)
TARGET_COMMITTEE_SIZE: 128
# 2**12 (= 4,096)
MAX_INDICES_PER_ATTESTATION: 4096
MAX_VALIDATORS_PER_COMMITTEE: 4096
# 2**2 (= 4)
MIN_PER_EPOCH_CHURN_LIMIT: 4
# 2**16 (= 65,536)
CHURN_LIMIT_QUOTIENT: 65536
# Normalizes base rewards
BASE_REWARDS_PER_EPOCH: 5
# See issue 563
SHUFFLE_ROUND_COUNT: 90
# `2**16` (= 65,536)
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 65536


# Deposit contract
# ---------------------------------------------------------------
# **TBD**
DEPOSIT_CONTRACT_ADDRESS: 0x1234567890123456789012345678901234567890
# 2**5 (= 32)
DEPOSIT_CONTRACT_TREE_DEPTH: 32


# Gwei values
Expand All @@ -46,8 +44,6 @@ EFFECTIVE_BALANCE_INCREMENT: 1000000000
GENESIS_FORK_VERSION: 0x00000000
# 0, GENESIS_EPOCH is derived from this constant
GENESIS_SLOT: 0
# 2**64 - 1
FAR_FUTURE_EPOCH: 18446744073709551615
BLS_WITHDRAWAL_PREFIX: 0


Expand Down Expand Up @@ -77,22 +73,24 @@ MAX_EPOCHS_PER_CROSSLINK: 64
MIN_EPOCHS_TO_INACTIVITY_PENALTY: 4


# State list lengths
# State vector lengths
# ---------------------------------------------------------------
# 2**16 (= 65,536) epochs ~0.8 years
EPOCHS_PER_HISTORICAL_VECTOR: 65536
# 2**13 (= 8,192) epochs ~36 days
LATEST_RANDAO_MIXES_LENGTH: 8192
# 2**13 (= 8,192) epochs ~36 days
LATEST_ACTIVE_INDEX_ROOTS_LENGTH: 8192
# 2**13 (= 8,192) epochs ~36 days
LATEST_SLASHED_EXIT_LENGTH: 8192
EPOCHS_PER_SLASHINGS_VECTOR: 8192
# 2**24 (= 16,777,216) historical roots, ~26,131 years
HISTORICAL_ROOTS_LIMIT: 16777216
# 2**40 (= 1,099,511,627,776) validator spots
VALIDATOR_REGISTRY_LIMIT: 1099511627776


# Reward and penalty quotients
# ---------------------------------------------------------------
# 2**5 (= 32)
BASE_REWARD_FACTOR: 32
# 2**9 (= 512)
WHISTLEBLOWING_REWARD_QUOTIENT: 512
WHISTLEBLOWER_REWARD_QUOTIENT: 512
# 2**3 (= 8)
PROPOSER_REWARD_QUOTIENT: 8
# 2**25 (= 33,554,432)
Expand Down
28 changes: 13 additions & 15 deletions configs/constant_presets/minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,21 @@ SHARD_COUNT: 8
# [customized] unsecure, but fast
TARGET_COMMITTEE_SIZE: 4
# 2**12 (= 4,096)
MAX_INDICES_PER_ATTESTATION: 4096
MAX_VALIDATORS_PER_COMMITTEE: 4096
# 2**2 (= 4)
MIN_PER_EPOCH_CHURN_LIMIT: 4
# 2**16 (= 65,536)
CHURN_LIMIT_QUOTIENT: 65536
# Normalizes base rewards
BASE_REWARDS_PER_EPOCH: 5
# [customized] Faster, but unsecure.
SHUFFLE_ROUND_COUNT: 10
# [customized]
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 64


# Deposit contract
# ---------------------------------------------------------------
# **TBD**
DEPOSIT_CONTRACT_ADDRESS: 0x1234567890123456789012345678901234567890
# 2**5 (= 32)
DEPOSIT_CONTRACT_TREE_DEPTH: 32


# Gwei values
Expand All @@ -45,8 +43,6 @@ EFFECTIVE_BALANCE_INCREMENT: 1000000000
GENESIS_FORK_VERSION: 0x00000000
# 0, GENESIS_EPOCH is derived from this constant
GENESIS_SLOT: 0
# 2**64 - 1
FAR_FUTURE_EPOCH: 18446744073709551615
BLS_WITHDRAWAL_PREFIX: 0


Expand All @@ -70,30 +66,32 @@ 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
EARLY_DERIVED_SECRET_PENALTY_MAX_FUTURE_EPOCHS: 4096


# State list lengths
# State vector lengths
# ---------------------------------------------------------------
# [customized] smaller state
LATEST_RANDAO_MIXES_LENGTH: 64
# [customized] smaller state
LATEST_ACTIVE_INDEX_ROOTS_LENGTH: 64
EPOCHS_PER_HISTORICAL_VECTOR: 64
# [customized] smaller state
LATEST_SLASHED_EXIT_LENGTH: 64
EPOCHS_PER_SLASHINGS_VECTOR: 64
# 2**24 (= 16,777,216) historical roots
HISTORICAL_ROOTS_LIMIT: 16777216
# 2**40 (= 1,099,511,627,776) validator spots
VALIDATOR_REGISTRY_LIMIT: 1099511627776


# Reward and penalty quotients
# ---------------------------------------------------------------
# 2**5 (= 32)
BASE_REWARD_FACTOR: 32
# 2**9 (= 512)
WHISTLEBLOWING_REWARD_QUOTIENT: 512
WHISTLEBLOWER_REWARD_QUOTIENT: 512
# 2**3 (= 8)
PROPOSER_REWARD_QUOTIENT: 8
# 2**25 (= 33,554,432)
Expand Down
2 changes: 1 addition & 1 deletion deposit_contract/contracts/validator_registration.json

Large diffs are not rendered by default.

Loading