-
Notifications
You must be signed in to change notification settings - Fork 481
Expand file tree
/
Copy pathdefault.toml
More file actions
1778 lines (1627 loc) · 82.9 KB
/
default.toml
File metadata and controls
1778 lines (1627 loc) · 82.9 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
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
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Name of this Firedancer instance. This name serves as a unique token
# so that multiple Firedancer instances can run side by side without
# conflicting when they need to share a system or kernel namespace.
# When starting a Firedancer instance, it will potentially load, reset,
# or overwrite any state created by a prior or currently running
# instance with the same name.
name = "fd1"
# The operating system user to permission data and run Firedancer as.
# Firedancer needs to start privileged, either with various capabilities
# or as root, so that it can configure kernel bypass networking. Once
# this configuration has been performed, the process will enter a highly
# restrictive sandbox, drop all privileges, and switch to the user given
# here. When running the configuration steps of `fdctl configure` data
# will be permissioned so that is it writable for this user and not the
# user which is performing the configuration.
#
# Firedancer requires nothing from this user, and it should be as
# minimally permissioned as is possible. It is suggested to run
# Firedancer as a separate user from other processes on the machine so
# that they cannot attempt to send signals, ptrace, or otherwise
# interfere with the process. You should under no circumstances use a
# superuser or privileged user here, and Firedancer will not allow you
# to use the root user. It is also not a good idea to use a user that
# has access to `sudo` or has other entries in the sudoers file.
#
# Firedancer will automatically determine a user to run as if none is
# provided. By default, the user is determined by the following
# sequence:
#
# 1. The `SUDO_USER`, `LOGNAME`, `USER`, `LNAME`, or `USERNAME`
# environment variables are checked in this order, and if one of
# them is set that user is used
# 2. The `/proc/self/loginuid` file is used to determine the UID, and
# the username is looked up in nss (the name service switch).
#
# This means if running as sudo, the user will be the terminal user
# which invoked sudo, not the root user.
user = ""
# Absolute directory path to place scratch files used during setup and
# operation. The ledger and accounts databases will also be placed in
# here by default, although that can be overridden by other options.
#
# Two substitutions will be performed on this string. If "{user}" is
# present it will be replaced with the user running Firedancer, as
# above, and "{name}" will be replaced with the name of the Firedancer
# instance.
scratch_directory = "/home/{user}/.firedancer/{name}"
# Port range used for various incoming network listeners, in the form
# `<MIN_PORT>-<MAX_PORT>` inclusive. The range used includes min, but
# not max [min, max). Ports are used for receiving transactions and
# votes from clients and other validators.
#
# For Firedancer, ports are assigned statically in later parts of this
# configuration file, and this option is passed to the Agave
# client with the `--dynamic-port-range` argument. Agave will use
# this to determine port locations for services not yet rewritten as
# part of Firedancer, including gossip and RPC. This port range should
# NOT overlap with any of the static ports used by Firedancer below.
dynamic_port_range = "8900-9000"
# Firedancer logs to two places by default: stderr and a logfile.
# stdout is not used for logging, and will only be used to print command
# output or boot errors. Messages to "stderr" are abbreviated and not
# as fully detailed as those to the log file. The log file is intended
# for long term archival purposes. The log levels mirror the Linux
# syslog levels, which are, from lowest to highest priority:
#
# - DEBUG Development and diagnostic messages.
# - INFO Less important informational notice.
# - NOTICE More important informational notice.
# - WARNING Unexpected condition, shouldn't happen. Should be
# investigated.
# - ERR Kills Firedancer. Routine error, likely programmer error.
# - CRIT Kills Firedancer. Critical errors.
# - ALERT Kills Firedancer. Alert requiring immediate attention.
# - EMERG Kills Firedancer. Emergency requiring immediate
# attention, security or risk issue.
#
# Default behaviors are:
#
# - DEBUG messages are not written to either stream.
# - INFO messages are written in detailed form to the log file.
# - NOTICE is INFO + messages are written in summary form to
# stderr.
# - WARNING is NOTICE + the log file is flushed to disk.
# - ERR and above are WARNING + the program will be exited with an
# error code of 1.
#
# All processes in Firedancer share one log file, and they all inherit
# STDERR and STDOUT from the launcher. An example log message would
# look something like:
#
# NOTICE 01-23 04:56:07.890123 45678 f0 0 src/file.c(901): 1 is the loneliest number
#
# to the ephemeral log (stderr) and log something like:
#
# NOTICE 2023-01-23 04:56:07.890123456 GMT-06 45678:45678 user:host:f0 app:thread:0 src/file.c(901)[func]: 1 is the loneliest number
#
# to the permanent log (log file).
#
# Firedancer does not support rotating the log file in response to
# SIGUSR1 or SIGUSR2. Instead, it will silently swallow and ignore
# these signals. To perform log rotation, it is suggested to use a
# mechanism like the `copytruncate` directive of `logrotate`.
[log]
# Absolute file path of where to place the log file. It will be
# appended to, or created if it does not already exist. The
# shortened ephemeral log will always be written to stderr.
#
# Two substitutions will be performed on this string. If "{user}"
# is present it will be replaced with the user running Firedancer,
# as above, and "{name}" will be replaced with the name of the
# Firedancer instance.
#
# If no path is provided, the default is to place the log file in
# /tmp with a name that will be unique. If specified as "-", the
# permanent log will be written to stdout.
path = ""
# Firedancer can colorize the stderr ephemeral log using ANSI escape
# codes so that it looks pretty in a terminal. This option must be
# one of "auto", "true", or "false". If set to "auto" stderr output
# will be colorized if we can detect the terminal supports it. The
# log file output will never be colorized.
colorize = "auto"
# The minimum log level which will be written to the log file. Log
# levels lower than this will be skipped. Must be one of the levels
# described above.
level_logfile = "INFO"
# The minimum log level which will be written to stderr. Log levels
# lower than this will be skipped. Must be one of the levels
# described above. This should be at least the same as the level
# for the log file.
level_stderr = "NOTICE"
# The minimum log level which will immediately flush the log file to
# disk. Must be one of the levels described above.
level_flush = "WARNING"
# The client supports sending health reports, and performance and
# diagnostic information to a remote server for collection and analysis.
# This reporting powers the Solana Validator Dashboard and is often used
# by developers to monitor network health.
[reporting]
# A metrics environment string describing where to report the
# diagnostic event data to. The options for public clusters are
# described at https://docs.solanalabs.com/clusters/available,
# and are:
#
# mainnet-beta:
# "host=https://metrics.solana.com:8086,db=mainnet-beta,u=mainnet-beta_write,p=password"
#
# devnet:
# "host=https://metrics.solana.com:8086,db=devnet,u=scratch_writer,p=topsecret"
#
# testnet:
# "host=https://metrics.solana.com:8086,db=tds,u=testnet_write,p=c4fa841aa918bf8274e3e2a44d77568d9861b3ea"
#
# If no option is provided here, event reporting is disabled.
#
# This string is passed to the Agave client with the
# `SOLANA_METRICS_CONFIG` environment variable.
solana_metrics_config = ""
# The ledger is the set of information that can be replayed to get back
# to the current state of the chain. In Solana, it is considered a
# combination of the genesis, and the recent unconfirmed blocks. The
# accounts database (the current balance of all the accounts) is
# information that is derived from the ledger.
[ledger]
# Absolute directory path to place the ledger. Firedancer currently
# spawns a Agave validator to execute transactions that it
# receives. If no ledger path is provided, it is defaulted to the
# `ledger` subdirectory of the scratch directory above.
#
# Two substitutions will be performed on this string. If "{user}"
# is present it will be replaced with the user running Firedancer,
# as above, and "{name}" will be replaced with the name of the
# Firedancer instance.
#
# The ledger path constructed here is passed to the Agave
# client with the `--ledger` argument.
path = ""
# Absolute directory path to place the accounts database in. If
# this is empty, it will default to the `accounts` subdirectory of
# the ledger `path` above.
#
# Two substitutions will be performed on this string. If "{user}"
# is present it will be replaced with the user running Firedancer,
# as above, and "{name}" will be replaced with the name of the
# Firedancer instance.
#
# This option is passed to the Agave client with the `--accounts` argument.
accounts_path = ""
# Maximum number of shreds to keep in root slots in the ledger
# before discarding.
#
# The default is chosen to allow enough time for a validator to
# download a snapshot from a peer and boot from it, and to make sure
# that if a validator needs to reboot from its own snapshot, it has
# enough slots locally to catch back up to where it was when it
# stopped. It works out to around 400GB of space.
#
# This option is passed to the Agave client with the
# `--limit-ledger-size` argument.
limit_size = 200_000_000
# If nonempty, enable an accounts index indexed by the specified
# field. The account field must be one of "program-id",
# "spl-token-owner", or "spl-token-mint". These options are passed
# to the Agave client with the `--account-index` argument.
account_indexes = []
# If account indexes are enabled, exclude these keys from the index.
# These options are passed to the Agave client with the
# `--account-index-exclude-key` argument.
account_index_exclude_keys = []
# If account indexes are enabled, only include these keys in the
# index. This overrides `account_index_exclude_keys` if specified
# and that value will be ignored. These options are passed to the
# Agave client with the `--account-index-include-key` argument.
account_index_include_keys = []
# If account indexes are enabled, they are flushed to disk
# periodically. Otherwise, the entire index is kept in memory.
# Setting this to false may reduce disk I/O strain. This option is
# passed to the Agave client with the `--enable-accounts-disk-index`
# argument.
enable_accounts_disk_index = false
# If account indexes are enabled, this is the absolute directory
# path to place the accounts index in. If this is empty, it
# will default to the `accounts_index` subdirectory of the ledger
# `path` above. This option is passed to the Agave client with
# the `--accounts-index-path` argument. Setting this will
# automatically set the [ledger.enable_accounts_disk_index] to true.
accounts_index_path = ""
# Every epoch, the client calculates a hash of all the accounts
# on-chain called the Epoch Accounts Hash. As a part of this
# process, the client iterates over the entire accounts database
# to calculate serialized hashes for every account which are then
# stored in several files in a directory on disk.
#
# This option specifies the absolute directory path to place the
# accounts hash cache data in. If this is empty, it will default
# to the `accounts_hash_cache` subdirectory of the ledger `path`
# above. This option is passed to the Agave client with the
# `--accounts-hash-cache-path` argument.
accounts_hash_cache_path = ""
# Whether to use compression when storing snapshots. This option is
# passed to the Agave client with the
# `--snapshot-archive-format` argument.
snapshot_archive_format = "zstd"
# Refuse to start if saved tower state is not found. This option is
# passed to the Agave client with the `--require-tower`
# argument.
require_tower = false
[gossip]
# Routable DNS name or IP address and port number to use to
# rendezvous with the gossip cluster. These entrypoints are passed
# to the Agave client with the `--entrypoint` argument.
entrypoints = []
# If true, checks at startup that at least one of the provided
# entrypoints can connect to this validator on all necessary ports.
# If it can't, then the validator will exit.
#
# This option is passed to the Agave client inverted with the
# `--no-port-check` argument.
port_check = true
# The port number to use for receiving gossip messages on this
# validator. This option is passed to the Agave client with
# the `--gossip-port` argument. This argument is required. Agave
# treats this as an optional argument, but the code that tries
# to find a default will always fail.
port = 8001
[rpc]
# If nonzero, enable JSON RPC on this port, and use the next port
# for the RPC websocket. If zero, disable JSON RPC. This option is
# passed to the Agave client with the `--rpc-port` argument.
port = 0
# If true, all RPC operations are enabled on this validator,
# including non-default RPC methods for querying chain state and
# transaction history. This option is passed to the Agave
# client with the `--full-rpc-api` argument.
full_api = false
# If the RPC is private, the validator's open RPC port is not
# published in the `solana gossip` command for use by others. This
# option is passed to the Agave client with the
# `--private-rpc` argument.
private = false
# The address to bind the RPC port. If no address is specified,
# the default RPC bind address is 127.0.0.1 if [rpc.private] = true,
# otherwise it's 0.0.0.0. This option is passed to the Agave client
# with the `--rpc-bind-address` argument.
bind_address = ""
# RPC address for the validator to advertise publicly in gossip.
# Useful for validators running behind a load balancer or proxy.
# This option is passed to the Agave client
# with the `--public-rpc-address` argument.
public_address = ""
# Enable historical transaction info over JSON RPC, including the
# `getConfirmedBlock` API. This will cause an increase in disk
# usage and IOPS. This option is passed to the Agave client
# with the `--enable-rpc-transaction-history` argument.
transaction_history = false
# If enabled, include CPI inner instructions, logs, and return data
# in the historical transaction info stored. This option is passed
# to the Agave client with the
# `--enable-extended-tx-metadata-storage` argument.
extended_tx_metadata_storage = false
# If true, use the RPC service of known validators only. This
# option is passed to the Agave client with the
# `--only-known-rpc` argument.
only_known = true
# If true, enable the unstable RPC PubSub `blockSubscribe`
# subscription. This option is passed to the Agave client
# with the `--rpc-pubsub-enable-block-subscription` argument.
pubsub_enable_block_subscription = false
# If true, enable the unstable RPC PubSub `voteSubscribe`
# subscription. This option is passed to the Agave client
# with the `--rpc-pubsub-enable-vote-subscription` argument.
pubsub_enable_vote_subscription = false
# If enabled, fetch historical transaction info from a BigTable
# instance as a fallback to local ledger data when serving RPC
# requests. The `GOOGLE_APPLICATION_CREDENTIALS` environment
# variable must be set to access BigTable.
#
# This option is passed to the Agave client with the
# `--enable-rpc-bigtable-ledger-storage` argument.
bigtable_ledger_storage = false
# The Agave client periodically takes and stores snapshots of the
# chain's state. Other clients, especially as they bootstrap or catch
# up to the head of the chain, may request a snapshot.
[snapshots]
# If false, all snapshots (both full and incremental) will not be
# produced. This option is passed to the Agave client (inverted)
# with the `--no-snapshots` argument.
enabled = true
# Enable incremental snapshots by setting this flag. This option is
# passed to the Agave client (inverted) with the
# `--no-incremental-snapshots` argument.
incremental_snapshots = true
# Set how frequently full snapshots are taken, measured in slots,
# where one slot is about 400ms on production chains. It's
# recommended to leave this to the default or to set it to the same
# value that the known validators are using. Must be a multiple of
# the incremental snapshot interval. This options is passed to the
# Agave client with the `--full-snapshot-interval-slots` argument.
full_snapshot_interval_slots = 25000
# Set how frequently incremental snapshots are taken, measured in
# slots. Must be a multiple of the accounts hash interval (which is
# 100 by default). This options is passed to the Agave client with
# the `--snapshot-interval-slots` argument.
incremental_snapshot_interval_slots = 100
# Set the maximum number of full snapshot archives to keep when
# purging older snapshots. This option is passed to the Agave
# client with the `--maximum-full-snapshots-to-retain` argument.
maximum_full_snapshots_to_retain = 2
# Set the maximum number of incremental snapshot archives to keep
# when purging older snapshots. This option is passed to the Agave
# client with the `--maximum-incremental-snapshots-to-retain`
# argument.
maximum_incremental_snapshots_to_retain = 4
# Set the minimum snapshot download speed in bytes per second. If
# the initial download speed falls below this threshold, the
# validator will retry the download against a different RPC node.
#
# The default value is 10MB/s. This option is passed to the Agave
# client with the `--minimum-snapshot-download-speed` argument.
minimum_snapshot_download_speed = 10485760
# The maximum number of times to abort and retry when encountering a
# slow snapshot download.
#
# The default value is 5 retries. This option is passed to the
# Agave client with the `--maximum-snapshot-download-abort`
# argument.
maximum_snapshot_download_abort = 5
# Absolute directory path for storing snapshots. If no path is
# provided, it defaults to the [ledger.path] option from above.
#
# Two substitutions will be performed on this string. If "{user}"
# is present it will be replaced with the user running Firedancer,
# as above, and "{name}" will be replaced with the name of the
# Firedancer instance.
#
# The snapshot path constructed here is passed to the Agave
# client with the `--snapshots` argument.
path = ""
# Absolute directory path for storing incremental snapshots. If no
# path is provided, defaults to the [snapshots.path] option above,
# or if that is not provided, the [ledger.path] option above.
#
# Two substitutions will be performed on this string. If "{user}"
# is present it will be replaced with the user running Firedancer,
# as above, and "{name}" will be replaced with the name of the
# Firedancer instance.
#
# The snapshot path constructed here is passed to the Agave
# client with the `--incremental-snapshot-archive-path` argument.
incremental_path = ""
[consensus]
# Absolute path to a `keypair.json` file containing the identity of
# the validator. When connecting to dev, test, or mainnet it is
# required to provide an identity file.
#
# Two substitutions will be performed on this string. If "{user}"
# is present it will be replaced with the user running Firedancer,
# as above, and "{name}" will be replaced with the name of the
# Firedancer instance.
#
# When running a local cluster, Firedancer will generate a keypair
# if one is not provided (or has not already been generated) and
# place it in this path. If no path is provided, it is defaulted
# to inside the scratch directory, under path `identity.json`.
#
# This option is passed to the Agave client with the
# `--identity` argument.
identity_path = ""
# Absolute path to a `keypair.json` containing the voting account
# of the validator. You can alternatively provide the base58
# encoded pubkey of the vote account to use with this validator. If
# no voting account is provided, voting will be disabled and the
# validator will cast no votes.
#
# Two substitutions will be performed on this string. If "{user}"
# is present it will be replaced with the user running Firedancer,
# as above, and "{name}" will be replaced with the name of the
# Firedancer instance.
#
# The authorized voter for the vote account must be either the
# identity keypair or one of the authorized-voter keypairs.
#
# When running a local cluster, Firedancer will generate a keypair
# if one is not provided (or has not already been generated) and
# place it in this path. If no path is provided, it is defaulted
# to inside the scratch directory, under path `vote-account.json`.
#
# This option is passed to the Agave client with the
# `--vote-account` argument.
vote_account_path = ""
# List of absolute paths to authorized-voter keypairs for the vote
# account. This is not needed if no vote account is specified.
# If a vote account is specified and this is empty, the identity
# account will be used as the authorized-voter account.
#
# Two substitutions will be performed on each string in this list.
# If "{user}" is present it will be replaced with the user running
# Firedancer, as above, and "{name}" will be replaced with the
# name of the Firedancer instance.
#
# These options are passed to the Agave client with the
# `--authorized-voter` argument.
authorized_voter_paths = []
# If false, do not attempt to fetch a snapshot from the cluster,
# instead start from a local snapshot if one is present. A snapshot
# is required to run the validator, so either one must be present,
# or you need to fetch it. The snapshot will be fetched from a
# validator in the list of entrypoints. If no validators are listed
# there, starting the validator will fail. This option is passed
# (inverted) to the Agave client with the `--no-snapshot-fetch`
# argument.
snapshot_fetch = true
# If false, do not attempt to fetch the genesis from the cluster.
# This option is passed (inverted) to the Agave client with
# the `--no-genesis-fetch` argument.
genesis_fetch = true
# On startup, do some simulations to see how fast the validator can
# generate proof of history. If it is too slow to keep up with the
# network, exit out during boot. It is recommended to leave this on
# to ensure you can keep up with the network. This option is passed
# to the Agave client (inverted) with the
# `--no-poh-speed-test` argument.
poh_speed_test = true
# If set, require the genesis block to have the given hash. If it
# does not the validator will abort with an error. This option is
# passed to the Agave client with the
# `--expected-genesis-hash` argument.
expected_genesis_hash = ""
# If nonzero, after processing the ledger, and the next slot is the
# provided value, wait until a supermajority of stake is visible on
# gossip before starting proof of history. This option is passed to
# the Agave client with the `--wait-for-supermajority`
# argument.
wait_for_supermajority_at_slot = 0
# If there is a hard fork, it might be required to provide an
# expected bank hash to ensure the correct fork is being selected.
# If this is not provided, or we are not waiting for a
# supermajority, the bank hash is not checked. Otherwise, we require
# the bank at the supermajority slot to have this hash. This option
# is passed to the Agave client with the
# `--expected-bank-hash` argument.
expected_bank_hash = ""
# The shred version is a small hash of the genesis block and any
# subsequent hard forks. The Agave client uses it to filter
# out any shred traffic from validators that disagree with this
# validator on the genesis hash or the set of hard forks. If
# nonzero, ignore any shreds that have a different shred version
# than this value. If zero, the expected shred version is
# automatically determined by copying the shred version that the
# entrypoint validator is using. This option is passed to the
# Agave client with the `--expected-shred-version` argument.
expected_shred_version = 0
# If the validator starts up with no ledger, it will wait to start
# block production until it sees a vote land in a rooted slot. This
# prevents double signing. Turn off to risk double signing a block.
# This option is passed to the Agave client (inverted) with
# the `--no-wait-for-vote-to-start-leader` argument.
wait_for_vote_to_start_leader = true
# Perform a network speed test on starting up the validator. If
# this is not disabled, and the speed test fails, the validator will
# refuse to start. This option is passed to the Agave client
# (inverted) with the `--no-os-network-limits-test` argument.
os_network_limits_test = true
# If nonempty, add a hard fork at each of the provided slots. These
# options are passed to the Agave client with the
# `--hard-fork` argument.
hard_fork_at_slots = []
# A set of validators we trust to publish snapshots. If a snapshot
# is not published by a validator with one of these keys, it is
# ignored. If no known validators are specified, any hash will be
# accepted. These options are passed to the Agave client with
# the `--known-validator` argument.
known_validators = []
# CPU cores in Firedancer are carefully managed. Where a typical
# program lets the operating system scheduler determine which threads to
# run on which cores and for how long, Firedancer overrides most of this
# behavior by pinning threads to CPU cores.
#
# The validator splits all work into eleven distinct jobs, with each
# thread running one of the jobs:
#
# - net Sends and receives network packets from the network
# device
#
# - quic Receives transactions from clients, performing all
# connection management and packet processing to manage
# and implement the QUIC protocol
#
# - verify Verifies the cryptographic signature of incoming
# transactions, filtering invalid ones
#
# - dedup Checks for and filters out duplicated incoming
# transactions
#
# - pack Collects incoming transactions and smartly schedules
# them for execution when we are leader
#
# - bank Executes transactions that have been scheduled when we
# are leader
#
# - poh Continuously hashes in the background, and mixes the
# hash in with executed transactions to prove passage of
# time
#
# - shred Distributes block data to the network when leader, and
# receives and retransmits block data when not leader
#
# - store Receives block data when we are leader, or from other
# nodes when they are leader, and stores it locally in a
# database on disk
#
# - metric Collects monitoring information about other tiles and
# serves it on an HTTP endpoint
#
# - sign Holds the validator private key, and receives and
# responds to signing requests from other tiles
#
# The jobs involved in producing blocks when we are leader are organized
# in a pipeline, where transactions flow through the system in a linear
# sequence.
#
# net -> quic -> verify -> dedup -> pack -> bank -> poh -> shred -> store
#
# Some of these jobs (net, quic, verify, bank, and shred) can be
# parallelized, and run on multiple CPU cores at once. For example, we
# could structure the pipeline like this for performance:
#
# net -> quic +-> verify -+> dedup -> pack +-> bank -+> poh -> shred -> store
# +-> verify -+ +-> bank -+
# +-> verify -+
# +-> verify -+
#
# Each instance of a job running on a CPU core is called a tile. In
# this configuration we are running 4 verify tiles and 2 bank tiles.
#
# The problem of deciding which cores to use, and what job to run on
# each core we call layout. Layout is system dependent and the highest
# throughput layout will vary depending on the specific hardware
# available.
#
# Tiles communicate with each other using message queues. If a queue
# between two tiles fills up, the producer will either block, waiting
# until there is free space to continue which is referred to as
# backpressure, or it will drop transactions or data and continue.
#
# A slow tile can cause backpressure through the rest of the system
# causing it to halt, and the goal of adding more tiles is to increase
# throughput of a job, preventing dropped transactions. For example,
# if the QUIC server was producing 100,000 transactions a second, but
# each verify tile could only handle 20,000 transactions a second, five
# of the verify tiles would be needed to keep up without dropping
# transactions.
#
# A full Firedancer layout spins up these eleven tasks onto a variety of
# CPU cores and connects them together with queues so that data can flow
# in and out of the system with maximum throughput and minimal drops.
[layout]
# Logical CPU cores to run Firedancer tiles on. Can be specified as
# a single core like "0", a range like "0-10", or a range with
# stride like "0-10/2". Stride is useful when CPU cores should be
# skipped due to hyperthreading. You can also have a number
# preceded by a 'f' like 'f5' which means the next five tiles are
# not pinned and will float on the original core set that Firedancer
# was started with.
#
# For example, if Firedancer has six tiles numbered 0..5, and the
# affinity is specified as
#
# f1,0-1,2-4/2,f1
#
# Then the tile to core mapping looks like,
#
# tile | core
# -----+-----
# 0 | floating
# 1 | 0
# 2 | 1
# 3 | 2
# 4 | 4
# 5 | floating
#
# If the value is specified as auto, Firedancer will attempt to
# determine the best layout for the system. This is the default
# value although for best performance it is recommended to specify
# the layout manually. If the layout is specified as auto, the
# agave_affinity below must also be set to auto.
affinity = "auto"
# In addition to the Firedancer tiles which use a core each, the
# current version of Firedancer hosts an Agave validator as
# a subprocess.
#
# This affinity controls which logical CPU cores the Agave
# subprocess and all of its threads are allowed to run on. This is
# specified in the same format as the above Firedancer affinity.
#
# It is strongly suggested that you do not overlap the Firedancer
# affinity with the Agave affinity, as Firedancer tiles expect
# to have exclusive use of their core. Unexpected latency spikes
# due to context switching may decrease performance overall.
#
# If the value is specified as "auto", the [layout.affinity] field
# must also be set to "auto", and the Agave affinity will be
# determined automatically as well.
agave_affinity = "auto"
# Logical CPU cores to blocklist from being used by Firedancer, when
# using auto affinity. If not using auto affinity, this option is
# ignored.
#
# Blocklisting cores is useful if there are specific cores that are
# used by other processes on the system, and you do not want
# Firedancer running there and competing for the core.
#
# Cores are specified as a comma separated list of single cores like
# "0", ranges like "0-10", or ranges with stride like "0-10/2".
# Cores can also be specified with an 'h' suffix to indicate both
# the core and its hyperthread sibling should be blocklisted. For
# example, "2h" blocklists core 2 and its hyperthread sibling (if
# any, if there is no hyperthread sibling the program will proceed).
#
# By default, both core 0 and its hyperthread sibling are
# blocklisted to prevent interference with OS kernel threads that
# often run on these cores.
blocklist_cores = "0h"
# The number of threads to spawn per-fork for the unified scheduler.
# The replay stage, which is a part of the Agave subprocess, uses
# these threads for transaction execution. The threads stay within
# the cores dedicated to the Agave subprocess.
#
# If set to 0, the default depends on the number of cores available
# to the agave subprocess.
#
# agave_cores >= 8 => agave_cores - 4
# 4 <= agave_cores < 8 => 4
# agave_cores < 4 => agave_cores
#
# Increasing the value for this parameter might help during the
# start-up phase when the validator is trying to catch up to the
# cluster. It may also help the node stay caught up if it keeps
# falling behind.
agave_unified_scheduler_handler_threads = 0
# How many net tiles to run. Should be set to 1. This is
# configurable and designed to scale out for future network
# conditions, but there is no need to run more than 1 net tile given
# current `mainnet-beta` conditions.
#
# Net tiles are responsible for sending and receiving packets from
# the network device configured in the [net] section below.
# Each net tile will service exactly one queue from the device, and
# Firedancer will error on boot if the number of queues on the
# device is not configured correctly.
#
# The net tile is designed to scale linearly when adding more tiles.
#
# See the comments for the [net] section below for more information.
net_tile_count = 1
# How many QUIC tiles to run. Should be set to 1. This is
# configurable and designed to scale out for future network
# conditions. There is no need to run more than 1 QUIC tile given
# current `mainnet-beta` conditions, unless the validator is the
# subject of an attack.
#
# QUIC tiles are responsible for parsing incoming QUIC protocol
# messages, managing connections and responding to clients.
# Connections from the net tiles will be evenly distributed
# between the available QUIC tiles round-robin style.
#
# QUIC tiles are designed to scale linearly when adding more tiles,
quic_tile_count = 1
# How many resolver tiles to run. Should be set to 1. This is
# configurable and designed to scale out for future network
# conditions. There is no need to run more than 1 resolver tile
# given current `mainnet-beta` conditions, unless the validator is
# under a DoS or spam attack.
#
# Resolve tiles are responsible for resolving address lookup tables
# before transactions are scheduled.
resolh_tile_count = 1
# How many verify tiles to run. Verify tiles perform signature
# verification on incoming transactions, an expensive operation that
# is often the bottleneck of the validator.
#
# Verify tiles are designed to scale linearly when adding more
# tiles, and the verify tile count should be increased until the
# validator is not dropping incoming QUIC transactions from clients.
#
# On modern hardware, each verify tile can handle around 20-40K
# transactions per second. Six tiles seems to be enough to handle
# current `mainnet-beta` traffic, unless the validator is under a
# denial of service or spam attack.
verify_tile_count = 6
# How many bank tiles to run. Should be set to 4 for perf and
# balanced scheduling modes. Bank tiles execute transactions, so
# the validator can include the results of the transaction into a
# block when we are leader. Because of current consensus limits
# restricting blocks to around 32,000 transactions per block, there
# is typically no need to use more than 4 bank tiles on
# mainnet-beta, except when using unique scheduling strategies. For
# development and benchmarking, it can be useful to increase this
# number further.
#
# Bank tiles do not scale linearly. The current implementation uses
# the agave runtime for execution, which takes various locks and
# uses concurrent data structures which slow down with multiple
# parallel users.
bank_tile_count = 4
# How many shred tiles to run. Should be set to 1. This is
# configurable and designed to scale out for future network
# conditions. There is no need to run more than 1 shred tile given
# current `mainnet-beta` conditions. There is however a need to run
# 2 shred tiles under current `testnet` conditions.
#
# Shred tiles distribute block data to the network when we are
# leader, and receive and retransmit it to other nodes when we are
# not leader.
#
# Shred tile performance heavily dependent on the number of peer
# nodes in the cluster, as computing where data should go is an
# expensive function with this list of peers as the input. In
# development and benchmarking, 1 tile is also sufficient to hit
# very high TPS rates because the cluster size will be very small.
shred_tile_count = 1
# All memory that will be used in Firedancer is pre-allocated in two
# kinds of pages: huge and gigantic. Huge pages are 2 MiB and gigantic
# pages are 1 GiB. This is done to prevent TLB misses which can have a
# high performance cost. There are three important steps in this
# configuration,
#
# 1. At boot time or soon after, the kernel is told to allocate a
# certain number of both huge and gigantic pages to a special pool
# so that they are reserved for later use by privileged programs.
#
# 2. At configuration time, one (pseudo) file system of type hugetlbfs
# for each of huge and gigantic pages is mounted on a local
# directory. Any file created within these file systems will be
# backed by in-memory pages of the desired size.
#
# 3. At Firedancer initialization time, Firedancer creates a
# "workspace" file in one of these mounts. The workspace is a
# single mapped memory region within which the program lays out and
# initializes all the data structures it will need in advance.
# Most Firedancer allocations occur at initialization time, and this
# memory is fully managed by special purpose allocators.
#
# A typical layout of the mounts looks as follows,
#
# /mnt/.fd [Mount parent directory specified below]
# +-- .gigantic [Files created in this mount use 1 GiB
# pages]
# +-- firedancer1.wksp
# +-- .huge [Files created in this mount use 2 MiB
# pages]
# +-- scratch1.wksp
# +-- scratch2.wksp
[hugetlbfs]
# The absolute path to a directory in the file system. Firedancer
# will mount the hugetlbfs file system for gigantic pages at a
# subdirectory named .gigantic under this path, or if the entire
# path already exists, will use it as-is. Firedancer will also
# mount the hugetlbfs file system for huge pages at a subdirectory
# named .huge under this path, or if the entire path already exists,
# will use it as-is. If the mount already exists it should be
# writable by the Firedancer user.
mount_path = "/mnt/.fd"
# The largest supported page size on the system. Possible values
# are either "huge" (2 MiB) or "gigantic" (1 GiB). Larger sizes
# yield better performance. Smaller values may be required on
# virtualized environments like cloud providers.
max_page_size = "gigantic"
# Workspaces are either fully backed by "huge" or "gigantic" pages.
# Workspaces with footprint equal to or greater than the given value
# in MiB are backed by "gigantic" pages unless disabled via
# max_page_size.
gigantic_page_threshold_mib = 128
# The network stack is provided by net tiles, which are responsible for
# sending and receiving packets on the network.
#
# Net tiles will multiplex in both directions, fanning out packets
# to multiple parts of Firedancer that can receive and handle them,
# like QUIC tiles and the Turbine retransmission engine. Then also
# fanning in from these various network senders to transmit on the
# queues we have available.
[net]
# The provider determines which Linux networking stack is used by
# Firedancer. Possible values for the option are:
#
# "xdp" (default)
# Use Linux express data path APIs for high performance networking.
# These APIs map memory from the network device directly into
# Firedancer to bypass parts of the kernel when reading and writing
# data.
#
# "socket"
# Use UDP sockets and system calls like `send(2)` for networking.
# Sockets are slower and socket support is provided on a best-effort
# basis. The socket option is provided as a fallback for hosts which
# do not support XDP, and to support experimental features that are
# not yet implemented in the XDP stack.
#
# Using the XDP networking stack is strongly preferred where possible,
# as it is faster and better tested by the development team.
provider = "xdp"
# Which interface to bind to for network traffic. Currently,
# only one interface is supported for networking. If this is
# empty, the default is the interface used to route to 8.8.8.8,
# you can check what this is with `ip route get 8.8.8.8`
interface = ""
# Optional IPv4 bind address for peer-to-peer traffic. For
# incoming packets, specifies the destination address to listen
# on. For outgoing packets, sets the default source address.
# When left unspecified (default), listens on all addresses, and
# derives the source address for outgoing packets based on
# address and route tables. Should be an IPv4 address, e.g.
# "198.51.100.2". This option is passed to the Agave client
# with the `--bind-address` argument.
bind_address = ""
# The maximum number of packets in-flight between a net tile and
# downstream consumers, after which additional packets begin to
# replace older ones, which will be dropped. Smaller values use
# less memory. Larger values decrease link overruns caused by
# excessive latency.
ingress_buffer_size = 16384
# This section contains XDP-specific network configuration.
# Only active if [net.provider] is set to "xdp".
[net.xdp]
# XDP is redundantly provided by different parts in the kernel.
# This option selects the XDP provider. Possible values for
# this option are:
#
# "skb" (default)
# XDP provided by the kernel's generic network code. This is
# the slowest mode, but it is well tested and compatible with
# all Linux network devices and drivers.
#
# "drv"
# XDP provided by the device driver. This mode is much faster
# than "skb" but only works for certain hardware. May require
# very recent Linux versions. Can be less stable than "skb"
# mode. Tested extensively with ConnectX NICs (mlx5), Intel
# X710 (i40e), and Intel E810 (ice).
# Full list of network drivers supporting XDP:
# https://github.com/iovisor/bcc/blob/master/docs/kernel-versions.md#xdp
#
# "default"
# Selects "skb" or "drv" automatically.
#
# If the kernel/hardware does not support driver mode, then
# `fdctl run` will fail to start up with "operation not
# supported".
xdp_mode = "skb"
# This option helps reduce CPU usage when receiving packets.
# If enabled, the net tile instructs the network device to copy
# packets directly (DMA) into the working memory of downstream
# tiles (such as the quic tile). This allows scaling ingress up
# to 100 Gbps per net tile.
#
# Only works when XDP is provided by the network driver (see
# the xdp_mode option above). If the kernel/hardware does not
# support zero copy, `fdctl run` will fail to start up with
# "operation not supported".
xdp_zero_copy = false
# XDP uses metadata queues shared across the kernel and
# userspace to relay events about incoming and outgoing packets.
# This setting defines the number of entries in these metadata
# queues, which has to be a power of two.
#
# Smaller values use less memory. Larger values reduce packet
# loss caused by excessive scheduling or inter-CPU latency.
xdp_rx_queue_size = 32768
xdp_tx_queue_size = 32768
# When the oldest packet in a batch has been queued for more than
# the specified duration, flushes the batch out to the network
# device. Smaller values improve latency, larger values may
# improve throughput.
flush_timeout_micros = 20
# RSS (RX hardware flow steering) queue mode
#
# Each XDP net tile services exactly one hardware queue. Thus we
# must ensure the system routes all incoming Firedancer packets to
# the correct queue(s). The queue setup and initialization has the