forked from ava-labs/avalanchego
/
config.go
73 lines (55 loc) · 1.56 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
// (c) 2019-2020, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package node
import (
"github.com/ava-labs/gecko/database"
"github.com/ava-labs/gecko/nat"
"github.com/ava-labs/gecko/snow/consensus/avalanche"
"github.com/ava-labs/gecko/snow/networking/router"
"github.com/ava-labs/gecko/utils"
"github.com/ava-labs/gecko/utils/logging"
)
// Config contains all of the configurations of an Ava node.
type Config struct {
// protocol to use for opening the network interface
Nat nat.Router
// ID of the network this node should connect to
NetworkID uint32
// Transaction fee configuration
AvaTxFee uint64
// Assertions configuration
EnableAssertions bool
// Crypto configuration
EnableCrypto bool
// Database to use for the node
DB database.Database
// Staking configuration
StakingIP utils.IPDesc
EnableStaking bool
StakingKeyFile string
StakingCertFile string
// Bootstrapping configuration
BootstrapPeers []*Peer
// HTTP configuration
HTTPPort uint16
EnableHTTPS bool
HTTPSKeyFile string
HTTPSCertFile string
// Enable/Disable APIs
AdminAPIEnabled bool
KeystoreAPIEnabled bool
MetricsAPIEnabled bool
// Logging configuration
LoggingConfig logging.Config
// Plugin directory
PluginDir string
// Consensus configuration
ConsensusParams avalanche.Parameters
// Throughput configuration
ThroughputPort uint16
ThroughputServerEnabled bool
// IPCEnabled configuration
IPCEnabled bool
// Router that is used to handle incoming consensus messages
ConsensusRouter router.Router
}