2019-05-27 12:48:13 +00:00
|
|
|
# beacon_chain
|
2020-01-27 11:36:17 +00:00
|
|
|
# Copyright (c) 2018-2020 Status Research & Development GmbH
|
2019-05-27 12:48:13 +00:00
|
|
|
# Licensed and distributed under either of
|
2019-11-25 15:30:02 +00:00
|
|
|
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
|
|
|
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
2019-05-27 12:48:13 +00:00
|
|
|
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
|
|
|
|
|
|
|
# This file contains constants that are part of the spec and thus subject to
|
|
|
|
# serialization and spec updates.
|
|
|
|
|
|
|
|
import
|
2019-10-25 10:59:56 +00:00
|
|
|
math
|
2019-05-27 12:48:13 +00:00
|
|
|
|
|
|
|
type
|
|
|
|
Slot* = distinct uint64
|
|
|
|
Epoch* = distinct uint64
|
|
|
|
|
|
|
|
{.experimental: "codeReordering".} # SLOTS_PER_EPOCH is use before being defined in spec
|
|
|
|
|
|
|
|
const
|
|
|
|
# Misc
|
|
|
|
# ---------------------------------------------------------------
|
2020-01-27 12:21:50 +00:00
|
|
|
# https://github.com/ethereum/eth2.0-specs/blob/v0.10.1/configs/minimal.yaml#L4
|
2019-05-27 12:48:13 +00:00
|
|
|
|
2019-11-08 11:31:48 +00:00
|
|
|
# Changed
|
2019-11-07 21:13:27 +00:00
|
|
|
MAX_COMMITTEES_PER_SLOT* = 4
|
2019-05-27 12:48:13 +00:00
|
|
|
TARGET_COMMITTEE_SIZE* = 4
|
|
|
|
|
|
|
|
# Unchanged
|
2019-11-08 11:31:48 +00:00
|
|
|
MAX_VALIDATORS_PER_COMMITTEE* = 2048
|
2019-05-27 12:48:13 +00:00
|
|
|
MIN_PER_EPOCH_CHURN_LIMIT* = 4
|
|
|
|
CHURN_LIMIT_QUOTIENT* = 2^16
|
|
|
|
|
|
|
|
# Changed
|
|
|
|
SHUFFLE_ROUND_COUNT* = 10
|
2019-11-08 11:31:48 +00:00
|
|
|
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT* {.intdefine.} = 64
|
2019-11-22 19:56:39 +00:00
|
|
|
MIN_GENESIS_TIME* {.intdefine.} = 1578009600 # 3 Jan, 2020
|
2019-05-27 12:48:13 +00:00
|
|
|
|
2020-03-14 21:54:45 +00:00
|
|
|
# Unchanged
|
|
|
|
HYSTERESIS_QUOTIENT* = 4
|
|
|
|
HYSTERESIS_DOWNWARD_MULTIPLIER* = 1
|
|
|
|
HYSTERESIS_UPWARD_MULTIPLIER* = 5
|
|
|
|
|
2019-07-01 08:23:50 +00:00
|
|
|
# Constants
|
2019-05-27 12:48:13 +00:00
|
|
|
# ---------------------------------------------------------------
|
2020-03-30 23:40:24 +00:00
|
|
|
# https://github.com/ethereum/eth2.0-specs/blob/v0.11.1/specs/phase0/beacon-chain.md#constants
|
2019-07-01 08:23:50 +00:00
|
|
|
# TODO "The following values are (non-configurable) constants" ...
|
2019-05-27 12:48:13 +00:00
|
|
|
# Unchanged
|
2019-11-08 10:30:22 +00:00
|
|
|
BASE_REWARDS_PER_EPOCH* = 4
|
|
|
|
|
2019-05-27 12:48:13 +00:00
|
|
|
DEPOSIT_CONTRACT_TREE_DEPTH* = 32
|
|
|
|
|
|
|
|
# Gwei values
|
|
|
|
# ---------------------------------------------------------------
|
2020-04-01 11:41:39 +00:00
|
|
|
# https://github.com/ethereum/eth2.0-specs/blob/v0.11.1/configs/minimal.yaml#L58
|
2019-05-27 12:48:13 +00:00
|
|
|
|
|
|
|
# Unchanged
|
|
|
|
MIN_DEPOSIT_AMOUNT* = 2'u64^0 * 10'u64^9
|
|
|
|
MAX_EFFECTIVE_BALANCE* = 2'u64^5 * 10'u64^9
|
|
|
|
EJECTION_BALANCE* = 2'u64^4 * 10'u64^9
|
|
|
|
EFFECTIVE_BALANCE_INCREMENT* = 2'u64^0 * 10'u64^9
|
|
|
|
|
|
|
|
# Initial values
|
|
|
|
# ---------------------------------------------------------------
|
2020-01-27 12:21:50 +00:00
|
|
|
# https://github.com/ethereum/eth2.0-specs/blob/v0.10.1/configs/minimal.yaml#L64
|
2019-05-27 12:48:13 +00:00
|
|
|
|
|
|
|
# Unchanged
|
2019-06-12 07:48:49 +00:00
|
|
|
GENESIS_SLOT* = 0.Slot
|
2020-04-06 18:18:42 +00:00
|
|
|
GENESIS_FORK_VERSION* = [0'u8, 0'u8, 0'u8, 1'u8]
|
2019-06-14 16:21:04 +00:00
|
|
|
BLS_WITHDRAWAL_PREFIX* = 0'u8
|
2019-05-27 12:48:13 +00:00
|
|
|
|
|
|
|
# Time parameters
|
|
|
|
# ---------------------------------------------------------------
|
2020-03-30 11:31:44 +00:00
|
|
|
# https://github.com/ethereum/eth2.0-specs/blob/v0.11.1/configs/minimal.yaml#L77
|
2020-01-14 17:46:58 +00:00
|
|
|
# Changed: Faster to spin up testnets, but does not give validator
|
|
|
|
# reasonable warning time for genesis
|
|
|
|
MIN_GENESIS_DELAY* = 300
|
|
|
|
|
2019-05-27 12:48:13 +00:00
|
|
|
# Unchanged
|
|
|
|
SECONDS_PER_SLOT*{.intdefine.} = 6'u64
|
0.6.2 updates (#275)
* update process_justification_and_finalization to 0.6.2; mark AttesterSlashing as 0.6.2
* replace get_effective_balance(...) with state.validator_registry[idx].effective_balance; rm get_effective_balance, process_ejections, should_update_validator_registry, update_validator_registry, and update_registry_and_shuffling_data; update get_total_balance to 0.6.2; implement process_registry_updates
* rm exit_validator; implement is_slashable_attestation_data; partly update processAttesterSlashings
* mark HistoricalBatch and Eth1Data as 0.6.2; implement get_shard_delta(...); replace 0.5 finish_epoch_update with 0.6 process_final_updates
* mark increase_balance, decrease_balance, get_delayed_activation_exit_epoch, bls_aggregate_pubkeys, bls_verify_multiple, Attestation, Transfer, slot_to_epoch, Crosslink, get_current_epoch, int_to_bytes*, various constants, processEth1Data, processTransfers, and verifyStateRoot as 0.6.2; rm is_double_vote and is_surround_vote
* mark get_bitfield_bit, verify_bitfield, ProposerSlashing, DepositData, VoluntaryExit, PendingAttestation, Fork, integer_squareroot, get_epoch_start_slot, is_active_validator, generate_seed, some constants to 0.6.2; rename MIN_PENALTY_QUOTIENT to MIN_SLASHING_PENALTY_QUOTIENT
* rm get_previous_total_balance, get_current_epoch_boundary_attestations, get_previous_epoch_boundary_attestations, and get_previous_epoch_matching_head_attestations
* update BeaconState to 0.6.2; simplify legacy get_crosslink_committees_at_slot infrastructure a bit by noting that registry_change is always false; reimplment 0.5 get_crosslink_committees_at_slot in terms of 0.6 get_crosslink_committee
* mark process_deposit(...), get_block_root_at_slot(...), get_block_root(...), Deposit, BeaconBlockHeader, BeaconBlockBody, hash(...), get_active_index_root(...), various constants, get_shard_delta(...), get_epoch_start_shard(...), get_crosslink_committee(...), processRandao(...), processVoluntaryExits(...), cacheState(...) as 0.6.2
* rm removed-since-0.5 split(...), is_power_of_2(...), get_shuffling(...); rm 0.5 versions of get_active_validator_indices and get_epoch_committee_count; add a few tests for integer_squareroot
* mark bytes_to_int(...) and advanceState(...) as 0.6.2
* rm 0.5 get_attesting_indices; update get_attesting_balance to 0.6.2
* another tiny commit to poke AppVeyor to maybe not timeout at connecting to GitHub partway through CI: mark get_churn_limit(...), initiate_validator_exit(...), and Validator as 0.6.2
* mark get_attestation_slot(...), AttestationDataAndCustodyBit, and BeaconBlock as 0.6.2
2019-06-03 10:31:04 +00:00
|
|
|
|
|
|
|
# Unchanged
|
2019-07-08 13:19:52 +00:00
|
|
|
MIN_ATTESTATION_INCLUSION_DELAY* = 1
|
2019-05-27 12:48:13 +00:00
|
|
|
|
|
|
|
# Changed
|
2019-07-13 15:58:01 +00:00
|
|
|
SLOTS_PER_EPOCH* {.intdefine.} = 8
|
2019-05-27 12:48:13 +00:00
|
|
|
|
|
|
|
# Unchanged
|
|
|
|
MIN_SEED_LOOKAHEAD* = 1
|
initial 0.9.0 spec sync (#509)
* rename compute_epoch_of_slot(...) to compute_epoch_at_slot(...)
* remove some unnecessary imports; remove some crosslink-related code and tests; complete renaming of compute_epoch_of_slot(...) to compute_epoch_at_slot(...)
* rm more transfer-related code and tests; rm more unnecessary strutils imports
* rm remaining unused imports
* remove useless get_empty_per_epoch_cache(...)/compute_start_slot_of_epoch(...) calls
* rename compute_start_slot_of_epoch(...) to compute_start_slot_at_epoch(...)
* rename ACTIVATION_EXIT_DELAY to MAX_SEED_LOOKAHEAD
* update domain types to 0.9.0
* mark AttesterSlashing, IndexedAttestation, AttestationDataAndCustodyBit, DepositData, BeaconBlockHeader, Fork, integer_squareroot(...), and process_voluntary_exit(...) as 0.9.0
* mark increase_balance(...), decrease_balance(...), get_block_root(...), CheckPoint, Deposit, PendingAttestation, HistoricalBatch, is_active_validator(...), and is_slashable_attestation_data(...) as 0.9.0
* mark compute_activation_exit_epoch(...), bls_verify(...), Validator, get_active_validator_indices(...), get_current_epoch(...), get_total_active_balance(...), and get_previous_epoch(...) as 0.9.0
* mark get_block_root_at_slot(...), ProposerSlashing, get_domain(...), VoluntaryExit, mainnet preset Gwei values, minimal preset max operations, process_block_header(...), and is_slashable_validator(...) as 0.9.0
* mark makeWithdrawalCredentials(...), get_validator_churn_limit(...), get_total_balance(...), is_valid_indexed_attestation(...), bls_aggregate_pubkeys(...), initial genesis value/constants, Attestation, get_randao_mix(...), mainnet preset max operations per block constants, minimal preset Gwei values and time parameters, process_eth1_data(...), get_shuffled_seq(...), compute_committee(...), and process_slots(...) as 0.9.0; partially update get_indexed_attestation(...) to 0.9.0 by removing crosslink refs and associated tests
* mark initiate_validator_exit(...), process_registry_updates(...), BeaconBlock, Eth1Data, compute_domain(...), process_randao(...), process_attester_slashing(...), get_base_reward(...), and process_slot(...) as 0.9.0
2019-10-30 19:41:19 +00:00
|
|
|
MAX_SEED_LOOKAHEAD* = 4
|
2019-05-27 12:48:13 +00:00
|
|
|
|
|
|
|
# Changed
|
2020-03-14 21:54:45 +00:00
|
|
|
EPOCHS_PER_ETH1_VOTING_PERIOD* = 2
|
initial 0.9.0 spec sync (#509)
* rename compute_epoch_of_slot(...) to compute_epoch_at_slot(...)
* remove some unnecessary imports; remove some crosslink-related code and tests; complete renaming of compute_epoch_of_slot(...) to compute_epoch_at_slot(...)
* rm more transfer-related code and tests; rm more unnecessary strutils imports
* rm remaining unused imports
* remove useless get_empty_per_epoch_cache(...)/compute_start_slot_of_epoch(...) calls
* rename compute_start_slot_of_epoch(...) to compute_start_slot_at_epoch(...)
* rename ACTIVATION_EXIT_DELAY to MAX_SEED_LOOKAHEAD
* update domain types to 0.9.0
* mark AttesterSlashing, IndexedAttestation, AttestationDataAndCustodyBit, DepositData, BeaconBlockHeader, Fork, integer_squareroot(...), and process_voluntary_exit(...) as 0.9.0
* mark increase_balance(...), decrease_balance(...), get_block_root(...), CheckPoint, Deposit, PendingAttestation, HistoricalBatch, is_active_validator(...), and is_slashable_attestation_data(...) as 0.9.0
* mark compute_activation_exit_epoch(...), bls_verify(...), Validator, get_active_validator_indices(...), get_current_epoch(...), get_total_active_balance(...), and get_previous_epoch(...) as 0.9.0
* mark get_block_root_at_slot(...), ProposerSlashing, get_domain(...), VoluntaryExit, mainnet preset Gwei values, minimal preset max operations, process_block_header(...), and is_slashable_validator(...) as 0.9.0
* mark makeWithdrawalCredentials(...), get_validator_churn_limit(...), get_total_balance(...), is_valid_indexed_attestation(...), bls_aggregate_pubkeys(...), initial genesis value/constants, Attestation, get_randao_mix(...), mainnet preset max operations per block constants, minimal preset Gwei values and time parameters, process_eth1_data(...), get_shuffled_seq(...), compute_committee(...), and process_slots(...) as 0.9.0; partially update get_indexed_attestation(...) to 0.9.0 by removing crosslink refs and associated tests
* mark initiate_validator_exit(...), process_registry_updates(...), BeaconBlock, Eth1Data, compute_domain(...), process_randao(...), process_attester_slashing(...), get_base_reward(...), and process_slot(...) as 0.9.0
2019-10-30 19:41:19 +00:00
|
|
|
SLOTS_PER_HISTORICAL_ROOT* = 64
|
2019-05-27 12:48:13 +00:00
|
|
|
|
|
|
|
# Unchanged
|
|
|
|
MIN_VALIDATOR_WITHDRAWABILITY_DELAY* = 2'u64^8
|
2020-03-14 21:54:45 +00:00
|
|
|
|
|
|
|
# Changed
|
|
|
|
PERSISTENT_COMMITTEE_PERIOD* = 128
|
|
|
|
|
|
|
|
# Unchanged
|
2019-08-28 12:07:00 +00:00
|
|
|
MAX_EPOCHS_PER_CROSSLINK* = 4
|
2019-11-22 12:08:07 +00:00
|
|
|
|
|
|
|
# Changed
|
2019-05-27 12:48:13 +00:00
|
|
|
MIN_EPOCHS_TO_INACTIVITY_PENALTY* = 2'u64^2
|
|
|
|
|
2019-09-05 19:52:34 +00:00
|
|
|
# State vector lengths
|
2019-05-27 12:48:13 +00:00
|
|
|
# ---------------------------------------------------------------
|
2020-01-27 12:21:50 +00:00
|
|
|
# https://github.com/ethereum/eth2.0-specs/blob/v0.10.1/configs/minimal.yaml#L105
|
2019-05-27 12:48:13 +00:00
|
|
|
|
|
|
|
# Changed
|
More 0.8.0 updates (#311)
* replace BeaconState.finalized_{epoch,root} with BeaconState.finalized_checkpoint; rename get_delayed_activation_exit_epoch(...) to compute_activation_exit_epoch(...) and mark as 0.8.0; update get_churn_limit(...)/get_validator_churn_limit(...) to 0.8.0; update process_registry_updates(...) to 0.8.0
* update process_crosslinks(...) to 0.8.0; mark compute_start_slot_of_epoch(...) and get_committee_count(...) as 0.8.0
* mark Fork, is_slashable_validator(...), and get_beacon_proposer_index(...) as 0.8.0
* rename LATEST_SLASHED_EXIT_LENGTH to EPOCHS_PER_SLASHINGS_VECTOR; update process_slashings(...) to 0.8.0; remove pointless type conversion warning in get_previous_epoch(...)
* convert remaining references to finalized_epoch to finalized_checkpoint.epoch
* update slash_validator(...) to 0.8.0; mark inital value, Gwei, and time constants as 0.8.0; mark hash(...) and processBlockHeader(...) as 0.8.0
* rename WHISTLEBLOWING_REWARD_QUOTIENT to WHISTLEBLOWER_REWARD_QUOTIENT; rename LATEST_ACTIVE_INDEX_ROOTS_LENGTH to EPOCHS_PER_HISTORICAL_VECTOR (randao will also get merged into this); remove get_active_index_root(...); mark time parameter, signature domain types, and max operations per block constants as 0.8.0; update rewards and penalties constants to 0.8.0
* update is_valid_indexed_attestation(...) to 0.8.0; mark process_slot(...) as 0.8.0
* replace BeaconState.{current,previous}_justified_{epoch,root} with BeaconState.{current,previous}_justified_checkpoint
2019-07-05 08:30:05 +00:00
|
|
|
EPOCHS_PER_HISTORICAL_VECTOR* = 64
|
|
|
|
EPOCHS_PER_SLASHINGS_VECTOR* = 64
|
2019-07-03 07:35:05 +00:00
|
|
|
HISTORICAL_ROOTS_LIMIT* = 16777216
|
|
|
|
VALIDATOR_REGISTRY_LIMIT* = 1099511627776
|
2019-05-27 12:48:13 +00:00
|
|
|
|
|
|
|
# Reward and penalty quotients
|
|
|
|
# ---------------------------------------------------------------
|
2020-04-01 11:41:39 +00:00
|
|
|
# https://github.com/ethereum/eth2.0-specs/blob/v0.11.1/configs/minimal.yaml#L117
|
2019-05-27 12:48:13 +00:00
|
|
|
|
More 0.8.0 updates (#311)
* replace BeaconState.finalized_{epoch,root} with BeaconState.finalized_checkpoint; rename get_delayed_activation_exit_epoch(...) to compute_activation_exit_epoch(...) and mark as 0.8.0; update get_churn_limit(...)/get_validator_churn_limit(...) to 0.8.0; update process_registry_updates(...) to 0.8.0
* update process_crosslinks(...) to 0.8.0; mark compute_start_slot_of_epoch(...) and get_committee_count(...) as 0.8.0
* mark Fork, is_slashable_validator(...), and get_beacon_proposer_index(...) as 0.8.0
* rename LATEST_SLASHED_EXIT_LENGTH to EPOCHS_PER_SLASHINGS_VECTOR; update process_slashings(...) to 0.8.0; remove pointless type conversion warning in get_previous_epoch(...)
* convert remaining references to finalized_epoch to finalized_checkpoint.epoch
* update slash_validator(...) to 0.8.0; mark inital value, Gwei, and time constants as 0.8.0; mark hash(...) and processBlockHeader(...) as 0.8.0
* rename WHISTLEBLOWING_REWARD_QUOTIENT to WHISTLEBLOWER_REWARD_QUOTIENT; rename LATEST_ACTIVE_INDEX_ROOTS_LENGTH to EPOCHS_PER_HISTORICAL_VECTOR (randao will also get merged into this); remove get_active_index_root(...); mark time parameter, signature domain types, and max operations per block constants as 0.8.0; update rewards and penalties constants to 0.8.0
* update is_valid_indexed_attestation(...) to 0.8.0; mark process_slot(...) as 0.8.0
* replace BeaconState.{current,previous}_justified_{epoch,root} with BeaconState.{current,previous}_justified_checkpoint
2019-07-05 08:30:05 +00:00
|
|
|
BASE_REWARD_FACTOR* = 2'u64^6
|
|
|
|
WHISTLEBLOWER_REWARD_QUOTIENT* = 2'u64^9
|
2019-05-27 12:48:13 +00:00
|
|
|
PROPOSER_REWARD_QUOTIENT* = 2'u64^3
|
|
|
|
INACTIVITY_PENALTY_QUOTIENT* = 2'u64^25
|
0.6.2 updates (#275)
* update process_justification_and_finalization to 0.6.2; mark AttesterSlashing as 0.6.2
* replace get_effective_balance(...) with state.validator_registry[idx].effective_balance; rm get_effective_balance, process_ejections, should_update_validator_registry, update_validator_registry, and update_registry_and_shuffling_data; update get_total_balance to 0.6.2; implement process_registry_updates
* rm exit_validator; implement is_slashable_attestation_data; partly update processAttesterSlashings
* mark HistoricalBatch and Eth1Data as 0.6.2; implement get_shard_delta(...); replace 0.5 finish_epoch_update with 0.6 process_final_updates
* mark increase_balance, decrease_balance, get_delayed_activation_exit_epoch, bls_aggregate_pubkeys, bls_verify_multiple, Attestation, Transfer, slot_to_epoch, Crosslink, get_current_epoch, int_to_bytes*, various constants, processEth1Data, processTransfers, and verifyStateRoot as 0.6.2; rm is_double_vote and is_surround_vote
* mark get_bitfield_bit, verify_bitfield, ProposerSlashing, DepositData, VoluntaryExit, PendingAttestation, Fork, integer_squareroot, get_epoch_start_slot, is_active_validator, generate_seed, some constants to 0.6.2; rename MIN_PENALTY_QUOTIENT to MIN_SLASHING_PENALTY_QUOTIENT
* rm get_previous_total_balance, get_current_epoch_boundary_attestations, get_previous_epoch_boundary_attestations, and get_previous_epoch_matching_head_attestations
* update BeaconState to 0.6.2; simplify legacy get_crosslink_committees_at_slot infrastructure a bit by noting that registry_change is always false; reimplment 0.5 get_crosslink_committees_at_slot in terms of 0.6 get_crosslink_committee
* mark process_deposit(...), get_block_root_at_slot(...), get_block_root(...), Deposit, BeaconBlockHeader, BeaconBlockBody, hash(...), get_active_index_root(...), various constants, get_shard_delta(...), get_epoch_start_shard(...), get_crosslink_committee(...), processRandao(...), processVoluntaryExits(...), cacheState(...) as 0.6.2
* rm removed-since-0.5 split(...), is_power_of_2(...), get_shuffling(...); rm 0.5 versions of get_active_validator_indices and get_epoch_committee_count; add a few tests for integer_squareroot
* mark bytes_to_int(...) and advanceState(...) as 0.6.2
* rm 0.5 get_attesting_indices; update get_attesting_balance to 0.6.2
* another tiny commit to poke AppVeyor to maybe not timeout at connecting to GitHub partway through CI: mark get_churn_limit(...), initiate_validator_exit(...), and Validator as 0.6.2
* mark get_attestation_slot(...), AttestationDataAndCustodyBit, and BeaconBlock as 0.6.2
2019-06-03 10:31:04 +00:00
|
|
|
MIN_SLASHING_PENALTY_QUOTIENT* = 32 # 2^5
|
2019-05-27 12:48:13 +00:00
|
|
|
|
|
|
|
# Max operations per block
|
|
|
|
# ---------------------------------------------------------------
|
2020-04-01 11:41:39 +00:00
|
|
|
# https://github.com/ethereum/eth2.0-specs/blob/v0.11.1/configs/minimal.yaml#L131
|
2019-05-27 12:48:13 +00:00
|
|
|
|
|
|
|
MAX_PROPOSER_SLASHINGS* = 2^4
|
|
|
|
MAX_ATTESTER_SLASHINGS* = 2^0
|
|
|
|
MAX_ATTESTATIONS* = 2^7
|
|
|
|
MAX_DEPOSITS* = 2^4
|
|
|
|
MAX_VOLUNTARY_EXITS* = 2^4
|
|
|
|
|
2019-11-22 19:56:39 +00:00
|
|
|
# Fork choice
|
|
|
|
# ---------------------------------------------------------------
|
2020-01-27 10:56:32 +00:00
|
|
|
# https://github.com/ethereum/eth2.0-specs/blob/v0.10.1/configs/minimal.yaml#L26
|
2019-07-12 14:24:11 +00:00
|
|
|
|
2019-11-22 19:56:39 +00:00
|
|
|
# Changed
|
|
|
|
SAFE_SLOTS_TO_UPDATE_JUSTIFIED* = 2
|
|
|
|
|
|
|
|
# Validators
|
|
|
|
# ---------------------------------------------------------------
|
2020-04-01 11:41:39 +00:00
|
|
|
# https://github.com/ethereum/eth2.0-specs/blob/v0.11.1/configs/minimal.yaml#L38
|
2019-11-22 19:56:39 +00:00
|
|
|
|
|
|
|
# Changed
|
|
|
|
ETH1_FOLLOW_DISTANCE* = 16 # blocks
|
|
|
|
|
|
|
|
# Unchanged
|
|
|
|
TARGET_AGGREGATORS_PER_COMMITTEE* = 16 # validators
|
|
|
|
RANDOM_SUBNETS_PER_VALIDATOR* = 1 # subnet
|
|
|
|
EPOCHS_PER_RANDOM_SUBNET_SUBSCRIPTION* = 256 # epochs ~ 27 hours
|
2020-01-14 17:46:58 +00:00
|
|
|
SECONDS_PER_ETH1_BLOCK* = 14 # estimate from Eth1 mainnet)
|
2019-11-22 19:56:39 +00:00
|
|
|
|
2020-03-14 21:54:45 +00:00
|
|
|
# Phase 1: Upgrade from Phase 0
|
|
|
|
# ---------------------------------------------------------------
|
|
|
|
# https://github.com/ethereum/eth2.0-specs/blob/v0.11.0/configs/minimal.yaml#L161
|
|
|
|
PHASE_1_FORK_VERSION* = 16777217
|
|
|
|
INITIAL_ACTIVE_SHARDS* = 4
|
|
|
|
INITIAL_GASPRICE* = 10
|
|
|
|
|
|
|
|
# Phase 1: General
|
|
|
|
# ---------------------------------------------------------------
|
|
|
|
# https://github.com/ethereum/eth2.0-specs/blob/v0.11.0/configs/minimal.yaml#L171
|
|
|
|
MAX_SHARDS* = 8
|
|
|
|
ONLINE_PERIOD* = 8 # epochs ~ 51 minutes
|
|
|
|
LIGHT_CLIENT_COMMITTEE_SIZE* = 128
|
|
|
|
LIGHT_CLIENT_COMMITTEE_PERIOD* = 256 # epochs
|
|
|
|
SHARD_COMMITTEE_PERIOD* = 256 # epochs
|
|
|
|
SHARD_BLOCK_CHUNK_SIZE* = 262144
|
|
|
|
MAX_SHARD_BLOCK_CHUNKS* = 4
|
|
|
|
TARGET_SHARD_BLOCK_SIZE* = 196608
|
|
|
|
MAX_SHARD_BLOCKS_PER_ATTESTATION* = 12
|
|
|
|
MAX_GASPRICE* = 16384 # Gwei
|
|
|
|
MIN_GASPRICE* = 32 # Gwei
|
|
|
|
GASPRICE_ADJUSTMENT_COEFFICIENT* = 8
|
|
|
|
|
2019-12-10 19:49:42 +00:00
|
|
|
# Phase 1 - Custody game
|
|
|
|
# ---------------------------------------------------------------
|
2020-01-27 12:21:50 +00:00
|
|
|
# https://github.com/ethereum/eth2.0-specs/blob/v0.10.1/specs/phase1/custody-game.md#constants
|
2019-12-10 19:49:42 +00:00
|
|
|
# TODO those are included in minimal.yaml but not mainnet.yaml
|
|
|
|
# Why?
|
2020-03-14 21:54:45 +00:00
|
|
|
RANDAO_PENALTY_EPOCHS* = 2
|
2019-12-10 19:49:42 +00:00
|
|
|
EARLY_DERIVED_SECRET_PENALTY_MAX_FUTURE_EPOCHS* = 4096 # epochs
|
2020-03-14 21:54:45 +00:00
|
|
|
EPOCHS_PER_CUSTODY_PERIOD* = 2048
|
|
|
|
|
|
|
|
# Time parameters
|
|
|
|
# https://github.com/ethereum/eth2.0-specs/blob/v0.11.0/configs/minimal.yaml#L204
|
|
|
|
CUSTODY_PERIOD_TO_RANDAO_PADDING* = 2048
|
|
|
|
MAX_REVEAL_LATENESS_DECREMENT* = 128
|
|
|
|
|
|
|
|
# Max operations
|
|
|
|
# https://github.com/ethereum/eth2.0-specs/blob/v0.11.0/configs/minimal.yaml#L216
|
|
|
|
MAX_CUSTODY_KEY_REVEALS* = 256
|
|
|
|
MAX_EARLY_DERIVED_SECRET_REVEALS* = 1
|
|
|
|
MAX_CUSTODY_SLASHINGS* = 1
|
|
|
|
|
|
|
|
# Reward and penalty quotients
|
|
|
|
# https://github.com/ethereum/eth2.0-specs/blob/v0.11.0/configs/minimal.yaml#L222
|
|
|
|
EARLY_DERIVED_SECRET_REVEAL_SLOT_REWARD_MULTIPLE* = 2
|
|
|
|
MINOR_REWARD_QUOTIENT* = 256
|