AvalancheGo Config Flags

This page lists all available configuration options for AvalancheGo nodes.

This document lists all available configuration options for AvalancheGo nodes. You can configure your node using either command-line flags or environment variables.

Note: For comparison with the previous documentation format (using individual flag headings), see the archived version.

Environment Variable Naming Convention

All environment variables follow the pattern: AVAGO_ + flag name where the flag name is converted to uppercase with hyphens replaced by underscores.

For example:

  • Flag: --api-admin-enabled
  • Environment Variable: AVAGO_API_ADMIN_ENABLED

Example Usage

Using Command-Line Flags

avalanchego --network-id=fuji --http-host=0.0.0.0 --log-level=debug

Using Environment Variables

export AVAGO_NETWORK_ID=fuji
export AVAGO_HTTP_HOST=0.0.0.0
export AVAGO_LOG_LEVEL=debug
avalanchego

Using Config File

Create a JSON config file:

{
  "network-id": "fuji",
  "http-host": "0.0.0.0",
  "log-level": "debug"
}

Run with:

avalanchego --config-file=/path/to/config.json

Configuration Precedence

Configuration sources are applied in the following order (highest to lowest precedence):

  1. Command-line flags
  2. Environment variables
  3. Config file
  4. Default values

Configuration Options

APIs

Configuration for various APIs exposed by the node.

FlagEnv VarTypeDefaultDescription
--api-admin-enabledAVAGO_API_ADMIN_ENABLEDboolfalseIf set to true, this node will expose the Admin API. See here for more information.
--api-health-enabledAVAGO_API_HEALTH_ENABLEDbooltrueIf set to false, this node will not expose the Health API. See here for more information.
--index-enabledAVAGO_INDEX_ENABLEDboolfalseIf set to true, this node will enable the indexer and the Index API will be available. See here for more information.
--api-info-enabledAVAGO_API_INFO_ENABLEDbooltrueIf set to false, this node will not expose the Info API. See here for more information.
--api-metrics-enabledAVAGO_API_METRICS_ENABLEDbooltrueIf set to false, this node will not expose the Metrics API. See here for more information.

Avalanche Community Proposals

Support for Avalanche Community Proposals.

FlagEnv VarTypeDefaultDescription
--acp-supportAVAGO_ACP_SUPPORT[]int[]The --acp-support flag allows an AvalancheGo node to indicate support for a set of Avalanche Community Proposals.
--acp-objectAVAGO_ACP_OBJECT[]int[]The --acp-object flag allows an AvalancheGo node to indicate objection for a set of Avalanche Community Proposals.

Bootstrapping

Configuration for node bootstrapping process.

FlagEnv VarTypeDefaultDescription
--bootstrap-ancestors-max-containers-sentAVAGO_BOOTSTRAP_ANCESTORS_MAX_CONTAINERS_SENTuint2000Max number of containers in an Ancestors message sent by this node.
--bootstrap-ancestors-max-containers-receivedAVAGO_BOOTSTRAP_ANCESTORS_MAX_CONTAINERS_RECEIVEDuint2000This node reads at most this many containers from an incoming Ancestors message.
--bootstrap-beacon-connection-timeoutAVAGO_BOOTSTRAP_BEACON_CONNECTION_TIMEOUTduration1mTimeout when attempting to connect to bootstrapping beacons.
--bootstrap-idsAVAGO_BOOTSTRAP_IDSstringnetwork dependentBootstrap IDs is a comma-separated list of validator IDs. These IDs will be used to authenticate bootstrapping peers. An example setting of this field would be --bootstrap-ids="NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg,NodeID-MFrZFVCXPv5iCn6M9K6XduxGTYp891xXZ". The number of given IDs here must be same with number of given --bootstrap-ips. The default value depends on the network ID.
--bootstrap-ipsAVAGO_BOOTSTRAP_IPSstringnetwork dependentBootstrap IPs is a comma-separated list of IP:port pairs. These IP Addresses will be used to bootstrap the current Avalanche state. An example setting of this field would be --bootstrap-ips="127.0.0.1:12345,1.2.3.4:5678". The number of given IPs here must be same with number of given --bootstrap-ids. The default value depends on the network ID.
--bootstrap-max-time-get-ancestorsAVAGO_BOOTSTRAP_MAX_TIME_GET_ANCESTORSduration50msMax Time to spend fetching a container and its ancestors when responding to a GetAncestors message.
--bootstrap-retry-enabledAVAGO_BOOTSTRAP_RETRY_ENABLEDbooltrueIf set to false, will not retry bootstrapping if it fails.
--bootstrap-retry-warn-frequencyAVAGO_BOOTSTRAP_RETRY_WARN_FREQUENCYuint50Specifies how many times bootstrap should be retried before warning the operator.

Chain Configuration

Some blockchains allow the node operator to provide custom configurations for individual blockchains. These custom configurations are broken down into two categories: network upgrades and optional chain configurations. AvalancheGo reads in these configurations from the chain configuration directory and passes them into the VM on initialization.

FlagEnv VarTypeDefaultDescription
--chain-config-dirAVAGO_CHAIN_CONFIG_DIRstring$HOME/.avalanchego/configs/chainsSpecifies the directory that contains chain configs, as described here. If this flag is not provided and the default directory does not exist, AvalancheGo will not exit since custom configs are optional. However, if the flag is set, the specified folder must exist, or AvalancheGo will exit with an error. This flag is ignored if --chain-config-content is specified. Network upgrades are passed in from the location: chain-config-dir/blockchainID/upgrade.*. The chain configs are passed in from the location chain-config-dir/blockchainID/config.*. See here for more information.
--chain-config-contentAVAGO_CHAIN_CONFIG_CONTENTstring-As an alternative to --chain-config-dir, chains custom configurations can be loaded altogether from command line via --chain-config-content flag. Content must be base64 encoded. Example: First, encode the chain config: echo -n '{"log-level":"trace"}' | base64. This will output something like eyJsb2ctbGV2ZWwiOiJ0cmFjZSJ9. Then create the full config JSON and encode it: echo -n '{"C":{"Config":"eyJsb2ctbGV2ZWwiOiJ0cmFjZSJ9","Upgrade":null}}' | base64. Finally run: avalanchego --chain-config-content "eyJDIjp7IkNvbmZpZyI6ImV5SnNiMmN0YkdWMlpXd2lPaUowY21GalpTSjkiLCJVcGdyYWRlIjpudWxsfX0="
--chain-aliases-fileAVAGO_CHAIN_ALIASES_FILEstring~/.avalanchego/configs/chains/aliases.jsonPath to JSON file that defines aliases for Blockchain IDs. This flag is ignored if --chain-aliases-file-content is specified. Example content: {"q2aTwKuyzgs8pynF7UXBZCU7DejbZbZ6EUyHr3JQzYgwNPUPi": ["DFK"]}. The above example aliases the Blockchain whose ID is "q2aTwKuyzgs8pynF7UXBZCU7DejbZbZ6EUyHr3JQzYgwNPUPi" to "DFK". Chain aliases are added after adding primary network aliases and before any changes to the aliases via the admin API. This means that the first alias included for a Blockchain on a Subnet will be treated as the "Primary Alias" instead of the full blockchainID. The Primary Alias is used in all metrics and logs.
--chain-aliases-file-contentAVAGO_CHAIN_ALIASES_FILE_CONTENTstring-As an alternative to --chain-aliases-file, it allows specifying base64 encoded aliases for Blockchains.
--chain-data-dirAVAGO_CHAIN_DATA_DIRstring$HOME/.avalanchego/chainDataChain specific data directory.

Config File

FlagEnv VarTypeDefaultDescription
--config-fileAVAGO_CONFIG_FILEstring-Path to a JSON file that specifies this node's configuration. Command line arguments will override arguments set in the config file. This flag is ignored if --config-file-content is specified. Example JSON config file: {"log-level": "debug"}. Install Script creates the node config file at ~/.avalanchego/configs/node.json. No default file is created if AvalancheGo is built from source, you would need to create it manually if needed.
--config-file-contentAVAGO_CONFIG_FILE_CONTENTstring-As an alternative to --config-file, it allows specifying base64 encoded config content.
--config-file-content-typeAVAGO_CONFIG_FILE_CONTENT_TYPEstringJSONSpecifies the format of the base64 encoded config content. JSON, TOML, YAML are among currently supported file format (see here for full list).

Data Directory

FlagEnv VarTypeDefaultDescription
--data-dirAVAGO_DATA_DIRstring$HOME/.avalanchegoSets the base data directory where default sub-directories will be placed unless otherwise specified.

Database

FlagEnv VarTypeDefaultDescription
--db-dirAVAGO_DB_DIRstring$HOME/.avalanchego/dbSpecifies the directory to which the database is persisted.
--db-typeAVAGO_DB_TYPEstringleveldbSpecifies the type of database to use. Must be one of leveldb, memdb, or pebbledb. memdb is an in-memory, non-persisted database. Note: memdb stores everything in memory. So if you have a 900 GiB LevelDB instance, then using memdb you'd need 900 GiB of RAM. memdb is useful for fast one-off testing, not for running an actual node (on Fuji or Mainnet). Also note that memdb doesn't persist after restart. So any time you restart the node it would start syncing from scratch.

Database Config

FlagEnv VarTypeDefaultDescription
--db-config-fileAVAGO_DB_CONFIG_FILEstring-Path to the database config file. Ignored if --db-config-file-content is specified.
--db-config-file-contentAVAGO_DB_CONFIG_FILE_CONTENTstring-As an alternative to --db-config-file, it allows specifying base64 encoded database config content.

A LevelDB config file must be JSON and may have these keys. Any keys not given will receive the default value. See here for more information.

File Descriptor Limit

FlagEnv VarTypeDefaultDescription
--fd-limitAVAGO_FD_LIMITint32768Attempts to raise the process file descriptor limit to at least this value and error if the value is above the system max.

Genesis

FlagEnv VarTypeDefaultDescription
--genesis-fileAVAGO_GENESIS_FILEstring-Path to a JSON file containing the genesis data to use. Ignored when running standard networks (Mainnet, Fuji Testnet), or when --genesis-file-content is specified. If not given, uses default genesis data. See the documentation for the genesis JSON format here and an example for a local network here.
--genesis-file-contentAVAGO_GENESIS_FILE_CONTENTstring-As an alternative to --genesis-file, it allows specifying base64 encoded genesis data to use.

HTTP Server

FlagEnv VarTypeDefaultDescription
--http-allowed-hostsAVAGO_HTTP_ALLOWED_HOSTSstringlocalhostList of acceptable host names in API requests. Provide the wildcard ('*') to accept requests from all hosts. API requests where the Host field is empty or an IP address will always be accepted. An API call whose HTTP Host field isn't acceptable will receive a 403 error code.
--http-allowed-originsAVAGO_HTTP_ALLOWED_ORIGINSstring*Origins to allow on the HTTP port. Example: "https://*.avax.network https://*.avax-test.network"
--http-hostAVAGO_HTTP_HOSTstring127.0.0.1The address that HTTP APIs listen on. This means that by default, your node can only handle API calls made from the same machine. To allow API calls from other machines, use --http-host=. You can also enter domain names as parameter.
--http-portAVAGO_HTTP_PORTint9650Each node runs an HTTP server that provides the APIs for interacting with the node and the Avalanche network. This argument specifies the port that the HTTP server will listen on.
--http-idle-timeoutAVAGO_HTTP_IDLE_TIMEOUTduration120sMaximum duration to wait for the next request when keep-alives are enabled. If --http-idle-timeout is zero, the value of --http-read-timeout is used. If both are zero, there is no timeout.
--http-read-timeoutAVAGO_HTTP_READ_TIMEOUTduration30sMaximum duration for reading the entire request, including the body. A zero or negative value means there will be no timeout.
--http-read-header-timeoutAVAGO_HTTP_READ_HEADER_TIMEOUTduration30sMaximum duration to read request headers. The connection's read deadline is reset after reading the headers. If --http-read-header-timeout is zero, the value of --http-read-timeout is used. If both are zero, there is no timeout.
--http-write-timeoutAVAGO_HTTP_WRITE_TIMEOUTduration30sMaximum duration before timing out writes of the response. It is reset whenever a new request's header is read. A zero or negative value means there will be no timeout.
--http-shutdown-timeoutAVAGO_HTTP_SHUTDOWN_TIMEOUTduration10sMaximum duration to wait for existing connections to complete during node shutdown.
--http-shutdown-waitAVAGO_HTTP_SHUTDOWN_WAITduration0sDuration to wait after receiving SIGTERM or SIGINT before initiating shutdown. The /health endpoint will return unhealthy during this duration (if the Health API is enabled.)
--http-tls-enabledAVAGO_HTTP_TLS_ENABLEDbooleanfalseIf set to true, this flag will attempt to upgrade the server to use HTTPS.
--http-tls-cert-fileAVAGO_HTTP_TLS_CERT_FILEstring-This argument specifies the location of the TLS certificate used by the node for the HTTPS server. This must be specified when --http-tls-enabled=true. There is no default value. This flag is ignored if --http-tls-cert-file-content is specified.
--http-tls-cert-file-contentAVAGO_HTTP_TLS_CERT_FILE_CONTENTstring-As an alternative to --http-tls-cert-file, it allows specifying base64 encoded content of the TLS certificate used by the node for the HTTPS server. Note that full certificate content, with the leading and trailing header, must be base64 encoded. This must be specified when --http-tls-enabled=true.
--http-tls-key-fileAVAGO_HTTP_TLS_KEY_FILEstring-This argument specifies the location of the TLS private key used by the node for the HTTPS server. This must be specified when --http-tls-enabled=true. There is no default value. This flag is ignored if --http-tls-key-file-content is specified.
--http-tls-key-file-contentAVAGO_HTTP_TLS_KEY_FILE_CONTENTstring-As an alternative to --http-tls-key-file, it allows specifying base64 encoded content of the TLS private key used by the node for the HTTPS server. Note that full private key content, with the leading and trailing header, must be base64 encoded. This must be specified when --http-tls-enabled=true.

Logging

FlagEnv VarTypeDefaultDescription
--log-level=offAVAGO_LOG_LEVELstringinfoNo logs.
--log-level=fatalAVAGO_LOG_LEVELstringinfoFatal errors that are not recoverable.
--log-level=errorAVAGO_LOG_LEVELstringinfoErrors that the node encounters, these errors were able to be recovered.
--log-level=warnAVAGO_LOG_LEVELstringinfoWarnings that might be indicative of a spurious byzantine node, or potential future error.
--log-level=infoAVAGO_LOG_LEVELstringinfoUseful descriptions of node status updates.
--log-level=traceAVAGO_LOG_LEVELstringinfoTraces container job results, useful for tracing container IDs and their outcomes.
--log-level=debugAVAGO_LOG_LEVELstringinfoUseful when attempting to understand possible bugs in the code.
--log-level=verboAVAGO_LOG_LEVELstringinfoTracks extensive amounts of information the node is processing, including message contents and binary dumps of data for extremely low level protocol analysis.
--log-display-levelAVAGO_LOG_DISPLAY_LEVELstringvalue of --log-levelThe log level determines which events to display to stdout. If left blank, will default to the value provided to --log-level.
--log-format=autoAVAGO_LOG_FORMATstringautoFormats terminal-like logs when the output is a terminal.
--log-format=plainAVAGO_LOG_FORMATstringautoPlain text log format.
--log-format=colorsAVAGO_LOG_FORMATstringautoColored log format.
--log-format=jsonAVAGO_LOG_FORMATstringautoJSON log format.
--log-dirAVAGO_LOG_DIRstring$HOME/.avalanchego/logsSpecifies the directory in which system logs are kept. If you are running the node as a system service (ex. using the installer script) logs will also be stored in $HOME/var/log/syslog.
--log-disable-display-plugin-logsAVAGO_LOG_DISABLE_DISPLAY_PLUGIN_LOGSbooleanfalseDisables displaying plugin logs in stdout.
--log-rotater-max-sizeAVAGO_LOG_ROTATER_MAX_SIZEuint8The maximum file size in megabytes of the log file before it gets rotated.
--log-rotater-max-filesAVAGO_LOG_ROTATER_MAX_FILESuint7The maximum number of old log files to retain. 0 means retain all old log files.
--log-rotater-max-ageAVAGO_LOG_ROTATER_MAX_AGEuint0The maximum number of days to retain old log files based on the timestamp encoded in their filename. 0 means retain all old log files.
--log-rotater-compress-enabledAVAGO_LOG_ROTATER_COMPRESS_ENABLEDbooleanfalseEnables the compression of rotated log files through gzip.

Continuous Profiling

You can configure your node to continuously run memory/CPU profiles and save the most recent ones. Continuous memory/CPU profiling is enabled if --profile-continuous-enabled is set.

FlagEnv VarTypeDefaultDescription
--profile-continuous-enabledAVAGO_PROFILE_CONTINUOUS_ENABLEDbooleanfalseWhether the app should continuously produce performance profiles.
--profile-dirAVAGO_PROFILE_DIRstring$HOME/.avalanchego/profiles/If profiling enabled, node continuously runs memory/CPU profiles and puts them at this directory.
--profile-continuous-freqAVAGO_PROFILE_CONTINUOUS_FREQduration15mHow often a new CPU/memory profile is created.
--profile-continuous-max-filesAVAGO_PROFILE_CONTINUOUS_MAX_FILESint5Maximum number of CPU/memory profiles files to keep.

Network

FlagEnv VarTypeDefaultDescription
--network-id=mainnetAVAGO_NETWORK_IDstringmainnetConnect to Mainnet (default).
--network-id=fujiAVAGO_NETWORK_IDstringmainnetConnect to the Fuji test-network.
--network-id=testnetAVAGO_NETWORK_IDstringmainnetConnect to the current test-network (currently Fuji).
--network-id=localAVAGO_NETWORK_IDstringmainnetConnect to a local test-network.
--network-id=network-[id]AVAGO_NETWORK_IDstringmainnetConnect to the network with the given ID. id must be in the range [0, 2^32).

OpenTelemetry

AvalancheGo supports collecting and exporting OpenTelemetry traces. This might be useful for debugging, performance analysis, or monitoring.

FlagEnv VarTypeDefaultDescription
--tracing-endpointAVAGO_TRACING_ENDPOINTstringlocalhost:4317 (gRPC) or localhost:4318 (HTTP)The endpoint to export trace data to. Default depends on --tracing-exporter-type.
--tracing-exporter-typeAVAGO_TRACING_EXPORTER_TYPEstringdisabledType of exporter to use for tracing. Options are `disabled`, `grpc`, `http`.
--tracing-insecureAVAGO_TRACING_INSECUREbooleantrueIf true, don't use TLS when exporting trace data.
--tracing-sample-rateAVAGO_TRACING_SAMPLE_RATEfloat0.1The fraction of traces to sample. If >= 1, always sample. If <= 0, never sample.

Partial Sync Primary Network

FlagEnv VarTypeDefaultDescription
--partial-sync-primary-networkAVAGO_PARTIAL_SYNC_PRIMARY_NETWORKbooleanfalsePartial sync enables nodes that are not primary network validators to optionally sync only the P-chain on the primary network. Nodes that use this option can still track Subnets. After the Etna upgrade, nodes that use this option can also validate L1s.

Public IP

Validators must know one of their public facing IP addresses so they can enable other nodes to connect to them. By default, the node will attempt to perform NAT traversal to get the node's IP according to its router.

FlagEnv VarTypeDefaultDescription
--public-ipAVAGO_PUBLIC_IPstring-If this argument is provided, the node assumes this is its public IP. When running a local network it may be easiest to set this value to 127.0.0.1.
--public-ip-resolution-frequencyAVAGO_PUBLIC_IP_RESOLUTION_FREQUENCYduration5mFrequency at which this node resolves/updates its public IP and renew NAT mappings, if applicable.
--public-ip-resolution-serviceAVAGO_PUBLIC_IP_RESOLUTION_SERVICEstring-When provided, the node will use that service to periodically resolve/update its public IP. Only acceptable values are ifconfigCo, opendns or ifconfigMe.

State Syncing

FlagEnv VarTypeDefaultDescription
--state-sync-idsAVAGO_STATE_SYNC_IDSstring-State sync IDs is a comma-separated list of validator IDs. The specified validators will be contacted to get and authenticate the starting point (state summary) for state sync. An example setting of this field would be --state-sync-ids="NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg,NodeID-MFrZFVCXPv5iCn6M9K6XduxGTYp891xXZ". The number of given IDs here must be same with number of given --state-sync-ips. The default value is empty, which results in all validators being sampled.
--state-sync-ipsAVAGO_STATE_SYNC_IPSstring-State sync IPs is a comma-separated list of IP:port pairs. These IP Addresses will be contacted to get and authenticate the starting point (state summary) for state sync. An example setting of this field would be --state-sync-ips="127.0.0.1:12345,1.2.3.4:5678". The number of given IPs here must be the same with the number of given --state-sync-ids.

Staking

FlagEnv VarTypeDefaultDescription
--staking-portAVAGO_STAKING_PORTint9651The port through which the network peers will connect to this node externally. Having this port accessible from the internet is required for correct node operation.
--staking-tls-cert-fileAVAGO_STAKING_TLS_CERT_FILEstring$HOME/.avalanchego/staking/staker.crtAvalanche uses two-way authenticated TLS connections to securely connect nodes. This argument specifies the location of the TLS certificate used by the node. This flag is ignored if --staking-tls-cert-file-content is specified.
--staking-tls-cert-file-contentAVAGO_STAKING_TLS_CERT_FILE_CONTENTstring-As an alternative to --staking-tls-cert-file, it allows specifying base64 encoded content of the TLS certificate used by the node. Note that full certificate content, with the leading and trailing header, must be base64 encoded.
--staking-tls-key-fileAVAGO_STAKING_TLS_KEY_FILEstring$HOME/.avalanchego/staking/staker.keyAvalanche uses two-way authenticated TLS connections to securely connect nodes. This argument specifies the location of the TLS private key used by the node. This flag is ignored if --staking-tls-key-file-content is specified.
--staking-tls-key-file-contentAVAGO_STAKING_TLS_KEY_FILE_CONTENTstring-As an alternative to --staking-tls-key-file, it allows specifying base64 encoded content of the TLS private key used by the node. Note that full private key content, with the leading and trailing header, must be base64 encoded.

Subnets

Subnet Tracking

FlagEnv VarTypeDefaultDescription
--track-subnetsAVAGO_TRACK_SUBNETSstring-Comma separated list of Subnet IDs that this node would track if added to. Defaults to empty (will only validate the Primary Network).

Subnet Configs

It is possible to provide parameters for Subnets. Parameters here apply to all chains in the specified Subnets. Parameters must be specified with a [subnetID].json config file under --subnet-config-dir. AvalancheGo loads configs for Subnets specified in --track-subnets parameter. Full reference for all configuration options for a Subnet can be found in a separate Subnet Configs document.

FlagEnv VarTypeDefaultDescription
--subnet-config-dirAVAGO_SUBNET_CONFIG_DIRstring$HOME/.avalanchego/configs/subnetsSpecifies the directory that contains Subnet configs, as described above. If the flag is set explicitly, the specified folder must exist, or AvalancheGo will exit with an error. This flag is ignored if --subnet-config-content is specified. Example: Let's say we have a Subnet with ID p4jUwqZsA2LuSftroCd3zb4ytH8W99oXKuKVZdsty7eQ3rXD6. We can create a config file under the default subnet-config-dir at $HOME/.avalanchego/configs/subnets/p4jUwqZsA2LuSftroCd3zb4ytH8W99oXKuKVZdsty7eQ3rXD6.json. An example config file is: {"validatorOnly": false, "consensusParameters": {"k": 25, "alpha": 18}}. By default, none of these directories and/or files exist. You would need to create them manually if needed.
--subnet-config-contentAVAGO_SUBNET_CONFIG_CONTENTstring-As an alternative to --subnet-config-dir, it allows specifying base64 encoded parameters for a Subnet.

Version

FlagEnv VarTypeDefaultDescription
--versionAVAGO_VERSIONbooleanfalseIf this is true, print the version and quit.

Advanced Configuration Options

⚠️ Warning: The following options may affect the correctness of a node. Only power users should change these.

Gossiping

Consensus gossiping parameters.

FlagEnv VarTypeDefaultDescription
--consensus-accepted-frontier-gossip-validator-sizeAVAGO_CONSENSUS_ACCEPTED_FRONTIER_GOSSIP_VALIDATOR_SIZEuint0Number of validators to gossip to when gossiping accepted frontier.
--consensus-accepted-frontier-gossip-non-validator-sizeAVAGO_CONSENSUS_ACCEPTED_FRONTIER_GOSSIP_NON_VALIDATOR_SIZEuint0Number of non-validators to gossip to when gossiping accepted frontier.
--consensus-accepted-frontier-gossip-peer-sizeAVAGO_CONSENSUS_ACCEPTED_FRONTIER_GOSSIP_PEER_SIZEuint15Number of peers to gossip to when gossiping accepted frontier.
--consensus-accepted-frontier-gossip-frequencyAVAGO_CONSENSUS_ACCEPTED_FRONTIER_GOSSIP_FREQUENCYduration10sTime between gossiping accepted frontiers.
--consensus-on-accept-gossip-validator-sizeAVAGO_CONSENSUS_ON_ACCEPT_GOSSIP_VALIDATOR_SIZEuint0Number of validators to gossip to each accepted container to.
--consensus-on-accept-gossip-non-validator-sizeAVAGO_CONSENSUS_ON_ACCEPT_GOSSIP_NON_VALIDATOR_SIZEuint0Number of non-validators to gossip to each accepted container to.
--consensus-on-accept-gossip-peer-sizeAVAGO_CONSENSUS_ON_ACCEPT_GOSSIP_PEER_SIZEuint10Number of peers to gossip to each accepted container to.

Sybil Protection

Sybil protection configuration. These settings affect how the node participates in consensus.

FlagEnv VarTypeDefaultDescription
--sybil-protection-enabledAVAGO_SYBIL_PROTECTION_ENABLEDbooleantrueAvalanche uses Proof of Stake (PoS) as sybil resistance to make it prohibitively expensive to attack the network. If false, sybil resistance is disabled and all peers will be sampled during consensus. Note that this can not be disabled on public networks (Fuji and Mainnet). Setting this flag to false does not mean "this node is not a validator." It means that this node will sample all nodes, not just validators. You should not set this flag to false unless you understand what you are doing.
--sybil-protection-disabled-weightAVAGO_SYBIL_PROTECTION_DISABLED_WEIGHTuint100Weight to provide to each peer when staking is disabled.

Benchlist

Peer benchlisting configuration.

FlagEnv VarTypeDefaultDescription
--benchlist-durationAVAGO_BENCHLIST_DURATIONduration15mMaximum amount of time a peer is benchlisted after surpassing --benchlist-fail-threshold.
--benchlist-fail-thresholdAVAGO_BENCHLIST_FAIL_THRESHOLDint10Number of consecutive failed queries to a node before benching it (assuming all queries to it will fail).
--benchlist-min-failing-durationAVAGO_BENCHLIST_MIN_FAILING_DURATIONduration150sMinimum amount of time queries to a peer must be failing before the peer is benched.

Consensus Parameters

:::note Some of these parameters can only be set on a local or private network, not on Fuji Testnet or Mainnet :::

FlagEnv VarTypeDefaultDescription
--consensus-shutdown-timeoutAVAGO_CONSENSUS_SHUTDOWN_TIMEOUTduration5sTimeout before killing an unresponsive chain.
--create-asset-tx-feeAVAGO_CREATE_ASSET_TX_FEEint10000000Transaction fee, in nAVAX, for transactions that create new assets. This can only be changed on a local network.
--tx-feeAVAGO_TX_FEEint1000000The required amount of nAVAX to be burned for a transaction to be valid on the X-Chain, and for import/export transactions on the P-Chain. This parameter requires network agreement in its current form. Changing this value from the default should only be done on private networks or local network.
--uptime-requirementAVAGO_UPTIME_REQUIREMENTfloat0.8Fraction of time a validator must be online to receive rewards. This can only be changed on a local network.
--uptime-metric-freqAVAGO_UPTIME_METRIC_FREQduration30sFrequency of renewing this node's average uptime metric.

Staking Parameters

Staking economics configuration.

FlagEnv VarTypeDefaultDescription
--min-validator-stakeAVAGO_MIN_VALIDATOR_STAKEintnetwork dependentThe minimum stake, in nAVAX, required to validate the Primary Network. This can only be changed on a local network. Defaults to 2000000000000 (2,000 AVAX) on Mainnet. Defaults to 5000000 (.005 AVAX) on Test Net.
--max-validator-stakeAVAGO_MAX_VALIDATOR_STAKEintnetwork dependentThe maximum stake, in nAVAX, that can be placed on a validator on the primary network. This includes stake provided by both the validator and by delegators to the validator. This can only be changed on a local network.
--min-delegator-stakeAVAGO_MIN_DELEGATOR_STAKEintnetwork dependentThe minimum stake, in nAVAX, that can be delegated to a validator of the Primary Network. Defaults to 25000000000 (25 AVAX) on Mainnet. Defaults to 5000000 (.005 AVAX) on Test Net. This can only be changed on a local network.
--min-delegation-feeAVAGO_MIN_DELEGATION_FEEint20000The minimum delegation fee that can be charged for delegation on the Primary Network, multiplied by `10,000`. Must be in the range [0, 1000000]. This can only be changed on a local network.
--min-stake-durationAVAGO_MIN_STAKE_DURATIONduration336hMinimum staking duration. This can only be changed on a local network. This applies to both delegation and validation periods.
--max-stake-durationAVAGO_MAX_STAKE_DURATIONduration8760hThe maximum staking duration, in hours. This can only be changed on a local network.
--stake-minting-periodAVAGO_STAKE_MINTING_PERIODduration8760hConsumption period of the staking function, in hours. This can only be changed on a local network.
--stake-max-consumption-rateAVAGO_STAKE_MAX_CONSUMPTION_RATEuint120000The maximum percentage of the consumption rate for the remaining token supply in the minting period, which is 1 year on Mainnet. This can only be changed on a local network.
--stake-min-consumption-rateAVAGO_STAKE_MIN_CONSUMPTION_RATEuint100000The minimum percentage of the consumption rate for the remaining token supply in the minting period, which is 1 year on Mainnet. This can only be changed on a local network.
--stake-supply-capAVAGO_STAKE_SUPPLY_CAPuint720000000000000000The maximum stake supply, in nAVAX, that can be placed on a validator. This can only be changed on a local network.

Snow Consensus

Snow consensus protocol parameters.

FlagEnv VarTypeDefaultDescription
--snow-concurrent-repollsAVAGO_SNOW_CONCURRENT_REPOLLSint4Snow consensus requires repolling transactions that are issued during low time of network usage. This parameter lets one define how aggressive the client will be in finalizing these pending transactions. This should only be changed after careful consideration of the tradeoffs of Snow consensus. The value must be at least 1 and at most --snow-commit-threshold.
--snow-sample-sizeAVAGO_SNOW_SAMPLE_SIZEint20Snow consensus defines k as the number of validators that are sampled during each network poll. This parameter lets one define the k value used for consensus. This should only be changed after careful consideration of the tradeoffs of Snow consensus. The value must be at least 1.
--snow-quorum-sizeAVAGO_SNOW_QUORUM_SIZEint15Snow consensus defines alpha as the number of validators that must prefer a transaction during each network poll to increase the confidence in the transaction. This parameter lets us define the alpha value used for consensus. This should only be changed after careful consideration of the tradeoffs of Snow consensus. The value must be at greater than k/2.
--snow-commit-thresholdAVAGO_SNOW_COMMIT_THRESHOLDint20Snow consensus defines beta as the number of consecutive polls that a container must increase its confidence for it to be accepted. This parameter lets us define the beta value used for consensus. This should only be changed after careful consideration of the tradeoffs of Snow consensus. The value must be at least 1.
--snow-optimal-processingAVAGO_SNOW_OPTIMAL_PROCESSINGint50Optimal number of processing items in consensus. The value must be at least 1.
--snow-max-processingAVAGO_SNOW_MAX_PROCESSINGint1024Maximum number of processing items to be considered healthy. Reports unhealthy if more than this number of items are outstanding. The value must be at least 1.
--snow-max-time-processingAVAGO_SNOW_MAX_TIME_PROCESSINGduration2mMaximum amount of time an item should be processing and still be healthy. Reports unhealthy if there is an item processing for longer than this duration. The value must be greater than 0.

ProposerVM

ProposerVM configuration.

FlagEnv VarTypeDefaultDescription
--proposervm-use-current-heightAVAGO_PROPOSERVM_USE_CURRENT_HEIGHTbooleanfalseHave the ProposerVM always report the last accepted P-chain block height.
--proposervm-min-block-delayAVAGO_PROPOSERVM_MIN_BLOCK_DELAYduration1sThe minimum delay to enforce when building a snowman++ block for the primary network chains and the default minimum delay for subnets. A non-default value is only suggested for non-production nodes.

Health Checks

Health monitoring configuration.

FlagEnv VarTypeDefaultDescription
--health-check-frequencyAVAGO_HEALTH_CHECK_FREQUENCYduration30sHealth check runs with this frequency.
--health-check-averager-halflifeAVAGO_HEALTH_CHECK_AVERAGER_HALFLIFEduration10sHalf life of averagers used in health checks (to measure the rate of message failures, for example.) Larger value -> less volatile calculation of averages.

Network Configuration

Advanced network settings.

FlagEnv VarTypeDefaultDescription
--network-allow-private-ipsAVAGO_NETWORK_ALLOW_PRIVATE_IPSbooleantrueAllows the node to connect peers with private IPs.
--network-compression-typeAVAGO_NETWORK_COMPRESSION_TYPEstringgzipThe type of compression to use when sending messages to peers. Must be one of `gzip`, `zstd`, `none`. Nodes can handle inbound `gzip` compressed messages but by default send `zstd` compressed messages.
--network-initial-timeoutAVAGO_NETWORK_INITIAL_TIMEOUTduration5sInitial timeout value of the adaptive timeout manager.
--network-initial-reconnect-delayAVAGO_NETWORK_INITIAL_RECONNECT_DELAYduration1sInitial delay duration must be waited before attempting to reconnect a peer.
--network-max-reconnect-delayAVAGO_NETWORK_MAX_RECONNECT_DELAYduration1hMaximum delay duration must be waited before attempting to reconnect a peer.
--network-minimum-timeoutAVAGO_NETWORK_MINIMUM_TIMEOUTduration2sMinimum timeout value of the adaptive timeout manager.
--network-maximum-timeoutAVAGO_NETWORK_MAXIMUM_TIMEOUTduration10sMaximum timeout value of the adaptive timeout manager.
--network-maximum-inbound-timeoutAVAGO_NETWORK_MAXIMUM_INBOUND_TIMEOUTduration10sMaximum timeout value of an inbound message. Defines duration within which an incoming message must be fulfilled. Incoming messages containing deadline higher than this value will be overridden with this value.
--network-timeout-halflifeAVAGO_NETWORK_TIMEOUT_HALFLIFEduration5mHalf life used when calculating average network latency. Larger value -> less volatile network latency calculation.
--network-timeout-coefficientAVAGO_NETWORK_TIMEOUT_COEFFICIENTfloat2Requests to peers will time out after [network-timeout-coefficient] * [average request latency].
--network-read-handshake-timeoutAVAGO_NETWORK_READ_HANDSHAKE_TIMEOUTduration15sTimeout value for reading handshake messages.
--network-ping-timeoutAVAGO_NETWORK_PING_TIMEOUTduration30sTimeout value for Ping-Pong with a peer.
--network-ping-frequencyAVAGO_NETWORK_PING_FREQUENCYduration22.5sFrequency of pinging other peers.
--network-health-min-conn-peersAVAGO_NETWORK_HEALTH_MIN_CONN_PEERSuint1Node will report unhealthy if connected to less than this many peers.
--network-health-max-time-since-msg-receivedAVAGO_NETWORK_HEALTH_MAX_TIME_SINCE_MSG_RECEIVEDduration1mNode will report unhealthy if it hasn't received a message for this amount of time.
--network-health-max-time-since-msg-sentAVAGO_NETWORK_HEALTH_MAX_TIME_SINCE_MSG_SENTduration1mNetwork layer returns unhealthy if haven't sent a message for at least this much time.
--network-health-max-portion-send-queue-fullAVAGO_NETWORK_HEALTH_MAX_PORTION_SEND_QUEUE_FULLfloat0.9Node will report unhealthy if its send queue is more than this portion full. Must be in [0,1].
--network-health-max-send-fail-rateAVAGO_NETWORK_HEALTH_MAX_SEND_FAIL_RATEfloat0.25Node will report unhealthy if more than this portion of message sends fail. Must be in [0,1].
--network-health-max-outstanding-request-durationAVAGO_NETWORK_HEALTH_MAX_OUTSTANDING_REQUEST_DURATIONduration5mNode reports unhealthy if there has been a request outstanding for this duration.
--network-max-clock-differenceAVAGO_NETWORK_MAX_CLOCK_DIFFERENCEduration1mMax allowed clock difference value between this node and peers.
--network-require-validator-to-connectAVAGO_NETWORK_REQUIRE_VALIDATOR_TO_CONNECTbooleanfalseIf true, this node will only maintain a connection with another node if this node is a validator, the other node is a validator, or the other node is a beacon.
--network-tcp-proxy-enabledAVAGO_NETWORK_TCP_PROXY_ENABLEDbooleanfalseRequire all P2P connections to be initiated with a TCP proxy header.
--network-tcp-proxy-read-timeoutAVAGO_NETWORK_TCP_PROXY_READ_TIMEOUTduration3sMaximum duration to wait for a TCP proxy header.
--network-outbound-connection-timeoutAVAGO_NETWORK_OUTBOUND_CONNECTION_TIMEOUTduration30sTimeout while dialing a peer.

Message Rate-Limiting

These flags govern rate-limiting of inbound and outbound messages. For more information on rate-limiting and the flags below, see package throttling in AvalancheGo.

CPU Based Rate-Limiting

Rate-limiting based on how much CPU usage a peer causes.

FlagEnv VarTypeDefaultDescription
--throttler-inbound-cpu-validator-allocAVAGO_THROTTLER_INBOUND_CPU_VALIDATOR_ALLOCfloathalf of CPUsNumber of CPU allocated for use by validators. Value should be in range (0, total core count].
--throttler-inbound-cpu-max-recheck-delayAVAGO_THROTTLER_INBOUND_CPU_MAX_RECHECK_DELAYduration5sIn the CPU rate-limiter, check at least this often whether the node's CPU usage has fallen to an acceptable level.
--throttler-inbound-disk-max-recheck-delayAVAGO_THROTTLER_INBOUND_DISK_MAX_RECHECK_DELAYduration5sIn the disk-based network throttler, check at least this often whether the node's disk usage has fallen to an acceptable level.
--throttler-inbound-cpu-max-non-validator-usageAVAGO_THROTTLER_INBOUND_CPU_MAX_NON_VALIDATOR_USAGEfloat80% of CPUsNumber of CPUs that if fully utilized, will rate limit all non-validators. Value should be in range [0, total core count].
--throttler-inbound-cpu-max-non-validator-node-usageAVAGO_THROTTLER_INBOUND_CPU_MAX_NON_VALIDATOR_NODE_USAGEfloatCPUs / 8Maximum number of CPUs that a non-validator can utilize. Value should be in range [0, total core count].
--throttler-inbound-disk-validator-allocAVAGO_THROTTLER_INBOUND_DISK_VALIDATOR_ALLOCfloat1000 GiB/sMaximum number of disk reads/writes per second to allocate for use by validators. Must be > 0.
--throttler-inbound-disk-max-non-validator-usageAVAGO_THROTTLER_INBOUND_DISK_MAX_NON_VALIDATOR_USAGEfloat1000 GiB/sNumber of disk reads/writes per second that, if fully utilized, will rate limit all non-validators. Must be >= 0.
--throttler-inbound-disk-max-non-validator-node-usageAVAGO_THROTTLER_INBOUND_DISK_MAX_NON_VALIDATOR_NODE_USAGEfloat1000 GiB/sMaximum number of disk reads/writes per second that a non-validator can utilize. Must be >= 0.

Bandwidth Based Rate-Limiting

Rate-limiting based on the bandwidth a peer uses.

FlagEnv VarTypeDefaultDescription
--throttler-inbound-bandwidth-refill-rateAVAGO_THROTTLER_INBOUND_BANDWIDTH_REFILL_RATEuint512Max average inbound bandwidth usage of a peer, in bytes per second. See interface throttling.BandwidthThrottler.
--throttler-inbound-bandwidth-max-burst-sizeAVAGO_THROTTLER_INBOUND_BANDWIDTH_MAX_BURST_SIZEuint2 MiBMax inbound bandwidth a node can use at once. See interface throttling.BandwidthThrottler.

Message Size Based Rate-Limiting

Rate-limiting based on the total size, in bytes, of unprocessed messages.

FlagEnv VarTypeDefaultDescription
--throttler-inbound-at-large-alloc-sizeAVAGO_THROTTLER_INBOUND_AT_LARGE_ALLOC_SIZEuint6 MiBSize, in bytes, of at-large allocation in the inbound message throttler.
--throttler-inbound-validator-alloc-sizeAVAGO_THROTTLER_INBOUND_VALIDATOR_ALLOC_SIZEuint32 MiBSize, in bytes, of validator allocation in the inbound message throttler.
--throttler-inbound-node-max-at-large-bytesAVAGO_THROTTLER_INBOUND_NODE_MAX_AT_LARGE_BYTESuint2 MiBMaximum number of bytes a node can take from the at-large allocation of the inbound message throttler.

Message Based Rate-Limiting

Rate-limiting based on the number of unprocessed messages.

FlagEnv VarTypeDefaultDescription
--throttler-inbound-node-max-processing-msgsAVAGO_THROTTLER_INBOUND_NODE_MAX_PROCESSING_MSGSuint1024Node will stop reading messages from a peer when it is processing this many messages from the peer. Will resume reading messages from the peer when it is processing less than this many messages.

Outbound Rate-Limiting

Rate-limiting for outbound messages.

FlagEnv VarTypeDefaultDescription
--throttler-outbound-at-large-alloc-sizeAVAGO_THROTTLER_OUTBOUND_AT_LARGE_ALLOC_SIZEuint32 MiBSize, in bytes, of at-large allocation in the outbound message throttler.
--throttler-outbound-validator-alloc-sizeAVAGO_THROTTLER_OUTBOUND_VALIDATOR_ALLOC_SIZEuint32 MiBSize, in bytes, of validator allocation in the outbound message throttler.
--throttler-outbound-node-max-at-large-bytesAVAGO_THROTTLER_OUTBOUND_NODE_MAX_AT_LARGE_BYTESuint2 MiBMaximum number of bytes a node can take from the at-large allocation of the outbound message throttler.

Connection Rate-Limiting

FlagEnv VarTypeDefaultDescription
--network-inbound-connection-throttling-cooldownAVAGO_NETWORK_INBOUND_CONNECTION_THROTTLING_COOLDOWNduration10sNode will upgrade an inbound connection from a given IP at most once within this duration. If 0 or negative, will not consider recency of last upgrade when deciding whether to upgrade.
--network-inbound-connection-throttling-max-conns-per-secAVAGO_NETWORK_INBOUND_CONNECTION_THROTTLING_MAX_CONNS_PER_SECuint512Node will accept at most this many inbound connections per second.
--network-outbound-connection-throttling-rpsAVAGO_NETWORK_OUTBOUND_CONNECTION_THROTTLING_RPSuint50Node makes at most this many outgoing peer connection attempts per second.

Peer List Gossiping

Nodes gossip peers to each other so that each node can have an up-to-date peer list. A node gossips --network-peer-list-num-validator-ips validator IPs to --network-peer-list-validator-gossip-size validators, --network-peer-list-non-validator-gossip-size non-validators and --network-peer-list-peers-gossip-size peers every --network-peer-list-gossip-frequency.

FlagEnv VarTypeDefaultDescription
--network-peer-list-num-validator-ipsAVAGO_NETWORK_PEER_LIST_NUM_VALIDATOR_IPSint15Number of validator IPs to gossip to other nodes.
--network-peer-list-validator-gossip-sizeAVAGO_NETWORK_PEER_LIST_VALIDATOR_GOSSIP_SIZEint20Number of validators that the node will gossip peer list to.
--network-peer-list-non-validator-gossip-sizeAVAGO_NETWORK_PEER_LIST_NON_VALIDATOR_GOSSIP_SIZEint0Number of non-validators that the node will gossip peer list to.
--network-peer-list-peers-gossip-sizeAVAGO_NETWORK_PEER_LIST_PEERS_GOSSIP_SIZEint0Number of total peers (including non-validator or validator) that the node will gossip peer list to.
--network-peer-list-gossip-frequencyAVAGO_NETWORK_PEER_LIST_GOSSIP_FREQUENCYduration1mFrequency to gossip peers to other nodes.
--network-peer-read-buffer-sizeAVAGO_NETWORK_PEER_READ_BUFFER_SIZEint8 KiBSize of the buffer that peer messages are read into (there is one buffer per peer).
--network-peer-write-buffer-sizeAVAGO_NETWORK_PEER_WRITE_BUFFER_SIZEint8 KiBSize of the buffer that peer messages are written into (there is one buffer per peer).

Resource Usage Tracking

FlagEnv VarTypeDefaultDescription
--meter-vms-enabledAVAGO_METER_VMS_ENABLEDbooleantrueEnable Meter VMs to track VM performance with more granularity.
--system-tracker-frequencyAVAGO_SYSTEM_TRACKER_FREQUENCYduration500msFrequency to check the real system usage of tracked processes. More frequent checks -> usage metrics are more accurate, but more expensive to track.
--system-tracker-processing-halflifeAVAGO_SYSTEM_TRACKER_PROCESSING_HALFLIFEduration15sHalf life to use for the processing requests tracker. Larger half life -> usage metrics change more slowly.
--system-tracker-cpu-halflifeAVAGO_SYSTEM_TRACKER_CPU_HALFLIFEduration15sHalf life to use for the CPU tracker. Larger half life -> CPU usage metrics change more slowly.
--system-tracker-disk-halflifeAVAGO_SYSTEM_TRACKER_DISK_HALFLIFEduration1mHalf life to use for the disk tracker. Larger half life -> disk usage metrics change more slowly.
--system-tracker-disk-required-available-spaceAVAGO_SYSTEM_TRACKER_DISK_REQUIRED_AVAILABLE_SPACEuint536870912Minimum number of available bytes on disk, under which the node will shutdown.
--system-tracker-disk-warning-threshold-available-spaceAVAGO_SYSTEM_TRACKER_DISK_WARNING_THRESHOLD_AVAILABLE_SPACEuint1073741824Warning threshold for the number of available bytes on disk, under which the node will be considered unhealthy. Must be >= --system-tracker-disk-required-available-space.

Plugins

FlagEnv VarTypeDefaultDescription
--plugin-dirAVAGO_PLUGIN_DIRstring$HOME/.avalanchego/pluginsSets the directory for VM plugins.

Virtual Machine (VM) Configs

FlagEnv VarTypeDefaultDescription
--vm-aliases-fileAVAGO_VM_ALIASES_FILEstring~/.avalanchego/configs/vms/aliases.jsonPath to JSON file that defines aliases for Virtual Machine IDs. This flag is ignored if --vm-aliases-file-content is specified. Example content: {"tGas3T58KzdjLHhBDMnH2TvrddhqTji5iZAMZ3RXs2NLpSnhH": ["timestampvm", "timerpc"]}. The above example aliases the VM whose ID is "tGas3T58KzdjLHhBDMnH2TvrddhqTji5iZAMZ3RXs2NLpSnhH" to "timestampvm" and "timerpc".
--vm-aliases-file-contentAVAGO_VM_ALIASES_FILE_CONTENTstring-As an alternative to --vm-aliases-file, it allows specifying base64 encoded aliases for Virtual Machine IDs.

Indexing

FlagEnv VarTypeDefaultDescription
--index-allow-incompleteAVAGO_INDEX_ALLOW_INCOMPLETEbooleanfalseIf true, allow running the node in such a way that could cause an index to miss transactions. Ignored if index is disabled.

Router

FlagEnv VarTypeDefaultDescription
--router-health-max-drop-rateAVAGO_ROUTER_HEALTH_MAX_DROP_RATEfloat1Node reports unhealthy if the router drops more than this portion of messages.
--router-health-max-outstanding-requestsAVAGO_ROUTER_HEALTH_MAX_OUTSTANDING_REQUESTSuint1024Node reports unhealthy if there are more than this many outstanding consensus requests (Get, PullQuery, etc.) over all chains.

Additional Resources

Is this guide helpful?

Report Issue