github.com/prysmaticlabs/prysm@v1.4.4/shared/params/testnet_e2e_config.go (about)

     1  package params
     2  
     3  // UseE2EConfig for beacon chain services.
     4  func UseE2EConfig() {
     5  	beaconConfig = E2ETestConfig()
     6  
     7  	cfg := BeaconNetworkConfig().Copy()
     8  	// Due to the small number of peers in the e2e test network
     9  	// setting this to 0, prevents the node from being overwhelmed
    10  	// from discovery lookups.
    11  	cfg.MinimumPeersInSubnet = 0
    12  	OverrideBeaconNetworkConfig(cfg)
    13  }
    14  
    15  // E2ETestConfig retrieves the configurations made specifically for E2E testing.
    16  // Warning: This config is only for testing, it is not meant for use outside of E2E.
    17  func E2ETestConfig() *BeaconChainConfig {
    18  	e2eConfig := MinimalSpecConfig()
    19  
    20  	// Misc.
    21  	e2eConfig.MinGenesisActiveValidatorCount = 256
    22  	e2eConfig.GenesisDelay = 10 // 10 seconds so E2E has enough time to process deposits and get started.
    23  
    24  	// Time parameters.
    25  	e2eConfig.SecondsPerSlot = 10
    26  	e2eConfig.SlotsPerEpoch = 6
    27  	e2eConfig.SecondsPerETH1Block = 2
    28  	e2eConfig.Eth1FollowDistance = 4
    29  	e2eConfig.EpochsPerEth1VotingPeriod = 2
    30  	e2eConfig.ShardCommitteePeriod = 4
    31  	e2eConfig.MaxSeedLookahead = 1
    32  
    33  	// PoW parameters.
    34  	e2eConfig.DepositChainID = 1337   // Chain ID of eth1 dev net.
    35  	e2eConfig.DepositNetworkID = 1337 // Network ID of eth1 dev net.
    36  
    37  	// Prysm constants.
    38  	e2eConfig.ConfigName = ConfigNames[EndToEnd]
    39  
    40  	return e2eConfig
    41  }