prysm-pulse/shared/params/testnet_e2e_config.go
Nishant Das 29804fa572
Refactor Subnet Search (#8048)
* checkpoint progress

* checkpoint

* clean up

* do better

* fix test

* fix

* fix

* preston's review

* fix

* fix

* fix

* add iterator

* go doc

* make it a config parameter

* Apply suggestions from code review

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2020-12-11 18:40:56 -08:00

40 lines
1.2 KiB
Go

package params
// UseE2EConfig for beacon chain services.
func UseE2EConfig() {
beaconConfig = E2ETestConfig()
cfg := BeaconNetworkConfig().Copy()
// Due to the small number of peers in the e2e test network
// setting this to 0, prevents the node from being overwhelmed
// from discovery lookups.
cfg.MinimumPeersInSubnet = 0
cfg.ChainID = 1337 // Chain ID of eth1 dev net.
cfg.NetworkID = 1337 // Network ID of eth1 dev net.
OverrideBeaconNetworkConfig(cfg)
}
// 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
e2eConfig.GenesisDelay = 10 // 10 seconds so E2E has enough time to process deposits and get started.
// Time parameters.
e2eConfig.SecondsPerSlot = 10
e2eConfig.SlotsPerEpoch = 6
e2eConfig.SecondsPerETH1Block = 2
e2eConfig.Eth1FollowDistance = 4
e2eConfig.EpochsPerEth1VotingPeriod = 2
e2eConfig.ShardCommitteePeriod = 4
e2eConfig.MaxSeedLookahead = 1
// Prysm constants.
e2eConfig.NetworkName = "End-to-end"
return e2eConfig
}