forked from rchain/rchain
-
Notifications
You must be signed in to change notification settings - Fork 2
/
defaults.conf
317 lines (245 loc) · 12.8 KB
/
defaults.conf
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# Start a stand-alone node.
# In this mode node
# 1. does not connect to any network
# 2. `casper.genesis-ceremony.ceremony-master-mode` = true
# 3. `required-signatures` = 0
# for node to be able to create and approve genesis block if its not available
standalone = false
autopropose = false
protocol-server {
# ID of the RChain network.
# Node shall only accept messages with this `network-id`.
# This is not Casper construct so it is not in `casper` section.
# This is used to filter out messages originated from different networks to lower down the load.
network-id = "testnet"
# Host name or IP address of this node. Will be used by peers to reach this node, so by default have to be public
# address.
# If this attribute is not set then node will try to guess its public IP address.
# Note: actual protocol server is binded to "0.0.0.0"
# host = localhost
# Use random ports in case RChain Protocol port and/or Kademlia port are not free.
use-random-ports = false
# Support dynamic IP
dynamic-ip = false
# Disable UPnP
no-upnp = false
# Port for protocol server
port = 40400
# Maximum message size that can be received
grpc-max-recv-message-size = 256K
# Maximum size of messages that can be received via streams
# This is effectively max size of a block
grpc-max-recv-stream-message-size = 256M
# Number of incoming RChain Protocol message consumers
# This should be high enough, as BlockMessage consumption can hang waiting for block processing lock and
# occupy one consumer.
# The very minimum should be {number of nodes} * {synchrony constraint}, which is enough to consume
# blocks proposed by peers simultaneously. Taking into account blocks are not the only protocol message,
# and blocks can be received as well via `requesting missing blocks` routine, it is recommended to
# make this number high. Upper bounded by the numer of messages (blocks are the biggest of them)
# node is able to keep in memory. Block size upper bound size is `max-stream-message-size`.
max-message-consumers = 400
# whether a node could export the state to other nodes
disable-state-exporter = false
}
protocol-client {
# Should be the same as server network ID.
network-id = ${protocol-server.network-id}
# Address of RNode to bootstrap from when connecting to a network.
# This should be provided by bootstrap node operator. You can bootstrap from any network peer.
# <node-id> is derived from TLS public key used to secure internode communications (see tls.key-path).
# To manually generate one the following command can be used
# ```openssl ec -text -in <path-to-tls-key>/node.key.pem | grep pub -A 5 | tail -n +2 | tr -d '\n[:space:]:' | \
# sed 's/^04//' | keccak-256sum -x -l | tr -d ' -' | tail -c 41```
bootstrap = "rnode://[email protected]?protocol=40400&discovery=40404"
# Disable the node to start from Last Finalized State, instead it will start from genesis.
# If this is `true`, when a node without any data connecting to existing network, the node would start from
# genesis block and validate blocks from scratch. Otherwise, the node would start from last finalized block which
# can save a lot of time of validating all the history blocks.
disable-lfs = false
# Number of connected peers picked randomly for broadcasting and streaming
batch-max-connections = 20
# Default timeout for network operations
network-timeout = 5 seconds
# Max message size for inbound gRPC messages
grpc-max-recv-message-size = ${protocol-server.grpc-max-recv-message-size}
# Chunk size for outbound streamed messages
grpc-stream-chunk-size = 256K
}
peers-discovery {
# host name or IP address of this node
# If this attribute is not set then the node will try to guess its IP address
# host = localhost
# Port for Kademlia server
port = 40404
# Interval for peers lookup
lookup-interval = 20 seconds
# Interval for check for stale connections
cleanup-interval = 20 minutes
# Number of connections to check for being active at a time
# If there are thousands of nodes, we might want to not check all of them each time.
# One of strategies might be to check all connections with moderately low `check-stale-interval`
# We implement this by default, so `batch-size` is high
heartbeat-batch-size = 100
# Check for first connection loop interval
init-wait-loop-interval = 1 seconds
}
api-server {
# Hostname or IP to bind API servers
host = "0.0.0.0"
# Port used for external gRPC API, exposes public API endpoints.
port-grpc-external = 40401
# Port used for internal gRPC API, exposes propose API and other non public endpoints.
port-grpc-internal = 40402
# Maximum size of message that can be received. This is effectively max size of a deploy.
grpc-max-recv-message-size = 16M
# Port for HTTP API
port-http = 40403
# Port for admin HTTP API
port-admin-http = 40405
# Some of API methods are loading blocks into memory, which can lead to memory exhaustion.
# This puts upper bound on number of blocks that can be loaded via single API call.
max-blocks-limit = 50
# Enable reporting API
enable-reporting = false
# Sets a custom keepalive time, the delay time for sending next keepalive ping
keep-alive-time = 2 hours
# Sets a custom keepalive timeout, the timeout for keepalive ping requests
keep-alive-timeout = 20 seconds
# The most aggressive keep-alive time clients are permitted to configure.
# The server would close the connection if clients exceeding this rate
permit-keep-alive-time = 5 minutes
# Sets a custom max connection idle time, connection being idle for longer than which will be gracefully terminated
max-connection-idle = 1 hours
# Sets a custom max connection age, connection lasting longer than which will be gracefully terminated
max-connection-age = 1 hours
# Sets a custom grace time for the graceful connection termination. Once the max connection age
# is reached, RPCs have the grace time to complete. RPCs that do not complete in time will be
# cancelled, allowing the connection to terminate
max-connection-age-grace = 1 hours
}
storage {
# Path to data directory. Depends on CLI `profile` option.
data-dir = ${default-data-dir}
}
tls {
# "Path to X.509 certificate for TLS. If file does not exist, certificate will be
# generated from PEM key located at `tls.key-path`.
certificate-path = ${storage.data-dir}/node.certificate.pem
# Path to private key for TLS. Elliptic curve secp256r1 key in PEM format is supported.
# If file does not exist, new key will be generated.
key-path = ${storage.data-dir}/node.key.pem
# Use a non blocking secure random instance to generate TLS key
secure-random-non-blocking = false
# TODO possibly remove
custom-certificate-location = false
custom-key-location = false
}
casper {
# Base16 encoding of the public key to use for signing a proposed blocks.
# Can be inferred from the private key for some signature algorithms.
# validator-public-key =
# Base16 encoding of the private key to use for signing a proposed blocks.
# It is not recommended to use in production since private key could be revealed through the process table.
# validator-private-key =
# Path to the base16 encoded private key to use for signing a proposed blocks.
# validator-private-key-path =
# Shard name written into PoS contract during genesis.
shard-name = root,
# ID of the parent shard. For root shard it's `/`. ID of the shard is `{parent-shard-id}/{shard-name}`.
# So for root named `root` shard ID is `/root`, for its child shard `rootchild` shard ID is `/root/rootchild`.
parent-shard-id = /
# Interval of the casper loop to maintain requested blocks and missing dependent blocks
# in the node runtime, there is a loop which would fetch dependency of the missing dag and maintain
# requested blocks. See
# https://github.com/rchain/rchain/blob/43a1dfd90ec16a4a5c3b24e7d7aab8bc160ccb2b/node/src/main/scala/coop/rchain/node/NodeRuntime.scala#L746-L759
casper-loop-interval = 30 seconds
# Timeout for the requested blocks
# all requests sent to request blocks is put into a data structure for maintain.
requested-blocks-timeout = 240 seconds
# Maximum number of block parents
max-number-of-parents = 2147483647
# Node will request for fork choice tips if the latest FCT is more then this value.
fork-choice-stale-threshold = 10 minutes
# Interval for check if fork choice tip is stale
fork-choice-check-if-stale-interval = 11 minutes
# Each block in Casper is justified by number of other blocks.
# Before creating new block node checks if sum stake behind blocks in justificaton
# is more then `synchrony-constraint-threshold` * {total stake of all other validators in a shard}.
synchrony-constraint-threshold = 0.67
# Node is allowed to propose a block only when last finalised block is less then `height-constraint-threshold`
# behind. This is experimental option.
height-constraint-threshold = 1000
# Genesis block variables
genesis-block-data {
genesis-data-dir = ${storage.data-dir}/genesis
# Plain text file consisting of lines of the form `<pk> <stake>`,
# which defines the bond amounts for each validator at genesis.
# <pk> is the public key (in base-16 encoding) identifying the validator and <stake>
# is the amount of Rev they have bonded (an integer).
bonds-file = ${casper.genesis-block-data.genesis-data-dir}/bonds.txt
# Plain text file consisting of lines of the form `<algorithm> <pk> <revBalance>`,
# which defines the Rev wallets that exist at genesis.
# <algorithm> is the algorithm used to verify signatures when using the wallet (one of ed25519 or secp256k1),
# <pk> is the public key (in base-16 encoding) identifying the wallet and <revBalance>
# is the amount of Rev in the wallet.
wallets-file = ${casper.genesis-block-data.genesis-data-dir}/wallets.txt
# Minimum bond accepted by the PoS contract in the genesis block.
bond-minimum = 1
# Maximum bond accepted by the PoS contract in the genesis block.
bond-maximum = 9223372036854775807
# Length of the validation epoch measured in blocks.
# This is put into PoS contract in the genesis block.
epoch-length = 10000
# Length of the quarantine time measured in blocks.
# This is put into PoS contract in the genesis block.
quarantine-length = 50000
# Max number of active validator in a shard. Validator rotation will be enabled if there are
# extra bond requests then slots available.
number-of-active-validators = 100
# genesis-block-number is used for hard fork on existing network.
genesis-block-number = 0
# Public keys accepted by the PoS contract in the genesis block.
pos-multi-sig-public-keys = [
04db91a53a2b72fcdcb201031772da86edad1e4979eb6742928d27731b1771e0bc40c9e9c9fa6554bdec041a87cee423d6f2e09e9dfb408b78e85a4aa611aad20c,
042a736b30fffcc7d5a58bb9416f7e46180818c82b15542d0a7819d1a437aa7f4b6940c50db73a67bfc5f5ec5b5fa555d24ef8339b03edaa09c096de4ded6eae14,
047f0f0f5bbe1d6d1a8dac4d88a3957851940f39a57cd89d55fe25b536ab67e6d76fd3f365c83e5bfe11fe7117e549b1ae3dd39bfc867d1c725a4177692c4e7754
]
# How many confirmations are necessary to use multi-sig vault.
# The value should be less or equal the number of PoS multi-sig public keys.
pos-multi-sig-quorum = 2
# Public key for transfers from the PoS vault
# This public key is used to make transfer from PoS vault defined in PoS contract
pos-vault-pub-key = ""
# Public key to manage updates of system contracts.
# It should be set when network is started (genesis block is created).
# Not setting this key will disable possibility to update system contracts.
system-contract-pub-key = ""
}
# If node has to create genesis block but no bonds file is provided, bonds file with a list of
# random public keys is generated + private keys corresponding to that keys are stored
# in `<genesis-path>/<public_key>.sk`
# This param specifies number of validator identites to generate.
autogen-shard-size = 5
# The minimum Phlogiston price. Value can be configured to provide sufficient transaction fees to cover
# the cost of the network and equipment
min-phlo-price = 1
}
# Enable/disable Kamon reporters. Kamon is used for metrics collection / aggregation.
metrics {
prometheus = false
# Enable default influxdb reporter
influxdb = false
# Our requirement is to send metrics every 500ms to InfluxDB. The default `kamon-influxdb` uses HTTP with a
# precision of epoch seconds for timestamps. In consequence, metrics are getting overwritten.
# For that reason we use a custom InfluxDB reporter which sends metrics over UDP with a
# precision of epoch milliseconds.
influxdb-udp = false
zipkin = false
sigar = false
}
dev-mode = false
dev {
# If set, on each propose node will add dummy deploy signed by this key.
# deployer-private-key =
}