diff --git a/configs/constant_presets/mainnet.yaml b/configs/constant_presets/mainnet.yaml index c0b7c6e9c..ed839fc7d 100644 --- a/configs/constant_presets/mainnet.yaml +++ b/configs/constant_presets/mainnet.yaml @@ -15,8 +15,6 @@ MAX_INDICES_PER_ATTESTATION: 4096 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 @@ -25,8 +23,6 @@ SHUFFLE_ROUND_COUNT: 90 # --------------------------------------------------------------- # **TBD** DEPOSIT_CONTRACT_ADDRESS: 0x1234567890123456789012345678901234567890 -# 2**5 (= 32) -DEPOSIT_CONTRACT_TREE_DEPTH: 32 # Gwei values @@ -46,8 +42,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 diff --git a/configs/constant_presets/minimal.yaml b/configs/constant_presets/minimal.yaml index cdd919927..d631300e2 100644 --- a/configs/constant_presets/minimal.yaml +++ b/configs/constant_presets/minimal.yaml @@ -14,8 +14,6 @@ MAX_INDICES_PER_ATTESTATION: 4096 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 @@ -24,8 +22,6 @@ SHUFFLE_ROUND_COUNT: 10 # --------------------------------------------------------------- # **TBD** DEPOSIT_CONTRACT_ADDRESS: 0x1234567890123456789012345678901234567890 -# 2**5 (= 32) -DEPOSIT_CONTRACT_TREE_DEPTH: 32 # Gwei values @@ -45,8 +41,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 diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index 968098895..4a8e316ea 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -11,6 +11,7 @@ - [Notation](#notation) - [Terminology](#terminology) - [Constants](#constants) + - [Configuration](#configuration) - [Misc](#misc) - [Deposit contract](#deposit-contract) - [Gwei values](#gwei-values) @@ -152,7 +153,18 @@ Code snippets appearing in `this style` are to be interpreted as Python code. ## Constants -*Note*: The default mainnet values for the constants are included here for spec-design purposes. +The following values are (non-configurable) constants used throughout the specification. + +| Name | Value | +| - | - | +| `FAR_FUTURE_EPOCH` | `2**64 - 1` | +| `ZERO_HASH` | `b'\x00' * 32` | +| `BASE_REWARDS_PER_EPOCH` | `5` | +| `DEPOSIT_CONTRACT_TREE_DEPTH` | `2**5` (= 32) | + +## Configuration + +*Note*: The default mainnet configuration values are included here for spec-design purposes. The different configurations for mainnet, testnets, and YAML-based testing can be found in the `configs/constant_presets/` directory. These configurations are updated for releases, but may be out of sync during `dev` changes. @@ -165,17 +177,10 @@ These configurations are updated for releases, but may be out of sync during `de | `MAX_INDICES_PER_ATTESTATION` | `2**12` (= 4,096) | | `MIN_PER_EPOCH_CHURN_LIMIT` | `2**2` (= 4) | | `CHURN_LIMIT_QUOTIENT` | `2**16` (= 65,536) | -| `BASE_REWARDS_PER_EPOCH` | `5` | | `SHUFFLE_ROUND_COUNT` | `90` | * For the safety of crosslinks `TARGET_COMMITTEE_SIZE` exceeds [the recommended minimum committee size of 111](https://vitalik.ca/files/Ithaca201807_Sharding.pdf); with sufficient active validators (at least `SLOTS_PER_EPOCH * TARGET_COMMITTEE_SIZE`), the shuffling algorithm ensures committee sizes of at least `TARGET_COMMITTEE_SIZE`. (Unbiasable randomness with a Verifiable Delay Function (VDF) will improve committee robustness and lower the safe minimum committee size.) -### Deposit contract - -| Name | Value | -| - | - | -| `DEPOSIT_CONTRACT_TREE_DEPTH` | `2**5` (= 32) | - ### Gwei values | Name | Value | Unit | @@ -191,8 +196,6 @@ These configurations are updated for releases, but may be out of sync during `de | - | - | | `GENESIS_SLOT` | `0` | | `GENESIS_EPOCH` | `0` | -| `FAR_FUTURE_EPOCH` | `2**64 - 1` | -| `ZERO_HASH` | `b'\x00' * 32` | | `BLS_WITHDRAWAL_PREFIX` | `0` | ### Time parameters diff --git a/specs/core/0_fork-choice.md b/specs/core/0_fork-choice.md index 8103bbeb2..1910b6d04 100644 --- a/specs/core/0_fork-choice.md +++ b/specs/core/0_fork-choice.md @@ -9,7 +9,7 @@ - [Table of contents](#table-of-contents) - [Introduction](#introduction) - [Prerequisites](#prerequisites) - - [Constants](#constants) + - [Configuration](#configuration) - [Time parameters](#time-parameters) - [Beacon chain processing](#beacon-chain-processing) - [Beacon chain fork choice rule](#beacon-chain-fork-choice-rule) @@ -26,7 +26,7 @@ This document represents the specification for the beacon chain fork choice rule All terminology, constants, functions, and protocol mechanics defined in the [Phase 0 -- The Beacon Chain](./0_beacon-chain.md) doc are requisite for this document and used throughout. Please see the Phase 0 doc before continuing and use as a reference throughout. -## Constants +## Configuration ### Time parameters diff --git a/specs/core/1_shard-data-chains.md b/specs/core/1_shard-data-chains.md index a895b3c38..1b2b2b2da 100644 --- a/specs/core/1_shard-data-chains.md +++ b/specs/core/1_shard-data-chains.md @@ -9,8 +9,9 @@ - [Ethereum 2.0 Phase 1 -- Shard Data Chains](#ethereum-20-phase-1----shard-data-chains) - [Table of contents](#table-of-contents) - [Introduction](#introduction) - - [Constants](#constants) + - [Configuration](#configuration) - [Misc](#misc) + - [Initial values](#initial-values) - [Time parameters](#time-parameters) - [Signature domains](#signature-domains) - [Data structures](#data-structures) @@ -38,7 +39,7 @@ This document describes the shard data layer and the shard fork choice rule in Phase 1 of Ethereum 2.0. -## Constants +## Configuration ### Misc @@ -46,6 +47,10 @@ This document describes the shard data layer and the shard fork choice rule in P | - | - | | `BYTES_PER_SHARD_BLOCK_BODY` | `2**14` (= 16,384) | | `MAX_SHARD_ATTESTIONS` | `2**4` (= 16) | + +### Initial values + +| Name | Value | | `PHASE_1_FORK_EPOCH` | **TBD** | | `PHASE_1_FORK_SLOT` | **TBD** | | `GENESIS_SHARD_SLOT` | 0 |