mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 21:07:18 +00:00
a069738c20
* update shared/params * update eth2-types deps * update protobufs * update shared/* * fix testutil/state * update beacon-chain/state * update beacon-chain/db * update tests * fix test * update beacon-chain/core * update beacon-chain/blockchain * update beacon-chain/cache * beacon-chain/forkchoice * update beacon-chain/operations * update beacon-chain/p2p * update beacon-chain/rpc * update sync/initial-sync * update deps * update deps * go fmt * update beacon-chain/sync * update endtoend/ * bazel build //beacon-chain - works w/o issues * update slasher code * udpate tools/ * update validator/ * update fastssz * fix build * fix test building * update tests * update ethereumapis deps * fix tests * update state/stategen * fix build * fix test * add FarFutureSlot * go imports * Radek's suggestions * Ivan's suggestions * type conversions * Nishant's suggestions * add more tests to rpc_send_request * fix test * clean up * fix conflicts Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> Co-authored-by: nisdas <nishdas93@gmail.com>
84 lines
2.9 KiB
Go
84 lines
2.9 KiB
Go
package params
|
|
|
|
import "github.com/prysmaticlabs/prysm/shared/bytesutil"
|
|
|
|
// UseMinimalConfig for beacon chain services.
|
|
func UseMinimalConfig() {
|
|
beaconConfig = MinimalSpecConfig()
|
|
}
|
|
|
|
// MinimalSpecConfig retrieves the minimal config used in spec tests.
|
|
func MinimalSpecConfig() *BeaconChainConfig {
|
|
minimalConfig := mainnetBeaconConfig.Copy()
|
|
// Misc
|
|
minimalConfig.MaxCommitteesPerSlot = 4
|
|
minimalConfig.TargetCommitteeSize = 4
|
|
minimalConfig.MaxValidatorsPerCommittee = 2048
|
|
minimalConfig.MinPerEpochChurnLimit = 4
|
|
minimalConfig.ChurnLimitQuotient = 65536
|
|
minimalConfig.ShuffleRoundCount = 10
|
|
minimalConfig.MinGenesisActiveValidatorCount = 64
|
|
minimalConfig.MinGenesisTime = 1578009600
|
|
minimalConfig.GenesisDelay = 300 // 5 minutes
|
|
minimalConfig.TargetAggregatorsPerCommittee = 16
|
|
|
|
// Gwei values
|
|
minimalConfig.MinDepositAmount = 1e9
|
|
minimalConfig.MaxEffectiveBalance = 32e9
|
|
minimalConfig.EjectionBalance = 16e9
|
|
minimalConfig.EffectiveBalanceIncrement = 1e9
|
|
|
|
// Initial values
|
|
minimalConfig.BLSWithdrawalPrefixByte = byte(0)
|
|
|
|
// Time parameters
|
|
minimalConfig.SecondsPerSlot = 6
|
|
minimalConfig.MinAttestationInclusionDelay = 1
|
|
minimalConfig.SlotsPerEpoch = 8
|
|
minimalConfig.MinSeedLookahead = 1
|
|
minimalConfig.MaxSeedLookahead = 4
|
|
minimalConfig.EpochsPerEth1VotingPeriod = 4
|
|
minimalConfig.SlotsPerHistoricalRoot = 64
|
|
minimalConfig.MinValidatorWithdrawabilityDelay = 256
|
|
minimalConfig.ShardCommitteePeriod = 64
|
|
minimalConfig.MinEpochsToInactivityPenalty = 4
|
|
minimalConfig.Eth1FollowDistance = 16
|
|
minimalConfig.SafeSlotsToUpdateJustified = 2
|
|
minimalConfig.SecondsPerETH1Block = 14
|
|
|
|
// State vector lengths
|
|
minimalConfig.EpochsPerHistoricalVector = 64
|
|
minimalConfig.EpochsPerSlashingsVector = 64
|
|
minimalConfig.HistoricalRootsLimit = 16777216
|
|
minimalConfig.ValidatorRegistryLimit = 1099511627776
|
|
|
|
// Reward and penalty quotients
|
|
minimalConfig.BaseRewardFactor = 64
|
|
minimalConfig.WhistleBlowerRewardQuotient = 512
|
|
minimalConfig.ProposerRewardQuotient = 8
|
|
minimalConfig.InactivityPenaltyQuotient = 33554432
|
|
minimalConfig.MinSlashingPenaltyQuotient = 64
|
|
minimalConfig.ProportionalSlashingMultiplier = 2
|
|
|
|
// Max operations per block
|
|
minimalConfig.MaxProposerSlashings = 16
|
|
minimalConfig.MaxAttesterSlashings = 2
|
|
minimalConfig.MaxAttestations = 128
|
|
minimalConfig.MaxDeposits = 16
|
|
minimalConfig.MaxVoluntaryExits = 16
|
|
|
|
// Signature domains
|
|
minimalConfig.DomainBeaconProposer = bytesutil.ToBytes4(bytesutil.Bytes4(0))
|
|
minimalConfig.DomainBeaconAttester = bytesutil.ToBytes4(bytesutil.Bytes4(1))
|
|
minimalConfig.DomainRandao = bytesutil.ToBytes4(bytesutil.Bytes4(2))
|
|
minimalConfig.DomainDeposit = bytesutil.ToBytes4(bytesutil.Bytes4(3))
|
|
minimalConfig.DomainVoluntaryExit = bytesutil.ToBytes4(bytesutil.Bytes4(4))
|
|
minimalConfig.GenesisForkVersion = []byte{0, 0, 0, 1}
|
|
|
|
minimalConfig.DepositContractTreeDepth = 32
|
|
minimalConfig.FarFutureEpoch = 1<<64 - 1
|
|
minimalConfig.FarFutureSlot = 1<<64 - 1
|
|
|
|
return minimalConfig
|
|
}
|