-
Notifications
You must be signed in to change notification settings - Fork 672
/
config.go
84 lines (59 loc) · 2.36 KB
/
config.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package config
import (
"time"
"github.com/ava-labs/avalanchego/chains"
"github.com/ava-labs/avalanchego/ids"
"github.com/ava-labs/avalanchego/snow/engine/common"
"github.com/ava-labs/avalanchego/snow/uptime"
"github.com/ava-labs/avalanchego/snow/validators"
"github.com/ava-labs/avalanchego/vms/platformvm/reward"
)
// Struct collecting all foundational parameters of PlatformVM
type Config struct {
// The node's chain manager
Chains chains.Manager
// Node's validator set maps subnetID -> validators of the subnet
Validators validators.Manager
// Provides access to subnet tracking
SubnetTracker common.SubnetTracker
// Provides access to the uptime manager as a thread safe data structure
UptimeLockedCalculator uptime.LockedCalculator
// True if the node is being run with staking enabled
StakingEnabled bool
// Set of subnets that this node is validating
WhitelistedSubnets ids.Set
// Fee that must be burned by every create staker transaction
AddStakerTxFee uint64
// Fee that is burned by every non-state creating transaction
TxFee uint64
// Fee that must be burned by every state creating transaction before AP3
CreateAssetTxFee uint64
// Fee that must be burned by every subnet creating transaction after AP3
CreateSubnetTxFee uint64
// Fee that must be burned by every blockchain creating transaction after AP3
CreateBlockchainTxFee uint64
// The minimum amount of tokens one must bond to be a validator
MinValidatorStake uint64
// The maximum amount of tokens that can be bonded on a validator
MaxValidatorStake uint64
// Minimum stake, in nAVAX, that can be delegated on the primary network
MinDelegatorStake uint64
// Minimum fee that can be charged for delegation
MinDelegationFee uint32
// UptimePercentage is the minimum uptime required to be rewarded for staking
UptimePercentage float64
// Minimum amount of time to allow a staker to stake
MinStakeDuration time.Duration
// Maximum amount of time to allow a staker to stake
MaxStakeDuration time.Duration
// Config for the minting function
RewardConfig reward.Config
// Time of the AP3 network upgrade
ApricotPhase3Time time.Time
// Time of the AP4 network upgrade
ApricotPhase4Time time.Time
// Time of the AP5 network upgrade
ApricotPhase5Time time.Time
}