-
Notifications
You must be signed in to change notification settings - Fork 665
/
params.go
57 lines (52 loc) · 1.68 KB
/
params.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// (c) 2019-2020, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package genesis
import (
"time"
"github.com/ava-labs/avalanchego/utils/constants"
)
// Params ...
type Params struct {
// Transaction fee
TxFee uint64
// Transaction fee for transactions that create new state
CreationTxFee uint64
// Staking uptime requirements
UptimeRequirement float64
// Minimum stake, in nAVAX, required to validate the primary network
MinValidatorStake uint64
// Maximum stake, in nAVAX, allowed to be placed on a single validator in
// the primary network
MaxValidatorStake uint64
// Minimum stake, in nAVAX, that can be delegated on the primary network
MinDelegatorStake uint64
// Minimum delegation fee, in the range [0, 1000000], that can be charged
// for delegation on the primary network.
MinDelegationFee uint32
// MinStakeDuration is the minimum amount of time a validator can validate
// for in a single period.
MinStakeDuration time.Duration
// MaxStakeDuration is the maximum amount of time a validator can validate
// for in a single period.
MaxStakeDuration time.Duration
// StakeMintingPeriod is the amount of time for a consumption period.
StakeMintingPeriod time.Duration
// EpochFirstTransition is the time that the transition from epoch 0 to 1
// should occur.
EpochFirstTransition time.Time
// EpochDuration is the amount of time that an epoch runs for.
EpochDuration time.Duration
}
// GetParams ...
func GetParams(networkID uint32) *Params {
switch networkID {
case constants.MainnetID:
return &MainnetParams
case constants.FujiID:
return &FujiParams
case constants.LocalID:
return &LocalParams
default:
return &LocalParams
}
}