2020-06-27 00:20:24 +00:00
|
|
|
package params
|
|
|
|
|
2022-02-15 21:06:14 +00:00
|
|
|
const (
|
2023-02-10 06:19:15 +00:00
|
|
|
AltairE2EForkEpoch = 6
|
|
|
|
BellatrixE2EForkEpoch = 8
|
|
|
|
CapellaE2EForkEpoch = 10
|
2023-12-12 08:04:55 +00:00
|
|
|
DenebE2EForkEpoch = 12
|
2022-02-15 21:06:14 +00:00
|
|
|
)
|
2021-08-13 05:11:11 +00:00
|
|
|
|
2020-06-27 00:20:24 +00:00
|
|
|
// E2ETestConfig retrieves the configurations made specifically for E2E testing.
|
2022-05-12 15:25:44 +00:00
|
|
|
//
|
|
|
|
// WARNING: This config is only for testing, it is not meant for use outside of E2E.
|
2020-06-27 00:20:24 +00:00
|
|
|
func E2ETestConfig() *BeaconChainConfig {
|
|
|
|
e2eConfig := MinimalSpecConfig()
|
2022-12-13 23:13:49 +00:00
|
|
|
e2eConfig.DepositContractAddress = "0x4242424242424242424242424242424242424242"
|
|
|
|
e2eConfig.Eth1FollowDistance = 8
|
2020-06-27 00:20:24 +00:00
|
|
|
|
|
|
|
// Misc.
|
|
|
|
e2eConfig.MinGenesisActiveValidatorCount = 256
|
2020-08-02 21:30:59 +00:00
|
|
|
e2eConfig.GenesisDelay = 10 // 10 seconds so E2E has enough time to process deposits and get started.
|
2021-09-15 22:04:13 +00:00
|
|
|
e2eConfig.ChurnLimitQuotient = 65536
|
2023-02-10 06:19:15 +00:00
|
|
|
e2eConfig.MaxValidatorsPerWithdrawalsSweep = 128
|
2020-06-27 00:20:24 +00:00
|
|
|
|
|
|
|
// Time parameters.
|
2020-08-01 17:22:53 +00:00
|
|
|
e2eConfig.SecondsPerSlot = 10
|
|
|
|
e2eConfig.SlotsPerEpoch = 6
|
2021-08-09 16:35:46 +00:00
|
|
|
e2eConfig.SqrRootSlotsPerEpoch = 2
|
2020-06-27 00:20:24 +00:00
|
|
|
e2eConfig.SecondsPerETH1Block = 2
|
2020-08-01 17:22:53 +00:00
|
|
|
e2eConfig.EpochsPerEth1VotingPeriod = 2
|
2020-06-27 00:20:24 +00:00
|
|
|
e2eConfig.ShardCommitteePeriod = 4
|
2020-08-01 17:22:53 +00:00
|
|
|
e2eConfig.MaxSeedLookahead = 1
|
2023-02-10 06:19:15 +00:00
|
|
|
e2eConfig.MinValidatorWithdrawabilityDelay = 1
|
2020-08-01 17:22:53 +00:00
|
|
|
|
2020-12-18 22:22:48 +00:00
|
|
|
// PoW parameters.
|
|
|
|
e2eConfig.DepositChainID = 1337 // Chain ID of eth1 dev net.
|
|
|
|
e2eConfig.DepositNetworkID = 1337 // Network ID of eth1 dev net.
|
|
|
|
|
2022-04-11 13:45:22 +00:00
|
|
|
// Fork Parameters.
|
2023-02-10 06:19:15 +00:00
|
|
|
e2eConfig.AltairForkEpoch = AltairE2EForkEpoch
|
|
|
|
e2eConfig.BellatrixForkEpoch = BellatrixE2EForkEpoch
|
|
|
|
e2eConfig.CapellaForkEpoch = CapellaE2EForkEpoch
|
2023-08-23 20:07:25 +00:00
|
|
|
e2eConfig.DenebForkEpoch = DenebE2EForkEpoch
|
2022-04-05 14:02:46 +00:00
|
|
|
|
|
|
|
// Terminal Total Difficulty.
|
2022-12-21 04:43:29 +00:00
|
|
|
e2eConfig.TerminalTotalDifficulty = "480"
|
2021-08-13 05:11:11 +00:00
|
|
|
|
2020-08-30 16:39:53 +00:00
|
|
|
// Prysm constants.
|
2022-05-06 21:42:27 +00:00
|
|
|
e2eConfig.ConfigName = EndToEndName
|
2022-03-21 19:43:41 +00:00
|
|
|
e2eConfig.GenesisForkVersion = []byte{0, 0, 0, 253}
|
|
|
|
e2eConfig.AltairForkVersion = []byte{1, 0, 0, 253}
|
|
|
|
e2eConfig.BellatrixForkVersion = []byte{2, 0, 0, 253}
|
2023-01-13 04:04:37 +00:00
|
|
|
e2eConfig.CapellaForkVersion = []byte{3, 0, 0, 253}
|
2023-08-23 20:07:25 +00:00
|
|
|
e2eConfig.DenebForkVersion = []byte{4, 0, 0, 253}
|
2020-08-30 16:39:53 +00:00
|
|
|
|
2022-03-21 19:43:41 +00:00
|
|
|
e2eConfig.InitializeForkSchedule()
|
2020-06-27 00:20:24 +00:00
|
|
|
return e2eConfig
|
|
|
|
}
|
2022-02-02 19:13:52 +00:00
|
|
|
|
|
|
|
func E2EMainnetTestConfig() *BeaconChainConfig {
|
|
|
|
e2eConfig := MainnetConfig().Copy()
|
2022-12-13 23:13:49 +00:00
|
|
|
e2eConfig.DepositContractAddress = "0x4242424242424242424242424242424242424242"
|
|
|
|
e2eConfig.Eth1FollowDistance = 8
|
2022-02-02 19:13:52 +00:00
|
|
|
|
|
|
|
// Misc.
|
|
|
|
e2eConfig.MinGenesisActiveValidatorCount = 256
|
|
|
|
e2eConfig.GenesisDelay = 25 // 25 seconds so E2E has enough time to process deposits and get started.
|
|
|
|
e2eConfig.ChurnLimitQuotient = 65536
|
|
|
|
|
|
|
|
// Time parameters.
|
2022-02-03 13:14:26 +00:00
|
|
|
e2eConfig.SecondsPerSlot = 6
|
2022-02-02 19:13:52 +00:00
|
|
|
e2eConfig.SqrRootSlotsPerEpoch = 5
|
|
|
|
e2eConfig.SecondsPerETH1Block = 2
|
|
|
|
e2eConfig.ShardCommitteePeriod = 4
|
2023-02-10 06:19:15 +00:00
|
|
|
e2eConfig.MinValidatorWithdrawabilityDelay = 1
|
2022-02-02 19:13:52 +00:00
|
|
|
|
|
|
|
// PoW parameters.
|
|
|
|
e2eConfig.DepositChainID = 1337 // Chain ID of eth1 dev net.
|
|
|
|
e2eConfig.DepositNetworkID = 1337 // Network ID of eth1 dev net.
|
|
|
|
|
|
|
|
// Altair Fork Parameters.
|
2023-02-10 06:19:15 +00:00
|
|
|
e2eConfig.AltairForkEpoch = AltairE2EForkEpoch
|
|
|
|
e2eConfig.BellatrixForkEpoch = BellatrixE2EForkEpoch
|
|
|
|
e2eConfig.CapellaForkEpoch = CapellaE2EForkEpoch
|
2023-08-23 20:07:25 +00:00
|
|
|
e2eConfig.DenebForkEpoch = DenebE2EForkEpoch
|
2022-04-05 14:02:46 +00:00
|
|
|
|
|
|
|
// Terminal Total Difficulty.
|
2022-12-21 04:43:29 +00:00
|
|
|
e2eConfig.TerminalTotalDifficulty = "480"
|
2022-02-02 19:13:52 +00:00
|
|
|
|
|
|
|
// Prysm constants.
|
2022-05-20 07:16:53 +00:00
|
|
|
e2eConfig.ConfigName = EndToEndMainnetName
|
2022-03-21 19:43:41 +00:00
|
|
|
e2eConfig.GenesisForkVersion = []byte{0, 0, 0, 254}
|
|
|
|
e2eConfig.AltairForkVersion = []byte{1, 0, 0, 254}
|
|
|
|
e2eConfig.BellatrixForkVersion = []byte{2, 0, 0, 254}
|
2023-01-13 04:04:37 +00:00
|
|
|
e2eConfig.CapellaForkVersion = []byte{3, 0, 0, 254}
|
2023-08-23 20:07:25 +00:00
|
|
|
e2eConfig.DenebForkVersion = []byte{4, 0, 0, 254}
|
2022-02-02 19:13:52 +00:00
|
|
|
|
2023-09-28 21:05:23 +00:00
|
|
|
// Deneb changes.
|
|
|
|
e2eConfig.MinPerEpochChurnLimit = 2
|
|
|
|
|
2022-03-21 19:43:41 +00:00
|
|
|
e2eConfig.InitializeForkSchedule()
|
2022-02-02 19:13:52 +00:00
|
|
|
return e2eConfig
|
|
|
|
}
|