mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-11 14:54:12 +00:00
rename MERGE_FORK_VERSION to BELLATRIX_FORK_VERSION
This commit is contained in:
parent
57abb07e4e
commit
9699858422
@ -522,8 +522,8 @@ proc init*(T: type ChainDAGRef, cfg: RuntimeConfig, db: BeaconChainDB,
|
||||
)
|
||||
|
||||
let forkVersions =
|
||||
[cfg.GENESIS_FORK_VERSION, cfg.ALTAIR_FORK_VERSION, cfg.MERGE_FORK_VERSION,
|
||||
cfg.SHARDING_FORK_VERSION]
|
||||
[cfg.GENESIS_FORK_VERSION, cfg.ALTAIR_FORK_VERSION,
|
||||
cfg.BELLATRIX_FORK_VERSION, cfg.SHARDING_FORK_VERSION]
|
||||
for i in 0 ..< forkVersions.len:
|
||||
for j in i+1 ..< forkVersions.len:
|
||||
doAssert forkVersions[i] != forkVersions[j]
|
||||
|
@ -125,8 +125,8 @@ proc installConfigApiHandlers*(router: var RestRouter, node: BeaconNode) =
|
||||
"0x" & $node.dag.cfg.ALTAIR_FORK_VERSION,
|
||||
ALTAIR_FORK_EPOCH:
|
||||
Base10.toString(uint64(node.dag.cfg.ALTAIR_FORK_EPOCH)),
|
||||
MERGE_FORK_VERSION:
|
||||
"0x" & $node.dag.cfg.MERGE_FORK_VERSION,
|
||||
BELLATRIX_FORK_VERSION:
|
||||
"0x" & $node.dag.cfg.BELLATRIX_FORK_VERSION,
|
||||
MERGE_FORK_EPOCH:
|
||||
Base10.toString(uint64(node.dag.cfg.MERGE_FORK_EPOCH)),
|
||||
SHARDING_FORK_VERSION:
|
||||
|
@ -870,7 +870,7 @@ func upgrade_to_bellatrix*(cfg: RuntimeConfig, pre: altair.BeaconState):
|
||||
slot: pre.slot,
|
||||
fork: Fork(
|
||||
previous_version: pre.fork.current_version,
|
||||
current_version: cfg.MERGE_FORK_VERSION,
|
||||
current_version: cfg.BELLATRIX_FORK_VERSION,
|
||||
epoch: epoch,
|
||||
),
|
||||
|
||||
|
@ -286,7 +286,7 @@ type
|
||||
GENESIS_DELAY*: uint64
|
||||
ALTAIR_FORK_VERSION*: Version
|
||||
ALTAIR_FORK_EPOCH*: uint64
|
||||
MERGE_FORK_VERSION*: Version
|
||||
BELLATRIX_FORK_VERSION*: Version
|
||||
MERGE_FORK_EPOCH*: uint64
|
||||
SHARDING_FORK_VERSION*: Version
|
||||
SHARDING_FORK_EPOCH*: uint64
|
||||
|
@ -401,7 +401,7 @@ func mergeFork*(cfg: RuntimeConfig): Fork =
|
||||
# previous fork version would be the GENESIS_FORK_VERSION
|
||||
Fork(
|
||||
previous_version: cfg.ALTAIR_FORK_VERSION,
|
||||
current_version: cfg.MERGE_FORK_VERSION,
|
||||
current_version: cfg.BELLATRIX_FORK_VERSION,
|
||||
epoch: cfg.MERGE_FORK_EPOCH)
|
||||
|
||||
proc forkAtEpoch*(cfg: RuntimeConfig, epoch: Epoch): Fork =
|
||||
@ -412,7 +412,7 @@ proc forkAtEpoch*(cfg: RuntimeConfig, epoch: Epoch): Fork =
|
||||
|
||||
proc forkVersionAtEpoch*(cfg: RuntimeConfig, epoch: Epoch): Version =
|
||||
case cfg.stateForkAtEpoch(epoch)
|
||||
of BeaconStateFork.Bellatrix: cfg.MERGE_FORK_VERSION
|
||||
of BeaconStateFork.Bellatrix: cfg.BELLATRIX_FORK_VERSION
|
||||
of BeaconStateFork.Altair: cfg.ALTAIR_FORK_VERSION
|
||||
of BeaconStateFork.Phase0: cfg.GENESIS_FORK_VERSION
|
||||
|
||||
@ -519,7 +519,7 @@ func init*(T: type ForkDigests,
|
||||
altair:
|
||||
compute_fork_digest(cfg.ALTAIR_FORK_VERSION, genesisValidatorsRoot),
|
||||
bellatrix:
|
||||
compute_fork_digest(cfg.MERGE_FORK_VERSION, genesisValidatorsRoot),
|
||||
compute_fork_digest(cfg.BELLATRIX_FORK_VERSION, genesisValidatorsRoot),
|
||||
sharding:
|
||||
compute_fork_digest(cfg.SHARDING_FORK_VERSION, genesisValidatorsRoot),
|
||||
)
|
||||
|
@ -50,7 +50,7 @@ type
|
||||
ALTAIR_FORK_EPOCH*: Epoch
|
||||
|
||||
# Merge
|
||||
MERGE_FORK_VERSION*: Version
|
||||
BELLATRIX_FORK_VERSION*: Version
|
||||
MERGE_FORK_EPOCH*: Epoch
|
||||
|
||||
# Sharding
|
||||
@ -193,7 +193,7 @@ when const_preset == "mainnet":
|
||||
ALTAIR_FORK_VERSION: Version [byte 0x01, 0x00, 0x00, 0x00],
|
||||
ALTAIR_FORK_EPOCH: Epoch(74240), # Oct 27, 2021, 10:56:23am UTC
|
||||
# Merge
|
||||
MERGE_FORK_VERSION: Version [byte 0x02, 0x00, 0x00, 0x00],
|
||||
BELLATRIX_FORK_VERSION: Version [byte 0x02, 0x00, 0x00, 0x00],
|
||||
MERGE_FORK_EPOCH: Epoch(uint64.high),
|
||||
# Sharding
|
||||
SHARDING_FORK_VERSION: Version [byte 0x03, 0x00, 0x00, 0x00],
|
||||
@ -282,7 +282,7 @@ elif const_preset == "minimal":
|
||||
ALTAIR_FORK_VERSION: Version [byte 0x01, 0x00, 0x00, 0x01],
|
||||
ALTAIR_FORK_EPOCH: Epoch(uint64.high),
|
||||
# Merge
|
||||
MERGE_FORK_VERSION: Version [byte 0x02, 0x00, 0x00, 0x01],
|
||||
BELLATRIX_FORK_VERSION: Version [byte 0x02, 0x00, 0x00, 0x01],
|
||||
MERGE_FORK_EPOCH: Epoch(uint64.high),
|
||||
# Sharding
|
||||
SHARDING_FORK_VERSION: Version [byte 0x03, 0x00, 0x00, 0x01],
|
||||
|
@ -2646,7 +2646,7 @@
|
||||
"response": {
|
||||
"status": {"operator": "equals", "value": "200"},
|
||||
"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":"","MERGE_FORK_VERSION":"","MERGE_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":""}}]
|
||||
"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":"","MERGE_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":""}}]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user