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.10 to master #1561

Merged
merged 76 commits into from
Jan 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
5dd0015
Update link to current bls standard draft.
gnattishness Oct 29, 2019
04e1b8a
Merge pull request #1458 from gnattishness/update_bls_link
protolambda Oct 30, 2019
2159df2
Update 0_beacon-chain.md
terencechain Nov 1, 2019
40cb72e
Merge pull request #1461 from terencechain/patch-89
hwwhww Nov 1, 2019
2c32274
rename BytesN to ByteVector, rename Bytes to ByteList
protolambda Nov 15, 2019
b15669b
Backport master (v0.9.1) to dev (#1482)
protolambda Nov 15, 2019
6ef79ac
Merge pull request #1480 from ethereum/ssz-bytes-naming
djrtwo Nov 18, 2019
23abc11
handle v0.9.2-dev conflict
djrtwo Nov 21, 2019
19fa537
Merge pull request #1490 from ethereum/master-copy
djrtwo Dec 4, 2019
da17f4b
Merge pull request #1505 from ethereum/v09x
protolambda Dec 5, 2019
3d48a3e
Fix dead link to use Internet Archive
ethers Dec 12, 2019
4271d3b
Merge pull request #1519 from ethers/patch-1
djrtwo Dec 12, 2019
88e954a
Merge pull request #1522 from ethereum/master
protolambda Dec 13, 2019
48317d8
Minor cosmetic cleanups
JustinDrake Dec 15, 2019
412a066
Update 0_beacon-chain.md
JustinDrake Dec 15, 2019
502ee29
Phase 0 new BLS
CarlBeek Dec 17, 2019
80eb721
Domains are bytes
CarlBeek Dec 17, 2019
c239ffb
Linting fixes
CarlBeek Dec 17, 2019
995c895
New BLS in Phase 1
CarlBeek Dec 17, 2019
177ec93
Update ToC
CarlBeek Dec 17, 2019
3dc78e0
kick CI cache
CarlBeek Dec 17, 2019
d3f74ea
Realise #1517 was a thing
CarlBeek Dec 17, 2019
4290c1d
Vyper b13 -> b13.hotfix1761
daejunpark Dec 18, 2019
331892a
bump version on despoit cache
djrtwo Dec 18, 2019
01a2ef8
fix vyper custom build link and bump pycryptodome version
djrtwo Dec 18, 2019
42a3dd4
Implement @djrtwo's review suggestions
CarlBeek Dec 19, 2019
62cbd0e
Revert domain 6 -> 5 to prevent confusion
CarlBeek Dec 19, 2019
2119159
Merge pull request #1539 from ethereum/daejunpark-vyper-b13-hotfix1761
djrtwo Dec 19, 2019
1e410a1
Fix typo due to change of interface
CarlBeek Dec 20, 2019
7af4429
Make bls a module
CarlBeek Dec 20, 2019
b698eff
Merge pull request #1546 from ethereum/master
protolambda Dec 20, 2019
850d45d
Allow empty lists in streamed responses
arnetheduck Dec 19, 2019
662a986
Update 0_fork-choice.md
terencechain Dec 25, 2019
765176e
PySpec SSZ Bytes instantiated from hex
CarlBeek Dec 27, 2019
e70863c
Bytes4 -> DomainType
CarlBeek Dec 30, 2019
d3c2dd0
Merge pull request #1551 from ethereum/carl_Bytes_hex
protolambda Dec 30, 2019
defeb4e
Merge pull request #1550 from terencechain/patch-94
djrtwo Dec 31, 2019
a65d96d
Merge in dev
CarlBeek Jan 3, 2020
51bcb29
'DomainWrapper' -> 'SigningRoot'
CarlBeek Jan 3, 2020
8580ec3
'message' -> 'signing_root'
CarlBeek Jan 3, 2020
7b1a609
Merge pull request #1549 from status-im/empty-block-response
djrtwo Jan 3, 2020
261b6c0
modify get_eth1_data to use timestamp instead of block height
djrtwo Jan 3, 2020
6dbc020
add GENESIS_FORK_VERSION and make associated modifications to support…
djrtwo Jan 4, 2020
f9b0e29
Merge pull request #1554 from ethereum/genesis_version
protolambda Jan 4, 2020
43d0952
add note that validator should broadcast attestation immediately when…
djrtwo Jan 5, 2020
5ac0d12
Merge pull request #1553 from ethereum/eth1-caching
djrtwo Jan 5, 2020
8515aec
move GENESIS_SLOT/EPOCH to constants as they are not truly configurable
djrtwo Jan 5, 2020
50c8727
make genesis delay configurable
djrtwo Jan 5, 2020
f86b53b
Merge pull request #1557 from ethereum/min-genesis-wait-time
protolambda Jan 6, 2020
a295451
Merge pull request #1555 from ethereum/att-when-ready
protolambda Jan 6, 2020
71206c9
deposit with other fork version
protolambda Jan 6, 2020
6095428
make tests correctly sign for general genesis-domain
protolambda Jan 6, 2020
8391d8e
missed deposit case, also fix signing here
protolambda Jan 6, 2020
83abd3e
Merge pull request #1558 from ethereum/other_deposit_fork_version
djrtwo Jan 6, 2020
9ea03dc
add compute_time_at_slot helper in validator doc
djrtwo Jan 6, 2020
b637b9a
fix mod bug for voting period
djrtwo Jan 7, 2020
c3f7f0b
Merge pull request #1556 from ethereum/constant-genesis-slot
djrtwo Jan 7, 2020
fbfe024
Rename vyper file from `.v.py` to `.vy`
hwwhww Jan 7, 2020
f104ccf
Merge pull request #1559 from ethereum/vyper_highlight
djrtwo Jan 7, 2020
8948393
Remove references to BLS messages
CarlBeek Jan 7, 2020
12ea891
`py_ecc` 2.0.0 baby!
CarlBeek Jan 7, 2020
1f70d3e
add additional upgrade to py_ecc 2.0.0 to packages
djrtwo Jan 7, 2020
19ca7af
bump circleci cache versions
djrtwo Jan 7, 2020
fff354d
Merge branch 'dev' into carl_new_new_bls
djrtwo Jan 7, 2020
38f947b
Merge pull request #1532 from ethereum/carl_new_new_bls
djrtwo Jan 8, 2020
f01254d
Merge branch 'dev' into JustinDrake-patch-2
djrtwo Jan 8, 2020
ac33b3d
Merge pull request #1525 from ethereum/JustinDrake-patch-2
djrtwo Jan 8, 2020
b8d4ce4
fix default value when voting on eth1data
djrtwo Jan 9, 2020
a41447a
Merge pull request #1562 from ethereum/eth1-default-bug
protolambda Jan 9, 2020
af702d4
add slot validation condition for beacon block gossip sub channel
djrtwo Jan 10, 2020
e0cd109
fix voluntary exit to be wrt signed voluntary exit in p2p spec
djrtwo Jan 10, 2020
5e96c08
add MAXIMUM_GOSSIP_CLOCK_DISPARITY for gossip subnet validations
djrtwo Jan 10, 2020
25ea557
Merge pull request #1563 from ethereum/p2p-validate-block-slot
djrtwo Jan 10, 2020
676e216
reorg specs by fork and move ssz out to own folder. make all of the b…
djrtwo Jan 10, 2020
55fb97d
bump cache versions
djrtwo Jan 10, 2020
1a450c5
Merge pull request #1564 from ethereum/fork-dir-reorg
djrtwo Jan 10, 2020
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
38 changes: 19 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,27 @@ commands:
description: "Restore the cache with pyspec keys"
steps:
- restore_cached_venv:
venv_name: v4-pyspec
reqs_checksum: cache-{{ checksum "test_libs/pyspec/requirements.txt" }}-{{ checksum "test_libs/pyspec/requirements-testing.txt" }}
venv_name: v7-pyspec
reqs_checksum: cache-{{ checksum "tests/core/pyspec/requirements.txt" }}-{{ checksum "tests/core/pyspec/requirements-testing.txt" }}
save_pyspec_cached_venv:
description: Save a venv into a cache with pyspec keys"
steps:
- save_cached_venv:
venv_name: v4-pyspec
reqs_checksum: cache-{{ checksum "test_libs/pyspec/requirements.txt" }}-{{ checksum "test_libs/pyspec/requirements-testing.txt" }}
venv_path: ./test_libs/pyspec/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"
steps:
- restore_cached_venv:
venv_name: v6-deposit-contract
reqs_checksum: cache-{{ checksum "test_libs/pyspec/requirements.txt" }}-{{ checksum "deposit_contract/requirements-testing.txt" }}
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"
steps:
- save_cached_venv:
venv_name: v6-deposit-contract
reqs_checksum: cache-{{ checksum "test_libs/pyspec/requirements.txt" }}-{{ checksum "deposit_contract/requirements-testing.txt" }}
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
jobs:
checkout_specs:
Expand All @@ -66,16 +66,16 @@ jobs:
# Restore git repo at point close to target branch/revision, to speed up checkout
- restore_cache:
keys:
- v1-specs-repo-{{ .Branch }}-{{ .Revision }}
- v1-specs-repo-{{ .Branch }}-
- v1-specs-repo-
- v2-specs-repo-{{ .Branch }}-{{ .Revision }}
- v2-specs-repo-{{ .Branch }}-
- v2-specs-repo-
- checkout
- run:
name: Clean up git repo to reduce cache size
command: git gc
# Save the git checkout as a cache, to make cloning next time faster.
- save_cache:
key: v1-specs-repo-{{ .Branch }}-{{ .Revision }}
key: v2-specs-repo-{{ .Branch }}-{{ .Revision }}
paths:
- ~/specs-repo
install_pyspec_test:
Expand All @@ -84,7 +84,7 @@ jobs:
working_directory: ~/specs-repo
steps:
- restore_cache:
key: v1-specs-repo-{{ .Branch }}-{{ .Revision }}
key: v2-specs-repo-{{ .Branch }}-{{ .Revision }}
- restore_pyspec_cached_venv
- run:
name: Install pyspec requirements
Expand All @@ -96,13 +96,13 @@ jobs:
working_directory: ~/specs-repo
steps:
- restore_cache:
key: v1-specs-repo-{{ .Branch }}-{{ .Revision }}
key: v2-specs-repo-{{ .Branch }}-{{ .Revision }}
- restore_pyspec_cached_venv
- run:
name: Run py-tests
command: make citest
- store_test_results:
path: test_libs/pyspec/test-reports
path: tests/core/pyspec/test-reports
table_of_contents:
docker:
- image: circleci/node:10.16.3
Expand All @@ -127,7 +127,7 @@ jobs:
working_directory: ~/specs-repo
steps:
- restore_cache:
key: v1-specs-repo-{{ .Branch }}-{{ .Revision }}
key: v2-specs-repo-{{ .Branch }}-{{ .Revision }}
- restore_pyspec_cached_venv
- run:
name: Run linter
Expand All @@ -138,7 +138,7 @@ jobs:
working_directory: ~/specs-repo
steps:
- restore_cache:
key: v1-specs-repo-{{ .Branch }}-{{ .Revision }}
key: v2-specs-repo-{{ .Branch }}-{{ .Revision }}
- restore_deposit_contract_cached_venv
- run:
name: Install deposit contract requirements
Expand All @@ -150,7 +150,7 @@ jobs:
working_directory: ~/specs-repo
steps:
- restore_cache:
key: v1-specs-repo-{{ .Branch }}-{{ .Revision }}
key: v2-specs-repo-{{ .Branch }}-{{ .Revision }}
- restore_deposit_contract_cached_venv
- run:
name: Run deposit contract test
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.vy linguist-language=Python
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ eth2.0-spec-tests/
.mypy_cache

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

# coverage reports
.htmlcov
.coverage

# local CI testing output
test_libs/pyspec/test-reports
tests/core/pyspec/test-reports
19 changes: 11 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
SPEC_DIR = ./specs
SSZ_DIR = ./ssz
SCRIPT_DIR = ./scripts
TEST_LIBS_DIR = ./test_libs
TEST_LIBS_DIR = ./tests/core
PY_SPEC_DIR = $(TEST_LIBS_DIR)/pyspec
TEST_VECTOR_DIR = ./eth2.0-spec-tests/tests
GENERATOR_DIR = ./test_generators
GENERATOR_DIR = ./tests/generators
DEPOSIT_CONTRACT_DIR = ./deposit_contract
CONFIGS_DIR = ./configs

Expand All @@ -16,17 +17,19 @@ 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)/core/0_*.md)
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)/core/1_*.md)
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 $(SPEC_DIR)/light_client/*.md) $(wildcard $(SPEC_DIR)/networking/*.md) $(wildcard $(SPEC_DIR)/validator/*.md)
MARKDOWN_FILES = $(PY_SPEC_ALL_DEPS) $(wildcard $(SPEC_DIR)/*.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
Expand Down Expand Up @@ -91,7 +94,7 @@ install_deposit_contract_test: $(PY_SPEC_ALL_TARGETS)

compile_deposit_contract:
cd $(DEPOSIT_CONTRACT_DIR); . venv/bin/activate; \
python tool/compile_deposit_contract.py contracts/validator_registration.v.py;
python tool/compile_deposit_contract.py contracts/validator_registration.vy;

test_deposit_contract:
cd $(DEPOSIT_CONTRACT_DIR); . venv/bin/activate; \
Expand All @@ -101,10 +104,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 $(SPEC_DIR)/core/0_fork-choice.md $(SPEC_DIR)/validator/0_beacon-chain-validator.md $@
python3 $(SCRIPT_DIR)/build_spec.py -p0 $(PHASE0_SPEC_DIR)/beacon-chain.md $(PHASE0_SPEC_DIR)/fork-choice.md $(PHASE0_SPEC_DIR)/validator.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/0_fork-choice.md $(SPEC_DIR)/light_client/merkle_proofs.md $(SPEC_DIR)/core/1_custody-game.md $(SPEC_DIR)/core/1_shard-data-chains.md $(SPEC_DIR)/core/1_beacon-chain-misc.md $@
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 $@

CURRENT_DIR = ${CURDIR}

Expand Down
29 changes: 14 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,19 @@ This repository hosts the current Eth2 specifications. Discussions about design

## Specs

Core specifications for Eth2 client validation can be found in [specs/core](specs/core). These are divided into phases. Each subsequent phase depends upon the prior. The current phases specified are:
Core specifications for Eth2 clients be found in [specs/](specs/). These are divided into phases. Each subsequent phase depends upon the prior. The current phases specified are:

### Phase 0
* [The Beacon Chain](specs/core/0_beacon-chain.md)
* [Fork Choice](specs/core/0_fork-choice.md)
* [Deposit Contract](specs/core/0_deposit-contract.md)
* [Honest Validator](specs/validator/0_beacon-chain-validator.md)
* [The Beacon Chain](specs/phase0/beacon-chain.md)
* [Fork Choice](specs/phase0/fork-choice.md)
* [Deposit Contract](specs/phase0/deposit-contract.md)
* [Honest Validator](specs/phase0/validator.md)

### Phase 1
* [Custody Game](specs/core/1_custody-game.md)
* [Shard Data Chains](specs/core/1_shard-data-chains.md)
* [Misc beacon chain updates](specs/core/1_beacon-chain-misc.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)
* [Light client syncing protocol](specs/phase1/light-client-sync.md)

### Phase 2

Expand All @@ -30,11 +31,9 @@ See the [Eth2 Phase 2 Wiki](https://hackmd.io/UzysWse1Th240HELswKqVA?view) for c

### Accompanying documents can be found in [specs](specs) and include:

* [SimpleSerialize (SSZ) spec](specs/simple-serialize.md)
* [BLS signature verification](specs/bls_signature.md)
* [General test format](specs/test_formats/README.md)
* [Merkle proof formats](specs/light_client/merkle_proofs.md)
* [Light client syncing protocol](specs/light_client/sync_protocol.md)
* [SimpleSerialize (SSZ) spec](ssz/simple-serialize.md)
* [Merkle proof formats](ssz/merkle-proofs.md)
* [General test format](tests/formats/README.md)

## Additional specifications for client implementers

Expand Down Expand Up @@ -63,6 +62,6 @@ The following are the broad design goals for Ethereum 2.0:
## For spec contributors

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

8 changes: 6 additions & 2 deletions configs/mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ TARGET_AGGREGATORS_PER_COMMITTEE: 16
RANDOM_SUBNETS_PER_VALIDATOR: 1
# 2**8 (= 256)
EPOCHS_PER_RANDOM_SUBNET_SUBSCRIPTION: 256
# 14 (estimate from Eth1 mainnet)
SECONDS_PER_ETH1_BLOCK: 14


# Deposit contract
Expand All @@ -61,13 +63,15 @@ EFFECTIVE_BALANCE_INCREMENT: 1000000000

# Initial values
# ---------------------------------------------------------------
# 0, GENESIS_EPOCH is derived from this constant
GENESIS_SLOT: 0
# Mainnet initial fork version, recommend altering for testnets
GENESIS_FORK_VERSION: 0x00000000
BLS_WITHDRAWAL_PREFIX: 0x00


# Time parameters
# ---------------------------------------------------------------
# 86400 seconds (1 day)
MIN_GENESIS_DELAY: 86400
# 12 seconds
SECONDS_PER_SLOT: 12
# 2**0 (= 1) slots 12 seconds
Expand Down
8 changes: 6 additions & 2 deletions configs/minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ TARGET_AGGREGATORS_PER_COMMITTEE: 16
RANDOM_SUBNETS_PER_VALIDATOR: 1
# 2**8 (= 256)
EPOCHS_PER_RANDOM_SUBNET_SUBSCRIPTION: 256
# 14 (estimate from Eth1 mainnet)
SECONDS_PER_ETH1_BLOCK: 14


# Deposit contract
Expand All @@ -61,13 +63,15 @@ EFFECTIVE_BALANCE_INCREMENT: 1000000000

# Initial values
# ---------------------------------------------------------------
# 0, GENESIS_EPOCH is derived from this constant
GENESIS_SLOT: 0
# Highest byte set to 0x01 to avoid collisions with mainnet versioning
GENESIS_FORK_VERSION: 0x00000001
BLS_WITHDRAWAL_PREFIX: 0x00


# Time parameters
# ---------------------------------------------------------------
# [customized] Faster to spin up testnets, but does not give validator reasonable warning time for genesis
MIN_GENESIS_DELAY: 300
# [customized] Faster for testing purposes
SECONDS_PER_SLOT: 6
# 2**0 (= 1) slots 6 seconds
Expand Down
Loading