mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-22 04:24:05 +00:00
update presets / configs / REST config for v1.1.10 (#3614)
Updated outdated presets / configs / REST config to v1.1.10 specs. - `TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH` and `PROPOSER_SCORE_BOOST` are not yet used in `eth2-networks`, added configurability as TODOs. - `MIN_ANCHOR_POW_BLOCK_DIFFICULTY` is no longer needed, put on ignore list as some Altair devnets still reference it.
This commit is contained in:
parent
138c40161d
commit
fec933432d
@ -105,8 +105,8 @@ func init*(T: type ProtoArray,
|
|||||||
|
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.1.10/specs/phase0/fork-choice.md#configuration
|
# https://github.com/ethereum/consensus-specs/blob/v1.1.10/specs/phase0/fork-choice.md#configuration
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.1.10/specs/phase0/fork-choice.md#get_latest_attesting_balance
|
# https://github.com/ethereum/consensus-specs/blob/v1.1.10/specs/phase0/fork-choice.md#get_latest_attesting_balance
|
||||||
|
const PROPOSER_SCORE_BOOST* = 70
|
||||||
func calculateProposerBoost(validatorBalances: openArray[Gwei]): int64 =
|
func calculateProposerBoost(validatorBalances: openArray[Gwei]): int64 =
|
||||||
const PROPOSER_SCORE_BOOST = 70
|
|
||||||
var
|
var
|
||||||
total_balance: uint64
|
total_balance: uint64
|
||||||
num_validators: int64
|
num_validators: int64
|
||||||
|
@ -9,6 +9,7 @@ import ".."/beacon_node,
|
|||||||
".."/eth1/eth1_monitor,
|
".."/eth1/eth1_monitor,
|
||||||
".."/spec/forks,
|
".."/spec/forks,
|
||||||
"."/rest_utils
|
"."/rest_utils
|
||||||
|
from ../fork_choice/proto_array import PROPOSER_SCORE_BOOST
|
||||||
|
|
||||||
export rest_utils
|
export rest_utils
|
||||||
|
|
||||||
@ -22,10 +23,7 @@ proc installConfigApiHandlers*(router: var RestRouter, node: BeaconNode) =
|
|||||||
cachedConfigSpec =
|
cachedConfigSpec =
|
||||||
RestApiResponse.prepareJsonResponse(
|
RestApiResponse.prepareJsonResponse(
|
||||||
(
|
(
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.0.1/configs/mainnet/phase0.yaml
|
# https://github.com/ethereum/consensus-specs/blob/v1.1.10/presets/mainnet/phase0.yaml
|
||||||
CONFIG_NAME: cfg.name(),
|
|
||||||
|
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.1.3/presets/mainnet/phase0.yaml
|
|
||||||
MAX_COMMITTEES_PER_SLOT:
|
MAX_COMMITTEES_PER_SLOT:
|
||||||
Base10.toString(MAX_COMMITTEES_PER_SLOT),
|
Base10.toString(MAX_COMMITTEES_PER_SLOT),
|
||||||
TARGET_COMMITTEE_SIZE:
|
TARGET_COMMITTEE_SIZE:
|
||||||
@ -93,7 +91,7 @@ proc installConfigApiHandlers*(router: var RestRouter, node: BeaconNode) =
|
|||||||
MAX_VOLUNTARY_EXITS:
|
MAX_VOLUNTARY_EXITS:
|
||||||
Base10.toString(MAX_VOLUNTARY_EXITS),
|
Base10.toString(MAX_VOLUNTARY_EXITS),
|
||||||
|
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.1.4/presets/mainnet/altair.yaml
|
# https://github.com/ethereum/consensus-specs/blob/v1.1.10/presets/mainnet/altair.yaml
|
||||||
INACTIVITY_PENALTY_QUOTIENT_ALTAIR:
|
INACTIVITY_PENALTY_QUOTIENT_ALTAIR:
|
||||||
Base10.toString(INACTIVITY_PENALTY_QUOTIENT_ALTAIR),
|
Base10.toString(INACTIVITY_PENALTY_QUOTIENT_ALTAIR),
|
||||||
MIN_SLASHING_PENALTY_QUOTIENT_ALTAIR:
|
MIN_SLASHING_PENALTY_QUOTIENT_ALTAIR:
|
||||||
@ -106,14 +104,36 @@ proc installConfigApiHandlers*(router: var RestRouter, node: BeaconNode) =
|
|||||||
Base10.toString(EPOCHS_PER_SYNC_COMMITTEE_PERIOD),
|
Base10.toString(EPOCHS_PER_SYNC_COMMITTEE_PERIOD),
|
||||||
MIN_SYNC_COMMITTEE_PARTICIPANTS:
|
MIN_SYNC_COMMITTEE_PARTICIPANTS:
|
||||||
Base10.toString(uint64(MIN_SYNC_COMMITTEE_PARTICIPANTS)),
|
Base10.toString(uint64(MIN_SYNC_COMMITTEE_PARTICIPANTS)),
|
||||||
|
UPDATE_TIMEOUT:
|
||||||
|
Base10.toString(UPDATE_TIMEOUT),
|
||||||
|
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.1.3/configs/mainnet.yaml
|
# https://github.com/ethereum/consensus-specs/blob/v1.1.10/presets/mainnet/bellatrix.yaml
|
||||||
|
INACTIVITY_PENALTY_QUOTIENT_BELLATRIX:
|
||||||
|
Base10.toString(INACTIVITY_PENALTY_QUOTIENT_BELLATRIX),
|
||||||
|
MIN_SLASHING_PENALTY_QUOTIENT_BELLATRIX:
|
||||||
|
Base10.toString(MIN_SLASHING_PENALTY_QUOTIENT_BELLATRIX),
|
||||||
|
PROPORTIONAL_SLASHING_MULTIPLIER_BELLATRIX:
|
||||||
|
Base10.toString(PROPORTIONAL_SLASHING_MULTIPLIER_BELLATRIX),
|
||||||
|
MAX_BYTES_PER_TRANSACTION:
|
||||||
|
Base10.toString(uint64(MAX_BYTES_PER_TRANSACTION)),
|
||||||
|
MAX_TRANSACTIONS_PER_PAYLOAD:
|
||||||
|
Base10.toString(uint64(MAX_TRANSACTIONS_PER_PAYLOAD)),
|
||||||
|
BYTES_PER_LOGS_BLOOM:
|
||||||
|
Base10.toString(uint64(BYTES_PER_LOGS_BLOOM)),
|
||||||
|
MAX_EXTRA_DATA_BYTES:
|
||||||
|
Base10.toString(uint64(MAX_EXTRA_DATA_BYTES)),
|
||||||
|
|
||||||
|
# https://github.com/ethereum/consensus-specs/blob/v1.1.10/configs/mainnet.yaml
|
||||||
PRESET_BASE:
|
PRESET_BASE:
|
||||||
cfg.PRESET_BASE,
|
cfg.PRESET_BASE,
|
||||||
|
CONFIG_NAME:
|
||||||
|
cfg.name(),
|
||||||
TERMINAL_TOTAL_DIFFICULTY:
|
TERMINAL_TOTAL_DIFFICULTY:
|
||||||
toString(cfg.TERMINAL_TOTAL_DIFFICULTY),
|
toString(cfg.TERMINAL_TOTAL_DIFFICULTY),
|
||||||
TERMINAL_BLOCK_HASH:
|
TERMINAL_BLOCK_HASH:
|
||||||
$cfg.TERMINAL_BLOCK_HASH,
|
$cfg.TERMINAL_BLOCK_HASH,
|
||||||
|
TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH:
|
||||||
|
Base10.toString(uint64(TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH)),
|
||||||
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT:
|
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT:
|
||||||
Base10.toString(cfg.MIN_GENESIS_ACTIVE_VALIDATOR_COUNT),
|
Base10.toString(cfg.MIN_GENESIS_ACTIVE_VALIDATOR_COUNT),
|
||||||
MIN_GENESIS_TIME:
|
MIN_GENESIS_TIME:
|
||||||
@ -154,6 +174,8 @@ proc installConfigApiHandlers*(router: var RestRouter, node: BeaconNode) =
|
|||||||
Base10.toString(cfg.MIN_PER_EPOCH_CHURN_LIMIT),
|
Base10.toString(cfg.MIN_PER_EPOCH_CHURN_LIMIT),
|
||||||
CHURN_LIMIT_QUOTIENT:
|
CHURN_LIMIT_QUOTIENT:
|
||||||
Base10.toString(cfg.CHURN_LIMIT_QUOTIENT),
|
Base10.toString(cfg.CHURN_LIMIT_QUOTIENT),
|
||||||
|
PROPOSER_SCORE_BOOST:
|
||||||
|
Base10.toString(uint64(PROPOSER_SCORE_BOOST)),
|
||||||
DEPOSIT_CHAIN_ID:
|
DEPOSIT_CHAIN_ID:
|
||||||
Base10.toString(cfg.DEPOSIT_CHAIN_ID),
|
Base10.toString(cfg.DEPOSIT_CHAIN_ID),
|
||||||
DEPOSIT_NETWORK_ID:
|
DEPOSIT_NETWORK_ID:
|
||||||
@ -230,10 +252,6 @@ proc installConfigApiHandlers*(router: var RestRouter, node: BeaconNode) =
|
|||||||
Base10.toString(uint64(TARGET_AGGREGATORS_PER_SYNC_SUBCOMMITTEE)),
|
Base10.toString(uint64(TARGET_AGGREGATORS_PER_SYNC_SUBCOMMITTEE)),
|
||||||
SYNC_COMMITTEE_SUBNET_COUNT:
|
SYNC_COMMITTEE_SUBNET_COUNT:
|
||||||
Base10.toString(uint64(SYNC_COMMITTEE_SUBNET_COUNT)),
|
Base10.toString(uint64(SYNC_COMMITTEE_SUBNET_COUNT)),
|
||||||
|
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.1.10/specs/bellatrix/beacon-chain.md#transition-settings
|
|
||||||
TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH:
|
|
||||||
Base10.toString(uint64(TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH)),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
cachedDepositContract =
|
cachedDepositContract =
|
||||||
|
@ -74,10 +74,6 @@ const
|
|||||||
INACTIVITY_SCORE_BIAS* = 4
|
INACTIVITY_SCORE_BIAS* = 4
|
||||||
INACTIVITY_SCORE_RECOVERY_RATE* = 16
|
INACTIVITY_SCORE_RECOVERY_RATE* = 16
|
||||||
|
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.1.10/specs/altair/sync-protocol.md#misc
|
|
||||||
# MIN_SYNC_COMMITTEE_PARTICIPANTS defined in presets
|
|
||||||
UPDATE_TIMEOUT* = SLOTS_PER_EPOCH * EPOCHS_PER_SYNC_COMMITTEE_PERIOD
|
|
||||||
|
|
||||||
SYNC_SUBCOMMITTEE_SIZE* = SYNC_COMMITTEE_SIZE div SYNC_COMMITTEE_SUBNET_COUNT
|
SYNC_SUBCOMMITTEE_SIZE* = SYNC_COMMITTEE_SIZE div SYNC_COMMITTEE_SUBNET_COUNT
|
||||||
|
|
||||||
# "Note: The sum of the weights equal WEIGHT_DENOMINATOR."
|
# "Note: The sum of the weights equal WEIGHT_DENOMINATOR."
|
||||||
|
@ -243,10 +243,7 @@ type
|
|||||||
of BeaconBlockFork.Bellatrix: bellatrixBody*: bellatrix.BeaconBlockBody
|
of BeaconBlockFork.Bellatrix: bellatrixBody*: bellatrix.BeaconBlockBody
|
||||||
|
|
||||||
RestSpec* = object
|
RestSpec* = object
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.0.1/configs/mainnet/phase0.yaml
|
# https://github.com/ethereum/consensus-specs/blob/v1.1.10/presets/mainnet/phase0.yaml
|
||||||
CONFIG_NAME*: string
|
|
||||||
|
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.1.3/presets/mainnet/phase0.yaml
|
|
||||||
MAX_COMMITTEES_PER_SLOT*: uint64
|
MAX_COMMITTEES_PER_SLOT*: uint64
|
||||||
TARGET_COMMITTEE_SIZE*: uint64
|
TARGET_COMMITTEE_SIZE*: uint64
|
||||||
MAX_VALIDATORS_PER_COMMITTEE*: uint64
|
MAX_VALIDATORS_PER_COMMITTEE*: uint64
|
||||||
@ -281,18 +278,30 @@ type
|
|||||||
MAX_DEPOSITS*: uint64
|
MAX_DEPOSITS*: uint64
|
||||||
MAX_VOLUNTARY_EXITS*: uint64
|
MAX_VOLUNTARY_EXITS*: uint64
|
||||||
|
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.1.3/presets/mainnet/altair.yaml
|
# https://github.com/ethereum/consensus-specs/blob/v1.1.10/presets/mainnet/altair.yaml
|
||||||
INACTIVITY_PENALTY_QUOTIENT_ALTAIR*: uint64
|
INACTIVITY_PENALTY_QUOTIENT_ALTAIR*: uint64
|
||||||
MIN_SLASHING_PENALTY_QUOTIENT_ALTAIR*: uint64
|
MIN_SLASHING_PENALTY_QUOTIENT_ALTAIR*: uint64
|
||||||
PROPORTIONAL_SLASHING_MULTIPLIER_ALTAIR*: uint64
|
PROPORTIONAL_SLASHING_MULTIPLIER_ALTAIR*: uint64
|
||||||
SYNC_COMMITTEE_SIZE*: uint64
|
SYNC_COMMITTEE_SIZE*: uint64
|
||||||
EPOCHS_PER_SYNC_COMMITTEE_PERIOD*: uint64
|
EPOCHS_PER_SYNC_COMMITTEE_PERIOD*: uint64
|
||||||
MIN_SYNC_COMMITTEE_PARTICIPANTS*: uint64
|
MIN_SYNC_COMMITTEE_PARTICIPANTS*: uint64
|
||||||
|
UPDATE_TIMEOUT*: uint64
|
||||||
|
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.1.3/configs/mainnet.yaml
|
# https://github.com/ethereum/consensus-specs/blob/v1.1.10/presets/mainnet/bellatrix.yaml
|
||||||
|
INACTIVITY_PENALTY_QUOTIENT_BELLATRIX*: uint64
|
||||||
|
MIN_SLASHING_PENALTY_QUOTIENT_BELLATRIX*: uint64
|
||||||
|
PROPORTIONAL_SLASHING_MULTIPLIER_BELLATRIX*: uint64
|
||||||
|
MAX_BYTES_PER_TRANSACTION*: uint64
|
||||||
|
MAX_TRANSACTIONS_PER_PAYLOAD*: uint64
|
||||||
|
BYTES_PER_LOGS_BLOOM*: uint64
|
||||||
|
MAX_EXTRA_DATA_BYTES*: uint64
|
||||||
|
|
||||||
|
# https://github.com/ethereum/consensus-specs/blob/v1.1.10/configs/mainnet.yaml
|
||||||
PRESET_BASE*: string
|
PRESET_BASE*: string
|
||||||
|
CONFIG_NAME*: string
|
||||||
TERMINAL_TOTAL_DIFFICULTY*: UInt256
|
TERMINAL_TOTAL_DIFFICULTY*: UInt256
|
||||||
TERMINAL_BLOCK_HASH*: BlockHash
|
TERMINAL_BLOCK_HASH*: BlockHash
|
||||||
|
TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH*: uint64
|
||||||
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT*: uint64
|
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT*: uint64
|
||||||
MIN_GENESIS_TIME*: uint64
|
MIN_GENESIS_TIME*: uint64
|
||||||
GENESIS_FORK_VERSION*: Version
|
GENESIS_FORK_VERSION*: Version
|
||||||
@ -313,6 +322,7 @@ type
|
|||||||
EJECTION_BALANCE*: uint64
|
EJECTION_BALANCE*: uint64
|
||||||
MIN_PER_EPOCH_CHURN_LIMIT*: uint64
|
MIN_PER_EPOCH_CHURN_LIMIT*: uint64
|
||||||
CHURN_LIMIT_QUOTIENT*: uint64
|
CHURN_LIMIT_QUOTIENT*: uint64
|
||||||
|
PROPOSER_SCORE_BOOST*: uint64
|
||||||
DEPOSIT_CHAIN_ID*: uint64
|
DEPOSIT_CHAIN_ID*: uint64
|
||||||
DEPOSIT_NETWORK_ID*: uint64
|
DEPOSIT_NETWORK_ID*: uint64
|
||||||
DEPOSIT_CONTRACT_ADDRESS*: Eth1Address
|
DEPOSIT_CONTRACT_ADDRESS*: Eth1Address
|
||||||
|
@ -29,15 +29,14 @@ type
|
|||||||
Eth1Address* = ethtypes.Address
|
Eth1Address* = ethtypes.Address
|
||||||
|
|
||||||
RuntimeConfig* = object
|
RuntimeConfig* = object
|
||||||
## https://github.com/ethereum/consensus-specs/tree/v1.1.3/configs
|
## https://github.com/ethereum/consensus-specs/tree/v1.1.10/configs
|
||||||
|
|
||||||
PRESET_BASE*: string
|
PRESET_BASE*: string
|
||||||
|
|
||||||
CONFIG_NAME*: string
|
CONFIG_NAME*: string
|
||||||
|
|
||||||
# Transition
|
# Transition
|
||||||
TERMINAL_TOTAL_DIFFICULTY*: UInt256
|
TERMINAL_TOTAL_DIFFICULTY*: UInt256
|
||||||
TERMINAL_BLOCK_HASH*: BlockHash
|
TERMINAL_BLOCK_HASH*: BlockHash
|
||||||
|
# TODO TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH*: Epoch
|
||||||
|
|
||||||
# Genesis
|
# Genesis
|
||||||
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT*: uint64
|
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT*: uint64
|
||||||
@ -45,32 +44,32 @@ type
|
|||||||
GENESIS_FORK_VERSION*: Version
|
GENESIS_FORK_VERSION*: Version
|
||||||
GENESIS_DELAY*: uint64
|
GENESIS_DELAY*: uint64
|
||||||
|
|
||||||
# Altair
|
# Forking
|
||||||
ALTAIR_FORK_VERSION*: Version
|
ALTAIR_FORK_VERSION*: Version
|
||||||
ALTAIR_FORK_EPOCH*: Epoch
|
ALTAIR_FORK_EPOCH*: Epoch
|
||||||
|
|
||||||
# Merge
|
|
||||||
BELLATRIX_FORK_VERSION*: Version
|
BELLATRIX_FORK_VERSION*: Version
|
||||||
BELLATRIX_FORK_EPOCH*: Epoch
|
BELLATRIX_FORK_EPOCH*: Epoch
|
||||||
|
|
||||||
# Sharding
|
|
||||||
SHARDING_FORK_VERSION*: Version
|
SHARDING_FORK_VERSION*: Version
|
||||||
SHARDING_FORK_EPOCH*: Epoch
|
SHARDING_FORK_EPOCH*: Epoch
|
||||||
|
|
||||||
MIN_ANCHOR_POW_BLOCK_DIFFICULTY*: uint64
|
# Time parameters
|
||||||
|
|
||||||
# TODO SECONDS_PER_SLOT*: uint64
|
# TODO SECONDS_PER_SLOT*: uint64
|
||||||
SECONDS_PER_ETH1_BLOCK*: uint64
|
SECONDS_PER_ETH1_BLOCK*: uint64
|
||||||
MIN_VALIDATOR_WITHDRAWABILITY_DELAY*: uint64
|
MIN_VALIDATOR_WITHDRAWABILITY_DELAY*: uint64
|
||||||
SHARD_COMMITTEE_PERIOD*: uint64
|
SHARD_COMMITTEE_PERIOD*: uint64
|
||||||
ETH1_FOLLOW_DISTANCE*: uint64
|
ETH1_FOLLOW_DISTANCE*: uint64
|
||||||
|
|
||||||
|
# Validator cycle
|
||||||
INACTIVITY_SCORE_BIAS*: uint64
|
INACTIVITY_SCORE_BIAS*: uint64
|
||||||
INACTIVITY_SCORE_RECOVERY_RATE*: uint64
|
INACTIVITY_SCORE_RECOVERY_RATE*: uint64
|
||||||
EJECTION_BALANCE*: uint64
|
EJECTION_BALANCE*: uint64
|
||||||
MIN_PER_EPOCH_CHURN_LIMIT*: uint64
|
MIN_PER_EPOCH_CHURN_LIMIT*: uint64
|
||||||
CHURN_LIMIT_QUOTIENT*: uint64
|
CHURN_LIMIT_QUOTIENT*: uint64
|
||||||
|
|
||||||
|
# Fork choice
|
||||||
|
# TODO PROPOSER_SCORE_BOOST*: uint64
|
||||||
|
|
||||||
|
# Deposit contract
|
||||||
DEPOSIT_CHAIN_ID*: uint64
|
DEPOSIT_CHAIN_ID*: uint64
|
||||||
DEPOSIT_NETWORK_ID*: uint64
|
DEPOSIT_NETWORK_ID*: uint64
|
||||||
DEPOSIT_CONTRACT_ADDRESS*: Eth1Address
|
DEPOSIT_CONTRACT_ADDRESS*: Eth1Address
|
||||||
@ -148,6 +147,7 @@ const
|
|||||||
"DOMAIN_CONTRIBUTION_AND_PROOF",
|
"DOMAIN_CONTRIBUTION_AND_PROOF",
|
||||||
|
|
||||||
"TRANSITION_TOTAL_DIFFICULTY", # Name that appears in some altair alphas, obsolete, remove when no more testnets
|
"TRANSITION_TOTAL_DIFFICULTY", # Name that appears in some altair alphas, obsolete, remove when no more testnets
|
||||||
|
"MIN_ANCHOR_POW_BLOCK_DIFFICULTY", # Name that appears in some altair alphas, obsolete, remove when no more testnets
|
||||||
]
|
]
|
||||||
|
|
||||||
when const_preset == "mainnet":
|
when const_preset == "mainnet":
|
||||||
@ -157,19 +157,32 @@ when const_preset == "mainnet":
|
|||||||
# TODO Move this to RuntimeConfig
|
# TODO Move this to RuntimeConfig
|
||||||
const SECONDS_PER_SLOT* {.intdefine.}: uint64 = 12
|
const SECONDS_PER_SLOT* {.intdefine.}: uint64 = 12
|
||||||
|
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.1.3/configs/mainnet.yaml
|
# https://github.com/ethereum/consensus-specs/blob/v1.1.10/configs/mainnet.yaml
|
||||||
# TODO Read these from yaml file
|
# TODO Read these from yaml file
|
||||||
const defaultRuntimeConfig* = RuntimeConfig(
|
const defaultRuntimeConfig* = RuntimeConfig(
|
||||||
|
# Mainnet config
|
||||||
|
|
||||||
|
# Extends the mainnet preset
|
||||||
PRESET_BASE: "mainnet",
|
PRESET_BASE: "mainnet",
|
||||||
|
|
||||||
|
# Free-form short name of the network that this configuration applies to - known
|
||||||
|
# canonical network names include:
|
||||||
|
# * 'mainnet' - there can be only one
|
||||||
|
# * 'prater' - testnet
|
||||||
|
# Must match the regex: [a-z0-9\-]
|
||||||
|
CONFIG_NAME: "mainnet",
|
||||||
|
|
||||||
# Transition
|
# Transition
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# TBD, 2**256-2**10 is a placeholder
|
# TBD, 2**256-2**10 is a placeholder
|
||||||
TERMINAL_TOTAL_DIFFICULTY:
|
TERMINAL_TOTAL_DIFFICULTY:
|
||||||
u256"115792089237316195423570985008687907853269984665640564039457584007913129638912",
|
u256"115792089237316195423570985008687907853269984665640564039457584007913129638912",
|
||||||
# By default, don't use this param
|
# By default, don't use these params
|
||||||
TERMINAL_BLOCK_HASH: BlockHash.fromHex(
|
TERMINAL_BLOCK_HASH: BlockHash.fromHex(
|
||||||
"0x0000000000000000000000000000000000000000000000000000000000000000"),
|
"0x0000000000000000000000000000000000000000000000000000000000000000"),
|
||||||
|
# TODO TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: Epoch(uint64.high),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Genesis
|
# Genesis
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
@ -192,16 +205,13 @@ when const_preset == "mainnet":
|
|||||||
# Altair
|
# Altair
|
||||||
ALTAIR_FORK_VERSION: Version [byte 0x01, 0x00, 0x00, 0x00],
|
ALTAIR_FORK_VERSION: Version [byte 0x01, 0x00, 0x00, 0x00],
|
||||||
ALTAIR_FORK_EPOCH: Epoch(74240), # Oct 27, 2021, 10:56:23am UTC
|
ALTAIR_FORK_EPOCH: Epoch(74240), # Oct 27, 2021, 10:56:23am UTC
|
||||||
# Merge
|
# Bellatrix
|
||||||
BELLATRIX_FORK_VERSION: Version [byte 0x02, 0x00, 0x00, 0x00],
|
BELLATRIX_FORK_VERSION: Version [byte 0x02, 0x00, 0x00, 0x00],
|
||||||
BELLATRIX_FORK_EPOCH: Epoch(uint64.high),
|
BELLATRIX_FORK_EPOCH: Epoch(uint64.high),
|
||||||
# Sharding
|
# Sharding
|
||||||
SHARDING_FORK_VERSION: Version [byte 0x03, 0x00, 0x00, 0x00],
|
SHARDING_FORK_VERSION: Version [byte 0x03, 0x00, 0x00, 0x00],
|
||||||
SHARDING_FORK_EPOCH: Epoch(uint64.high),
|
SHARDING_FORK_EPOCH: Epoch(uint64.high),
|
||||||
|
|
||||||
# TBD, 2**32 is a placeholder. Merge transition approach is in active R&D.
|
|
||||||
MIN_ANCHOR_POW_BLOCK_DIFFICULTY: 4294967296'u64,
|
|
||||||
|
|
||||||
|
|
||||||
# Time parameters
|
# Time parameters
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
@ -231,6 +241,11 @@ when const_preset == "mainnet":
|
|||||||
CHURN_LIMIT_QUOTIENT: 65536,
|
CHURN_LIMIT_QUOTIENT: 65536,
|
||||||
|
|
||||||
|
|
||||||
|
# Fork choice
|
||||||
|
# ---------------------------------------------------------------
|
||||||
|
# 70%
|
||||||
|
# TODO PROPOSER_SCORE_BOOST: 70,
|
||||||
|
|
||||||
# Deposit contract
|
# Deposit contract
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# Ethereum PoW Mainnet
|
# Ethereum PoW Mainnet
|
||||||
@ -245,21 +260,31 @@ elif const_preset == "minimal":
|
|||||||
|
|
||||||
const SECONDS_PER_SLOT* {.intdefine.}: uint64 = 6
|
const SECONDS_PER_SLOT* {.intdefine.}: uint64 = 6
|
||||||
|
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.1.3/configs/minimal.yaml
|
# https://github.com/ethereum/consensus-specs/blob/v1.1.10/configs/minimal.yaml
|
||||||
const defaultRuntimeConfig* = RuntimeConfig(
|
const defaultRuntimeConfig* = RuntimeConfig(
|
||||||
# Minimal config
|
# Minimal config
|
||||||
|
|
||||||
# Extends the minimal preset
|
# Extends the minimal preset
|
||||||
PRESET_BASE: "minimal",
|
PRESET_BASE: "minimal",
|
||||||
|
|
||||||
|
# Free-form short name of the network that this configuration applies to - known
|
||||||
|
# canonical network names include:
|
||||||
|
# * 'mainnet' - there can be only one
|
||||||
|
# * 'prater' - testnet
|
||||||
|
# Must match the regex: [a-z0-9\-]
|
||||||
|
CONFIG_NAME: "minimal",
|
||||||
|
|
||||||
# Transition
|
# Transition
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# TBD, 2**256-2**10 is a placeholder
|
# TBD, 2**256-2**10 is a placeholder
|
||||||
TERMINAL_TOTAL_DIFFICULTY:
|
TERMINAL_TOTAL_DIFFICULTY:
|
||||||
u256"115792089237316195423570985008687907853269984665640564039457584007913129638912",
|
u256"115792089237316195423570985008687907853269984665640564039457584007913129638912",
|
||||||
# By default, don't use this param
|
# By default, don't use these params
|
||||||
TERMINAL_BLOCK_HASH: BlockHash.fromHex(
|
TERMINAL_BLOCK_HASH: BlockHash.fromHex(
|
||||||
"0x0000000000000000000000000000000000000000000000000000000000000000"),
|
"0x0000000000000000000000000000000000000000000000000000000000000000"),
|
||||||
|
# TODO TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: Epoch(uint64.high),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Genesis
|
# Genesis
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
@ -281,16 +306,13 @@ elif const_preset == "minimal":
|
|||||||
# Altair
|
# Altair
|
||||||
ALTAIR_FORK_VERSION: Version [byte 0x01, 0x00, 0x00, 0x01],
|
ALTAIR_FORK_VERSION: Version [byte 0x01, 0x00, 0x00, 0x01],
|
||||||
ALTAIR_FORK_EPOCH: Epoch(uint64.high),
|
ALTAIR_FORK_EPOCH: Epoch(uint64.high),
|
||||||
# Merge
|
# Bellatrix
|
||||||
BELLATRIX_FORK_VERSION: Version [byte 0x02, 0x00, 0x00, 0x01],
|
BELLATRIX_FORK_VERSION: Version [byte 0x02, 0x00, 0x00, 0x01],
|
||||||
BELLATRIX_FORK_EPOCH: Epoch(uint64.high),
|
BELLATRIX_FORK_EPOCH: Epoch(uint64.high),
|
||||||
# Sharding
|
# Sharding
|
||||||
SHARDING_FORK_VERSION: Version [byte 0x03, 0x00, 0x00, 0x01],
|
SHARDING_FORK_VERSION: Version [byte 0x03, 0x00, 0x00, 0x01],
|
||||||
SHARDING_FORK_EPOCH: Epoch(uint64.high),
|
SHARDING_FORK_EPOCH: Epoch(uint64.high),
|
||||||
|
|
||||||
# TBD, 2**32 is a placeholder. Merge transition approach is in active R&D.
|
|
||||||
MIN_ANCHOR_POW_BLOCK_DIFFICULTY: 4294967296'u64,
|
|
||||||
|
|
||||||
|
|
||||||
# Time parameters
|
# Time parameters
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
@ -320,6 +342,12 @@ elif const_preset == "minimal":
|
|||||||
CHURN_LIMIT_QUOTIENT: 32,
|
CHURN_LIMIT_QUOTIENT: 32,
|
||||||
|
|
||||||
|
|
||||||
|
# Fork choice
|
||||||
|
# ---------------------------------------------------------------
|
||||||
|
# 70%
|
||||||
|
# TODO PROPOSER_SCORE_BOOST: 70,
|
||||||
|
|
||||||
|
|
||||||
# Deposit contract
|
# Deposit contract
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# Ethereum Goerli testnet
|
# Ethereum Goerli testnet
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Mainnet preset - Altair
|
# Mainnet preset - Altair
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.1.3/presets/mainnet/altair.yaml
|
# https://github.com/ethereum/consensus-specs/blob/v1.1.10/presets/mainnet/altair.yaml
|
||||||
const
|
const
|
||||||
# Updated penalty values
|
# Updated penalty values
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
@ -23,3 +23,5 @@ const
|
|||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# 1
|
# 1
|
||||||
MIN_SYNC_COMMITTEE_PARTICIPANTS* = 1
|
MIN_SYNC_COMMITTEE_PARTICIPANTS* = 1
|
||||||
|
# SLOTS_PER_EPOCH * EPOCHS_PER_SYNC_COMMITTEE_PERIOD (= 32 * 256)
|
||||||
|
UPDATE_TIMEOUT*: uint64 = 8192
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Minimal preset - Altair
|
# Minimal preset - Altair
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.1.6/presets/minimal/altair.yaml
|
# https://github.com/ethereum/consensus-specs/blob/v1.1.10/presets/minimal/altair.yaml
|
||||||
const
|
const
|
||||||
# Updated penalty values
|
# Updated penalty values
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
@ -13,9 +13,9 @@ const
|
|||||||
|
|
||||||
# Sync committee
|
# Sync committee
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# customized
|
# [customized]
|
||||||
SYNC_COMMITTEE_SIZE* = 32
|
SYNC_COMMITTEE_SIZE* = 32
|
||||||
# customized
|
# [customized]
|
||||||
EPOCHS_PER_SYNC_COMMITTEE_PERIOD* {.intdefine.}: uint64 = 8
|
EPOCHS_PER_SYNC_COMMITTEE_PERIOD* {.intdefine.}: uint64 = 8
|
||||||
|
|
||||||
|
|
||||||
@ -23,3 +23,5 @@ const
|
|||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# 1
|
# 1
|
||||||
MIN_SYNC_COMMITTEE_PARTICIPANTS* = 1
|
MIN_SYNC_COMMITTEE_PARTICIPANTS* = 1
|
||||||
|
# SLOTS_PER_EPOCH * EPOCHS_PER_SYNC_COMMITTEE_PERIOD (= 8 * 8)
|
||||||
|
UPDATE_TIMEOUT*: uint64 = 64
|
||||||
|
@ -2646,7 +2646,7 @@
|
|||||||
"response": {
|
"response": {
|
||||||
"status": {"operator": "equals", "value": "200"},
|
"status": {"operator": "equals", "value": "200"},
|
||||||
"headers": [{"key": "Content-Type", "value": "application/json", "operator": "equals"}],
|
"headers": [{"key": "Content-Type", "value": "application/json", "operator": "equals"}],
|
||||||
"body": [{"operator": "jstructcmps", "start": ["data"], "value": {"CONFIG_NAME":"","MAX_COMMITTEES_PER_SLOT":"","TARGET_COMMITTEE_SIZE":"","MAX_VALIDATORS_PER_COMMITTEE":"","SHUFFLE_ROUND_COUNT":"","HYSTERESIS_QUOTIENT":"","HYSTERESIS_DOWNWARD_MULTIPLIER":"","HYSTERESIS_UPWARD_MULTIPLIER":"","SAFE_SLOTS_TO_UPDATE_JUSTIFIED":"","MIN_DEPOSIT_AMOUNT":"","MAX_EFFECTIVE_BALANCE":"","EFFECTIVE_BALANCE_INCREMENT":"","MIN_ATTESTATION_INCLUSION_DELAY":"","SLOTS_PER_EPOCH":"","MIN_SEED_LOOKAHEAD":"","MAX_SEED_LOOKAHEAD":"","EPOCHS_PER_ETH1_VOTING_PERIOD":"","SLOTS_PER_HISTORICAL_ROOT":"","MIN_EPOCHS_TO_INACTIVITY_PENALTY":"","EPOCHS_PER_HISTORICAL_VECTOR":"","EPOCHS_PER_SLASHINGS_VECTOR":"","HISTORICAL_ROOTS_LIMIT":"","VALIDATOR_REGISTRY_LIMIT":"","BASE_REWARD_FACTOR":"","WHISTLEBLOWER_REWARD_QUOTIENT":"","PROPOSER_REWARD_QUOTIENT":"","INACTIVITY_PENALTY_QUOTIENT":"","MIN_SLASHING_PENALTY_QUOTIENT":"","PROPORTIONAL_SLASHING_MULTIPLIER":"","MAX_PROPOSER_SLASHINGS":"","MAX_ATTESTER_SLASHINGS":"","MAX_ATTESTATIONS":"","MAX_DEPOSITS":"","MAX_VOLUNTARY_EXITS":"","INACTIVITY_PENALTY_QUOTIENT_ALTAIR":"","MIN_SLASHING_PENALTY_QUOTIENT_ALTAIR":"","PROPORTIONAL_SLASHING_MULTIPLIER_ALTAIR":"","SYNC_COMMITTEE_SIZE":"","EPOCHS_PER_SYNC_COMMITTEE_PERIOD":"","MIN_SYNC_COMMITTEE_PARTICIPANTS":"","PRESET_BASE":"","TERMINAL_TOTAL_DIFFICULTY":"","TERMINAL_BLOCK_HASH":"","MIN_GENESIS_ACTIVE_VALIDATOR_COUNT":"","MIN_GENESIS_TIME":"","GENESIS_FORK_VERSION":"","GENESIS_DELAY":"","ALTAIR_FORK_VERSION":"","ALTAIR_FORK_EPOCH":"","BELLATRIX_FORK_VERSION":"","BELLATRIX_FORK_EPOCH":"","SHARDING_FORK_VERSION":"","SHARDING_FORK_EPOCH":"","SECONDS_PER_SLOT":"","SECONDS_PER_ETH1_BLOCK":"","MIN_VALIDATOR_WITHDRAWABILITY_DELAY":"","SHARD_COMMITTEE_PERIOD":"","ETH1_FOLLOW_DISTANCE":"","INACTIVITY_SCORE_BIAS":"","INACTIVITY_SCORE_RECOVERY_RATE":"","EJECTION_BALANCE":"","MIN_PER_EPOCH_CHURN_LIMIT":"","CHURN_LIMIT_QUOTIENT":"","DEPOSIT_CHAIN_ID":"","DEPOSIT_NETWORK_ID":"","DEPOSIT_CONTRACT_ADDRESS":"","BLS_WITHDRAWAL_PREFIX":"","ETH1_ADDRESS_WITHDRAWAL_PREFIX":"","DOMAIN_BEACON_PROPOSER":"","DOMAIN_BEACON_ATTESTER":"","DOMAIN_RANDAO":"","DOMAIN_DEPOSIT":"","DOMAIN_VOLUNTARY_EXIT":"","DOMAIN_SELECTION_PROOF":"","DOMAIN_AGGREGATE_AND_PROOF":"","TIMELY_SOURCE_FLAG_INDEX":"","TIMELY_TARGET_FLAG_INDEX":"","TIMELY_HEAD_FLAG_INDEX":"","TIMELY_SOURCE_WEIGHT":"","TIMELY_TARGET_WEIGHT":"","TIMELY_HEAD_WEIGHT":"","SYNC_REWARD_WEIGHT":"","PROPOSER_WEIGHT":"","WEIGHT_DENOMINATOR":"","DOMAIN_SYNC_COMMITTEE":"","DOMAIN_SYNC_COMMITTEE_SELECTION_PROOF":"","DOMAIN_CONTRIBUTION_AND_PROOF":"","TARGET_AGGREGATORS_PER_COMMITTEE":"","RANDOM_SUBNETS_PER_VALIDATOR":"","EPOCHS_PER_RANDOM_SUBNET_SUBSCRIPTION":"","ATTESTATION_SUBNET_COUNT":"","TARGET_AGGREGATORS_PER_SYNC_SUBCOMMITTEE":"","SYNC_COMMITTEE_SUBNET_COUNT":"","TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH":""}}]
|
"body": [{"operator": "jstructcmps", "start": ["data"], "value": {"MAX_COMMITTEES_PER_SLOT":"","TARGET_COMMITTEE_SIZE":"","MAX_VALIDATORS_PER_COMMITTEE":"","SHUFFLE_ROUND_COUNT":"","HYSTERESIS_QUOTIENT":"","HYSTERESIS_DOWNWARD_MULTIPLIER":"","HYSTERESIS_UPWARD_MULTIPLIER":"","SAFE_SLOTS_TO_UPDATE_JUSTIFIED":"","MIN_DEPOSIT_AMOUNT":"","MAX_EFFECTIVE_BALANCE":"","EFFECTIVE_BALANCE_INCREMENT":"","MIN_ATTESTATION_INCLUSION_DELAY":"","SLOTS_PER_EPOCH":"","MIN_SEED_LOOKAHEAD":"","MAX_SEED_LOOKAHEAD":"","EPOCHS_PER_ETH1_VOTING_PERIOD":"","SLOTS_PER_HISTORICAL_ROOT":"","MIN_EPOCHS_TO_INACTIVITY_PENALTY":"","EPOCHS_PER_HISTORICAL_VECTOR":"","EPOCHS_PER_SLASHINGS_VECTOR":"","HISTORICAL_ROOTS_LIMIT":"","VALIDATOR_REGISTRY_LIMIT":"","BASE_REWARD_FACTOR":"","WHISTLEBLOWER_REWARD_QUOTIENT":"","PROPOSER_REWARD_QUOTIENT":"","INACTIVITY_PENALTY_QUOTIENT":"","MIN_SLASHING_PENALTY_QUOTIENT":"","PROPORTIONAL_SLASHING_MULTIPLIER":"","MAX_PROPOSER_SLASHINGS":"","MAX_ATTESTER_SLASHINGS":"","MAX_ATTESTATIONS":"","MAX_DEPOSITS":"","MAX_VOLUNTARY_EXITS":"","INACTIVITY_PENALTY_QUOTIENT_ALTAIR":"","MIN_SLASHING_PENALTY_QUOTIENT_ALTAIR":"","PROPORTIONAL_SLASHING_MULTIPLIER_ALTAIR":"","SYNC_COMMITTEE_SIZE":"","EPOCHS_PER_SYNC_COMMITTEE_PERIOD":"","MIN_SYNC_COMMITTEE_PARTICIPANTS":"","UPDATE_TIMEOUT":"","INACTIVITY_PENALTY_QUOTIENT_BELLATRIX":"","MIN_SLASHING_PENALTY_QUOTIENT_BELLATRIX":"","PROPORTIONAL_SLASHING_MULTIPLIER_BELLATRIX":"","MAX_BYTES_PER_TRANSACTION":"","MAX_TRANSACTIONS_PER_PAYLOAD":"","BYTES_PER_LOGS_BLOOM":"","MAX_EXTRA_DATA_BYTES":"","PRESET_BASE":"","CONFIG_NAME":"","TERMINAL_TOTAL_DIFFICULTY":"","TERMINAL_BLOCK_HASH":"","TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH":"","MIN_GENESIS_ACTIVE_VALIDATOR_COUNT":"","MIN_GENESIS_TIME":"","GENESIS_FORK_VERSION":"","GENESIS_DELAY":"","ALTAIR_FORK_VERSION":"","ALTAIR_FORK_EPOCH":"","BELLATRIX_FORK_VERSION":"","BELLATRIX_FORK_EPOCH":"","SHARDING_FORK_VERSION":"","SHARDING_FORK_EPOCH":"","SECONDS_PER_SLOT":"","SECONDS_PER_ETH1_BLOCK":"","MIN_VALIDATOR_WITHDRAWABILITY_DELAY":"","SHARD_COMMITTEE_PERIOD":"","ETH1_FOLLOW_DISTANCE":"","INACTIVITY_SCORE_BIAS":"","INACTIVITY_SCORE_RECOVERY_RATE":"","EJECTION_BALANCE":"","MIN_PER_EPOCH_CHURN_LIMIT":"","CHURN_LIMIT_QUOTIENT":"","PROPOSER_SCORE_BOOST":"","DEPOSIT_CHAIN_ID":"","DEPOSIT_NETWORK_ID":"","DEPOSIT_CONTRACT_ADDRESS":"","BLS_WITHDRAWAL_PREFIX":"","ETH1_ADDRESS_WITHDRAWAL_PREFIX":"","DOMAIN_BEACON_PROPOSER":"","DOMAIN_BEACON_ATTESTER":"","DOMAIN_RANDAO":"","DOMAIN_DEPOSIT":"","DOMAIN_VOLUNTARY_EXIT":"","DOMAIN_SELECTION_PROOF":"","DOMAIN_AGGREGATE_AND_PROOF":"","TIMELY_SOURCE_FLAG_INDEX":"","TIMELY_TARGET_FLAG_INDEX":"","TIMELY_HEAD_FLAG_INDEX":"","TIMELY_SOURCE_WEIGHT":"","TIMELY_TARGET_WEIGHT":"","TIMELY_HEAD_WEIGHT":"","SYNC_REWARD_WEIGHT":"","PROPOSER_WEIGHT":"","WEIGHT_DENOMINATOR":"","DOMAIN_SYNC_COMMITTEE":"","DOMAIN_SYNC_COMMITTEE_SELECTION_PROOF":"","DOMAIN_CONTRIBUTION_AND_PROOF":"","TARGET_AGGREGATORS_PER_COMMITTEE":"","RANDOM_SUBNETS_PER_VALIDATOR":"","EPOCHS_PER_RANDOM_SUBNET_SUBSCRIPTION":"","ATTESTATION_SUBNET_COUNT":"","TARGET_AGGREGATORS_PER_SYNC_SUBCOMMITTEE":"","SYNC_COMMITTEE_SUBNET_COUNT":""}}]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user