2020-06-27 00:20:24 +00:00
|
|
|
package params
|
|
|
|
|
|
|
|
// UseE2EConfig for beacon chain services.
|
|
|
|
func UseE2EConfig() {
|
|
|
|
beaconConfig = E2ETestConfig()
|
2020-07-27 04:48:36 +00:00
|
|
|
|
|
|
|
cfg := BeaconNetworkConfig().Copy()
|
|
|
|
cfg.ChainID = 1337 // Chain ID of eth1 dev net.
|
|
|
|
cfg.NetworkID = 1337 // Network ID of eth1 dev net.
|
|
|
|
OverrideBeaconNetworkConfig(cfg)
|
2020-06-27 00:20:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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()
|
|
|
|
|
|
|
|
// 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.
|
2020-06-27 00:20:24 +00:00
|
|
|
|
|
|
|
// Time parameters.
|
2020-08-01 17:22:53 +00:00
|
|
|
e2eConfig.SecondsPerSlot = 10
|
|
|
|
e2eConfig.SlotsPerEpoch = 6
|
2020-06-27 00:20:24 +00:00
|
|
|
e2eConfig.SecondsPerETH1Block = 2
|
|
|
|
e2eConfig.Eth1FollowDistance = 4
|
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
|
|
|
|
|
2020-08-30 16:39:53 +00:00
|
|
|
// Prysm constants.
|
|
|
|
e2eConfig.NetworkName = "End-to-end"
|
|
|
|
|
2020-06-27 00:20:24 +00:00
|
|
|
return e2eConfig
|
|
|
|
}
|