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.12.0 #1829

Merged
merged 209 commits into from May 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
209 commits
Select commit Hold shift + click to select a range
c10e59b
Fix `INACTIVITY_PENALTY_QUOTIENT`
hwwhww Apr 8, 2020
890c27d
The input parameter `index` in `compute_shuffled_index` is the positi…
hwwhww Apr 9, 2020
b2f6325
Fix `compute_committee`
hwwhww Apr 9, 2020
1e9df66
Merge pull request #1714 from ethereum/hwwhww/validator_index
djrtwo Apr 14, 2020
4a94200
Merge pull request #1712 from ethereum/hwwhww/inactivity_penalty_quot…
djrtwo Apr 14, 2020
6fdee75
Fix phase0 types
hwwhww Apr 17, 2020
cafd98b
Fix utils.hash_function typing
hwwhww Apr 17, 2020
3575b18
Fix `config_util.py` typing
hwwhww Apr 17, 2020
5b4f5c3
Merge pull request #1731 from ethereum/hwwhww/phase0_typing
djrtwo Apr 20, 2020
5929aac
Cosmetic changes from #1737
JustinDrake Apr 21, 2020
9bbac0d
Added consistency check for FFG & LMD vote in validate_on_atttestatio…
adiasg Apr 22, 2020
37abc54
Merge pull request #1740 from ethereum/JustinDrake-patch-3
djrtwo Apr 22, 2020
fe13bab
rework rewards/penalties to be more granular
djrtwo Apr 23, 2020
7612667
minor feedback and fixes on rewards/penalites proposal
djrtwo Apr 23, 2020
bf806b9
Require "seen" aggregates to be valid
paulhauner Apr 24, 2020
fde9b41
Merge pull request #1752 from ethereum/dev
djrtwo Apr 24, 2020
9acea51
Simplified by re-using get_ancestor()
adiasg Apr 25, 2020
1a81c87
Remove redundant check in fork choice
paulhauner Apr 26, 2020
c841aa1
genesis: clarify that eth1 timestamp can be less than min genesis time
q9f Apr 26, 2020
4d980ae
Fix validator guide
hwwhww Apr 23, 2020
303d7d5
Add validator guide tests
hwwhww Apr 23, 2020
bdae27e
Add bls.AggregatePKs helper
hwwhww Apr 23, 2020
8adc15e
Add validator guide tests
hwwhww Apr 23, 2020
70bd73d
Apply PR feedback from @djrtwo
hwwhww Apr 27, 2020
d311248
Increase `EPOCHS_PER_ETH1_VOTING_PERIOD` from `2` to `4` for testing …
hwwhww Apr 27, 2020
2dbc333
Make `compute_new_state_root` a pure function
hwwhww Apr 27, 2020
f95a135
Merge pull request #1745 from ethereum/hwwhww/validator-tests
djrtwo Apr 27, 2020
f0af339
Merge pull request #1749 from paulhauner/patch-22
djrtwo Apr 27, 2020
dae623b
Merge pull request #1756 from byz-f/q9-genesis-eth1
djrtwo Apr 27, 2020
3cc1fb9
Remove `/`
terencechain Apr 27, 2020
d9cb1da
Merge pull request #1762 from terencechain/patch-96
djrtwo Apr 27, 2020
9d39c29
Merge pull request #1763 from ethereum/master
protolambda Apr 27, 2020
553a33c
Merge pull request #1766 from ethereum/dev
djrtwo Apr 27, 2020
d128400
remove interop from header and gossip sections in network spec
djrtwo Apr 27, 2020
8758683
remove interop from phase 0 p2p specs
djrtwo Apr 27, 2020
fa66475
Move `sanity` to under `phase_0`
hwwhww Apr 28, 2020
b5ecc88
Merge pull request #1769 from ethereum/hwwhww/move_sanity
djrtwo Apr 28, 2020
4a086fb
Merge branch 'dev' into rewards-rework
djrtwo Apr 28, 2020
5f18dd7
add baseline get_target_deltas tests
djrtwo Apr 29, 2020
cd27e5e
add tests for source, target, head
djrtwo Apr 29, 2020
6a40f71
add note about beacon committees not going into attnets
djrtwo Apr 30, 2020
2dc5156
Add message about delaying consideration
paulhauner Apr 30, 2020
a30b2d3
Merge pull request #1775 from ethereum/attnet-note
djrtwo Apr 30, 2020
070056b
Merge pull request #1767 from ethereum/remove-interop-fix
djrtwo Apr 30, 2020
4b4fc32
Merge pull request #1755 from paulhauner/patch-23
djrtwo Apr 30, 2020
09cae4b
Handle empty-aggregation-bits case, and add tests. See #1713
protolambda May 1, 2020
47ed5b6
Fix rewards testing for empty/weird participation cases, adding more …
protolambda May 1, 2020
c2c2779
Merge branch 'dev' into rewards-rework
djrtwo May 1, 2020
45ad270
test double proposer slashings and exits
protolambda May 1, 2020
feb27a1
beacon-chain.md: Replace block wrapper with signable pattern
hwwhww Mar 31, 2020
e9f1e41
Add `proposer_index` to shard block
hwwhww Apr 2, 2020
5f69afe
Make `shard_state_transition` more like beacon state_transition function
hwwhww Apr 2, 2020
be50020
Refactor `get_light_client_committee` to similar to
hwwhww Apr 2, 2020
247a6c8
Add `verify_fraud_proof` function
hwwhww Apr 2, 2020
849d3f8
Apply @terencechain 's review feedback
hwwhww Apr 6, 2020
4e8a7ff
[squashed] shard transition wip
hwwhww Apr 6, 2020
afa12ca
Refactor `get_shard_state_transition_result`
hwwhww Apr 10, 2020
e645d6b
Rename `build_empty_shard_block` to `build_shard_block`
hwwhww Apr 13, 2020
9724cb8
Apply suggestions from code review from @djrtwo
hwwhww Apr 16, 2020
85d5a9a
[squashed] shard chain updates wip
hwwhww Apr 16, 2020
40483b5
[squashed] shard chain updates wip
hwwhww Apr 20, 2020
c8a473b
Apply suggestions from code review
hwwhww Apr 28, 2020
524ba16
[squashed] shard chain updates wip
hwwhww Apr 28, 2020
e758fb7
Check `head_shard_root` of all `transition_attestations`
hwwhww May 1, 2020
ff85025
PR feedback from terence
hwwhww May 1, 2020
977cd73
Refactor the tests
hwwhww May 1, 2020
b43e24a
specs/phase1/fraud-proofs.md -> specs/phase1/shard-transition.md
hwwhww May 1, 2020
4558c7d
Reorg the file structure
hwwhww May 1, 2020
7a77018
Reorg beacon-chain spec a bit
hwwhww May 1, 2020
71dc744
Merge pull request #1703 from ethereum/hwwhww/signed_pattern
djrtwo May 4, 2020
eda2499
basic generators work
djrtwo May 4, 2020
a7354bd
Merge branch 'dev' into rewards-rework
djrtwo May 4, 2020
5194c1f
add test_get_inclusion_delay_deltas
djrtwo May 4, 2020
8f569a8
add inactivity penalty deltas tests
djrtwo May 5, 2020
3f250f7
PR feedback
djrtwo May 5, 2020
f35106d
add comment for helper -- has_enouh_for_reward
djrtwo May 5, 2020
b2c3611
Merge branch 'dev' into v012x
djrtwo May 5, 2020
5b3ed8a
bump VERSION.txt to 0.12.0
djrtwo May 5, 2020
38f29ba
remove PERSISTENT_COMMITTEE_PERIOD in favor of SHARD_COMMITTEE_PERIOD
djrtwo May 5, 2020
f60f8ca
Fix README spec links
hwwhww May 5, 2020
2fb5c25
Merge pull request #1785 from ethereum/hwwhww/readme-patch
djrtwo May 5, 2020
d26cfd2
Apply suggestions from code review from @hwwhww
djrtwo May 5, 2020
b2dfb6c
PR feedback from @hwwhww
djrtwo May 5, 2020
b71a0ee
Merge branch 'v012x' into ffg_lmd_vote_consistency
djrtwo May 5, 2020
5267186
Merge pull request #1783 from ethereum/fix-persistent-committee-period
protolambda May 5, 2020
b109e7d
add test for inconsistent head and target in attestation fork choice
djrtwo May 5, 2020
4f40113
address PR feedback from @protolambda
djrtwo May 5, 2020
f0742b2
add exited tests for rewards. make some valiators exited/withdrawable…
djrtwo May 5, 2020
4ffa0db
Apply suggestions from code review
djrtwo May 5, 2020
c8b13c3
Add release & pypi badges
hwwhww May 6, 2020
0d459af
Merge pull request #1790 from ethereum/hwwhww/badges
hwwhww May 7, 2020
7625728
Merge pull request #1742 from ethereum/ffg_lmd_vote_consistency
djrtwo May 7, 2020
1e9d46d
Merge branch 'dev' into v012x
djrtwo May 7, 2020
08652f5
Merge branch 'v012x' into empty-bits-case
djrtwo May 7, 2020
12aa84f
PR feedback
djrtwo May 7, 2020
ee7d11d
clean up proposer slashing tests and add a couple
djrtwo May 7, 2020
4ad3d65
add multiple exits block sanity test
djrtwo May 7, 2020
b317a73
Merge branch 'dev' into double-operations
djrtwo May 7, 2020
197f1f5
Merge pull request #1781 from ethereum/double-operations
djrtwo May 7, 2020
c5d0090
Merge pull request #1780 from ethereum/empty-bits-case
djrtwo May 7, 2020
3a71c6d
Merge branch 'dev' into v012x
djrtwo May 7, 2020
38a5f41
[Minor] Fix config example to not assign a return value.
gnattishness May 8, 2020
5b2a08b
Merge pull request #1793 from gnattishness/config-readme
djrtwo May 8, 2020
1137e03
move MAX_ATTESTER_SLASHINGS to 2, add multiple slashings per block tests
djrtwo May 7, 2020
7a13060
hww feedback
djrtwo May 8, 2020
01eaf6c
Clarify the response of BlocksByRange to address #1765
djrtwo May 8, 2020
fdcc6d6
gossipsub v1.1 and extended validators for gossip conditions
djrtwo May 8, 2020
cdd0ed0
Update to IETF BLS draft-irtf-cfrg-bls-signature-02
hwwhww May 9, 2020
a8e3fe7
Update p2p reqresp with explicit handling of reqresp size bounds
protolambda May 9, 2020
1636360
remove todo comment
djrtwo May 11, 2020
8fe43e1
Merge pull request #1796 from ethereum/gossipsub-v1.1
djrtwo May 11, 2020
3fb4c43
Merge pull request #1794 from ethereum/2x-attester-slashings
djrtwo May 11, 2020
6474218
Merge pull request #1747 from ethereum/rewards-rework
djrtwo May 11, 2020
b3dd99f
Loosen restrictions for aggregate propogation
paulhauner Apr 19, 2020
7d4d3e4
remove aggregate clarifiyng text that is not longer valid
djrtwo May 11, 2020
b4bc203
clarify that clients MAY stop block requests if fork choice changes
djrtwo May 11, 2020
fcf0038
remove duplicate response diagram
protolambda May 11, 2020
17f656c
Merge branch 'dev' into v012x
djrtwo May 11, 2020
65108ae
start on_block just slots test at time 0
djrtwo May 11, 2020
b1c2c6e
Default BLS to ON, keep CI BLS off for now, add milagro option
protolambda May 11, 2020
30ecd9b
p2p PR feedback
djrtwo May 11, 2020
396f71f
Merge pull request #1802 from ethereum/minor-forkchoice-test-fix
protolambda May 11, 2020
ca1876e
Merge pull request #1795 from ethereum/clarify-blocks-request
djrtwo May 11, 2020
ef18010
Merge pull request #1800 from ethereum/reqresp-sizes
djrtwo May 11, 2020
511f803
use all attnets across the epoch even when not max committees per slot
djrtwo May 11, 2020
78d83b6
Bump py_ecc to v3.0.0 (IETF BLS v2 + H2C v6)
hwwhww May 11, 2020
ed194de
Bump py_ecc to v4.0.0 (IETF BLS v2 + H2C v7)
hwwhww May 12, 2020
2718dcc
Update IETF standard description
hwwhww May 12, 2020
3c11a4d
Fix `AggregateVerify` param name: `message` -> `messages`
hwwhww May 13, 2020
4a246ba
Apply feedback from Danny, add a note of the hash to curve configuration
hwwhww May 13, 2020
b9e4bcc
Fix type error
hwwhww May 13, 2020
4431e39
Fix bugs:
ericsson49 May 13, 2020
b41410e
lint problem fixed
ericsson49 May 13, 2020
aef5647
Update beacon-chain.md
terencechain May 13, 2020
84cea96
Fix typo
hwwhww May 14, 2020
f3448e5
Update specs/phase1/beacon-chain.md
terencechain May 14, 2020
23e2b83
Update specs/phase1/beacon-chain.md
terencechain May 14, 2020
183b197
Update specs/phase1/beacon-chain.md
hwwhww May 14, 2020
aa436d9
Use NO_SIGNATURE (0x00...) approach
hwwhww May 14, 2020
6a3241b
Remove leading space
hwwhww May 14, 2020
d27f235
Update BLS test suite to BLS standard draft v2 format
hwwhww May 14, 2020
c91e017
Merge pull request #1801 from ethereum/non-aggregator-att
djrtwo May 14, 2020
f0c4623
Apply PR feedback: add docstring
hwwhww May 14, 2020
689a695
Merge pull request #1812 from ethereum/no_signature
djrtwo May 14, 2020
9a25598
Fix typo and remove unused variable
hwwhww May 14, 2020
ea99f0a
Fix typo
hwwhww May 14, 2020
82073a4
Fix typo
hwwhww May 14, 2020
3dd1683
reformat compute_subnet_for_attestation to not use for loop
djrtwo May 14, 2020
ab3cbda
Add a note of `len(attestations) > 0`
hwwhww May 14, 2020
483f9a1
Update specs/phase0/p2p-interface.md
djrtwo May 14, 2020
96ab76d
Merge pull request #1804 from ethereum/use-all-attnets
djrtwo May 14, 2020
6f5cbe6
Update shard-transition.md
terencechain May 14, 2020
a9c4516
PR feedback from proto: revert configs
hwwhww May 15, 2020
7303153
Merge pull request #1814 from terencechain/patch-98
hwwhww May 15, 2020
d07e594
Add `Aggregate()` case
hwwhww May 15, 2020
fd3cce0
Update README
hwwhww May 15, 2020
4ffafa5
Merge pull request #1813 from ethereum/bls_v2_tests
djrtwo May 15, 2020
4a86c39
Merge pull request #1799 from ethereum/bls_v2
djrtwo May 18, 2020
7daa6c0
Merge pull request #1810 from terencechain/patch-97
djrtwo May 18, 2020
ed013b1
Merge pull request #1806 from ethereum/pack_bits
djrtwo May 18, 2020
b975a92
ensure at least one validator is slashed for slashing rewards tests
djrtwo May 18, 2020
6f685a9
Merge branch 'dev' into v012x
djrtwo May 18, 2020
97b6db4
add rewards tests for validators not yet activated
djrtwo May 18, 2020
96b5733
cleanup set some new deposits helper for rewards tests
djrtwo May 18, 2020
b7cfa94
Merge branch 'dev' into v0113-dev-merge
djrtwo May 18, 2020
69fdcf6
Merge pull request #1823 from ethereum/v0113-dev-merge
djrtwo May 18, 2020
c536729
Merge branch 'dev' into v012x
djrtwo May 18, 2020
6655382
Merge pull request #1807 from ericsson49/ericcson49/fix_is_valid_frau…
djrtwo May 18, 2020
5da4fe3
Merge pull request #1821 from ethereum/rewards-with-inactive-vals
djrtwo May 18, 2020
8060505
refactor rewards/penalties tests to use a single structure
djrtwo May 18, 2020
0f20d8a
leak state decorator, and test pre-state caching
protolambda May 18, 2020
75a0d60
cached epoch attestation preparation
protolambda May 19, 2020
97e54b8
fix cache for config change during runtime
protolambda May 19, 2020
85f6712
fix comments based on PR feedback
protolambda May 19, 2020
6d45afe
add some more random reawrds tests
djrtwo May 19, 2020
5c564f4
clean up reards generator
djrtwo May 19, 2020
65b5aa3
update test format docs
protolambda May 19, 2020
583b332
Merge pull request #1826 from ethereum/single-rewards-gen
djrtwo May 19, 2020
095b87c
Merge branch 'dev' into v012x
djrtwo May 19, 2020
724139a
change gossipsub protocol ID to /meshsub/1.1.0
djrtwo May 19, 2020
fdc7e84
remove incorrect table format
djrtwo May 19, 2020
dbb1ee6
Merge pull request #1828 from ethereum/gossipv1.1-id
djrtwo May 19, 2020
4d6b99b
Merge pull request #1820 from ethereum/v012x
djrtwo May 19, 2020
85e7822
ensure when performing optimally that you don't lose money during a leak
djrtwo May 19, 2020
95c3295
move proposer negation to inactivity_penalty deltas
djrtwo May 19, 2020
4c5d2c2
Bump remerkleable to 0.1.15
hwwhww May 20, 2020
21a4143
Merge branch 'dev' into fast-bls-option
hwwhww May 20, 2020
b643854
Merge pull request #1831 from ethereum/bump-remerkleable
protolambda May 20, 2020
796e372
remerkleable 0.1.16
protolambda May 20, 2020
476d480
Merge pull request #1833 from ethereum/remerkleable_0_1_16
djrtwo May 20, 2020
943e51a
hww feedback for finality rewards fix
djrtwo May 20, 2020
c9f21f1
clarify that eth1 blocks must be at a safe fllow distance before bein…
djrtwo May 20, 2020
7cb8e5e
Merge pull request #1830 from ethereum/neutral-rewards
djrtwo May 20, 2020
f72d14a
Bump `milagro_bls_binding` to 1.2.0
hwwhww May 20, 2020
db1a90d
`test_success_surround` changes the signing data of attestation, so i…
hwwhww May 20, 2020
4ac2fc7
add missing column description fo SECONDS_PER_ETH1_BLOCK
djrtwo May 20, 2020
607e239
require blocks to be ordered consecutively in block range request
arnetheduck May 19, 2020
a29cbeb
cover `step` parameter in stricter range request
arnetheduck May 20, 2020
59a4314
Rebased on latest BlocksByRange spec, fix conflicts, clarify single c…
protolambda May 20, 2020
a6d4566
Merge pull request #1834 from ethereum/clarify-genesis-safety
djrtwo May 20, 2020
522e34e
Fix markdown, use multiple lines for change-control, and add step >= …
protolambda May 20, 2020
763d74b
Just learned bls was disabled by default; fixing the tests
hwwhww May 20, 2020
aa63526
Merge pull request #1835 from ethereum/strict-block-range
djrtwo May 20, 2020
d92efdf
Should have signed the attestions in `test_filtered_block_tree` test
hwwhww May 20, 2020
96f785e
ensure only forward progress with eth1data voting
djrtwo May 20, 2020
61336a9
add deposit_root to validator unit tets
djrtwo May 20, 2020
f4991ce
Merge pull request #1836 from ethereum/disallow-rewind-votes
protolambda May 20, 2020
87005c6
milagro bls 1.3 with improved error handling
protolambda May 20, 2020
7770acc
Merge pull request #1803 from ethereum/fast-bls-option
djrtwo May 20, 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
6 changes: 3 additions & 3 deletions Makefile
Expand Up @@ -75,15 +75,15 @@ install_test:

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
python -m pytest -n 4 --disable-bls --cov=eth2spec.phase0.spec --cov=eth2spec.phase1.spec --cov-report="html:$(COV_HTML_OUT)" --cov-branch eth2spec

find_test: pyspec
. venv/bin/activate; cd $(PY_SPEC_DIR); \
python -m pytest -k=$(K) --cov=eth2spec.phase0.spec --cov=eth2spec.phase1.spec --cov-report="html:$(COV_HTML_OUT)" --cov-branch eth2spec
python -m pytest -k=$(K) --disable-bls --cov=eth2spec.phase0.spec --cov=eth2spec.phase1.spec --cov-report="html:$(COV_HTML_OUT)" --cov-branch 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
python -m pytest -n 4 --disable-bls --junitxml=eth2spec/test_results.xml eth2spec

open_cov:
((open "$(COV_INDEX_FILE)" || xdg-open "$(COV_INDEX_FILE)") &> /dev/null) &
Expand Down
10 changes: 7 additions & 3 deletions README.md
Expand Up @@ -9,11 +9,14 @@ This repository hosts the current Eth2 specifications. Discussions about design

## Specs

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:
[![GitHub release](https://img.shields.io/github/v/release/ethereum/eth2.0-specs)](https://github.com/ethereum/eth2.0-specs/releases/) [![PyPI version](https://badge.fury.io/py/eth2spec.svg)](https://badge.fury.io/py/eth2spec)


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/phase0/beacon-chain.md)
* [Fork Choice](specs/phase0/fork-choice.md)
* [Beacon Chain 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)
Expand All @@ -22,8 +25,9 @@ Core specifications for Eth2 clients be found in [specs/](specs/). These are div
* [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 Transition and Fraud Proofs](specs/phase1/fraud-proofs.md)
* [Shard Transition and Fraud Proofs](specs/phase1/shard-transition.md)
* [Light client syncing protocol](specs/phase1/light-client-sync.md)
* [Beacon Chain Fork Choice for Shards](specs/phase1/fork-choice.md)

### Phase 2

Expand Down
16 changes: 8 additions & 8 deletions configs/mainnet.yaml
Expand Up @@ -94,8 +94,8 @@ EPOCHS_PER_ETH1_VOTING_PERIOD: 32
SLOTS_PER_HISTORICAL_ROOT: 8192
# 2**8 (= 256) epochs ~27 hours
MIN_VALIDATOR_WITHDRAWABILITY_DELAY: 256
# 2**11 (= 2,048) epochs 9 days
PERSISTENT_COMMITTEE_PERIOD: 2048
# 2**8 (= 256) epochs ~27 hours
SHARD_COMMITTEE_PERIOD: 256
# 2**6 (= 64) epochs ~7 hours
MAX_EPOCHS_PER_CROSSLINK: 64
# 2**2 (= 4) epochs 25.6 minutes
Expand All @@ -122,8 +122,8 @@ BASE_REWARD_FACTOR: 64
WHISTLEBLOWER_REWARD_QUOTIENT: 512
# 2**3 (= 8)
PROPOSER_REWARD_QUOTIENT: 8
# 2**25 (= 33,554,432)
INACTIVITY_PENALTY_QUOTIENT: 33554432
# 2**24 (= 16,777,216)
INACTIVITY_PENALTY_QUOTIENT: 16777216
# 2**5 (= 32)
MIN_SLASHING_PENALTY_QUOTIENT: 32

Expand All @@ -132,8 +132,8 @@ MIN_SLASHING_PENALTY_QUOTIENT: 32
# ---------------------------------------------------------------
# 2**4 (= 16)
MAX_PROPOSER_SLASHINGS: 16
# 2**0 (= 1)
MAX_ATTESTER_SLASHINGS: 1
# 2**1 (= 2)
MAX_ATTESTER_SLASHINGS: 2
# 2**7 (= 128)
MAX_ATTESTATIONS: 128
# 2**4 (= 16)
Expand Down Expand Up @@ -161,6 +161,8 @@ DOMAIN_CUSTODY_BIT_SLASHING: 0x83000000
# Phase 1: Upgrade from Phase 0
# ---------------------------------------------------------------
PHASE_1_FORK_VERSION: 0x01000000
# [STUB]
PHASE_1_GENESIS_SLOT: 32
INITIAL_ACTIVE_SHARDS: 64

# Phase 1: General
Expand All @@ -173,8 +175,6 @@ ONLINE_PERIOD: 8
LIGHT_CLIENT_COMMITTEE_SIZE: 128
# 2**8 (= 256) | epochs | ~27 hours
LIGHT_CLIENT_COMMITTEE_PERIOD: 256
# 2**8 (= 256) | epochs | ~27 hours
SHARD_COMMITTEE_PERIOD: 256
# 2**18 (= 262,144)
SHARD_BLOCK_CHUNK_SIZE: 262144
# 2**2 (= 4)
Expand Down
16 changes: 8 additions & 8 deletions configs/minimal.yaml
Expand Up @@ -89,13 +89,13 @@ MIN_SEED_LOOKAHEAD: 1
# 2**2 (= 4) epochs
MAX_SEED_LOOKAHEAD: 4
# [customized] higher frequency new deposits from eth1 for testing
EPOCHS_PER_ETH1_VOTING_PERIOD: 2
EPOCHS_PER_ETH1_VOTING_PERIOD: 4
# [customized] smaller state
SLOTS_PER_HISTORICAL_ROOT: 64
# 2**8 (= 256) epochs
MIN_VALIDATOR_WITHDRAWABILITY_DELAY: 256
# [customized] higher frequency of committee turnover and faster time to acceptable voluntary exit
PERSISTENT_COMMITTEE_PERIOD: 128
SHARD_COMMITTEE_PERIOD: 64
# [customized] fast catchup crosslinks
MAX_EPOCHS_PER_CROSSLINK: 4
# 2**2 (= 4) epochs
Expand All @@ -122,8 +122,8 @@ BASE_REWARD_FACTOR: 64
WHISTLEBLOWER_REWARD_QUOTIENT: 512
# 2**3 (= 8)
PROPOSER_REWARD_QUOTIENT: 8
# 2**25 (= 33,554,432)
INACTIVITY_PENALTY_QUOTIENT: 33554432
# 2**24 (= 16,777,216)
INACTIVITY_PENALTY_QUOTIENT: 16777216
# 2**5 (= 32)
MIN_SLASHING_PENALTY_QUOTIENT: 32

Expand All @@ -132,8 +132,8 @@ MIN_SLASHING_PENALTY_QUOTIENT: 32
# ---------------------------------------------------------------
# 2**4 (= 16)
MAX_PROPOSER_SLASHINGS: 16
# 2**0 (= 1)
MAX_ATTESTER_SLASHINGS: 1
# 2**1 (= 2)
MAX_ATTESTER_SLASHINGS: 2
# 2**7 (= 128)
MAX_ATTESTATIONS: 128
# 2**4 (= 16)
Expand Down Expand Up @@ -162,6 +162,8 @@ DOMAIN_CUSTODY_BIT_SLASHING: 0x83000000
# ---------------------------------------------------------------
# [customized] for testnet distinction
PHASE_1_FORK_VERSION: 0x01000001
# [customized] for testing
PHASE_1_GENESIS_SLOT: 8
# [customized] reduced for testing
INITIAL_ACTIVE_SHARDS: 4

Expand All @@ -176,8 +178,6 @@ ONLINE_PERIOD: 8
LIGHT_CLIENT_COMMITTEE_SIZE: 128
# 2**8 (= 256) | epochs
LIGHT_CLIENT_COMMITTEE_PERIOD: 256
# 2**8 (= 256) | epochs
SHARD_COMMITTEE_PERIOD: 256
# 2**18 (= 262,144)
SHARD_BLOCK_CHUNK_SIZE: 262144
# 2**2 (= 4)
Expand Down
21 changes: 15 additions & 6 deletions setup.py
Expand Up @@ -108,7 +108,7 @@ def get_spec(file_name: str) -> SpecObject:
PHASE1_IMPORTS = '''from eth2spec.phase0 import spec as phase0
from eth2spec.config.config_util import apply_constants_config
from typing import (
Any, Dict, Set, Sequence, NewType, Tuple, TypeVar, Callable
Any, Dict, Set, Sequence, NewType, Tuple, TypeVar, Callable, Optional
)

from dataclasses import (
Expand Down Expand Up @@ -146,8 +146,14 @@ def ceillog2(x: uint64) -> int:
hash_cache: Dict[bytes, Bytes32] = {}


def get_eth1_data(distance: uint64) -> Bytes32:
return hash(distance)
def get_eth1_data(block: Eth1Block) -> Eth1Data:
"""
A stub function return mocking Eth1Data.
"""
return Eth1Data(
deposit_root=block.deposit_root,
deposit_count=block.deposit_count,
block_hash=hash_tree_root(block))


def hash(x: bytes) -> Bytes32: # type: ignore
Expand Down Expand Up @@ -373,9 +379,10 @@ def finalize_options(self):
self.md_doc_paths = """
specs/phase0/beacon-chain.md
specs/phase0/fork-choice.md
specs/phase0/validator.md
specs/phase1/custody-game.md
specs/phase1/beacon-chain.md
specs/phase1/fraud-proofs.md
specs/phase1/shard-transition.md
specs/phase1/fork-choice.md
specs/phase1/phase1-fork.md
"""
Expand Down Expand Up @@ -478,6 +485,7 @@ def run(self):
url="https://github.com/ethereum/eth2.0-specs",
include_package_data=False,
package_data={'configs': ['*.yaml'],

'specs': ['**/*.md'],
'eth2spec': ['VERSION.txt']},
package_dir={
Expand All @@ -497,9 +505,10 @@ def run(self):
"eth-utils>=1.3.0,<2",
"eth-typing>=2.1.0,<3.0.0",
"pycryptodome==3.9.4",
"py_ecc==2.0.0",
"py_ecc==4.0.0",
"milagro_bls_binding==1.3.0",
"dataclasses==0.6",
"remerkleable==0.1.13",
"remerkleable==0.1.16",
"ruamel.yaml==0.16.5",
"lru-dict==1.1.6"
]
Expand Down