-
Notifications
You must be signed in to change notification settings - Fork 223
/
config.toml
639 lines (500 loc) · 24.6 KB
/
config.toml
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
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
# ================================
# Configuration options for a node
# ================================
[node]
# If set, use this hash as a trust anchor when joining an existing network.
#trusted_hash = 'HEX-FORMATTED BLOCK HASH'
# Historical sync behavior for this node. Options are:
# 'genesis' (node will attempt to acquire all block data back to genesis)
# 'ttl' (node will attempt to acquire all block data to comply with time to live enforcement)
# 'nosync' (node will only acquire blocks moving forward)
# note: ttl is a chainsepc configured behavior on a given network; consult the `max_ttl` chainspec setting
# (it is currently ~18 hours by default on production and production-like networks but subject to change).
# note: `nosync` is incompatible with validator behavior; a nosync node is prevented from participating
# in consensus / switching to validate mode. it is primarily for lightweight nodes that are
# only interested in recent activity.
sync_handling = 'genesis'
# Idle time after which the syncing process is considered stalled.
idle_tolerance = '20 minutes'
# When the syncing process is considered stalled, it'll be retried up to `max_attempts` times.
max_attempts = 3
# Default delay for the control events that have no dedicated delay requirements.
control_logic_default_delay = '1 second'
# Flag which forces the node to resync all of the blocks.
force_resync = false
# A timeout for the ShutdownForUpgrade state, after which the node will upgrade even if not all
# conditions are satisfied.
shutdown_for_upgrade_timeout = '2 minutes'
# Maximum time a node will wait for an upgrade to commit.
upgrade_timeout = '30 seconds'
# The node detects when it should do a controlled shutdown when it is in a detectably bad state
# in order to avoid potentially catastrophic uncontrolled crashes. Generally, a node should be
# allowed to shutdown, and if restarted that node will generally recover gracefully and resume
# normal operation. However, actively validating nodes have subjective state in memory that is
# lost on shutdown / restart and must be reacquired from other validating nodes on restart.
# If all validating nodes shutdown in the middle of an era, social consensus is required to restart
# the network. As a mitigation for that, the following config can be set to true on some validator
# nodes to cause nodes that are supposed to be validators in the current era to ignore controlled
# shutdown events and stay up. This allows them to act as sentinels for the consensus data for
# other restarting nodes. This config is inert on non-validating nodes.
prevent_validator_shutdown = false
# =================================
# Configuration options for logging
# =================================
[logging]
# Output format. Possible values are 'text' or 'json'.
format = 'text'
# Colored output. Has no effect if format = 'json'.
color = false
# Abbreviate module names in text output. Has no effect if format = 'json'.
abbreviate_modules = false
# ===================================
# Configuration options for consensus
# ===================================
[consensus]
# Path (absolute, or relative to this config.toml) to validator's secret key file used to sign
# consensus messages.
secret_key_path = 'secret_key.pem'
# The maximum number of blocks by which execution is allowed to lag behind finalization.
# If it is more than that, consensus will pause, and resume once the executor has caught up.
max_execution_delay = 3
# =======================================
# Configuration options for Zug consensus
# =======================================
[consensus.zug]
# Request the latest protocol state from a random peer periodically, with this interval.
# '0 seconds' means it is disabled and we never request the protocol state from a peer.
sync_state_interval = '50 ms'
# Log inactive or faulty validators periodically, with this interval.
# '0 seconds' means it is disabled and we never print the log message.
log_participation_interval = '1 minute'
# The minimal proposal timeout. Validators wait this long for a proposal to receive a quorum of
# echo messages, before they vote to make the round skippable and move on to the next proposer.
proposal_timeout = '10 seconds'
# The additional proposal delay that is still considered fast enough, in percent. This should
# take into account variables like empty vs. full blocks, network traffic etc.
# E.g. if proposing a full block while under heavy load takes 50% longer than an empty one
# while idle this should be at least 50, meaning that the timeout is 50% longer than
# necessary for a quorum of recent proposals, approximately.
proposal_grace_period = 200
# The average number of rounds after which the proposal timeout adapts by a factor of 2.
# Note: It goes up faster than it goes down: it takes fewer rounds to double than to halve.
proposal_timeout_inertia = 10
# The maximum difference between validators' clocks we expect. Incoming proposals whose timestamp
# lies in the future by more than that are rejected.
clock_tolerance = '1 second'
# ===========================================
# Configuration options for Highway consensus
# ===========================================
[consensus.highway]
# The duration for which incoming vertices with missing dependencies should be kept in a queue.
pending_vertex_timeout = '1 minute'
# Request the latest protocol state from a random peer periodically, with this interval.
# '0 seconds' means it is disabled and we never request the protocol state from a peer.
request_state_interval = '20 seconds'
# Log inactive or faulty validators periodically, with this interval.
# '0 seconds' means it is disabled and we never print the log message.
log_participation_interval = '15 seconds'
# Log the synchronizer state periodically, with this interval.
# '0 seconds' means it is disabled and we never print the log message.
log_synchronizer_interval = '5 seconds'
# Log the size of every incoming and outgoing serialized unit.
log_unit_sizes = false
# The maximum number of peers we request the same vertex from in parallel.
max_requests_for_vertex = 5
# The maximum number of dependencies we request per validator in a batch.
# Limits requests per validator in panorama - in order to get a total number of
# requests, multiply by # of validators.
max_request_batch_size = 20
[consensus.highway.round_success_meter]
# The number of most recent rounds we will be keeping track of.
num_rounds_to_consider = 40
# The number of successful rounds that triggers us to slow down: With this many or fewer
# successes per `num_rounds_to_consider`, we increase our round length.
num_rounds_slowdown = 10
# The number of successful rounds that triggers us to speed up: With this many or more successes
# per `num_rounds_to_consider`, we decrease our round length.
num_rounds_speedup = 32
# We will try to accelerate (decrease our round length) every `acceleration_parameter` rounds if
# we have few enough failures.
acceleration_parameter = 40
# The FTT, as a percentage (i.e. `acceleration_ftt = [1, 100]` means 1% of the validators' total weight), which
# we will use for looking for a summit in order to determine a proposal's finality.
# The required quorum in a summit we will look for to check if a round was successful is
# determined by this FTT.
acceleration_ftt = [1, 100]
# ====================================
# Configuration options for networking
# ====================================
[network]
# The public address of the node.
#
# It must be publicly available in order to allow peers to connect to this node.
# If the port is set to 0, the actual bound port will be substituted.
public_address = '127.0.0.1:0'
# Address to bind to for listening.
# If port is set to 0, a random port will be used.
bind_address = '0.0.0.0:34553'
# Addresses to connect to in order to join the network.
#
# If not set, this node will not be able to attempt to connect to the network. Instead it will
# depend upon peers connecting to it. This is normally only useful for the first node of the
# network.
#
# Multiple addresses can be given and the node will attempt to connect to each, requiring at least
# one connection.
known_addresses = ['127.0.0.1:34553']
# Minimum number of fully-connected peers to consider network component initialized.
min_peers_for_initialization = 3
# The interval between each fresh round of gossiping the node's public address.
gossip_interval = '30 seconds'
# Initial delay for starting address gossipping after the network starts. This should be slightly
# more than the expected time required for initial connections to complete.
initial_gossip_delay = '5 seconds'
# How long a connection is allowed to be stuck as pending before it is abandoned.
max_addr_pending_time = '1 minute'
# Maximum time allowed for a connection handshake between two nodes to be completed. Connections
# exceeding this threshold are considered unlikely to be healthy or even malicious and thus
# terminated.
handshake_timeout = '20 seconds'
# Maximum number of incoming connections per unique peer allowed. If the limit is hit, additional
# connections will be rejected. A value of `0` means unlimited.
max_incoming_peer_connections = 3
# The maximum total of upstream bandwidth in bytes per second allocated to non-validating peers.
# A value of `0` means unlimited.
max_outgoing_byte_rate_non_validators = 0
# The maximum allowed total impact of requests from non-validating peers per second answered.
# A value of `0` means unlimited.
max_incoming_message_rate_non_validators = 0
# Maximum number of requests for data from a single peer that are allowed be buffered. A value of
# `0` means unlimited.
max_in_flight_demands = 50
# Version threshold to enable tarpit for.
#
# When set to a version (the value may be `null` to disable the feature), any peer that reports a
# protocol version equal or below the threshold will be rejected only after holding open the
# connection for a specific (`tarpit_duration`) amount of time.
#
# This option makes most sense to enable on known nodes with addresses where legacy nodes that are
# still in operation are connecting to, as these older versions will only attempt to reconnect to
# other nodes once they have exhausted their set of known nodes.
tarpit_version_threshold = '1.2.1'
# How long to hold connections to trapped legacy nodes.
tarpit_duration = '10 minutes'
# The probability [0.0, 1.0] of this node trapping a legacy node.
#
# Since older nodes will only reconnect if all their options are exhausted, it is sufficient for a
# single known node to hold open a connection to prevent the node from reconnecting. This should be
# set to `1/n` or higher, with `n` being the number of known nodes expected in the configuration of
# legacy nodes running this software.
tarpit_chance = 0.2
# How long peers remain blocked after they get blocklisted.
blocklist_retain_duration = '1 minute'
# Identity of a node
#
# When this section is not specified, an identity will be generated when the node process starts with a self-signed certifcate.
# This option makes sense for some private chains where for security reasons joining new nodes is restricted.
# [network.identity]
# tls_certificate = "local_node_cert.pem"
# secret_key = "local_node.pem"
# ca_certificate = "ca_cert.pem"
# Weights for impact estimation of incoming messages, used in combination with
# `max_incoming_message_rate_non_validators`.
#
# Any weight set to 0 means that the category of traffic is exempt from throttling.
[network.estimator_weights]
consensus = 0
block_gossip = 1
deploy_gossip = 0
finality_signature_gossip = 1
address_gossip = 0
finality_signature_broadcasts = 0
deploy_requests = 1
deploy_responses = 0
legacy_deploy_requests = 1
legacy_deploy_responses = 0
block_requests = 1
block_responses = 0
block_header_requests = 1
block_header_responses = 0
trie_requests = 1
trie_responses = 0
finality_signature_requests = 1
finality_signature_responses = 0
sync_leap_requests = 1
sync_leap_responses = 0
approvals_hashes_requests = 1
approvals_hashes_responses = 0
execution_results_requests = 1
execution_results_responses = 0
# Identity of a node
#
# When this section is not specified, an identity will be generated when the node process starts with a self-signed certifcate.
# This option makes sense for some private chains where for security reasons joining new nodes is restricted.
# [network.identity]
# tls_certificate = "local_node_cert.pem"
# secret_key = "local_node.pem"
# ca_certificate = "ca_cert.pem"
# ==================================================
# Configuration options for the JSON-RPC HTTP server
# ==================================================
[rpc_server]
# Flag which enables the JSON-RPC HTTP server.
enable_server = true
# Listening address for JSON-RPC HTTP server. If the port is set to 0, a random port will be used.
#
# If the specified port cannot be bound to, a random port will be tried instead. If binding fails,
# the JSON-RPC HTTP server will not run, but the node will be otherwise unaffected.
#
# The actual bound address will be reported via a log line if logging is enabled.
address = '0.0.0.0:7777'
# The global max rate of requests (per second) before they are limited.
# Request will be delayed to the next 1 second bucket once limited.
qps_limit = 100
# Maximum number of bytes to accept in a single request body.
max_body_bytes = 2_621_440
# Specifies which origin will be reported as allowed by RPC server.
#
# If left empty, CORS will be disabled.
# If set to '*', any origin is allowed.
# Otherwise, only a specified origin is allowed. The given string must conform to the [origin scheme](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin).
cors_origin = ''
# ========================================================================
# Configuration options for the speculative execution JSON-RPC HTTP server
# ========================================================================
[speculative_exec_server]
# Flag which enables the speculative execution JSON-RPC HTTP server.
enable_server = true
# Listening address for speculative execution JSON-RPC HTTP server. If the port
# is set to 0, a random port will be used.
#
# If the specified port cannot be bound to, a random port will be tried instead.
# If binding fails, the speculative execution JSON-RPC HTTP server will not run,
# but the node will be otherwise unaffected.
#
# The actual bound address will be reported via a log line if logging is enabled.
address = '0.0.0.0:7778'
# The global max rate of requests (per second) before they are limited.
# Request will be delayed to the next 1 second bucket once limited.
qps_limit = 1
# Maximum number of bytes to accept in a single request body.
max_body_bytes = 2_621_440
# Specifies which origin will be reported as allowed by speculative execution server.
#
# If left empty, CORS will be disabled.
# If set to '*', any origin is allowed.
# Otherwise, only a specified origin is allowed. The given string must conform to the [origin scheme](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin).
cors_origin = ''
# ==============================================
# Configuration options for the REST HTTP server
# ==============================================
[rest_server]
# Flag which enables the REST HTTP server.
enable_server = true
# Listening address for REST HTTP server. If the port is set to 0, a random port will be used.
#
# If the specified port cannot be bound to, a random port will be tried instead. If binding fails,
# the REST HTTP server will not run, but the node will be otherwise unaffected.
#
# The actual bound address will be reported via a log line if logging is enabled.
address = '0.0.0.0:8888'
# The global max rate of requests (per second) before they are limited.
# Request will be delayed to the next 1 second bucket once limited.
qps_limit = 100
# Specifies which origin will be reported as allowed by REST server.
#
# If left empty, CORS will be disabled.
# If set to '*', any origin is allowed.
# Otherwise, only a specified origin is allowed. The given string must conform to the [origin scheme](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin).
cors_origin = ''
# ==========================================================
# Configuration options for the SSE HTTP event stream server
# ==========================================================
[event_stream_server]
# Flag which enables the SSE HTTP event stream server.
enable_server = true
# Listening address for SSE HTTP event stream server. If the port is set to 0, a random port will be used.
#
# If the specified port cannot be bound to, a random port will be tried instead. If binding fails,
# the SSE HTTP event stream server will not run, but the node will be otherwise unaffected.
#
# The actual bound address will be reported via a log line if logging is enabled.
address = '0.0.0.0:9999'
# The number of event stream events to buffer.
event_stream_buffer_length = 5000
# The maximum number of subscribers across all event streams the server will permit at any one time.
max_concurrent_subscribers = 100
# Specifies which origin will be reported as allowed by event stream server.
#
# If left empty, CORS will be disabled.
# If set to '*', any origin is allowed.
# Otherwise, only a specified origin is allowed. The given string must conform to the [origin scheme](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin).
cors_origin = ''
# ===============================================
# Configuration options for the storage component
# ===============================================
[storage]
# Path (absolute, or relative to this config.toml) to the folder where any files created
# or read by the storage component will exist. A subfolder named with the network name will be
# automatically created and used for the storage component files.
#
# If the folder doesn't exist, it and any required parents will be created.
#
# If unset, the path must be supplied as an argument via the CLI.
path = '../node-storage'
# Maximum size of the database to use for the block store.
#
# The size should be a multiple of the OS page size.
#
# 483_183_820_800 == 18 GiB.
max_block_store_size = 19_327_352_832
# Maximum size of the database to use for the deploy store.
#
# The size should be a multiple of the OS page size.
#
# 322_122_547_200 == 12 GiB.
max_deploy_store_size = 12_884_901_888
# Maximum size of the database to use for the deploy metadata.
#
# The size should be a multiple of the OS page size.
#
# 322_122_547_200 == 12 GiB.
max_deploy_metadata_store_size = 12_884_901_888
# Maximum size of the database to use for the state snapshots.
#
# The size should be a multiple of the OS page size.
#
# 10_737_418_240 == 10 GiB.
max_state_store_size = 10_737_418_240
# Memory deduplication.
#
# If enabled, nodes will attempt to share loaded objects if possible.
enable_mem_deduplication = true
# Memory duplication garbage collection.
#
# Sets the frequency how often the memory pool cache is swept for free references.
# For example, setting this value to 5 means that every 5th time something is put in the pool the cache is swept.
mem_pool_prune_interval = 4096
# ===================================
# Configuration options for gossiping
# ===================================
[gossip]
# Target number of peers to infect with a given piece of data.
infection_target = 3
# The saturation limit as a percentage, with a maximum value of 99. Used as a termination
# condition.
#
# Example: assume the `infection_target` is 3, the `saturation_limit_percent` is 80, and we don't
# manage to newly infect 3 peers. We will stop gossiping once we know of more than 15 holders
# excluding us since 80% saturation would imply 3 new infections in 15 peers.
saturation_limit_percent = 80
# The maximum duration for which to keep finished entries.
#
# The longer they are retained, the lower the likelihood of re-gossiping a piece of data. However,
# the longer they are retained, the larger the list of finished entries can grow.
finished_entry_duration = '1 minute'
# The timeout duration for a single gossip request, i.e. for a single gossip message
# sent from this node, it will be considered timed out if the expected response from that peer is
# not received within this specified duration.
gossip_request_timeout = '10 seconds'
# The timeout duration for retrieving the remaining part(s) of newly-discovered data
# from a peer which gossiped information about that data to this node.
get_remainder_timeout = '5 seconds'
# The timeout duration for a newly-received, gossiped item to be validated and stored by another
# component before the gossiper abandons waiting to gossip the item onwards.
validate_and_store_timeout = '1 minute'
# ===============================================
# Configuration options for the block accumulator
# ===============================================
[block_accumulator]
# Block height difference threshold for starting to execute the blocks.
attempt_execution_threshold = 3
# Accepted time interval for inactivity in block accumulator.
dead_air_interval = '3 minutes'
# Time after which the block acceptors are considered old and can be purged.
purge_interval = '5 minutes'
# ================================================
# Configuration options for the block synchronizer
# ================================================
[block_synchronizer]
# Maximum number of fetch-trie tasks to run in parallel during block synchronization.
max_parallel_trie_fetches = 5000
# Time interval for the node to ask for refreshed peers.
peer_refresh_interval = '90 seconds'
# Time interval for the node to check what the block synchronizer needs to acquire next.
need_next_interval = '1 second'
# Time interval for recurring disconnection of dishonest peers.
disconnect_dishonest_peers_interval = '10 seconds'
# Time interval for resetting the latch in block builders.
latch_reset_interval = '5 seconds'
# =============================================
# Configuration options for the block validator
# =============================================
[block_validator]
# Maximum number of completed entries to retain.
#
# A higher value can avoid creating needless validation work on an already-validated proposed
# block, but comes at the cost of increased memory consumption.
max_completed_entries = 3
# ==================================
# Configuration options for fetchers
# ==================================
[fetcher]
# The timeout duration for a single fetcher request, i.e. for a single fetcher message
# sent from this node to another node, it will be considered timed out if the expected response from that peer is
# not received within this specified duration.
get_from_peer_timeout = '10 seconds'
# ========================================================
# Configuration options for the contract runtime component
# ========================================================
[contract_runtime]
# Optional maximum size of the database to use for the global state store.
#
# If unset, defaults to 805,306,368,000 == 750 GiB.
#
# The size should be a multiple of the OS page size.
max_global_state_size = 32_212_254_720
# Optional depth limit to use for global state queries.
#
# If unset, defaults to 5.
max_query_depth = 5
# Enable manual synchronizing to disk.
#
# If unset, defaults to true.
enable_manual_sync = true
# =============================================
# Configuration options for the deploy acceptor
# =============================================
[deploy_acceptor]
# The leeway allowed when considering whether a deploy is future-dated or not.
#
# To accommodate minor clock drift, deploys whose timestamps are within `timestamp_leeway` in the
# future are still acceptable.
#
# The maximum value to which `timestamp_leeway` can be set is defined by the chainspec setting
# `deploys.max_timestamp_leeway`.
timestamp_leeway = '2 seconds'
# ===========================================
# Configuration options for the deploy buffer
# ===========================================
[deploy_buffer]
# The interval of checking for expired deploys.
expiry_check_interval = '1 minute'
# ==============================================
# Configuration options for the diagnostics port
# ==============================================
[diagnostics_port]
# If set, the diagnostics port will be available on a UNIX socket.
enabled = true
# Filename for the UNIX domain socket the diagnostics port listens on.
socket_path = "debug.socket"
# The umask to set before creating the socket. A restrictive mask like `0o077` will cause the
# socket to be only accessible by the user the node runs as. A more relaxed variant is `0o007`,
# which allows for group access as well.
socket_umask = 0o077
# =============================================
# Configuration options for the upgrade watcher
# =============================================
[upgrade_watcher]
# How often to scan file system for available upgrades.
upgrade_check_interval = '30 seconds'