2018-08-09 18:25:48 +00:00
|
|
|
|
// Package params defines important constants that are essential to the beacon chain.
|
2018-07-14 02:15:37 +00:00
|
|
|
|
package params
|
2018-07-11 22:29:31 +00:00
|
|
|
|
|
2018-09-22 20:15:39 +00:00
|
|
|
|
import (
|
|
|
|
|
"math/big"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var (
|
2018-08-24 04:09:59 +00:00
|
|
|
|
// CycleLength is the beacon chain cycle length in slots.
|
2018-09-22 20:15:39 +00:00
|
|
|
|
CycleLength = uint64(64)
|
2018-07-11 22:29:31 +00:00
|
|
|
|
// ShardCount is a fixed number.
|
2018-07-29 17:03:03 +00:00
|
|
|
|
ShardCount = 1024
|
2018-09-22 20:15:39 +00:00
|
|
|
|
// DefaultBalance of a validator in wei.
|
|
|
|
|
DefaultBalance = new(big.Int).Div(big.NewInt(32), big.NewInt(int64(EtherDenomination)))
|
2018-07-11 22:29:31 +00:00
|
|
|
|
// MaxValidators in the protocol.
|
2018-07-21 17:20:00 +00:00
|
|
|
|
MaxValidators = 4194304
|
2018-07-29 17:03:03 +00:00
|
|
|
|
// SlotDuration in seconds.
|
2018-09-22 20:15:39 +00:00
|
|
|
|
SlotDuration = uint64(8)
|
2018-09-01 16:01:53 +00:00
|
|
|
|
// Cofactor is used cutoff algorithm to select slot and shard cutoffs.
|
2018-07-29 17:03:03 +00:00
|
|
|
|
Cofactor = 19
|
|
|
|
|
// MinCommiteeSize is the minimal number of validator needs to be in a committee.
|
2018-09-22 20:15:39 +00:00
|
|
|
|
MinCommiteeSize = uint64(128)
|
2018-08-14 00:58:37 +00:00
|
|
|
|
// DefaultEndDynasty is the upper bound of dynasty. We use it to track queued and exited validators.
|
2018-09-22 20:15:39 +00:00
|
|
|
|
DefaultEndDynasty = uint64(999999999999999999)
|
2018-08-18 03:34:56 +00:00
|
|
|
|
// BootstrappedValidatorsCount is the number of validators we seed the first crystallized
|
|
|
|
|
// state with. This number has yet to be decided by research and is arbitrary for now.
|
2018-08-25 18:59:46 +00:00
|
|
|
|
BootstrappedValidatorsCount = 1000
|
2018-09-12 03:17:20 +00:00
|
|
|
|
// MinDynastyLength is the slots needed before dynasty transition happens.
|
2018-09-22 20:15:39 +00:00
|
|
|
|
MinDynastyLength = uint64(256)
|
2018-09-21 19:56:39 +00:00
|
|
|
|
// EtherDenomination is the denomination of ether in wei.
|
|
|
|
|
EtherDenomination = 1e18
|
|
|
|
|
// BaseRewardQuotient is where 1/BaseRewardQuotient is the per-slot interest rate which will,
|
|
|
|
|
// compound to an annual rate of 3.88% for 10 million eth staked.
|
2018-09-22 20:15:39 +00:00
|
|
|
|
BaseRewardQuotient = uint64(32768)
|
2018-09-21 19:56:39 +00:00
|
|
|
|
// SqrtDropTime is a constant set to reflect the amount of time it will take for the quadratic leak to
|
|
|
|
|
// cut nonparticipating validators’ deposits by 39.4%.
|
2018-09-22 20:15:39 +00:00
|
|
|
|
SqrtDropTime = uint64(1048576)
|
2018-07-11 22:29:31 +00:00
|
|
|
|
)
|