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

Release v0.11.0 into master #1645

Merged
merged 249 commits into from Mar 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
249 commits
Select commit Hold shift + click to select a range
b4b5cc9
Merge branch 'v09x' into dev
djrtwo Dec 5, 2019
88aeba0
Added new shards
vbuterin Oct 12, 2019
f6be6b2
Added a few things
vbuterin Oct 12, 2019
25db268
Added a few more things
vbuterin Oct 13, 2019
26df98b
MAX_CATCHUP -> MAX_CATCHUP_RATIO
vbuterin Oct 13, 2019
fe60b4d
Variable max attestation length
vbuterin Oct 13, 2019
b792fe6
formatting
vbuterin Oct 13, 2019
9abfc62
Cleaned up state transition and honest committee member
vbuterin Oct 14, 2019
e5544d0
Made trace a commitment separate from state roots
vbuterin Oct 14, 2019
7fc2830
Some updates
vbuterin Oct 27, 2019
bb2835e
Shard slots to 128 bytes
vbuterin Oct 27, 2019
539c681
Updates to add new proposals
vbuterin Oct 29, 2019
0ff5985
Fix markdown and ToC
hwwhww Oct 28, 2019
08fc024
Changed fraud proof details
vbuterin Oct 29, 2019
bf0a2b7
Renaming
vbuterin Oct 29, 2019
bf886d6
Small edits
vbuterin Oct 29, 2019
b36820a
Changes to make Danny happy
vbuterin Nov 1, 2019
6b1bc1e
Reformed attestations
vbuterin Nov 3, 2019
3934369
Restructured shard blocks
vbuterin Nov 3, 2019
d723431
Fixed pending attestation handling and added empty transition check
vbuterin Nov 3, 2019
03ab1d5
A few cleanups
vbuterin Nov 4, 2019
1fdd033
Update ToC
hwwhww Nov 5, 2019
462d05d
Update specs/core/1_new_shards.md
vbuterin Nov 5, 2019
213032e
Update specs/core/1_new_shards.md
vbuterin Nov 5, 2019
d3f9bfe
Update specs/core/1_new_shards.md
vbuterin Nov 5, 2019
d59e87f
Update specs/core/1_new_shards.md
vbuterin Nov 5, 2019
bcd06d8
Update specs/core/1_new_shards.md
vbuterin Nov 5, 2019
9d3a230
Update specs/core/1_new_shards.md
vbuterin Nov 5, 2019
9810a3d
Update specs/core/1_new_shards.md
vbuterin Nov 5, 2019
4d1e9e1
Update specs/core/1_new_shards.md
vbuterin Nov 5, 2019
8a6bd20
Update specs/core/1_new_shards.md
vbuterin Nov 5, 2019
41be60e
Update specs/core/1_new_shards.md
vbuterin Nov 5, 2019
793c861
Update specs/core/1_new_shards.md
vbuterin Nov 5, 2019
bf13757
Update specs/core/1_new_shards.md
vbuterin Nov 5, 2019
0ddc0ba
Update specs/core/1_new_shards.md
vbuterin Nov 5, 2019
822cead
Update specs/core/1_new_shards.md
vbuterin Nov 5, 2019
a749dd9
Update specs/core/1_new_shards.md
vbuterin Nov 5, 2019
c9cc110
Update specs/core/1_new_shards.md
vbuterin Nov 5, 2019
2ea8eb9
Update specs/core/1_new_shards.md
vbuterin Nov 5, 2019
ff3bd72
Update specs/core/1_new_shards.md
vbuterin Nov 6, 2019
8cb404d
Update specs/core/1_new_shards.md
vbuterin Nov 6, 2019
e66b4e0
Update specs/core/1_new_shards.md
vbuterin Nov 6, 2019
b6680d2
Update specs/core/1_new_shards.md
vbuterin Nov 6, 2019
8f34a07
Some initial changes
vbuterin Nov 6, 2019
7b4a6e8
Simplified gasprice update
vbuterin Nov 7, 2019
4d6dcd1
Some fixes
vbuterin Nov 12, 2019
ef936b9
Added get_shard_proposer_index
vbuterin Nov 12, 2019
a33e01d
Start making phase1 work in pyspec again
protolambda Nov 15, 2019
7d2341b
Note: is_valid_indexed_attestation is overriden
protolambda Nov 15, 2019
edef2fd
more refactoring: more immediate custody game, general phase1 beacon …
protolambda Nov 15, 2019
465f6cb
update readme spec links
protolambda Nov 15, 2019
589d5a4
Add notes on custody game spec funcs
protolambda Nov 15, 2019
74d6021
PR comment fixes
protolambda Nov 16, 2019
cc0aac3
typo
protolambda Nov 16, 2019
36503f9
placeholder: rudimentary phase 0 to phase 1 fork process
protolambda Nov 16, 2019
4c9e5b8
add link to phase1 upgrade doc
protolambda Nov 16, 2019
03e956f
validator init adjustments
protolambda Nov 16, 2019
79be034
fix call to process_attestation
djrtwo Nov 18, 2019
82c9adc
fix phase 1 make build (not lint or tests)
djrtwo Nov 18, 2019
9f80a7f
phase1 lint (1)
djrtwo Nov 18, 2019
d6bfe5d
lint phase 1 (2)
djrtwo Nov 18, 2019
e73316c
change configs to be loaded in time; reload specs module to make new …
protolambda Nov 19, 2019
1a1c377
implement custody game revamp for new shard proposal: simplifications…
protolambda Nov 20, 2019
41be2ed
bugfix custody bit index lookup + lint fixes
protolambda Nov 20, 2019
1623d40
fix: check malefactor custody key
protolambda Nov 20, 2019
72a9dfc
fix lint problems
protolambda Nov 20, 2019
ddd7cd2
divide new and old containers out in phase 1
djrtwo Nov 22, 2019
a1ac0d5
fix get_shard_committee
djrtwo Nov 22, 2019
f533fef
add missing attestation validations; cleanup process_attestations and…
djrtwo Nov 23, 2019
4bf5eb8
fix issues using indexed attestation and custody bit wrapper
djrtwo Nov 23, 2019
a32b010
rebase fixes
djrtwo Dec 5, 2019
e31f17f
modify phase 1 to use new signature (no signing_root) pattern
djrtwo Dec 5, 2019
595d2f6
Merge branch 'dev' into phase1rebase
djrtwo Dec 5, 2019
ce40666
version pyspec module and test on one attesterslashing test
djrtwo Dec 5, 2019
0a3cc8a
malefactor_key -> malefactor_secret
djrtwo Jan 3, 2020
c9f52d0
Merge branch 'dev' into phase1rebase
djrtwo Jan 3, 2020
a5faabb
Merge branch 'version-pyspec-module' into phase1rebase
protolambda Jan 4, 2020
13cdfa8
apply configs in tests properly
protolambda Jan 4, 2020
018927d
generalize previous-slot function
protolambda Jan 5, 2020
a8276f6
don't hardcode shard count, bad example, need upgradeability
protolambda Jan 5, 2020
11011f2
test context can handle multiple phases better now
protolambda Jan 5, 2020
2e6090f
bugfixes for experimental phase0 -> phase1 fork py code
protolambda Jan 5, 2020
3995bd6
coerce container types, since classes do not match between phases
protolambda Jan 5, 2020
752eeec
old challenge based custody game tests are not relevant anymore
protolambda Jan 5, 2020
bf86a71
force-add in phase0 in test context, since state creation is not inde…
protolambda Jan 5, 2020
2f3919c
bugfix: pass block body to sub processing functions
protolambda Jan 5, 2020
0cf866e
fix bug, test should run properly, forward generator in return
protolambda Jan 5, 2020
6b872da
light client bitfield is vector now, small size anyway, better separa…
protolambda Jan 5, 2020
ce84ddd
initial update of phase1 section of configs
protolambda Jan 5, 2020
9c07e26
length assert not applicable anymore
protolambda Jan 5, 2020
68d93f9
online countdown fixes
protolambda Jan 5, 2020
ba10046
minor lint fixes
protolambda Jan 5, 2020
cd7a214
fix genesis tests: only run on single phase, ignore phases extra data
protolambda Jan 5, 2020
9dd8d1d
add two missing decorators
protolambda Jan 6, 2020
140129e
Merge dev into phase1 refactor, update BLS phase1
protolambda Jan 9, 2020
f810e6b
update to python v3.8
protolambda Jan 9, 2020
68ff136
warn about broken attestation validation, fix most attester slashings…
protolambda Jan 9, 2020
efbea8c
Fix BLS API description
hwwhww Jan 13, 2020
b001f25
Correct typo in heading level
benjaminion Jan 13, 2020
065b4ef
Fix p2p interface indentation
ChihChengLiang Jan 13, 2020
4732c7b
merge in dev (v0.10) and fix reorg/lint issues
protolambda Jan 13, 2020
507a9af
apply custody bit fix suggestion from Dankrad
protolambda Jan 13, 2020
419b6a3
config change, need more space for worst-case reveals
protolambda Jan 13, 2020
702b253
update configs for phase1
protolambda Jan 13, 2020
46be6ae
fix config loader to support list inputs
protolambda Jan 13, 2020
6c74468
forkchoice store on top of any state now
protolambda Jan 14, 2020
fee3baa
fix attesting indices error
protolambda Jan 14, 2020
e8654bf
merkle proofs out, moving to ssz spec
protolambda Jan 14, 2020
f6f8bd5
no custody bits fallback
protolambda Jan 14, 2020
f04a686
doctoc
protolambda Jan 14, 2020
d98c50a
update ci caches
protolambda Jan 14, 2020
5785b4f
custody bits temporary solution
protolambda Jan 14, 2020
f16d74d
fix custody key reveal tests not running due to decorator order problem
protolambda Jan 14, 2020
0d8a2ef
fix broken fork choice tests; compute anchor root for state, not just…
protolambda Jan 14, 2020
e6f98eb
minor config style fixes
protolambda Jan 14, 2020
90bc1f5
Fix config loading problem
protolambda Jan 14, 2020
8d0e1bd
downgrade deposit contract back to python 3.6, vyper syntax parsing i…
protolambda Jan 14, 2020
eda0efc
Merge pull request #1568 from benjaminion/typo_200113
djrtwo Jan 15, 2020
1756348
Merge pull request #1569 from ChihChengLiang/minor-fix-indentation
djrtwo Jan 15, 2020
08621a7
Merge pull request #1567 from ethereum/fix_bls_api
djrtwo Jan 15, 2020
3c07b2c
Make phase 0 fork choice more modular to more easily adopt for slight…
djrtwo Jan 15, 2020
c0b69e5
cycle through committee indexes instead of through active shards when…
djrtwo Jan 16, 2020
7a41253
remove test_shard_blocks (outdated) and reduce PERSISTENT_COMMITTEE_P…
djrtwo Jan 16, 2020
01f7c6c
separate deposit contract compiler and tester, pin compiler to python…
protolambda Jan 22, 2020
ebac603
Update for renamed constant
mcdee Jan 22, 2020
4e8cf25
Merge pull request #1588 from mcdee/cfix
protolambda Jan 22, 2020
88026a8
Merge pull request #1587 from ethereum/deposit-contract-test-pin
protolambda Jan 23, 2020
86b699b
Merge branch 'dev' into phase1rebase
protolambda Jan 23, 2020
6a26b76
Merge pull request #1504 from ethereum/phase1rebase
djrtwo Jan 23, 2020
67a4d5e
Merge branch 'dev' into master-copy
djrtwo Jan 24, 2020
8e5c176
Merge pull request #1594 from ethereum/master-copy
protolambda Jan 24, 2020
d9f62f9
Remerkleable - merkle tree based ssz for better and faster spec
protolambda Jan 24, 2020
247a4ee
Merge pull request #1552 from ethereum/tree-based-ssz
protolambda Jan 25, 2020
675d404
Package eth2spec for tooling and experimentation
protolambda Jan 25, 2020
7848500
spec packaging; implement review suggestions from hww
protolambda Jan 25, 2020
e118045
update remerkleable dependency
protolambda Jan 28, 2020
7b76808
Merge pull request #1600 from ethereum/master
djrtwo Jan 28, 2020
2a91b43
Remove shard block chunking
vbuterin Jan 8, 2020
52fb929
Update specs/core/1_beacon-chain.md
vbuterin Jan 11, 2020
b7004a9
Merge pull request #1560 from ethereum/vbuterin-patch-1
djrtwo Jan 29, 2020
51f2974
Update validator.md
Jan 29, 2020
7e2a2b2
Merge pull request #1602 from hermanjunge/patch-1
djrtwo Jan 29, 2020
fe58c78
Fix table
terencechain Jan 29, 2020
9467d49
Merge pull request #1603 from terencechain/patch-95
djrtwo Jan 29, 2020
340549a
spec version -> spec fork
protolambda Jan 31, 2020
cd4e99f
Merge branch 'dev' into pkg-the-pyspec
protolambda Jan 31, 2020
c943b58
drop `head_block_root` from BeaconBlocksByRange
arnetheduck Jan 31, 2020
3184ade
version stub
protolambda Feb 1, 2020
74c75fd
Remove extraneous word
mcdee Feb 2, 2020
93249aa
Proposal to focus on length-encoding SSZ contents, enable streaming o…
protolambda Feb 4, 2020
9355a6e
Noise libp2p specification
AgeManning Feb 5, 2020
1a16e9a
version eth2spec
protolambda Feb 5, 2020
c258a6f
Merge pull request #1605 from mcdee/tidy
djrtwo Feb 6, 2020
03f53e9
Merge pull request #1607 from AgeManning/noise-specification
djrtwo Feb 6, 2020
f5723cd
fix confusing directory name
ChihChengLiang Feb 5, 2020
b57b4f5
move desription to human readable name
djrtwo Feb 6, 2020
7aeeb37
[validator-guide] typo fix
ralexstokes Feb 7, 2020
b398e42
another typo in pubsub channel name
ralexstokes Feb 7, 2020
97d931b
rephrase fork choice requirement
arnetheduck Feb 7, 2020
6188f35
it's just a number
arnetheduck Feb 7, 2020
305a548
more explicit about version file location
protolambda Feb 8, 2020
501bac8
update deposit tests cache to read eth2spec version correctly
protolambda Feb 8, 2020
43cacc3
fix validator guide to show that block slashing is per slot rather th…
djrtwo Feb 8, 2020
19fb615
Merge pull request #1611 from ralexstokes/typo-fix
djrtwo Feb 9, 2020
0a429a4
'full_name' -> 'indentifier' for bls generators
djrtwo Feb 9, 2020
c2456a2
Merge pull request #1584 from ethereum/pkg-the-pyspec
djrtwo Feb 9, 2020
3315029
Merge pull request #1610 from ethereum/bls-nitpicks
djrtwo Feb 9, 2020
d5f1402
Merge pull request #1604 from status-im/fewer-head-block-roots
djrtwo Feb 9, 2020
c1a51a9
Add no repeat attestation condition for committee_index_beacon_attest…
djrtwo Feb 11, 2020
118a755
create SignedAggregateAndProof to prevent DoS attacks
djrtwo Feb 11, 2020
1ca4e35
prevent multiple beacon blocks from same proposer in a given slot
djrtwo Feb 11, 2020
8a2a689
add clarifying note to signedaggregateandproof in vaidator guide and …
djrtwo Feb 11, 2020
3d111f7
Merge pull request #1612 from ethereum/v-guide-per-slot-slash
djrtwo Feb 11, 2020
8d16d42
fix up some p2p validation conditions based on PR feedback
djrtwo Feb 11, 2020
eec57f2
add explicit instrucutions for construction of signed_aggregate_and_p…
djrtwo Feb 11, 2020
bf8252a
subnet validation PR feedback
djrtwo Feb 11, 2020
9047638
reverse params in get_aggregate_and_proof to match ssz type
djrtwo Feb 11, 2020
714a7de
reorder gossip conditions to put cheap checks before signature verifi…
djrtwo Feb 12, 2020
a9fae27
Merge pull request #1615 from ethereum/subnet-validations
djrtwo Feb 12, 2020
f8b72f5
add lower bound condition on block gossip
djrtwo Feb 12, 2020
f441fad
pr feedback
djrtwo Feb 12, 2020
8d9541e
Merge pull request #1616 from ethereum/min-block-slot-gossip-val
djrtwo Feb 12, 2020
a7ef70e
add DoS prevention validation conditions to voluntary_exit, proposer_…
djrtwo Feb 12, 2020
40b4931
cleanup attester slashing conditon code snippet
djrtwo Feb 13, 2020
d0e3300
Merge pull request #1617 from ethereum/extra-message-gossip-vals
protolambda Feb 13, 2020
8620adc
Correct the duration of HISTORICAL_ROOTS_LIMIT
benjaminion Feb 14, 2020
e112679
Merge pull request #1619 from benjaminion/dev
djrtwo Feb 15, 2020
7ad710e
fix dev install example distutil command
Feb 15, 2020
dc72861
add Gasper paper
ethers Feb 17, 2020
52b45ab
Add fork version to topic
arnetheduck Feb 17, 2020
cfcb7b2
Measure eth1 voting period in epochs instead of slots
Nashatyrev Feb 18, 2020
8201fb0
Merge pull request #1623 from ethers/patch-2
djrtwo Feb 18, 2020
757f5a3
add proposer index and add/modify tests
djrtwo Feb 17, 2020
a02aac4
adjust hysteresis to avoid initial over-deposit incentive
djrtwo Feb 18, 2020
71be894
add a couple more sanity block tests for added rpoposer_index
djrtwo Feb 18, 2020
61f661b
Update specs/phase0/p2p-interface.md
arnetheduck Feb 20, 2020
a14708a
Merge pull request #1622 from Leibniz137/patch-1
djrtwo Feb 27, 2020
4d72dcf
@hwwhww feedback
djrtwo Feb 27, 2020
bb82a05
clean up, add invalid input handling
protolambda Feb 27, 2020
38323d8
Add faq
arnetheduck Mar 1, 2020
0122081
hysteresis to -0.25/+1.25
djrtwo Mar 2, 2020
b4c7481
Fix the misc table
hwwhww Mar 3, 2020
d4548fc
Merge pull request #1634 from ethereum/hwwhww-patch-1
djrtwo Mar 3, 2020
2d4ec7d
add REWARD_OVERFLOW_INCREMENT to avoid overflow in rewards calculation
djrtwo Mar 3, 2020
33e7680
make hysteresis calculations configurable
djrtwo Mar 3, 2020
5e1fb79
Merge pull request #1627 from ethereum/hysteris-fix
djrtwo Mar 3, 2020
f082aa6
use EFFECTIVE_BALANCE_INCREMENT to normalize reward calculations
djrtwo Mar 3, 2020
5dae252
add eth2 key/value ENR to phase 0 p2p
djrtwo Feb 10, 2020
37b1fed
update eth2 ENR field to use ENRForkID
djrtwo Mar 4, 2020
7e04989
add genesis_validators_root to beaconstate and utilize in sig domain …
djrtwo Mar 5, 2020
b119f5f
Merge pull request #1638 from ethereum/domain-separation-by-root
djrtwo Mar 9, 2020
6230a22
Merge pull request #1606 from ethereum/rpc-snappy-lengths
djrtwo Mar 9, 2020
c5aca06
Update reference to Gasper paper
Mar 9, 2020
1707d2b
Merge pull request #1646 from hermanjunge/dev
djrtwo Mar 9, 2020
7d4997f
bump version to v0.11.0 for coming release
djrtwo Mar 9, 2020
da5720f
Put back in a requirement to store recent signed blocks that was remo…
sgryphon Mar 10, 2020
882b9ee
Merge branch 'dev' into rewards-overflow
hwwhww Mar 10, 2020
2d7a292
eth1 vote period constant in epochs: update configs, phase1, tests
protolambda Mar 10, 2020
55d436d
simplify description of voting period time
protolambda Mar 10, 2020
1818f34
add ForkDigest type, clarify how genesis_validators_root is mixed int…
djrtwo Mar 10, 2020
bd5231a
Merge pull request #1614 from ethereum/eth2-enr
djrtwo Mar 10, 2020
d6eedd9
fix wording to be clear it is about serving blocks
djrtwo Mar 10, 2020
1579072
add note about total balance overflowing
djrtwo Mar 10, 2020
0d01299
Merge pull request #1648 from sgryphon/feature/clarify-store-signed-b…
djrtwo Mar 10, 2020
c91eee6
revert fork choice store.blocks to store BeaconBlock
djrtwo Mar 10, 2020
1c9ca3c
Merge pull request #1635 from ethereum/rewards-overflow
djrtwo Mar 10, 2020
3b7704a
Merge pull request #1649 from ethereum/eth1-voting-period-in-epochs
djrtwo Mar 10, 2020
ab24e7c
Merge pull request #1651 from ethereum/revert-forkchoice-header
protolambda Mar 10, 2020
b25ca8e
Merge branch 'gossip-topic' of https://github.com/status-im/eth2.0-sp…
djrtwo Mar 10, 2020
415544b
modify gossip topics to use ForkDigest
djrtwo Mar 10, 2020
fccd3ab
clarify hex-encoded bytes string representation for fork digest in go…
djrtwo Mar 10, 2020
e2918c6
Merge pull request #1626 from ethereum/proposer-index
djrtwo Mar 10, 2020
baee673
add note about preparing for subnet backbone for forks
djrtwo Mar 10, 2020
0881e21
cleanup gossip topic fork digest based on PR feedback
djrtwo Mar 11, 2020
8eae0f0
Merge pull request #1647 from ethereum/bump-version
djrtwo Mar 11, 2020
36e48fb
enforce must match target to match head to avoid perverse incentive path
djrtwo Mar 11, 2020
4bcdf91
Apply suggestions from code review
djrtwo Mar 11, 2020
d01d532
Merge pull request #1653 from ethereum/head-match-target
djrtwo Mar 11, 2020
81dc71c
Merge pull request #1652 from ethereum/gossip-topics-with-fork-digest
djrtwo Mar 11, 2020
a49fc81
change 'gasper' to 'combining ghost and casper' for paper description
djrtwo Mar 11, 2020
47bbffa
'get_checkpoint_store' -> 'get_forkchoice_store' typo
djrtwo Mar 11, 2020
a0fb3b8
Merge pull request #1655 from ethereum/fc-typo
protolambda Mar 11, 2020
a612df1
minor typos and clarifications in fork choice
djrtwo Mar 11, 2020
d0fc606
Merge pull request #1654 from ethereum/readme-gasper-edit
protolambda Mar 11, 2020
22620bf
Fix generic SSZ tests, update remerkleable with small bugfix
protolambda Mar 11, 2020
c8c33fe
Merge pull request #1656 from ethereum/fc-typoo
protolambda Mar 11, 2020
42499a0
Merge pull request #1657 from ethereum/fix-ssz-generic-tests
djrtwo Mar 11, 2020
c894f5e
fork choice error note
djrtwo Mar 11, 2020
d4ce5f2
Merge pull request #1658 from ethereum/fc-header-comment
protolambda Mar 11, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
106 changes: 75 additions & 31 deletions .circleci/config.yml
Expand Up @@ -35,32 +35,45 @@ commands:
description: "Restore the cache with pyspec keys"
steps:
- restore_cached_venv:
venv_name: v7-pyspec
reqs_checksum: cache-{{ checksum "tests/core/pyspec/requirements.txt" }}-{{ checksum "tests/core/pyspec/requirements-testing.txt" }}
venv_name: v19-pyspec
reqs_checksum: cache-{{ checksum "setup.py" }}
save_pyspec_cached_venv:
description: Save a venv into a cache with pyspec keys"
steps:
- save_cached_venv:
venv_name: v7-pyspec
reqs_checksum: cache-{{ checksum "tests/core/pyspec/requirements.txt" }}-{{ checksum "tests/core/pyspec/requirements-testing.txt" }}
venv_path: ./tests/core/pyspec/venv
restore_deposit_contract_cached_venv:
description: "Restore the cache with deposit_contract keys"
venv_name: v19-pyspec
reqs_checksum: cache-{{ checksum "setup.py" }}
venv_path: ./venv
restore_deposit_contract_compiler_cached_venv:
description: "Restore the venv from cache for the deposit contract compiler"
steps:
- restore_cached_venv:
venv_name: v9-deposit-contract
reqs_checksum: cache-{{ checksum "tests/core/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"
venv_name: v18-deposit-contract-compiler
reqs_checksum: cache-{{ checksum "deposit_contract/compiler/requirements.txt" }}
save_deposit_contract_compiler_cached_venv:
description: "Save the venv to cache for later use of the deposit contract compiler"
steps:
- save_cached_venv:
venv_name: v9-deposit-contract
reqs_checksum: cache-{{ checksum "tests/core/pyspec/requirements.txt" }}-{{ checksum "deposit_contract/requirements-testing.txt" }}
venv_path: ./deposit_contract/venv
venv_name: v18-deposit-contract-compiler
reqs_checksum: cache-{{ checksum "deposit_contract/compiler/requirements.txt" }}
venv_path: ./deposit_contract/compiler/venv
restore_deposit_contract_tester_cached_venv:
description: "Restore the venv from cache for the deposit contract tester"
steps:
- restore_cached_venv:
venv_name: v19-deposit-contract-tester
reqs_checksum: cache-{{ checksum "setup.py" }}-{{ checksum "deposit_contract/tester/requirements.txt" }}
save_deposit_contract_tester_cached_venv:
description: "Save the venv to cache for later use of the deposit contract tester"
steps:
- save_cached_venv:
venv_name: v19-deposit-contract-tester
reqs_checksum: cache-{{ checksum "setup.py" }}-{{ checksum "deposit_contract/tester/requirements.txt" }}
venv_path: ./deposit_contract/tester/venv
jobs:
checkout_specs:
docker:
- image: circleci/python:3.6
- image: circleci/python:3.8
working_directory: ~/specs-repo
steps:
# Restore git repo at point close to target branch/revision, to speed up checkout
Expand All @@ -80,7 +93,7 @@ jobs:
- ~/specs-repo
install_pyspec_test:
docker:
- image: circleci/python:3.6
- image: circleci/python:3.8
working_directory: ~/specs-repo
steps:
- restore_cache:
Expand All @@ -92,7 +105,7 @@ jobs:
- save_pyspec_cached_venv
test:
docker:
- image: circleci/python:3.6
- image: circleci/python:3.8
working_directory: ~/specs-repo
steps:
- restore_cache:
Expand All @@ -114,7 +127,7 @@ jobs:
command: sudo npm install -g doctoc && make check_toc
codespell:
docker:
- image: circleci/python:3.6
- image: circleci/python:3.8
working_directory: ~/specs-repo
steps:
- checkout
Expand All @@ -123,7 +136,7 @@ jobs:
command: pip install codespell --user && make codespell
lint:
docker:
- image: circleci/python:3.6
- image: circleci/python:3.8
working_directory: ~/specs-repo
steps:
- restore_cache:
Expand All @@ -132,29 +145,54 @@ jobs:
- run:
name: Run linter
command: make lint
install_deposit_contract_test:
install_deposit_contract_compiler:
docker:
# The deposit contract compiler is pinned to python 3.7 because of the vyper version pin.
- image: circleci/python:3.7
working_directory: ~/specs-repo
steps:
- restore_cache:
key: v2-specs-repo-{{ .Branch }}-{{ .Revision }}
- restore_deposit_contract_compiler_cached_venv
- run:
name: Install deposit contract compiler requirements
command: make install_deposit_contract_compiler
- save_deposit_contract_compiler_cached_venv
install_deposit_contract_tester:
docker:
- image: circleci/python:3.6
- image: circleci/python:3.8
working_directory: ~/specs-repo
steps:
- restore_cache:
key: v2-specs-repo-{{ .Branch }}-{{ .Revision }}
- restore_deposit_contract_cached_venv
- restore_deposit_contract_tester_cached_venv
- run:
name: Install deposit contract requirements
command: make install_deposit_contract_test
- save_deposit_contract_cached_venv
deposit_contract:
name: Install deposit contract tester requirements
command: make install_deposit_contract_tester
- save_deposit_contract_tester_cached_venv
test_compile_deposit_contract:
docker:
- image: circleci/python:3.6
- image: circleci/python:3.7
working_directory: ~/specs-repo
steps:
- restore_cache:
key: v2-specs-repo-{{ .Branch }}-{{ .Revision }}
- restore_deposit_contract_cached_venv
- restore_deposit_contract_compiler_cached_venv
- run:
name: Run deposit contract compile test
command: make test_compile_deposit_contract
test_deposit_contract:
docker:
- image: circleci/python:3.8
working_directory: ~/specs-repo
steps:
- restore_cache:
key: v2-specs-repo-{{ .Branch }}-{{ .Revision }}
- restore_deposit_contract_tester_cached_venv
- run:
name: Run deposit contract test
command: make test_deposit_contract

workflows:
version: 2.1
test_spec:
Expand All @@ -171,9 +209,15 @@ workflows:
- lint:
requires:
- test
- install_deposit_contract_test:
- install_deposit_contract_compiler:
requires:
- checkout_specs
- test_compile_deposit_contract:
requires:
- install_deposit_contract_compiler
- install_deposit_contract_tester:
requires:
- checkout_specs
- deposit_contract:
- test_deposit_contract:
requires:
- install_deposit_contract_test
- install_deposit_contract_tester
9 changes: 7 additions & 2 deletions .gitignore
Expand Up @@ -7,19 +7,24 @@ venv

build/
output/
dist/

eth2.0-spec-tests/

.pytest_cache
.mypy_cache

# Dynamically built from Markdown spec
tests/core/pyspec/eth2spec/phase0/spec.py
tests/core/pyspec/eth2spec/phase1/spec.py
tests/core/pyspec/eth2spec/phase0/
tests/core/pyspec/eth2spec/phase1/

# coverage reports
.htmlcov
.coverage
.coverage.*

# local CI testing output
tests/core/pyspec/test-reports
tests/core/pyspec/eth2spec/test_results.xml

*.egg-info
98 changes: 54 additions & 44 deletions Makefile
@@ -1,11 +1,11 @@
SPEC_DIR = ./specs
SSZ_DIR = ./ssz
SCRIPT_DIR = ./scripts
TEST_LIBS_DIR = ./tests/core
PY_SPEC_DIR = $(TEST_LIBS_DIR)/pyspec
TEST_VECTOR_DIR = ./eth2.0-spec-tests/tests
TEST_VECTOR_DIR = ../eth2.0-spec-tests/tests
GENERATOR_DIR = ./tests/generators
DEPOSIT_CONTRACT_DIR = ./deposit_contract
DEPOSIT_CONTRACT_COMPILER_DIR = ./deposit_contract/compiler
DEPOSIT_CONTRACT_TESTER_DIR = ./deposit_contract/tester
CONFIGS_DIR = ./configs

# Collect a list of generator names
Expand All @@ -17,57 +17,69 @@ GENERATOR_VENVS = $(patsubst $(GENERATOR_DIR)/%, $(GENERATOR_DIR)/%venv, $(GENER
# To check generator matching:
#$(info $$GENERATOR_TARGETS is [${GENERATOR_TARGETS}])

PHASE0_SPEC_DIR = $(SPEC_DIR)/phase0
PY_SPEC_PHASE_0_TARGETS = $(PY_SPEC_DIR)/eth2spec/phase0/spec.py
PY_SPEC_PHASE_0_DEPS = $(wildcard $(SPEC_DIR)/phase0/*.md)

PHASE1_SPEC_DIR = $(SPEC_DIR)/phase1
PY_SPEC_PHASE_1_TARGETS = $(PY_SPEC_DIR)/eth2spec/phase1/spec.py
PY_SPEC_PHASE_1_DEPS = $(wildcard $(SPEC_DIR)/phase1/*.md)

PY_SPEC_ALL_DEPS = $(PY_SPEC_PHASE_0_DEPS) $(PY_SPEC_PHASE_1_DEPS)

PY_SPEC_ALL_TARGETS = $(PY_SPEC_PHASE_0_TARGETS) $(PY_SPEC_PHASE_1_TARGETS)

MARKDOWN_FILES = $(PY_SPEC_ALL_DEPS) $(wildcard $(SPEC_DIR)/*.md) $(wildcard $(SSZ_DIR)/*.md) $(wildcard $(SPEC_DIR)/networking/*.md) $(wildcard $(SPEC_DIR)/validator/*.md)
MARKDOWN_FILES = $(wildcard $(SPEC_DIR)/phase0/*.md) $(wildcard $(SPEC_DIR)/phase1/*.md) $(wildcard $(SSZ_DIR)/*.md) $(wildcard $(SPEC_DIR)/networking/*.md) $(wildcard $(SPEC_DIR)/validator/*.md)

COV_HTML_OUT=.htmlcov
COV_INDEX_FILE=$(PY_SPEC_DIR)/$(COV_HTML_OUT)/index.html

.PHONY: clean partial_clean all test citest lint generate_tests pyspec phase0 phase1 install_test open_cov \
install_deposit_contract_test test_deposit_contract compile_deposit_contract check_toc
.PHONY: clean partial_clean all test citest lint generate_tests pyspec install_test open_cov \
install_deposit_contract_tester test_deposit_contract install_deposit_contract_compiler \
compile_deposit_contract test_compile_deposit_contract check_toc

all: $(PY_SPEC_ALL_TARGETS)

# deletes everything except the venvs
partial_clean:
rm -rf $(TEST_VECTOR_DIR)
rm -rf $(GENERATOR_VENVS)
rm -rf .pytest_cache
rm -f .coverage
rm -rf $(PY_SPEC_DIR)/.pytest_cache
rm -rf $(PY_SPEC_ALL_TARGETS)
rm -rf $(DEPOSIT_CONTRACT_DIR)/.pytest_cache
rm -rf $(DEPOSIT_CONTRACT_COMPILER_DIR)/.pytest_cache
rm -rf $(DEPOSIT_CONTRACT_TESTER_DIR)/.pytest_cache
rm -rf $(PY_SPEC_DIR)/phase0
rm -rf $(PY_SPEC_DIR)/phase1
rm -rf $(PY_SPEC_DIR)/$(COV_HTML_OUT)
rm -rf $(PY_SPEC_DIR)/.coverage
rm -rf $(PY_SPEC_DIR)/test-reports
rm -rf eth2spec.egg-info dist build


clean: partial_clean
rm -rf venv
rm -rf $(PY_SPEC_DIR)/venv
rm -rf $(DEPOSIT_CONTRACT_DIR)/venv
rm -rf $(DEPOSIT_CONTRACT_COMPILER_DIR)/venv
rm -rf $(DEPOSIT_CONTRACT_TESTER_DIR)/venv

# The pyspec is rebuilt to enforce the /specs being part of eth2specs source distribution. It could be forgotten otherwise.
dist_build: pyspec
python3 setup.py sdist bdist_wheel

dist_check:
python3 -m twine check dist/*

dist_upload:
python3 -m twine upload dist/*


# "make generate_tests" to run all generators
generate_tests: $(PY_SPEC_ALL_TARGETS) $(GENERATOR_TARGETS)
generate_tests: $(GENERATOR_TARGETS)

# "make pyspec" to create the pyspec for all phases.
pyspec:
. venv/bin/activate; python3 setup.py pyspecdev

# installs the packages to run pyspec tests
install_test:
cd $(PY_SPEC_DIR); python3 -m venv venv; . venv/bin/activate; pip3 install -r requirements-testing.txt;
python3 -m venv venv; . venv/bin/activate; pip3 install .[test] .[lint]

test: $(PY_SPEC_ALL_TARGETS)
cd $(PY_SPEC_DIR); . venv/bin/activate; export PYTHONPATH="./"; \
test: pyspec
. venv/bin/activate; cd $(PY_SPEC_DIR); \
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 -n 4 --junitxml=test-reports/eth2spec/test_results.xml eth2spec
citest: pyspec
mkdir -p tests/core/pyspec/test-reports/eth2spec; . venv/bin/activate; cd $(PY_SPEC_DIR); \
python -m pytest -n 4 --junitxml=eth2spec/test_results.xml eth2spec

open_cov:
((open "$(COV_INDEX_FILE)" || xdg-open "$(COV_INDEX_FILE)") &> /dev/null) &
Expand All @@ -83,31 +95,29 @@ check_toc: $(MARKDOWN_FILES:=.toc)
codespell:
codespell . --skip ./.git -I .codespell-whitelist

lint: $(PY_SPEC_ALL_TARGETS)
cd $(PY_SPEC_DIR); . venv/bin/activate; \
lint: pyspec
. venv/bin/activate; cd $(PY_SPEC_DIR); \
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

compile_deposit_contract:
cd $(DEPOSIT_CONTRACT_DIR); . venv/bin/activate; \
python tool/compile_deposit_contract.py contracts/validator_registration.vy;
install_deposit_contract_tester:
cd $(DEPOSIT_CONTRACT_TESTER_DIR); python3 -m venv venv; . venv/bin/activate; pip3 install -r requirements.txt

test_deposit_contract:
cd $(DEPOSIT_CONTRACT_DIR); . venv/bin/activate; \
cd $(DEPOSIT_CONTRACT_TESTER_DIR); . venv/bin/activate; \
python -m pytest .

# "make pyspec" to create the pyspec for all phases.
pyspec: $(PY_SPEC_ALL_TARGETS)
install_deposit_contract_compiler:
cd $(DEPOSIT_CONTRACT_COMPILER_DIR); python3.7 -m venv venv; . venv/bin/activate; pip3.7 install -r requirements.txt

$(PY_SPEC_PHASE_0_TARGETS): $(PY_SPEC_PHASE_0_DEPS)
python3 $(SCRIPT_DIR)/build_spec.py -p0 $(PHASE0_SPEC_DIR)/beacon-chain.md $(PHASE0_SPEC_DIR)/fork-choice.md $(PHASE0_SPEC_DIR)/validator.md $@
compile_deposit_contract:
cd $(DEPOSIT_CONTRACT_COMPILER_DIR); . venv/bin/activate; \
python3.7 deposit_contract/compile.py contracts/validator_registration.vy

$(PY_SPEC_DIR)/eth2spec/phase1/spec.py: $(PY_SPEC_PHASE_1_DEPS)
python3 $(SCRIPT_DIR)/build_spec.py -p1 $(PHASE0_SPEC_DIR)/beacon-chain.md $(PHASE0_SPEC_DIR)/fork-choice.md $(SSZ_DIR)/merkle-proofs.md $(PHASE1_SPEC_DIR)/custody-game.md $(PHASE1_SPEC_DIR)/shard-data-chains.md $(PHASE1_SPEC_DIR)/beacon-chain-misc.md $@
test_compile_deposit_contract:
cd $(DEPOSIT_CONTRACT_COMPILER_DIR); . venv/bin/activate; \
python3.7 -m pytest .

CURRENT_DIR = ${CURDIR}

Expand Down Expand Up @@ -141,5 +151,5 @@ $(TEST_VECTOR_DIR)/:

# For any generator, build it using the run_generator function.
# (creation of output dir is a dependency)
gen_%: $(PY_SPEC_ALL_TARGETS) $(TEST_VECTOR_DIR)
gen_%: $(TEST_VECTOR_DIR)
$(call run_generator,$*)
8 changes: 5 additions & 3 deletions README.md
Expand Up @@ -16,11 +16,13 @@ Core specifications for Eth2 clients be found in [specs/](specs/). These are div
* [Fork Choice](specs/phase0/fork-choice.md)
* [Deposit Contract](specs/phase0/deposit-contract.md)
* [Honest Validator](specs/phase0/validator.md)
* [P2P Networking](specs/phase0/p2p-interface.md)

### Phase 1
* [From Phase 0 to Phase 1](specs/phase1/phase1-fork.md)
* [The Beacon Chain for Shards](specs/phase1/beacon-chain.md)
* [Custody Game](specs/phase1/custody-game.md)
* [Shard Data Chains](specs/phase1/shard-data-chains.md)
* [Misc beacon chain updates](specs/phase1/beacon-chain-misc.md)
* [Shard Transition and Fraud Proofs](specs/phase1/fraud-proofs.md)
* [Light client syncing protocol](specs/phase1/light-client-sync.md)

### Phase 2
Expand Down Expand Up @@ -57,11 +59,11 @@ The following are the broad design goals for Ethereum 2.0:

* [Design Rationale](https://notes.ethereum.org/s/rkhCgQteN#)
* [Phase 0 Onboarding Document](https://notes.ethereum.org/s/Bkn3zpwxB)
* [Combining GHOST and Casper paper](https://arxiv.org/abs/2003.03052)


## For spec contributors

Documentation on the different components used during spec writing can be found here:
* [YAML Test Generators](tests/generators/README.md)
* [Executable Python Spec, with Py-tests](tests/core/pyspec/README.md)