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

     1  package params
     2  
     3  import "github.com/prysmaticlabs/prysm/shared/bytesutil"
     4  
     5  // UseMinimalConfig for beacon chain services.
     6  func UseMinimalConfig() {
     7  	beaconConfig = MinimalSpecConfig()
     8  }
     9  
    10  // MinimalSpecConfig retrieves the minimal config used in spec tests.
    11  func MinimalSpecConfig() *BeaconChainConfig {
    12  	minimalConfig := mainnetBeaconConfig.Copy()
    13  	// Misc
    14  	minimalConfig.MaxCommitteesPerSlot = 4
    15  	minimalConfig.TargetCommitteeSize = 4
    16  	minimalConfig.MaxValidatorsPerCommittee = 2048
    17  	minimalConfig.MinPerEpochChurnLimit = 4
    18  	minimalConfig.ChurnLimitQuotient = 65536
    19  	minimalConfig.ShuffleRoundCount = 10
    20  	minimalConfig.MinGenesisActiveValidatorCount = 64
    21  	minimalConfig.MinGenesisTime = 1578009600
    22  	minimalConfig.GenesisDelay = 300 // 5 minutes
    23  	minimalConfig.TargetAggregatorsPerCommittee = 16
    24  
    25  	// Gwei values
    26  	minimalConfig.MinDepositAmount = 1e9
    27  	minimalConfig.MaxEffectiveBalance = 32e9
    28  	minimalConfig.EjectionBalance = 16e9
    29  	minimalConfig.EffectiveBalanceIncrement = 1e9
    30  
    31  	// Initial values
    32  	minimalConfig.BLSWithdrawalPrefixByte = byte(0)
    33  
    34  	// Time parameters
    35  	minimalConfig.SecondsPerSlot = 6
    36  	minimalConfig.MinAttestationInclusionDelay = 1
    37  	minimalConfig.SlotsPerEpoch = 8
    38  	minimalConfig.MinSeedLookahead = 1
    39  	minimalConfig.MaxSeedLookahead = 4
    40  	minimalConfig.EpochsPerEth1VotingPeriod = 4
    41  	minimalConfig.SlotsPerHistoricalRoot = 64
    42  	minimalConfig.MinValidatorWithdrawabilityDelay = 256
    43  	minimalConfig.ShardCommitteePeriod = 64
    44  	minimalConfig.MinEpochsToInactivityPenalty = 4
    45  	minimalConfig.Eth1FollowDistance = 16
    46  	minimalConfig.SafeSlotsToUpdateJustified = 2
    47  	minimalConfig.SecondsPerETH1Block = 14
    48  
    49  	// State vector lengths
    50  	minimalConfig.EpochsPerHistoricalVector = 64
    51  	minimalConfig.EpochsPerSlashingsVector = 64
    52  	minimalConfig.HistoricalRootsLimit = 16777216
    53  	minimalConfig.ValidatorRegistryLimit = 1099511627776
    54  
    55  	// Reward and penalty quotients
    56  	minimalConfig.BaseRewardFactor = 64
    57  	minimalConfig.WhistleBlowerRewardQuotient = 512
    58  	minimalConfig.ProposerRewardQuotient = 8
    59  	minimalConfig.InactivityPenaltyQuotient = 33554432
    60  	minimalConfig.MinSlashingPenaltyQuotient = 64
    61  	minimalConfig.ProportionalSlashingMultiplier = 2
    62  
    63  	// Max operations per block
    64  	minimalConfig.MaxProposerSlashings = 16
    65  	minimalConfig.MaxAttesterSlashings = 2
    66  	minimalConfig.MaxAttestations = 128
    67  	minimalConfig.MaxDeposits = 16
    68  	minimalConfig.MaxVoluntaryExits = 16
    69  
    70  	// Signature domains
    71  	minimalConfig.DomainBeaconProposer = bytesutil.ToBytes4(bytesutil.Bytes4(0))
    72  	minimalConfig.DomainBeaconAttester = bytesutil.ToBytes4(bytesutil.Bytes4(1))
    73  	minimalConfig.DomainRandao = bytesutil.ToBytes4(bytesutil.Bytes4(2))
    74  	minimalConfig.DomainDeposit = bytesutil.ToBytes4(bytesutil.Bytes4(3))
    75  	minimalConfig.DomainVoluntaryExit = bytesutil.ToBytes4(bytesutil.Bytes4(4))
    76  	minimalConfig.GenesisForkVersion = []byte{0, 0, 0, 1}
    77  
    78  	minimalConfig.DepositContractTreeDepth = 32
    79  	minimalConfig.FarFutureEpoch = 1<<64 - 1
    80  	minimalConfig.FarFutureSlot = 1<<64 - 1
    81  
    82  	return minimalConfig
    83  }