Repository navigation
Expand file tree
/
Copy pathgetLocalConfigFactory.js
More file actions
166 lines (162 loc) · 3.91 KB
/
Copy pathgetLocalConfigFactory.js
File metadata and controls
166 lines (162 loc) · 3.91 KB
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
import lodash from 'lodash';
import {
NETWORK_LOCAL, SSL_PROVIDERS,
} from '../../src/constants.js';
import Config from '../../src/config/Config.js';
const { merge: lodashMerge } = lodash;
/**
* @param {getBaseConfig} getBaseConfig
* @returns {getLocalConfig}
*/
export default function getLocalConfigFactory(getBaseConfig) {
/**
* @typedef {function} getLocalConfig
* @returns {Config}
*/
function getLocalConfig() {
const options = {
description: 'template for local configs',
docker: {
network: {
subnet: '172.24.24.0/24',
},
},
core: {
insight: {
port: 23001,
},
p2p: {
port: 20001,
},
rpc: {
port: 20002,
},
zmq: {
port: 49998,
},
// Mirrors the `core.compactFilters: true` set on the base
// config; restated explicitly here because the local
// preset is the canonical surface where dev BIP157 SPV
// clients (e.g. the swift-sdk iOS example app pointed at
// `local_seed`) need cfilter sync to work, and we want
// that requirement to survive any future flip of the base
// default.
compactFilters: true,
},
dashmate: {
helper: {
api: {
port: 29100,
},
},
},
platform: {
quorumList: {
api: {
port: 22444,
},
},
gateway: {
ssl: {
provider: SSL_PROVIDERS.SELF_SIGNED,
},
metrics: {
port: 29090,
},
admin: {
port: 29901,
},
listeners: {
dapiAndDrive: {
port: 2443,
},
},
rateLimiter: {
enabled: false,
metrics: {
port: 29102,
},
},
},
dapi: {
rsDapi: {
metrics: {
port: 29091,
},
},
},
drive: {
tenderdash: {
p2p: {
port: 46656,
flushThrottleTimeout: '10ms',
maxPacketMsgPayloadSize: 1024,
sendRate: 20000000,
recvRate: 20000000,
},
rpc: {
port: 46657,
},
pprof: {
port: 46060,
},
metrics: {
port: 46660,
},
// A local network genesis starts every node from scratch at the
// same time, so there is no populated peer to state sync from.
stateSync: {
enabled: false,
},
},
abci: {
tokioConsole: {
port: 26669,
},
metrics: {
port: 49090,
},
grovedbVisualizer: {
port: 28083,
},
epochTime: 1200,
validatorSet: {
quorum: {
llmqType: 106,
dkgInterval: 24,
activeSigners: 2,
rotation: false,
},
},
chainLock: {
quorum: {
llmqType: 100,
dkgInterval: 24,
activeSigners: 2,
rotation: false,
},
},
instantLock: {
quorum: {
llmqType: 104,
dkgInterval: 24,
activeSigners: 2,
rotation: false,
},
},
stateSync: {
snapshots: {
enabled: false,
},
},
},
},
},
environment: 'development',
network: NETWORK_LOCAL,
};
return new Config('local', lodashMerge({}, getBaseConfig()
.getStoredOptions(), options));
}
return getLocalConfig;
}