Ethereum 2.0 Specifications
Go to file
Justin 05a35c7228
Tweak inclusion delay rewards and set BASE_REWARD_FACTOR
Substantive changes:

1) Split the inclusion delay reward between attester and proposer to add up to at most one base reward. This is analogous to the reward logic in `slash_validator`, and makes the `BASE_REWARDS_PER_EPOCH` constant include proposer rewards.
2) Double `BASE_REWARD_FACTOR` to 2^6 (addressing item 4 in #1054). When the total effective balance is 2^17 ETH then maximum annual issuance is a bit below 2^21 ETH. Maximum annual issuance happens when a) all validators make perfect attestations (matching source, target, head, as well as consistent crosslink data), b) all attestations are included as fast as possible (in particular, no skip blocks), and c) there are no slashings.

```python
BASE_REWARD_FACTOR = 2**6
SLOTS_PER_EPOCH = 2**6
SECONDS_PER_SLOT = 6
BASE_REWARDS_PER_EPOCH = 5
GWEI_PER_ETH = 10**9
MAX_TOTAL_EFFECTIVE_BALANCE = 2**27 * GWEI_PER_ETH
TARGET_MAX_ISSUANCE = 2**21 * GWEI_PER_ETH

def integer_squareroot(n: int) -> int:
    """
    The largest integer ``x`` such that ``x**2`` is less than or equal to ``n``.
    """
    assert n >= 0
    x = n
    y = (x + 1) // 2
    while y < x:
        x = y
        y = (x + n // x) // 2
    return x

MAX_REWARDS_PER_EPOCH = MAX_TOTAL_EFFECTIVE_BALANCE * BASE_REWARD_FACTOR // integer_squareroot(MAX_TOTAL_EFFECTIVE_BALANCE) // BASE_REWARDS_PER_EPOCH
EPOCHS_PER_YEAR = 365.25*24*60*60 / (SECONDS_PER_SLOT * SLOTS_PER_EPOCH)
MAX_REWARDS_PER_YEAR = EPOCHS_PER_YEAR * MAX_REWARDS_PER_EPOCH * BASE_REWARDS_PER_EPOCH

print(MAX_REWARDS_PER_YEAR / TARGET_MAX_ISSUANCE)
```
2019-06-10 15:14:32 +01:00
.circleci fix 2019-06-07 23:01:10 -04:00
configs Adds review suggestions I missed 2019-06-06 11:45:22 +02:00
deposit_contract deposit_contract/venv 2019-06-07 22:41:50 -04:00
scripts Apply suggestions from @djrtwo's code review 2019-06-05 21:49:30 +02:00
specs Tweak inclusion delay rewards and set BASE_REWARD_FACTOR 2019-06-10 15:14:32 +01:00
test_generators Make test generators work with phase 1 execution 2019-06-05 16:23:44 +02:00
test_libs Rework of phases decorator 2019-06-06 23:30:40 +02:00
.gitignore Implements parameterised phase1 tests 2019-05-16 12:10:08 +02:00
LICENSE CC0 1.0 Universal for repo 2019-03-12 11:59:08 +00:00
Makefile improve makefile: declare new targets as non-file 2019-06-08 13:30:47 +02:00
README.md Merge pull request #1069 from sigp/bn-vc-api-rfc 2019-05-28 16:07:51 -06:00

README.md

Ethereum 2.0 Specifications

Join the chat at https://gitter.im/ethereum/sharding

To learn more about sharding and Ethereum 2.0 (Serenity), see the sharding FAQ and the research compendium.

This repository hosts the current Eth 2.0 specifications. Discussions about design rationale and proposed changes can be brought up and discussed as issues. Solidified, agreed-upon changes to the spec can be made through pull requests.

Specs

Core specifications for Eth 2.0 client validation can be found in specs/core. These are divided into phases. Each subsequent phase depends upon the prior. The current phases specified are:

Phase 0

Phase 1

Accompanying documents can be found in specs and include:

Design goals

The following are the broad design goals for Ethereum 2.0:

  • to minimize complexity, even at the cost of some losses in efficiency
  • to remain live through major network partitions and when very large portions of nodes go offline
  • to select all components such that they are either quantum secure or can be easily swapped out for quantum secure counterparts when available
  • to utilize crypto and design techniques that allow for a large participation of validators in total and per unit time
  • to allow for a typical consumer laptop with O(C) resources to process/validate O(1) shards (including any system level validation such as the beacon chain)

For spec contributors

Documentation on the different components used during spec writing can be found here: