-
Notifications
You must be signed in to change notification settings - Fork 48
/
groups.go
175 lines (137 loc) · 3.48 KB
/
groups.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT License was not distributed with this
// file, you can obtain one at https://opensource.org/licenses/MIT.
//
// Copyright (c) DUSK NETWORK. All rights reserved.
package config
type generalConfiguration struct {
Network string
}
type timeoutConfiguration struct {
TimeoutGetMempoolTXsBySize int64
TimeoutGetMempoolTXs int64
}
type loggerConfiguration struct {
Level string
Output string
Format string
}
type networkConfiguration struct {
MaxDupeMapItems uint32
MaxDupeMapExpire uint32
ServiceFlag uint8
}
type clientConfiguration struct {
Network string
Address string
DialTimeout int
}
type kadcastConfiguration struct {
Enabled bool
Address string
BootstrapAddr []string
Grpc clientConfiguration
}
// pkg/core/database package configs.
type databaseConfiguration struct {
Driver string
Dir string
}
// pprof configs.
// See also utils/diagnostics/ProfileSet.
type profileConfiguration struct {
Name string
Interval uint
Duration uint
Start bool
}
// pkg/rpc package configs.
type rpcConfiguration struct {
Network string
Address string
SessionDurationMins uint
RequireSession bool
EnableTLS bool
CertFile string
KeyFile string
User string
Pass string
Rusk ruskConfiguration
}
// rpc/rusk related configurations.
type ruskConfiguration struct {
Network string
Address string
// timeout for rusk calls.
ContractTimeout uint
DefaultTimeout uint
ConnectionTimeout uint
}
type gqlConfiguration struct {
// TODO: Keep 'Enabled' option?
Enabled bool
Network string
Address string
EnableTLS bool
CertFile string
KeyFile string
MaxRequestLimit uint
Notification notificationConfiguration
}
type apiConfiguration struct {
Enabled bool
Address string
EnableTLS bool
CertFile string
KeyFile string
DBFile string
ExpirationTime int
}
type notificationConfiguration struct {
BrokersNum uint
ClientsPerBroker uint
}
// Performance parameters.
type performanceConfiguration struct {
AccumulatorWorkers int
}
type mempoolConfiguration struct {
MaxSizeMB uint32
PoolType string
MaxInvItems uint32
PropagateTimeout string
PropagateBurst uint32
// diskpool config
DiskPoolDir string
// Hashmap config
HashMapPreallocTxs uint32
// Enables mempool updates at startup
Updates updates
// Artificial delay applied when mempool is empty
ExtractionDelaySecs int64
}
type updates struct {
// NumNodes is count of the nodes to ask for mempool transactions at start-up
NumNodes uint8
// Disabled is false by default which enables updates with default NumNodes
Disabled bool
}
type consensusConfiguration struct {
// Path to a file that stores Consensus Keys / BLS public and secret keys
// if file does not exist, it will be created at startup.
KeysFile string
// ConsensusTimeOut is the time out for consensus step timers.
ConsensusTimeOut int64
// UseCompressedKeys determines if AggregatePks works with compressed or uncompressed pks.
UseCompressedKeys bool
// ThrottleMilli determines number of Milliseconds to throttle block
// acceptance if Consensus time is less than config.ConsensusTimeThreshold.
ThrottleMilli int64
// ThrottleIterMilli determines number of Milliseconds to throttle VerifyST.
ThrottleIterMilli int64
}
type stateConfiguration struct {
// PersistEvery N blocks the state in rusk
PersistEvery uint64
BlockGasLimit uint64
}