Configuring
Overview
Firedancer is configured via a TOML file. Almost all options have a recommended default value that is set automatically by Firedancer, and an operator needs only to specify values for options they wish to change. The full list of options is as specified in the default.toml file is documented below.
MIGRATING
The Agave validator is configured with command line options like --identity identity.json --rpc-port 8899. When migrating your scripts, these command line options will need to move to the corresponding configuration option in the TOML file.
The full list of available options and their defaults are documented below. An example TOML file overriding select options needed for a new validator on testnet might look like:
user = "firedancer"
[gossip]
entrypoints = [
"entrypoint.testnet.solana.com:8001",
"entrypoint2.testnet.solana.com:8001",
"entrypoint3.testnet.solana.com:8001",
]
[paths]
identity_key = "/home/firedancer/validator-keypair.json"
vote_account = "/home/firedancer/vote-keypair.json"
[consensus]
expected_genesis_hash = "4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY"
[snapshots.sources.gossip]
allow_any = false
allow_list = [
"5D1fNXzvv5NjV1ysLjirC4WY92RNsVH18vjmcszZd8on",
"dDzy5SR3AXdYWVqbDEkVFdvSPCtS9ihF5kJkHCtXoFs",
"Ft5fbkqNa76vnsjYNwjDZUXoTWpP7VYm3mtsaQckQADN",
"eoKpUABi59aT4rR9HGS3LcMecfut9x7zJyodWWP43YQ",
"9QxCLckBiJc783jnMvXZubK4wH86Eqqvashtrwvcsgkv",
]
[tiles.rpc]
rpc_listen_port = 9099Once your configuration file is created you can use it by either setting the FIREDANCER_CONFIG_TOML environment variable, or by passing it to your command with the --config option.
NOTE
The same configuration file must be supplied to all commands, especially when configuring and later running the validator. Using a different file for different commands may cause them to fail.
Logging
By default Firedancer will maintain two logs. One permanent log which is written to a file, and an ephemeral log for fast visual inspection which is written to stderr. The Agave runtime and consensus components also output logs which are a part of the Firedancer's logs. You can increase the ephemeral log output in the configuration TOML.
[log]
level_stderr = "INFO"Layout
One way that Firedancer is fast is that it pins a dedicated thread to each CPU core on the system. Each thread can do one specific kind of work, for example, a verify tile can verify the signatures of incoming transactions. Tiles are connected together in a graph to form an efficient pipeline for processing transactions.
WARNING
Each tile needs a dedicated CPU core and it will be saturated at 100% utilization. The Agave process will run on the cores under the agave_affinity and this should not overlap with tile cores.
The configuration file has options for how many of each kind of tile should be started.
[layout]
affinity = "1-18"
quic_tile_count = 2
verify_tile_count = 4
bank_tile_count = 4
agave_affinity = "19-31"It is suggested to run as many tiles as possible and tune the tile counts for maximum system throughput so that the Solana network can run faster. There are some example tuned configurations in the src/app/firedancer/config/ folder to work from.
TIP
You can set the affinity and agave_affinity to "auto". This will let Firedancer detect the topology of the system and automatically configure the assignment of the tiles to cpu cores. This setting is the default option.
GUI
Firedancer has a GUI that can provide a lot of useful information about the validator. You can enable it by adding the following in the config TOML:
[tiles.gui]
enabled = trueBy default it will listen on 127.0.0.1:80. You can configure this using the [tile.gui.gui_listen_address] and [tiles.gui.gui_listen_port] options.
Options
The list of all available configuration options and their default values is provided below. You only need to override options which you wish to change.
# 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 `firedancer 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/loginid` 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 = ""
# Whether to enable telemetry reporting. When enabled, Firedancer will
# periodically send diagnostic information including performance
# statistics, metric counters, and other notable events to a centralized
# server for collection and analysis by the Firedancer development team.
#
# This data helps the development team debug during emergencies,
# understand how Firedancer is being used by operators, identify common
# problems and performance bottlenecks, and prioritize future
# development work. It is similar in nature to the
# `SOLANA_METRICS_CONFIG` environment variable used by the Agave
# validator, but is more comprehensive and configured automatically.
telemetry = true
# Firedancer uses the filesystem to store data which does not fit in
# memory like the accounts database, along with other data which must be
# persisted like log files and the genesis file.
#
# Validator performance is highly dependent on the speed of the storage
# devices under these filesystems, and the arrangement of the data. It
# is recommended to use an up to date Solana hardware guide to determine
# the disk configuration that is most appropriate for your validator.
#
# The default configuration will place all data in a single directory
# under the home directory of the user running Firedancer, but this is
# not recommended for production use.
[paths]
# Absolute directory path to use for placing all Firedancer related
# files, unless otherwise specified below. By default, files will
# be neatly organized under this base path. For example it might
# look like,
#
# /home/fire/.firedancer/fd1
# +-- accounts.db
# +-- genesis.bin
# +-- identity.json
# +-- shreds.db
# +-- snapshots
# +-- snapshot-368327930-E5ZsnTCNX7WToyrP4ZQYJj7pPii6Ssa7UnNcV7HZ3iAf.tar.zst
# +-- incremental-snapshot-368327930-368400391-8ybYYVq7Ecui9TLj13SvzXjTX7JiGP65f4KrtNRCPajW.tar.zst
# +-- tower-1_9-8RDPvMTMSDASGQBvehBFkiFVi2UdLTSZQYuFsGh5JwWU.bin
# +-- tower-1_9-8RDPvMTMSDASGQBvehBFkiFVi2UdLTSZQYuFsGh5JwWU.bin.new
# +-- vote-account.json
# +-- vote_history-8RDPvMTMSDASGQBvehBFkiFVi2UdLTSZQYuFsGh5JwWU.bin
# +-- vote_history-8RDPvMTMSDASGQBvehBFkiFVi2UdLTSZQYuFsGh5JwWU.bin.swp
# +-- vote_history-8RDPvMTMSDASGQBvehBFkiFVi2UdLTSZQYuFsGh5JwWU.bin.bak
#
# 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.
base = "/home/{user}/.firedancer/{name}"
# Absolute path to a `keypair.json` file containing the identity of
# the validator. When connecting to a non-local cluster it is
# required to provide an identity key.
#
# 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 base directory, under path `identity.json`.
identity_key = ""
# Absolute path to a `keypair.json` containing the voting account
# of the validator. The vote account can also be represented as a
# base 58 encoded pubkey string. 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 base directory, under path `vote-account.json`.
vote_account = ""
# 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.
authorized_voter_paths = []
# Absolute directory path for storing snapshots. If no path is
# provided, it defaults to the `snapshot` subdirectory of the
# base directory above.
#
# Snapshots are stored in a specially named format so that their
# contents can be determined from the filename along. This looks
# like:
#
# - snapshot-368327930-E5ZsnTCNX7WToyrP4ZQYJj7pPii6Ssa7UnNcV7HZ3iAf.tar.zst
# - incremental-snapshot-368327930-368400391-8ybYYVq7Ecui9TLj13SvzXjTX7JiGP65f4KrtNRCPajW.tar.zst
#
# Paths not matching this format will not be considered to be
# snapshots, and will be ignored by the validator. The snapshot
# system in the validator automatically manages the files in this
# directory, according to the options in the `[snapshots]` section
# below.
#
# 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.
snapshots = ""
# Absolute path where to store the `genesis.bin` file for the chain.
# If no path is provided, it defaults to the `genesis.bin` path
# within the base directory above. The `genesis.bin` file contains
# the exact parameters used to create the genesis block of the
# chain.
#
# The genesis file must be known so that the validator can verify
# the genesis hash matches the expected genesis hash specified in
# the `[consensus]` section below, and also verify that the genesis
# hash matches the genesis hash contained in any full or incremental
# snapshot being loaded. It is also served over RPC to other nodes.
#
# The validator will attempt to load this file on boot, or if the
# file does not exist, it will attempt to download it from a gossip
# entrypoint if allowed by the `[snapshots.genesis_download]`
# option.
#
# If this node is a bootstrapping node for a new cluster, meaning
# there are no gossip entrypoints specified because this node will
# be the origin entrypoint, then there must be a genesis file
# present, and it will be used to create the genesis block of the
# new cluster.
#
# 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.
genesis = ""
# File path to account database file.
#
# The account database contains a copy of all accounts on the
# network.
#
# The account DB file should be backed by fast local storage, e.g.
# NVMe. Validator performance is sensitive to disk latency.
#
# The validator recreates the account database file from a snapshot
# on every startup. It is therefore not necessary to back up this
# file.
#
# If no path is provided, it defaults to the `accounts.db` path
# within the base 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.
accounts = ""
# File path used to create the temporary stake-delegation spill
# file. If no path is provided, it defaults to the
# `stakedelegations.db` path within the base 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.
stake_delegations = ""
# File path used to create the temporary epoch-credits spill file.
# If no path is provided, it defaults to the `epochcredits.db` path
# within the base 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.
epoch_credits = ""
# File path used to create the temporary cost-tracker spill file.
# If no path is provided, it defaults to the `costtracker.db` path
# within the base 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.
cost_tracker = ""
# File path used to create the temporary vote-stakes spill file.
# If no path is provided, it defaults to the `votestakes.db` path
# within the base 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.
vote_stakes = ""
# File path used to create the temporary transaction-cache spill
# file. If no path is provided, it defaults to the `txncache.db`
# path within the base 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.
txncache = ""
# File path to the shreds database file.
#
# The shreds database stores recorded and reconstructed shreds
# that the validator has received, so that it is able to serve
# incoming repair requests from another validator catching up.
#
# If no path is provided, defaults to the `shreds.db` path
# within the base 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.
shredb = ""
# File path to the GUI database file.
#
# The GUI tile maintains an on-disk event database holding past
# slot, transaction, and metrics data served to WebSocket clients.
#
# If no path is provided, it defaults to the `gui.db` path within the
# base 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.
guidb = ""
# Absolute directory path for the vote history file used for safe
# identity switching. If no path is provided, it defaults to the
# base directory above. The directory must exist, be writable by
# the Firedancer user.
# The validator writes `vote_history-<identity>.bin` before each
# vote and each block it produces. This is an Agave-compatible vote
# history file and it protects against equivocation (both
# double-voting and double-producing blocks) on set-identity or
# restart. See the book for a sample runbook on how to safely
# use set-identity.
#
# 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.
vote_history = ""
# 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, like configuration
# issue
# - CRIT Kills Firedancer. Critical errors, likely programmer
# error.
# - 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 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 also fsync() the log file to
# disk. One of the levels described above, or "NONE" to never
# fsync.
#
# Log lines are written to the file immediately regardless and
# survive a validator crash; fsync() additionally survives kernel
# panic or power loss. The cost is that fsync() can block the
# unrelated tile doing the logging for seconds behind disk writeback
# (e.g. a snapshot being written), which increases latency. It is
# not recommended to enable this in production unless you have
# specific compliance or other durability requirements.
level_flush = "NONE"
[gossip]
# When first booting the validator, it will attempt to connect to a
# fixed set of entrypoints to rendezvous with the gossip cluster.
# Once connected, the validator will use the gossip protocol to
# discover other validators in the cluster and register itself as an
# active validator.
#
# The entrypoints are specified as a list of strings, each of which
# should be a DNS name or IP address and port number.
#
# These entrypoints should be highly trusted, as they are used to
# bootstrap. A compromised entrypoint could trick the validator
# into loading a bad snapshot, or joining a malicious cluster.
entrypoints = []
# The port number to listen for incoming gossip messages on. This
# port number will be advertised via. the gossip protocol to other
# peers, and the node must be publicly reachable on this port
# to successfully join the cluster.
port = 8001
# DNS name or IP address to advertise to the network in gossip. If
# none is provided, the default is the IP address of the interface
# specified in `[net.interface]`.
host = ""
# Snapshots are a periodic view of the accounts database and certain
# other state at a particular slot. They are used to enable validators
# to join the network quickly, as they do not need to replay all
# transactions since genesis, just those since a recent snapshot.
#
# Firedancer supports creating, downloading, and unpacking snapshots.
# It can also serve snapshots to other nodes via a HTTP file server.
[snapshots]
# Whether to enable loading from incremental snapshots.
#
# Full snapshots represent the entire state of the ledger, including
# all accounts. Naturally, these snapshots can be quite large. On
# the other hand, incremental snapshots build on top of a reference
# full snapshot and only contain state that has changed since that
# full snapshot's slot. They are much smaller in size.
#
# Typically, full snapshots are generated on a large interval and
# incremental snapshots on a smaller interval. This enables a
# validator to start from a more recent slot after loading both
# snapshots and then continuing to catch up. A validator may also
# be able to reuse a previously downloaded full snapshot on disk
# but download a more recent incremental snapshot from the network.
#
# If set to false, the validator will only load from a full
# snapshot. Note that during wait for supermajority this option
# may be overridden: if a full snapshot falls short of the WFS
# slot, the validator may attempt to load an incremental.
incremental_snapshots = true
# Whether to allow downloading a new genesis file from a peer when
# booting. If set to false, the validator will only reuse a locally
# stored genesis file, and if one does not exist, the validator will
# exit with an error.
#
# If download is allowed, and there is no local genesis file
# already, the validator will contact each of the gossip
# entrypoints and attempt to download the genesis file from their
# RPC endpoint. If none of the entrypoints is responsive or able to
# provide the genesis file, the validator will exit with an error.
#
# The genesis hash is verified against the expected_genesis_hash
# specified in this file, and it is then combined with information
# from the snapshot (the list of hard forks) to compute the shred
# version, which is itself verified against the
# expected_shred_version. If there is any mismatch, the validator
# will exit with an error.
genesis_download = true
# Controls how many snapshots are allowed to be kept in the
# snapshots directory on disk.
#
# On boot, any excess snapshots are deleted, oldest snapshot slot
# first. The remaining slots form a fixed pool that snapshot
# production then recycles, so a newly created snapshot always
# replaces the oldest one.
#
# A minimum of 2 is recommended so one useful snapshot remains if
# the validator crashes while another snapshot is still being
# created.
max_full_snapshots_to_keep = 2
max_incremental_snapshots_to_keep = 2
# Controls how many times the validator will retry loading a full or
# incremental snapshot before aborting. Reasons for retrying a
# snapshot load include snapshot corruption, slow download speed,
# server availability, and snapshot age. A peer that is serving us
# a snapshot may go offline, or network congestion may cause slow
# download speeds.
max_retry_abort = 5
# The minimum download speed the validator will tolerate in MiB/s.
# If the download speed of a snapshot falls below the
# min_download_speed_mibs threshold, the validator will cancel the
# download and retry downloading the snapshot from a different peer.
min_download_speed_mibs = 10
# Maximum time to wait for a snapshot peer to become available
# before aborting startup. Applies when waiting for either full or
# incremental snapshot peers.
wait_for_peers_timeout_seconds = 30
# Target interval in blocks between full snapshot creations.
# 0 disables full snapshot production. Snapshots may be skipped
# if production cannot keep up with the schedule.
full_snapshot_interval_blocks = 100000
# Interval in blocks between periodic incremental snapshot
# creations. 0 disables incremental snapshot production.
# Snapshots may be skipped if production cannot keep up with the
# schedule or max_incremental_snapshot_accounts is exceeded.
incremental_snapshot_interval_blocks = 200
# Maximum number of changed-account pubkeys retained between full
# snapshots for incremental snapshot creation. Each entry uses 36
# bytes, plus the hash-chain index. If this fills, incremental
# production pauses until the next full snapshot resets it.
max_incremental_snapshot_accounts = 20_000_000
# At startup we must choose which full/incremental snapshots to use
# to initiate catchup. Snapshots may come from the local disk, from
# gossip peers that advertise RPC server addresses, or from external
# HTTP servers.
#
# When no sources are configured, the newest local snapshots in the
# snapshots directory on disk will be used. If there are no local
# snapshots, the validator will exit with an error.
#
# If multiple sources and peers are available, the one with the
# lowest latency and fastest download will be automatically
# selected. Sometimes, if a slightly slower peer is serving a newer
# snapshot than a faster peer, the slower peer will be selected if
# it will enable full validator startup to complete earlier, due to
# reduced catchup time once the snapshot is loaded.
#
# Snapshot download is hard to trust, as the protocol has no way to
# fully verify the downloaded contents (snapshots are not signed nor
# fully validated). If your node downloads a snapshot from an
# untrusted or compromised peer, it may initially appear to
# validate and work well, but could later crash, corrupt, or cause
# your node to vote incorrectly in an attacker controlled way.
#
# It is strongly recommended to only download snapshots from peers
# that you highly trust. WARNING: The default configuration allows
# downloading of snapshots from any gossip peer that advertises an
# RPC service.
[snapshots.sources]
# The local age parameters control whether or not we use locally
# stored full / incremental snapshots, if they exist. Slot age
# is measured against the highest slot we could currently arrive
# at by downloading new full and incremental snapshots from any
# of our trusted sources.
#
# The effective usable slot of the local full snapshot is
# defined as the max slot of all trusted incremental snapshots
# that we could possibly use (local, or downloaded) that apply
# on top of this full snapshot.
#
# The ultimate goal of these parameters is to minimize cluster
# catchup time. To that end, they are a tradeoff between the
# catchup time from a snapshot slot and download time of the
# snapshot. A local snapshot that has an older age than one we
# can download might actually result in a faster catchup time
# because of the faster loading speed. The full age should be
# set higher than the incremental age because, as full snapshots
# are much larger than incremental snapshots, the time penalty
# for downloading a full snapshot is much higher.
max_local_full_effective_age = 1000
max_local_incremental_age = 50
# If any HTTP server URLs are listed, the following paths will
# be fetched from these servers to determine if they have a
# snapshot available:
#
# - /snapshot.tar.bz2
# - /incremental-snapshot.tar.bz2
#
# If these servers have snapshots at the given paths, they will
# be considered as trusted sources for downloading snapshots.
#
# The given URLs must contain the protocol (HTTP or HTTPS), the
# host (which can be an IPv4 address or a domain name), and the
# port number. No path should be given (as the aforementioned
# paths are always used). Example URLs:
#
# - http://snapshots.example.com:8899
# - https://1.2.3.4:443
servers = []
[snapshots.sources.gossip]
# Allow downloading snapshots from arbitrary gossip peers
# that are hosting a snapshot server. This may allow faster
# snapshot download if a peer in a local data-center is
# serving a recent snapshot, but it is extremely dangerous
# as the peer could serve you a specially crafted malicious
# snapshot that may appear to be valid even after catchup
# is complete.
#
# WARNING: This option defaults to true. Consider setting
# this to false and providing explicitly trusted sources.
allow_any = true
# Allow downloading snapshots from the gossip peers
# identified by the given base58-encoded public keys. In
# order to be used, a given peer must be advertising an RPC
# service via gossip and the advertised IP address and port
# must be reachable (and pingable) from your validator.
allow_list = []
# Do not attempt downloads from the given base58-encoded
# gossip public keys. For an example, this can be useful
# if a peer is frequently selected by the automatic logic
# but does not yield successful / usable snapshots.
block_list = []
# Configures the embedded HTTP file server used to serve snapshots
# to other nodes.
[snapshots.server]
# True if the snapshot server should be enabled.
# The snapshot server requires at least Linux 6.7.
enabled = false
# The IP address to listen on. By default, this is the same as
# [tiles.rpc].rpc_listen_address.
#
# Exposing the snapshot server to the internet from a production
# validator is not recommended as it increases the attack
# surface of the validator. It also allows arbitrary peers to
# connect to your validator and waste resources on snapshot
# downloads.
http_listen_address = ""
# The TCP port to listen on.
# Firedancer runs a HTTP/1.1 server supporting Range requests on
# this port.
http_listen_port = 8902
# The maximum number of concurrent snapshot downloads to allow.
max_http_connections = 128
# When no valid snapshot requests are seen on a HTTP connection
# for longer than the specified duration, the HTTP connection is
# gracefully closed. Allowed range: [100,60000).
idle_timeout_millis = 1000
# When a snapshot download is stuck without making progress for
# longer than the specified duration (in milliseconds), the
# HTTP connection is aborted. Allowed range: [100,60000).
send_timeout_millis = 10000
# Per-connection buffer size for outgoing snapshot data.
# Two buffers of this size are used per connection (one for
# reading snapshot data, one for sending). Larger values result
# in more memory use. Must be a power of two.
send_buffer_size_kib = 64
[consensus]
# The shred version is a small hash of the genesis block and any
# subsequent hard forks. The validator 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 set to zero, the expected shred version is automatically
# determined at startup by requesting the shred version from the
# gossip entrypoints. If set to a nonzero value, the validator will
# still request the shred version from the gossip entrypoints, but
# if the shred version is not equal to this value, the validator
# will abort with an error.
#
# The shred version will also be computed locally, by combining the
# genesis.bin hash with the hard fork list from the loaded snapshot,
# and this shred version is also enforced to match or the validator
# will abort with an error.
expected_shred_version = 0
# The genesis hash is just a SHA256 hash of the genesis.bin file,
# representing the parameters used to create the genesis block of
# the chain.
#
# If the expected_genesis_hash is set to a base58 encoded string of
# such a hash, the validator will verify that the hash of the
# genesis.bin that is loaded from disk or downloaded from a peer
# matches this value. If there is a mismatch, the validator will
# abort with an error.
expected_genesis_hash = ""
# Indicates if the client should wait for a vote published from this
# node to land in a rooted slot before publishing any leader slots.
# This check should be enabled to prevent a backup / failover node
# from accidentally equivocating (i.e. publishing two slots with the
# same slot number but different blockhash) in cases where the
# primary node may still be alive.
#
# During wait-for-supermajority (WFS) this option must be disabled,
# in order to prevent the chain from deadlocking on a hard restart
# (explicitly enabling it during WFS is rejected). However, if the
# validator is booting after the chain has already moved forward,
# this flag must be enabled. Therefore, set it to "auto" (default)
# so that WFS logic handles it automatically (when WFS is not
# configured, "auto" resolves to enabled).
#
# Allowed values are: "auto", true, "true", false or "false".
wait_for_vote_to_start_leader = "auto"
# Wait-for-supermajority (WFS) is used during a coordinated hard
# fork restart, so that all validators agree on the fork before
# resuming: the network waits until at least 80% of stake is
# visible on gossip before replaying.
#
# Slot and bank hash below must be set together, and also
# `expected_shred_version` must be nonzero. Slot 0 means disabled.
#
# If the loaded snapshot is exactly at the WFS slot, the bank hash
# is verified against `wait_for_supermajority_with_bank_hash`. If
# it is ahead (the network already moved on), WFS is a no-op: both
# the bank hash check and the wait are skipped. If it cannot reach
# the WFS slot, the validator refuses to boot.
#
# Remove obsolete local snapshots before a coordinated restart, and
# restrict downloads to trusted sources.
wait_for_supermajority_at_slot = 0
wait_for_supermajority_with_bank_hash = ""
# The primary state a validator is required to maintain is the accounts
# database, a current listing of all "public key" identifiers on the
# chain, and their associated balance (lamports), owner, and data.
#
# Firedancer stores the accounts database using a hybrid in-memory and
# on-disk design that is fully custom to the validator. At a high
# level, frequently accessed accounts are kept in memory, while colder
# less frequently accessed accounts are stored on disk. The index of
# which account is stored where is kept fully in memory.
#
# The storage layer is optimized for append only workloads on an NVMe
# device.
[accounts]
# Controls the account index size.
#
# If the number of accounts on the chain exceeds this configured
# amount, the validator will crash. Storing 1 billion accounts
# requires around 100 GiB of index space.
#
# The development team will adjust this default as needed for new
# releases and it is not recommended to change. Going significantly
# higher than the expected number of accounts on the chain may slow
# down the index structure, and use more memory than is necessary.
max_accounts = 1_300_000_000
# The size of the in-memory cache for hit accounts, in GiB. The
# performance of the validator is surprisingly not sensitive to this
# parameter, as long as it is large enough to hold the hottest
# accounts.
#
# The reason is that, once hot accounts are fully in memory, cold
# account accesses always happen off the critical execution CPU core
# and do not block the serial execution of transactions on the
# critical writable account paths, so whether they load from disk or
# memory makes no difference, they are asynchronous to the critical
# path.
#
# That said, the accounts database is designed so that in-memory
# access is zero-cost over a fully in-memory design, and so if you
# have enough memory available, you could dedicate it all to the
# cache and then never read from or write to disk during operation.
#
# The default value of 12 GiB is large enough to have near-optimal
# performance on mainnet. The cache size has a minimum bound below
# which the validator will refuse to boot, which depends on whether
# bundles are enabled and certain other factors. Transactions
# literally execute in-place in the cache memory to save on data
# copies, and so the minimum cache size is the smallest amount of
# memory needed to hold a worst case atomic unit of accounts (either
# a single large, transaction, or a large bundle of large
# transactions, if enabled).
cache_size_gib = 12
[runtime]
# Certain slots are considered "live" in the validator if we must
# hold space in memory for them. The root slot is live, as are any
# of its descendants. But a slot older than the root is not live,
# for example, as we can delete all of its data and never need it
# again.
#
# The execution system bounds all internal limits and structures in
# terms of this "max live slots" parameter, and it is set large
# enough to make the chain impractical to attack. For example, a
# value of 2048 means the validator can go without rooting for
# around fifteen minutes without needing to start evicting data.
#
# On hitting this limit, the validator will begin evicting less
# important slots from memory, meaning their state will be lost and
# may need to be re-requested and re-replayed again in future as
# needed.
#
# It is not recommended to change this value, except in development
# or test environments to decrease memory usage or test edge cases.
max_live_slots = 2048
# The maximum number of stake delegations held in memory. Stake
# delegations beyond this limit spill to disk, which is slower.
#
# It is not recommended to change this value, except in development
# or test environments to decrease memory usage or test edge cases.
stake_delegation_cache_cnt = 2150000
# Total size of the program cache workspace in MiB.
#
# The program cache pre-loads frequently executed programs for
# faster transaction execution.
program_cache_size_mib = 2048
# Each executing slot has a large amount of state that the validator
# tracks per slot. During standard operation, only a few slots use
# this state at one time, so rather than keeping all of the entries
# in-memory for every live slot, the validator will keep a portion
# of the state in-memory and will spill the rest to disk.
#
# This is the number of entries that is kept in-memory. It must be
# at least 2 more than the smaller of layout.execrp_tile_count and
# 4, or the validator will not start.
#
# It is not recommended to change this value, except in development
# or test environments to decrease memory usage or test edge cases.
bank_cache_cnt = 16
# Memory budget for cached transactions in MiB, excluding metadata.
# When full, the cache spills to paths.txncache. This value has
# been chosen and tuned around mainnet network behavior.
#
# It is not recommended to change this value, except in development
# or test environments to decrease memory usage to test edge cases.
transaction_cache_size_mib = 480
# Transactions that execute in the VM require large worst-case
# buffers called bpf serialization frames. A new frame is required
# for each instruction that invokes a BPF program and for each
# nested cross-program invocation (CPI). These frames are shared
# among different executing tiles.
#
# This value has been tuned for mainnet performance and it is not
# recommended to decrease this value, except in development or test
# environments to decrease memory usage or test edge cases.
bpf_shared_frames = 12
# Each execution tile can also keep some number of these frames
# local to itself for performance reasons.
#
# This value has been tuned for mainnet performance and it is not
# recommended to decrease this value, except in development or test
# environments to decrease memory usage or test edge cases.
bpf_local_frames = 2
# 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 distinct jobs, with each
# thread running one of the jobs, some example 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
#
# 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 -> resolv -> pack -> execle -> poh -> shred
#
# Some of these jobs (net, quic, verify, execle, 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 +-> execle -+> poh -> shred
# +-> verify -+ +-> execle -+
# +-> 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 execle 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]
# Kernel scheduling mode which determines what tile do when they
# have no work. Firedancer supports two scheduling modes described
# below.
#
# "performance" (default)
# Tiles spin using 100% of a CPU core, even when they have no work
# to do. This mode is the highest throughput and lowest latency,
# since there is no kernel context switching, and no delay when
# waking a tile or CPU core to perform work.
#
# This mode runs cores hot and uses the most energy. Currently,
# the performance mode is the only supported mode for production
# validators and block producers.
#
# "efficient" (experimental)
# Tiles are allowed to sleep when they have no work, letting the
# CPU cores sleep and reducing power draw, temperature, and host
# load. With auto affinity, tiles keep a pinned layout similar to
# performance mode, and stay maximally spread across the CPU so
# they don't contend for cores, but tiles that wake each other the
# most are packed in the same L3 cache domains to reduce wake
# costs.
#
# Sleeping and waking tiles has small overheads that can reduce
# throughput and increase latency when running under high load.
#
# Efficient mode is currently experimental and should not be used
# on a production voting or block packing validator.
mode = "performance"
# 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, minus pinned cores and their hyperthread
# siblings, or on the shared cores (below) if the layout names any.
# If that leaves nothing, they float on the whole original set.
#
# A core preceded by an 's' like 's5' is shared. The tile is homed
# at core 5, so its memory is placed on that core's NUMA node, but
# the kernel may schedule it on any shared core of that node. A
# shared core is not claimed exclusively, so more than one tile may
# name it, but a pinned core or its hyperthread sibling is never
# used as a shared core. This is for tiles that are idle in your
# configuration and would otherwise hold a core a busy tile could
# use.
#
# 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.
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"
# Whether to run tiles involved in block production.
#
# If block production is disabled, and the validator is on the
# leader schedule, it will skip its leader slots. Disabling block
# production is useful to reduce CPU and memory requirements for
# unstaked validators like RPC nodes.
#
# The following tiles will only run if this option is enabled:
#
# quic, bundle, verify, dedup, resolv, pack, execle, poh
#
# If block production is disabled, any layout options below
# controlling those tiles are ignored, and all tile-relevant options
# are ignored as the tiles are not booted to begin with.
enable_block_production = true
# Whether to run tiles involved in snapshot production.
#
# The following tiles will only run if this option is enabled:
#
# snapmk, snaprd, snapsv, snapzp
#
# These tiles do not use up CPU cycles while idle but increase
# memory usage (typically by a few GiB).
#
# If snapshot production is disabled, the validator will have to
# download a snapshot on every restart.
#
# WARNING: This feature is not currently supported and should not be
# enabled. It may reduce the stability of the running validator.
enable_snapshot_production = false
# How many net tiles to run. This is configurable and designed to
# scale out for future network conditions, but there is no need to
# run more than 2 net tiles given current `mainnet` conditions.
#
# Net tiles are responsible for sending and receiving packets from
# the network device configured in the [tiles.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 [tiles.net] section below for more
# information.
net_tile_count = 2
# 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` 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` conditions, unless the validator is
# under a DoS or spam attack.
#
# Resolve tiles are responsible for resolving address lookup tables
# before transactions are scheduled, and also determining certain
# transaction metadata like the age of the blockhash it references.
resolv_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. Three tiles seems to be enough to handle
# current `mainnet` traffic, unless the validator is under a
# denial of service or spam attack.
verify_tile_count = 3
# How many gossip verify tiles to run. Gossip verify tiles perform
# signature verification on incoming gossip table entries, before
# routing successfully verified entries to the gossip tile.
#
# Gossvf tiles are designed to be scaled linearly when adding more
# tiles, and the gossvf tile count should be increased until the
# validator is not dropping incoming gossip table entries from
# clients, and the gossvf tiles are consistently idle.
#
# Like verify tiles, each gossvf tile can handle around 20-40K
# transactions per second. One gossvf tile should be enough to
# handle current `mainnet` traffic.
gossvf_tile_count = 1
# How many execle tiles to run. Should be set to 2 for `perf` and
# `balanced` scheduling modes. Execle 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 98,000 transactions per block, there
# is typically no need to use more than 2 execle tiles on
# `mainnet`, except when using unique scheduling strategies. For
# development and benchmarking, it can be useful to increase this
# number further.
execle_tile_count = 2
# How many execrp tiles to run. These tiles execute transactions
# that are being replayed when our validator is not leader, and is
# verifying a block produced by someone else. Transactions can be
# executed in parallel up to a point, but there are dependencies
# among transactions that reference similar accounts that limit how
# much parallelism is possible.
#
# More execrp tiles can allow the validator to replay through blocks
# faster, subject to Amdahl's law. Empirically, we've found 10
# execrp tiles to achieve near optimal replay speed under current
# `mainnet` conditions.
#
# Execrp tiles are also responsible for writing account changes back
# to the accounts database. Since the accounts database is designed
# to be highly concurrent, most of the time account writeback can be
# done in parallel without blocking. Multiple execrp tiles exploit
# this parallelism supported by the accounts database.
execrp_tile_count = 10
# How many snapshot decompression tiles to run. Newer snapshots can
# be decompressed in parallel to speed up the boot process.
#
# It is recommended to use three tiles for all clusters and
# configurations, unless there is an indication that decompression
# is the bottleneck during boot. This is because typically the
# snapshot loader is bottlenecked by disk write speed.
#
# Decompression scales linearly in the number of cores used, and may
# become a bottleneck when the accounts database is backed by a very
# fast disk.
snapdc_tile_count = 3
# How many snapshot inserter tiles to run. Snapshot inserter tiles
# take the decompressed snapshot and write out its accounts to the
# accounts database.
#
# It is recommended to use five tiles for all clusters and
# configurations, unless there is an indication that disk write
# speeds during snapshot load are lower than expected, or the
# snapin tiles are completely busy but disk writing is not yet
# fully saturated. This is not typically expected on current
# NVMe, but may occur if using a RAM disk.
snapin_tile_count = 5
# How many snapshot compressor tiles to run. These tiles do not
# consume CPU when idle. If set to 0, snapshot creation and all
# associated tiles are disabled.
snapzp_tile_count = 6
# How many snapshot server tiles to run. These tiles do not consume
# CPU when idle.
snapsv_tile_count = 1
# How many snapshot server io_uring worker kernel threads to run.
snapsv_io_worker_count = 1
# How many shred tiles to run. Should be set to 2, however can be
# lowered to 1 if running an low staked or unstaked node. This is
# configurable and designed to scale out for future network
# 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 sufficient to hit very
# high TPS rates because the cluster size will be very small.
shred_tile_count = 2
# How many sign tiles to run, should be at least two. The signing
# tiles exclusively hold the validator private key for security, and
# all requests to sign things (transactions, shreds, repair
# requests, etc.) are routed to these tiles. Adding more signing
# tiles can speed up signing of repair requests, which there are a
# lot of, but all other signing requests are easily handled by two
# tiles.
sign_tile_count = 2
# 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 to use and allocate from.
# 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, or can
# be used during development or testing to save memory.
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.
#
# It is not recommended to change this value, except in development
# or test environments to decrease memory usage.
gigantic_page_threshold_mib = 512
# 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 how Firedancer sends and receives
# network packets. Possible values for the option are:
#
# "auto" (default)
# Firedancer auto selects based on what your system is safely capable of.
#
# "xdp"
# 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.
#
# "mlx5"
# Very fast userspace networking for Mellanox ConnectX-4 and newer
# NICs. Requires Linux 5.8 or newer and uses a kernel-bypass
# packet data path. Bonding is supported when every bond member
# is a port on the same NIC.
#
# "iavf"
# Very fast userspace networking for Intel ice and i40e driver
# based NICs. Requires SR-IOV and IOMMU to be enabled in system
# BIOS as well as Virtualization Mode set to SR-IOV within the
# NIC's BIOS section, on some motherboards/NIC OEMs this isn't
# always the default.
#
# If "iavf" is selected and your BIOS has some of the BIOS
# options disabled then some relevant help will be given in
# the Firedancer iavf configure stage error message (please
# follow at your own discretion, although SR-IOV has existed
# for a long time there is always some risk with changing
# BIOS settings).
provider = "auto"
# 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"
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:
#
# "auto" (default)
# Firedancer auto selects based on what your system is safely capable of.
#
# "skb"
# 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).
#
# With "drv" mode chosen on kernel/hardware which does not support driver
# mode, then `firedancer run` will fail to start up with "operation not
# supported".
xdp_mode = "auto"
# 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 set to "true" on kernel/hardware
# which does not support zero copy, `firedancer run` will fail to
# start up with "operation not supported".
#
# xdp_zero_copy can be broken even when enabled on drivers/kernels
# which supposedly support it. Support varies wildly by exact Linux
# version, with regressions being common. Therefore we recommend
# leaving this option set to "auto".
#
# If "auto" is in use for xdp_mode or native_bond, do not manually set
# xdp_zero_copy to "true", and instead leave as either "auto" or "false".
#
# Its possible values are:
# "true", "false" or "auto" (default)
xdp_zero_copy = "auto"
# The poll_mode option determines how Firedancer polls NAPI (Linux's
# high perf networking mechanisms). Its possible values are:
#
# "auto" (default)
# Firedancer auto selects based on what your system is safely capable of.
#
# "softirq"
# Relies significantly more on Linux to manage NAPI through wakeups,
# softirqs, and under higher network load, a separate ksoftirqd
# thread which Linux schedules onto a separate core.
#
# "prefbusy"
# Option which gives Firedancer significantly more control
# over how and when NAPI is polled. Reduces networking related
# IRQs and ksoftirqds to near zero on well supported NIC drivers,
# increasing determinism and stability during DoS attacks and
# high net load.
#
# Hardware Support: Currently best supported on mlx5 (Mellanox).
# Depending on the driver, XDP Copy Mode can see noticeable throughput
# gains (up to 2.4x on mlx5, 1.5x on i40e). Zero-copy RX throughput
# generally remains the same across both poll modes.
#
# Extra info:
#
# Prefbusy requires a kernel version of at least v5.11 (Feb 2021).
#
# Prefbusy mode increases tail latency for other applications on
# the system sharing the same network interface.
poll_mode = "auto"
# 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 following options:
#
# "simple"
# Reduces the total queue count to equal the number of net
# tiles. All packets (both interesting to Firedancer and not)
# are sharded amongst these queues. Simple, reliable, and
# works everywhere but suboptimal performance impact,
# especially to socket-based traffic.
#
# "dedicated"
# Reserves a dedicated hardware queue for each net tile. Uses
# ethtool 'ntuple' rules to route incoming packets based on
# UDP dst port. Packets are load balanced across the
# dedicated queues based on lowest bits of source address.
# This mode may not work with some network device setups,
# particularly when using more than one net tile. This
# option should not be selected if using GRE.
#
# "auto" (default)
# Automatically decides whether to attempt to use "dedicated"
# mode or "simple" depending on your system and whether you
# have an UP GRE interface.
rss_queue_mode = "auto"
# Some specialized networking setups, including DoubleZero,
# deliver packets to the validator in a GRE tunnel.
#
# If rss_queue_mode is "simple", this option is ignored, and
# Firedancer automatically listens to GRE-wrapped traffic when
# a GRE tunnel interface is configured.
#
# If this option is set to "auto", GRE support will only be
# ensured when an UP GRE interface is detected.
#
# Its possible values are:
# "true", "false" or "auto" (default)
listen_gre = "auto"
# Enable native network bonding support.
#
# If native_bond is set to "true" and [net.interface] is a
# bond type network device, install XDP config at bond slave
# devices instead of the bond device itself.
#
# Requires net_tile_count to be divisible by the number of slave
# devices. This causes outgoing traffic to be load balanced with
# an arbitrary/opaque hash policy. Supports up to 16 slave devices.
#
# Only 802.3ad (LACP) bonds are supported. In "auto" mode,
# native bonding is only enabled for bonds in 802.3ad mode.
#
# Assumes that bond memberships don't change, i.e. running `ip
# link set dev eth1 master bond0` will crash Firedancer.
# However, it is fine to bring individual bonded devices down,
# or unplug cables for maintenance. In other words, executing
# `ip link set dev eth1 down` while Firedancer is running is
# just fine.
#
# Its possible values are:
# "true", "false" or "auto" (default)
native_bond = "auto"
[net.socket]
# Sets the socket receive buffer size via SO_RCVBUF. Raises
# net.core.rmem_max accordingly
receive_buffer_size = 134217728
# Sets the socket receive buffer size via SO_SNDBUF. Raises
# net.core.wmem_max accordingly
send_buffer_size = 134217728
# This section contains Mellanox specific network configuration.
# Only active if [net.provider] is set to "mlx5".
[net.mlx5]
# Controls the depths of receive (RX) and transmit (TX) queues.
# Queue depth values must be a power of two.
#
# Smaller values use less memory. Larger values reduce packet
# loss caused by excessive scheduling or inter-CPU latency.
rx_queue_size = 32768
tx_queue_size = 32768
# This section contains Intel i40e/ice specific network
# configuration. Only active if [net.provider] is set to "iavf".
[net.iavf]
# Controls the depths of receive (RX) and transmit (TX) queues.
# Queue depth values must be a power of two. The highest allowed
# rx/tx_queue_size is 4096 due to Intel queue limits.
#
# Smaller values use less memory. Larger values reduce packet
# loss caused by excessive scheduling or inter-CPU latency.
rx_queue_size = 4096
tx_queue_size = 4096
# Tiles are described in detail in the layout section above. While the
# layout configuration determines how many of each tile to place on
# which CPU core to create a functioning system, below is the individual
# settings that can change behavior of the tiles.
[tiles]
# The netlink tile forwards Linux network configuration to net
# tiles. This config section contains advanced options that
# typically do not need to be changed. For further info, see
# https://docs.firedancer.io/guide/netlink.html
[tiles.netlink]
# The maximum number of routes per route table.
#
# The netlink tile imports two route tables from Linux, namely
# `local` and `main`. You can view them by running `ip route
# show table main`. Decreasing this option can result in
# connectivity issues. Increasing this option can drastically
# decrease performance.
#
# For virtually all cloud and bare-metal server providers, the
# number of routes per table does not exceed 16, excluding the
# /32 routes, see below.
max_routes = 128
# This setting configures the maximum number of IPv4 routes with
# a /32 netmask per route table. This setting is relevant for
# Double Zero accelerated networking, which uses one /32 route
# per peer on the network. The number of /32 routes should not
# exceed 100,000.
max_peer_routes = 8192
# The maximum number of Ethernet neighbors.
#
# This should be roughly as large as the size your Ethernet
# subnet. E.g. if your IP address is 198.51.100.3/24, then your
# subnet has up to 256 neighbors (2^(32-24)).
max_neighbors = 4096
[tiles.gossip]
# The maximum number of entries that can be stored in the gossip
# table before entries from low stake validators are evicted.
#
# The gossip protocol periodically expires old entries from the
# table, and this number should be set so that the table never
# gets full, and all entries expire before they would need to be
# evicted.
max_entries = 524_288
# QUIC tiles are responsible for serving network traffic, including
# parsing and responding to packets and managing connection timeouts
# and state machines. These tiles implement the QUIC protocol,
# along with receiving regular (non-QUIC) UDP transactions, and
# forward well-formed (but not necessarily valid) ones to verify
# tiles.
[tiles.quic]
# Which port to listen on for incoming, regular UDP transactions
# that are not over QUIC. These could be votes, user
# transactions, or transactions forwarded from another
# validator.
regular_transaction_listen_port = 9001
# Which port to listen on for incoming QUIC transactions.
# Currently this must be exactly 6 more than the
# transaction_listen_port.
quic_transaction_listen_port = 9007
# Maximum number of simultaneous QUIC connections which can be
# open. New connections which would exceed this limit will not
# be accepted.
#
# This must be >= 2 and also a power of 2.
max_concurrent_connections = 131072
# Controls how many transactions coming in via TPU can be
# reassembled at the same time. Reassembly is required for user
# transactions larger than ca ~1200 bytes, as these arrive
# fragmented. This parameter should scale linearly with line
# rate. Usually, clients send all fragments at once, such that
# each reassembly only takes a few microseconds.
#
# Higher values reduce TPU packet loss over unreliable networks.
# If this parameter is set too low, packet loss can cause some
# large transactions to get dropped. Must be 2 or larger.
txn_reassembly_count = 131072
# QUIC has a handshake process which establishes a secure
# connection between two endpoints. The handshake process is
# very expensive. So we allow only a limited number of
# handshakes to occur concurrently.
#
max_concurrent_handshakes = 4096
# QUIC has a concept of an idle connection, one where neither
# the client nor the server has sent any packet to the other for
# a period of time. Once this timeout is reached the connection
# will be terminated.
#
# An idle connection will be terminated if it remains idle
# longer than this threshold.
idle_timeout_millis = 10000
# Max delay for outgoing ACKs.
ack_delay_millis = 10
# QUIC retry is a feature to combat new connection request
# spamming. See rfc9000 8.1.2 for more details. This flag
# determines whether the feature is enabled in the validator.
retry = true
# Log TLS encryption keys to decrypt QUIC traffic to this file
# path in NSS SSLKEYLOGFILE format. An empty string (the
# default) disables key logging.
ssl_key_log_file = ""
# Verify tiles perform signature verification of incoming
# transactions, making sure that the data is well-formed, and that
# it is signed by the appropriate private key.
[tiles.verify]
# The verify tiles have a cache of signatures they have seen
# recently, used to discard duplicate transactions before they
# get verified to save signature verification resources. See
# [tiles.dedup.signature_cache_size] below for more information.
signature_cache_size = 4194302
# The maximum number of messages in-flight between a QUIC tile
# and associated verify tile, after which earlier messages might
# start being overwritten, and get dropped so that the system
# can keep up.
receive_buffer_size = 16384
# After being verified, all transactions are sent to a dedup tile to
# ensure the same transaction is not repeated multiple times. The
# dedup tile keeps a rolling history of signatures it has seen and
# drops any that are duplicated, before forwarding unique ones on.
[tiles.dedup]
# The size of the cache that stores unique signatures we have
# seen to deduplicate. This is the maximum number of signatures
# that can be remembered before we will let a duplicate through.
#
# If a duplicated transaction is let through, it will waste more
# resources downstream before we are able to determine that it
# is invalid and has already been executed. If a lot of memory
# is available, it can make sense to increase this cache size to
# protect against denial of service from high volumes of
# transaction spam.
#
# The default value here, 2^26 - 2 is a good balance, as it fits
# in 1 GiB of memory using a single gigantic page.
signature_cache_size = 33554430
# The bundle tile receives bundles from a block producer remote
# endpoint and forwards them for execution to pack.
[tiles.bundle]
# True if a bundle tile should be enabled, which receives
# bundles from a remote block engine and forwards them for
# atomic execution to the pack tile.
enabled = false
# The URL of the block engine to receive blocks from.
url = ""
# The domain name of the TLS certificate to use when verifying
# the peer. If none is provided, the domain from the URL above
# will be used by default.
#
# This is only needed in special cases where the block engine
# peer presents a certificate for a different domain that where
# it is being accessed.
tls_domain_name = ""
# The tip distribution program is used to control the
# distribution of tips that transactions from bundles may pay.
# This should be set to the public key of the tip distribution
# program. Consult the block engine provider's documentation
# for the appropriate value of this field.
tip_distribution_program_addr = ""
# The tip payment program handles the regular collection of tips
# into the account configured by the tip distribution program.
# This should be set to the public key of the tip payment
# program. Consult the block engine provider's documentation
# for the appropriate value of this field.
tip_payment_program_addr = ""
# A validator may want to distribute tips from transactions to
# their stakers or to any other relevant parties. Authority is
# delegated to the public key provided in the
# tip_distribution_authority to determine the distribution by
# uploading a hash tree. This field should be set to the
# base58 public key.
tip_distribution_authority = ""
# The standard tip distribution mechanism distributes tips
# pro rata to stakers with the validator optionally taking a
# portion as a fee. The commission set below, measured in basis
# points (100ths of a percent), determines the validator's
# portion.
commission_bps = 0
# This option roughly configures the time between pings to keep
# the bundle connection live when idle. The actual timing is
# randomized. Must be within range [3e3,3600e3]
keepalive_interval_millis = 5000
# By default, the TLS certificate of the bundle server is
# verified against the CA certs in /etc/ssl/certs, if the URL
# specifies https. To disable certificate verification, set
# this option to 'false'.
tls_cert_verify = true
# The pack tile takes incoming transactions that have been verified
# by the verify tile and then deduplicated, and attempts to order
# them in an optimal way to generate the most fees per compute
# resource used to execute them.
[tiles.pack]
# The pack tile receives transactions while it is waiting to
# become leader and stores them for future execution. This
# option determines the maximum number of transactions that
# will be stored before those with the lowest estimated
# profitability get dropped. The maximum allowed, and default
# value is 65524. It is not recommended to change this.
max_pending_transactions = 65524
# When a transaction consumes fewer CUs than it requests, the
# execle and pack tiles work together to adjust the block limits
# so that a different transaction can consume the unspent CUs.
# This is normally desirable, as it typically leads to
# producing blocks with more transactions.
#
# In situations where transactions typically do not
# significantly over-request CUs, or when the CU limit is high
# enough so that over-requesting CUs does not impact how many
# transactions fit in a block, this can be disabled to improve
# performance. It's not recommended (but allowed) to disable
# this option in a production cluster.
use_consumed_cus = true
# The pack tile can schedule using different strategies with
# different tradeoffs. The primary tradeoff is that executing
# transactions quickly is best for the network as a whole, but
# can reduce revenue opportunities for this validator.
#
# Over time, as the network gets faster and compute unit limits
# are raised, this trade-off will become less pronounced.
#
# The Firedancer team supports three different strategies which
# are described below:
#
# "perf"
# Try to fill the block as fast as possible using the highest-
# paying transactions available. This strategy results in
# consistently 100% full blocks.
#
# When using the perf scheduling mode, there is no reason to
# increase the execle tile count beyond the default of 2.
#
# "balanced" (default)
# Try to fill the block at a rate that is just fast enough to
# fill it by the end. This strategy optimizes for revenue
# from priority fees, but can result in blocks that are not
# always 100% full, and can be poor at capturing MEV if using
# an external block builder.
#
# When using the balanced mode, there is no reason to increase
# execle tile count beyond the default of 2.
#
# "auction"
# Schedule transactions in 50ms batch auctions. Bundles are
# not included in the auctions but are scheduled as soon as
# they arrive, without waiting for auctions to complete.
#
# In cases of network congestion, high volume, or if seeing poor
# block packing performance for any reason, it is recommended to
# revert to the "balanced" strategy.
schedule_strategy = "balanced"
# If the pack tile receives a transaction that reads from or
# writes to an address in the account_blocklist, it will reject
# the transaction immediately and not consider it for inclusion
# in any blocks this validator produces as leader. This does
# not prevent replaying blocks that contain transactions that
# access an account in the blocklist. Up to 16 addresses are
# currently allowed. account_blocklist should be a list of
# base58-encoded public keys.
account_blocklist = []
# The replay tile is responsible for orchestrating and scheduling
# replay of blocks produced by other validators and for managing the
# lifecycle of both leader and follower slots.
[tiles.replay]
# Transactions are parsed and buffered for consideration by the
# replay dispatcher for out-of-order execution. The larger this
# buffer is, the more transactions that the replay dispatcher
# can peek at and potentially reorder, and the better the odds
# of uncovering the fastest path through a block.
#
# Under current mainnet conditions, full blocks typically have
# around 2,000 transactions per block. Since transactions
# cannot be reordered across block boundaries, a buffer size
# much larger than that is likely in the territory of
# diminishing marginal returns. Empirically, a buffer size
# larger than the following offers no measurable performance
# advantage. For development and benchmarking, it can be useful
# to increase this number further.
max_transaction_lookahead_buffer_size = 65536
# The execle tile is what executes transactions when we are leader
# and updates the accounting state as a result of any operations
# performed by the transactions.
[tiles.execle]
# The execrp tile is what executes transactions when we are not
# leader and updates the accounting state as a result of any
# operations performed by the transactions.
[tiles.execrp]
# The proof of history tile receives transactions from execle tiles
# and mixes their hashes into a continuous stream of hashes that
# proves to other validators time is passing.
[tiles.poh]
# The shred tile distributes processed transactions that have been
# executed to the rest of the cluster in the form of shred packets.
[tiles.shred]
# When this validator is not the leader, it receives the most
# recent processed transactions from the leader and other
# validators in the form of shred packets. Shreds are grouped
# in sets for error correction purposes, and the full validation
# of a shred packet requires receiving at least half of the set.
# Since shreds frequently arrive out of order, the shred tile
# needs a relatively large buffer to hold sets of shreds until
# they can be fully validated. This option specifies the size
# of this buffer.
#
# To compute an appropriate value, multiply the expected Turbine
# worst-case latency (tenths of seconds) by the expected
# transaction rate, and divide by approx 25.
max_pending_shred_sets = 32768
# The shred tile listens on a specific port for shreds to
# forward. This argument controls which port that is. The port
# is broadcast over gossip so other validators know how to reach
# this one.
shred_listen_port = 8003
# Shreds can also be forwarded to specific addresses, for
# example to run an unstaked RPC or for archiving. Each new,
# valid shred that the validator receives will be forwarded to
# the addresses specified for retransmit.
#
# Each shred that the validator produced when it is leader will
# be sent to the addresses specified for leader.
#
# Destinations use "host:port"; hosts may be IPv4 addresses, /etc/hosts
# entries, or DNS names. Each shred tile resolves names once at startup
# to the first IPv4 answer; failure prevents startup and DNS changes
# require restart. IPv6 is unsupported. Use a numeric IP or stable
# single-address name when one receiver needs the complete stream.
# Shreds are sent here first.
additional_shred_destinations_retransmit = []
additional_shred_destinations_leader = []
# Sets the fixed size of the in-memory shred cache.
# This cache helps reduce disk I/O against the shred database file.
shred_cache_size_mib = 32
# The repair tile watches incoming shreds and sends repair requests
# to other validators when it notices we are missing data needed to
# replay the chain.
[tiles.repair]
# Which port to listen on for incoming responses to repair
# requests. This port must be open and accessible from the
# network.
repair_client_listen_port = 8701
[tiles.rserve]
# If the repair server is enabled.
enabled = true
# The port the repair server listens for repair requests.
repair_serve_listen_port = 8702
# Sets the maximum logical size of the wire-shred ring in the Store
# backing file, [paths].shredb. A larger ring lets the validator
# retain more old blocks for repair service. The file is sparse:
# physical disk use starts small and grows as ring entries and FEC
# spill pages are written. This value is not a total disk limit;
# FEC payload spills can consume additional space.
shred_storage_limit_gib = 50
# The metric tile receives metrics updates published from the rest
# of the tiles and serves them via. a Prometheus compatible HTTP
# endpoint.
[tiles.metric]
# The address to listen on. By default, metrics are only
# accessible from the local machine. If you wish to expose them
# to the network, you can change the listen address.
#
# The Firedancer team makes a best effort to secure the metrics
# endpoint but exposing it to the internet from a production
# validator is not recommended as it increases the attack
# surface of the validator.
prometheus_listen_address = "127.0.0.1"
# The port to listen on for HTTP request for Prometheus metrics.
# Firedancer serves metrics at a URI like 127.0.0.1:7999/metrics
prometheus_listen_port = 7999
# The event tile captures significant events from the system and
# reports them a remote collection server for analysis. Whether
# event reporting is enabled or not is controlled by the top level
# `telemetry` option, and if disabled no options here have any
# effect.
[tiles.event]
# The URL of the remote event collection server. By default,
# this is set to the Firedancer public event collection server.
#
# If no URL is provided, event reporting is disabled, although
# it is suggested to leave the default URL in place and set
# `telemetry` to false to disable event reporting.
url = "https://events-in.firedancer.io"
# The gui tile receives data from the validator and serves an HTTP
# endpoint to clients to view it.
[tiles.gui]
# If the GUI is enabled.
enabled = true
# The address to listen on. By default, if enabled, the GUI
# will only be accessible from the local machine. If you wish
# to expose it to the network, you can change the listen
# address.
#
# The Firedancer team makes a best effort to secure the GUI
# endpoint but exposing it to the internet from a production
# validator is not recommended as it increases the attack
# surface of the validator.
gui_listen_address = "127.0.0.1"
# The port to listen on.
gui_listen_port = 80
# Maximum number of simultaneous HTTP connections which can be
# open.
max_http_connections = 1024
# Maximum number of simultaneous WebSocket connections which can
# be open. Every browser tab currently showing the GUI has one
# persistent WebSocket connection. When a new WebSocket is
# created but no connections are free, the oldest one is closed.
max_websocket_connections = 1024
# All GUI connections share buffer space for outgoing GUI
# WebSocket updates and HTTP response headers. If this buffer
# runs out, the connections with the slowest recipients are
# dropped. Larger values make the GUI server more tolerant to
# slow clients but also increase memory usage.
send_buffer_size_mb = 512
# The maximum size of the on disk event database. This is an
# upper bound on the disk space used. The GUI tile will start
# with an empty database and grow the storage file on disk up to
# the limit as needed. When the database is full, the oldest
# values are evicted to make space for new data. Must be at
# least 4 GiB.
db_size_gib = 100
[tiles.rpc]
# If the RPC server is enabled.
enabled = true
# The address to listen on. By default, if enabled, the RPC
# server will only be accessible from the local machine. If
# you wish to expose it to the network, you can change the
# listen address.
#
# The Firedancer team makes a best effort to secure the RPC
# endpoint but exposing it to the internet from a production
# validator is not recommended as it increases the attack
# surface of the validator. It also allows arbitrary peers to
# connect to your validator and waste resources on expensive RPC
# queries.
rpc_listen_address = "127.0.0.1"
# The port to listen on.
rpc_listen_port = 8899
# The maximum number of concurrent RPC requests to allow. If
# too many connections are active, the oldest connection will be
# evicted to make room for new ones as they arrive. Increasing
# this value can improve RPC performance but will increase
# memory usage.
max_http_connections = 1024
# Maximum number of simultaneous WebSocket connections which can
# be open.
max_websocket_connections = 128
# All RPC connections share buffer space for outgoing RPC
# response data. If this buffer runs out, the connections with
# the slowest recipients are dropped. Larger values make the
# RPC server more tolerant to slow clients but also increase
# memory usage.
send_buffer_size_mb = 512
# If delay_startup is true, the RPC tile will wait for snapshots
# to load before accepting connections. This behavior conforms
# with Agave's boot sequence, but can be disabled here to allow
# RPC to serve a subset of calls even when snapshots are
# loading.
delay_startup = true
# Firedancer validators support a coordinated failover protocol. A
# handoff transfers the final vote history after the active stops signing.
# When the handoff fails, `failover takeover` takes the identity without
# coordination and can discard earlier lockouts or allow both validators
# to vote.
#
# The protocol works by hosting a TCP listener on your validator. Any
# peer in possession of the currently active identity private key can
# demote this validator to the junk identity by sending a specially
# signed packet proving that possession.
#
# Between two Firedancer validators, only hand off the identity with
# `failover promote`. Do not use `set-identity --vote-history-file`
# for this. The failover protocol passes the final vote history
# directly and checks it against what this validator replayed. Vote
# history files are only for handing off an identity from a validator that
# does not run failover, such as Agave.
[failover]
# Whether to listen for handoff requests, so that another machine
# can take this validator's identity with `failover promote`.
enabled = true
# Whether to boot as a standby under a junk identity generated in
# memory at each start, instead of under [paths.identity_key]. The
# junk private key is never written out to a file. The keypair in
# [paths.identity_key] is then the identity this machine takes with
# `failover promote`.
#
# Setting this to true is highly encouraged on every validator that
# uses failover. Such a validator never boots under the staked
# identity, so a restart cannot make it vote alongside the validator
# running the identity, or make gossip's duplicate instance check
# stop that validator.
boot_to_standby = false
# The address to listen on. If enabled, by default the listener is
# exposed to the network. This is safe as possession of the private
# key is required to take over the identity, but could be a vector
# for a targeted denial of service. For added reliability, restrict
# the listener to a private network.
listen_address = "0.0.0.0"
# The port to listen on for handoff requests. The other validator
# dials 8010 unless `failover promote --port` gives another port.
listen_port = 8010
# These options can be useful for development, but should not be used
# when connecting to a live cluster, as they may cause the validator to
# be unstable or have degraded performance or security. The program
# will check that these options are set correctly in production and
# refuse to start otherwise.
[development]
# For enhanced security, Firedancer runs itself in a restrictive
# sandbox in production. The sandbox prevents most system calls and
# restricts the capabilities of the process after initialization to
# make the attack surface smaller. This is required in production,
# but might be too restrictive during development.
#
# In development, you can disable the sandbox for testing and
# debugging with the `--no-sandbox` argument to `firedancer-dev`.
sandbox = true
# As part of the security sandboxing, Firedancer will run every tile
# in a separate process. This can be annoying for debugging where
# you want control of all the tiles under one inferior, so we also
# support a development mode where tiles are run as threads instead
# and the system operates inside a single process. This does not
# impact performance and threads still get pinned. If no clone is
# enabled, the sandbox is automatically disabled as well.
#
# This option cannot be enabled in production. In development, you
# can also launch Firedancer as a single process for with the
# `--no-clone` argument to `firedancer-dev`.
no_clone = false
# As part of security sandboxing, the dumpable bit of each process
# is cleared with prctl( PR_SET_DUMPABLE, 0 ). This prevents other
# processes from attaching via. `ptrace(2)` which could be a
# security issue, and also prevents core dumps from being generated
# which might leak sensitive information. If the sandbox is
# disabled, core dumps are always produced and this option has no
# effect.
#
# This option controls whether core dumps are produced when the
# sandbox is enabled, and what is in them. The option can be
# enabled in production although it is not always recommended as it
# removes some minor security protections from the sandbox. The
# possible options are,
#
# "disabled" (default)
# No core dumps are produced.
#
# "minimal"
# Core dumps are produced, but they contain only stack memory,
# registers, and other core process state. No heap memory or
# workspaces are included.
#
# "regular"
# Core dumps are produced including most useful process state,
# including heap memory and important workspaces mapped into the
# process. Certain large workspaces that are typically not useful
# will not be included, such as the accounts database and
# blockstore.
#
# "full"
# Core dumps are with almost all process memory, including things
# like the accounts database. The only memory which will not be
# in the dump are sensitive pages containing private key material
# from the running validator.
core_dump = "disabled"
# A hard fork occurs when our validator has some implementation
# difference in consensus rules and gets a different blockhash for
# a given slot than the rest of the cluster.
#
# Typically, we should assume that our validator is correct and keep
# running, but during development it can be useful to detect if we
# are on the minority hard fork and immediately exit or abort.
#
# If this option is true, the validator will immediately exit with
# an error if it detects a hard fork. If false, the validator will
# log the hard fork event and continue running.
hard_fork_fatal = false
# fixed_fec_sets controls the maximum data payload size for FEC sets
# in the store. Shreds per FEC set used to be variable-length, but
# were changed to always be a fixed size of 32. When true the data
# buffer per FEC set is 31840 bytes (32 shreds * 995 payload bytes
# per shred). When false, the data buffer is 63985 bytes (67 shreds
# * 955 payload bytes per shred) to accommodate the old
# variable-length FEC sets. This should be left as its default
# value of true unless attempting to replay old ledgers.
fixed_fec_sets = true
[development.votor]
# The votor tile makes outgoing QUIC connections from this port
# to broadcast the votes it produces. Peers see it as the
# source port; it is never advertised in gossip.
quic_client_listen_port = 8005
# Votes and certs are sent by peer validators via QUIC datagrams
# to this port.
quic_server_listen_port = 8004
[development.gossip]
# Under normal operating conditions, a validator should always
# reach out to a host located on the public internet. If this
# value is true, it allows the validator to gossip with nodes
# located on a private internet (rfc1918).
allow_private_address = false
[development.genesis]
# During normal operation, the genesi tile performs a validation
# check on the genesis hash which ensures it belongs to one of
# the three primary clusters (testnet, mainnet, devnet). During
# development, this option can be disabled, which allows joining
# a local cluster in, for example, mainnet mode with a different
# genesis hash.
validate_genesis_hash = true
# The maximum size of the genesis file that is either loaded
# from the disk or downloaded from the network. This also
# bounds the number of genesis accounts Firedancer can index
# (about one per 89 bytes) and sizes the account index kept by
# the genesi and replay tiles (about 18% of this value each).
# Must be in [1, 4055].
max_file_size_mib = 16
# How long each tick of the proof of history component should
# take, in microseconds. This value specifies the initial value
# of the chain and it will not change at runtime. The default
# gives 200ms slots with 64 ticks per slot.
target_tick_duration_micros = 3125
# The number of ticks in each slot. This value specifies the
# initial value of the chain and it will not change at runtime.
# The default value used here is the same as mainnet, devnet,
# and testnet.
ticks_per_slot = 64
# The count of accounts to pre-fund in the genesis block with
# SOL. Useful for benchmarking and development. The specific
# accounts that will be funded are those with private-keys of
# 0, 1, 2, .... N.
fund_initial_accounts = 1024
# The amount of SOL to pre-fund each account with.
fund_initial_amount_lamports = 50000000000000
# The number of lamports to stake on the voting account of the
# validator that starts up from the genesis. Genesis creation
# will fund the staking account passed to it with this amount
# and then stake it on the voting account. Note that the voting
# account key used in the genesis needs to be the same as the
# one that is used by the bootstrap validator.
vote_account_stake_lamports = 500000000
# Setting warmup epochs to true will allow shorter epochs
# towards the beginning of the cluster. This allows for faster
# stake activation. The first epoch will be 32 slots long and
# the duration of each subsequent epoch will be double that of
# the one before it until it reaches the desired epoch duration
# of the cluster.
warmup_epochs = false
[development.bench]
# How many benchg tiles to run when benchmarking. benchg tiles
# are responsible for generating and signing outgoing
# transactions to the validator which is expensive.
benchg_tile_count = 4
# How many benchs tiles to run when benchmarking. benchs tiles
# are responsible for sending transactions to the validator, for
# example by calling send() on a socket. On loopback, a single
# benchs tile can send around 320k packets a second.
benchs_tile_count = 2
# Which cores to run the benchmarking tiles on. By default, the
# cores will be floating but to get good performance
# measurements on your machine, you should create a topology
# where these generators get their own cores.
#
# The tiles included in this affinity are,
#
# bencho, benchg1, .... benchgN, benchs1, ... benchsN
#
# If the [layout.affinity] above is set to "auto" then this
# value must also be set to "auto" and it will be determined
# automatically.
affinity = "auto"
# Which kind of transaction the benchg tiles generate. One of,
#
# "noop" (default)
# Tiny transactions without instructions.
#
# "sol-transfer"
# Basic SOL transfers.
#
# "ptoken-transfer"
# SPL Token transfers using the p-token program.
transaction_mode = "noop"
# Solana has a consensus-agreed maximum number of compute units
# per block, on the order of 50,000,000, which works out to
# around 83,000 transfers a second since each consumes about
# 1,500 CUs. When benchmarking, this can be the limiting
# bottleneck of the system, so this option is provided to raise
# the limit. 0 keeps the consensus limits; any other value is
# the raised CUs per block and memory that scales with
# transactions per slot is sized up to match.
#
# This option should not be used in production, and would cause
# consensus violations and a consensus difference between the
# validator and the rest of the network.
max_cost_per_block = 0
# Solana has a consensus-agreed-upon limit of 16,384 data shreds
# (and as many parity shreds) per block with 200ms slots. This
# limit prevents a malicious (or mistaken) validator from
# slowing down the network by producing a huge block. When
# benchmarking, this limit can be the bottleneck of the whole
# system, so this option is provided to raise the limit. 0
# keeps the consensus limit; any other value is the raised
# number of data shreds per block, which must be a multiple of
# 16,384, and the block data byte limit scales with it.
#
# This option should not be used in a production network, since
# it would cause consensus violations between the validator and
# the rest of the network.
max_shreds_per_block = 0
# Experimental options for the bundle tile. These should not be
# changed on a production validator.
[development.bundle]
# Specify the maximum Protobuf message size in KiB.
#
# This affects the size of various gRPC-related buffers,
# including socket buffer sizes, the TLS buffer, the HTTP/2
# frame buffer, and a Protobuf encode buffer.
buffer_size_kib = 2048
# Log TLS encryption keys for block engine connection. An empty
# string (the default) disables key logging.
#
# Keys are appended in NSS SSLKEYLOGFILE format to the given
# file path. A file is created if none exists. The resulting
# file can be used to decrypt packet captures of gRPC conns
# made by the bundle tile.
ssl_key_log_file = ""
# Development and diagnostic only options for the event tile. These
# options should not be changed on a production validator or it may
# cause stability or performance issues.
[development.event]
# Whether to report all shreds that are received by the
# validator to the remote server. This generates a very high
# volume of events and should only be used for debugging and
# development purposes.
report_shreds = false
# Whether to report all transactions that are processed by the
# validator to the remote server. This generates a very high
# volume of events and should only be used for debugging and
# development purposes.
report_transactions = false
# Whether to emit the runtime events during replay
# Primarily useful for development and debugging mismatches
# between validator clients. This generates a very high
# volume of events and should only be used for debugging and
# development purposes.
report_runtime_diffs = false
# Whether to report every repair request sent to a peer, one
# event per requested shred, to the remote server. This
# generates a high volume of events, especially while catching
# up, and should only be used for debugging and development
# purposes.
report_repair_requests = false
# Maximum upload speed for telemetry data in megabits per second (Mbps).
# The steady state of collection sits well under the default here, and
# it is set higher to allow draining a backlog of data in the event of
# server outage.
#
# It is not recommended to change this value except in test or
# development environments.
max_upload_rate_mbps = 32
# The following options relate to the 'firedance-dev pktgen' tool
# only. pktgen tests net tile transmit throughput by generating a
# flood of non-routable Ethernet frames. Only use 'firedancer-dev
# pktgen' if you know what you are doing! It can cause damage to
# your system and network infrastructure.
[development.pktgen]
# Which cores to run the 'net' and 'pktgen' tiles on.
# By default, two fixed cores will be used. To get reliable
# measurements, avoid the use of floating tiles.
# This setting overrides [layout.affinity] above.
affinity = "auto"
# fake_dst_ip should be set to the IP address of a neighbor on
# the Ethernet network. (For example the router the system is
# directly connected to.)
#
# The net tile queries the route and neighbor tables as part of
# the benchmark. In short, these resolve the dst MAC address of
# the outgoing Ethernet packets. Since pktgen does not produce
# valid IPv4 packets, no traffic actually gets sent to this IP.
#
# The IP address should fulfill these requirements:
# - 'ip route get <IP>' resolves to the XDP interface
# (see [net.interface])
# - 'ip neigh get <NEXTHOP> dev <INTERFACE>' returns REACHABLE
# If these requirements are not met, no packets will be sent
# out.
fake_dst_ip = "" # e.g. "192.0.2.64"
# The following options relate to the 'fddev udpecho' tool only.
# This testing feature echos back incoming UDP packets using the
# production networking stack.
[development.udpecho]
affinity = "auto"
# Inject shreds (block data) into the system to replay.
# Used by 'firedancer-dev backtest'.
[development.ledger_input]
# The following input ledger formats are supported:
#
# "auto" (default)
# Attempt to detect input format based on file path.
#
# "pcap"
# Read a PCAP or PCAPNG file and inject all UDP packets as
# shreds. Supports the following link types: ETHERNET, IPv4,
# or RAW (interprets first header as IPv4).
# Supports Zstandard (.zst) compression.
#
# rocksdb directories cannot be ingested directly;
# convert them to a shredcap capture first with
# contrib/blockstore/blockstore2shredcap
format = "auto"
# Absolute file system path to shred source.
path = ""
# Stop injecting when this slot is reached (inclusive).
# Zero signals to only stop when the input is fully consumed.
end_slot = 0
# 'firedancer-dev backtest' specific options
[development.backtest]
# See [layout.affinity]
affinity = "auto"
# Delays rooting by the given number of slots.
root_distance = 32
# Tuning for the accounts database. These options are for advanced
# users and should not be changed in production.
[development.accdb]
# Size of each accdb partition file slice in gibibytes.
# Accounts are written sequentially into partitions; a new
# partition is opened when the current one fills. Smaller
# partitions allow finer-grained compaction at the cost of more
# frequent partition rotations.
partition_size_gib = 32
[development.hugetlbfs]
# If true the hugetlbfs mounts created by the `hugetlbfs`
# configure stage are mounted with a `min_size=` option, so the
# kernel persistently reserves the pages for the mount.
#
# This is useful to disable in test environments where reserving
# the pages can cause churn for other tests which expect them
# unreserved, but is not suggested in production as it adds a
# failure mode where Firedancer cannot boot because the
# hugepages are in use by another process.
min_size = true