mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-03 16:37:39 +00:00
d916827fb9
* e2e using dynamic configs; runtime bellatrix setup * starts from phase0 but fee recipient eval fails * lower TTD to cross before bellatrix epoch in e2e * fix debug printf * fix it * dynamic ttd and more robust fee_recipient eval * let multiplication set ttd=0 if bellatrix epoch=0 * refactoring fee recipient test after cognit errors * lint * appease deepsource * deep sourcin * gazelle * missed a usage of this when refactoring Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com> Co-authored-by: nisdas <nishdas93@gmail.com>
89 lines
2.8 KiB
Go
89 lines
2.8 KiB
Go
package params
|
|
|
|
const (
|
|
altairE2EForkEpoch = 6
|
|
bellatrixE2EForkEpoch = 8
|
|
)
|
|
|
|
// E2ETestConfig retrieves the configurations made specifically for E2E testing.
|
|
//
|
|
// WARNING: This config is only for testing, it is not meant for use outside of E2E.
|
|
func E2ETestConfig() *BeaconChainConfig {
|
|
e2eConfig := MinimalSpecConfig()
|
|
e2eConfig.DepositContractAddress = "0x4242424242424242424242424242424242424242"
|
|
e2eConfig.Eth1FollowDistance = 8
|
|
|
|
// Misc.
|
|
e2eConfig.MinGenesisActiveValidatorCount = 256
|
|
e2eConfig.GenesisDelay = 10 // 10 seconds so E2E has enough time to process deposits and get started.
|
|
e2eConfig.ChurnLimitQuotient = 65536
|
|
|
|
// Time parameters.
|
|
e2eConfig.SecondsPerSlot = 10
|
|
e2eConfig.SlotsPerEpoch = 6
|
|
e2eConfig.SqrRootSlotsPerEpoch = 2
|
|
e2eConfig.SecondsPerETH1Block = 2
|
|
e2eConfig.EpochsPerEth1VotingPeriod = 2
|
|
e2eConfig.ShardCommitteePeriod = 4
|
|
e2eConfig.MaxSeedLookahead = 1
|
|
|
|
// PoW parameters.
|
|
e2eConfig.DepositChainID = 1337 // Chain ID of eth1 dev net.
|
|
e2eConfig.DepositNetworkID = 1337 // Network ID of eth1 dev net.
|
|
|
|
// Fork Parameters.
|
|
e2eConfig.AltairForkEpoch = altairE2EForkEpoch
|
|
e2eConfig.BellatrixForkEpoch = bellatrixE2EForkEpoch
|
|
|
|
// Terminal Total Difficulty.
|
|
e2eConfig.TerminalTotalDifficulty = "480"
|
|
|
|
// Prysm constants.
|
|
e2eConfig.ConfigName = EndToEndName
|
|
e2eConfig.GenesisForkVersion = []byte{0, 0, 0, 253}
|
|
e2eConfig.AltairForkVersion = []byte{1, 0, 0, 253}
|
|
e2eConfig.BellatrixForkVersion = []byte{2, 0, 0, 253}
|
|
e2eConfig.ShardingForkVersion = []byte{3, 0, 0, 253}
|
|
|
|
e2eConfig.InitializeForkSchedule()
|
|
return e2eConfig
|
|
}
|
|
|
|
func E2EMainnetTestConfig() *BeaconChainConfig {
|
|
e2eConfig := MainnetConfig().Copy()
|
|
e2eConfig.DepositContractAddress = "0x4242424242424242424242424242424242424242"
|
|
e2eConfig.Eth1FollowDistance = 8
|
|
|
|
// 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.
|
|
e2eConfig.SecondsPerSlot = 6
|
|
e2eConfig.SqrRootSlotsPerEpoch = 5
|
|
e2eConfig.SecondsPerETH1Block = 2
|
|
e2eConfig.ShardCommitteePeriod = 4
|
|
|
|
// PoW parameters.
|
|
e2eConfig.DepositChainID = 1337 // Chain ID of eth1 dev net.
|
|
e2eConfig.DepositNetworkID = 1337 // Network ID of eth1 dev net.
|
|
|
|
// Altair Fork Parameters.
|
|
e2eConfig.AltairForkEpoch = altairE2EForkEpoch
|
|
e2eConfig.BellatrixForkEpoch = bellatrixE2EForkEpoch
|
|
|
|
// Terminal Total Difficulty.
|
|
e2eConfig.TerminalTotalDifficulty = "480"
|
|
|
|
// Prysm constants.
|
|
e2eConfig.ConfigName = EndToEndMainnetName
|
|
e2eConfig.GenesisForkVersion = []byte{0, 0, 0, 254}
|
|
e2eConfig.AltairForkVersion = []byte{1, 0, 0, 254}
|
|
e2eConfig.BellatrixForkVersion = []byte{2, 0, 0, 254}
|
|
e2eConfig.ShardingForkVersion = []byte{3, 0, 0, 254}
|
|
|
|
e2eConfig.InitializeForkSchedule()
|
|
return e2eConfig
|
|
}
|