Skip to main content

Environment variables

Besides CLI options and the configuration values in the configuration file, there are some environment variables that control the behavior of a forest process.

Environment variableValueDefaultExampleDescription
FOREST_KEYSTORE_PHRASEany textemptyasfvddaThe passphrase for the encrypted keystore
FOREST_CAR_LOADER_FILE_IO1 or truefalsetrueLoad CAR files with RandomAccessFile instead of Mmap
FOREST_DB_DEV_MODEsee herecurrentcurrentThe database to use in development mode
FOREST_ACTOR_BUNDLE_PATHfile pathempty/path/to/file.car.zstPath to the local actor bundle, download from remote servers when not set
FIL_PROOFS_PARAMETER_CACHEdirectory pathempty/var/tmp/filecoin-proof-parametersPath to folder that caches fil proof parameter files
FOREST_PROOFS_ONLY_IPFS_GATEWAY1 or truefalse1Use only IPFS gateway for proofs parameters download
FOREST_FORCE_TRUST_PARAMS1 or truefalse1Trust the parameters downloaded from the Cloudflare/IPFS
IPFS_GATEWAYURLhttps://proofs.filecoin.io/ipfs/https://proofs.filecoin.io/ipfs/The IPFS gateway to use for downloading proofs parameters
FOREST_RPC_DEFAULT_TIMEOUTDuration (in seconds)6010The default timeout for RPC calls
FOREST_MAX_CONCURRENT_REQUEST_RESPONSE_STREAMS_PER_PEERpositive integer1010the maximum concurrent streams per peer for request-response-based p2p protocols
FOREST_BLOCK_DELAY_SECSpositive integerDepends on the network30Duration of each tipset epoch
FOREST_PROPAGATION_DELAY_SECSpositive integerDepends on the network20How long to wait for a block to propagate through the network
FOREST_MAX_FILTERSinteger100100The maximum number of filters
FOREST_MAX_FILTER_RESULTSinteger10,00010000The maximum number of filter results
FOREST_MAX_FILTER_HEIGHT_RANGEinteger28802880The maximum filter height range allowed, a conservative limit of one day
FOREST_STATE_MIGRATION_THREADSintegerDepends on the machine.3The number of threads for state migration thread-pool. Advanced users only.
FOREST_CONFIG_PATHstring/$FOREST_HOME/com.ChainSafe.Forest/config.toml/patj/to/config.tomlForest configuration path. Alternatively supplied via --config cli parameter.
RUST_LOGstringemptydebug,forest_libp2p::service=infoAllows for log level customization.
FOREST_F3_SIDECAR_RPC_ENDPOINTstring127.0.0.1:23456127.0.0.1:23456An RPC endpoint of F3 sidecar.
FOREST_F3_SIDECAR_FFI_ENABLED1 or truefalse1Whether or not to start the F3 sidecar via FFI
FOREST_F3_MANIFEST_SERVERstringempty12D3KooWENMwUF9YxvQxar7uBWJtZkA6amvK4xWmKXfSiHUo2Qq7Set dynamic F3 manifest server
FOREST_F3_FINALITYintegerinherited from chain configuration900Set the chain finality epochs in F3 manifest
FOREST_F3_PERMANENT_PARTICIPATING_MINER_ADDRESSEScomma delimited stringsemptyt0100,t0101Set the miner addresses that participate in F3 permanently
FOREST_F3_INITIAL_POWER_TABLEstringemptybafyreicmaj5hhoy5mgqvamfhgexxyergw7hdeshizghodwkjg6qmpoco7iSet the F3 initial power table CID
FOREST_F3_ROOTstring[FOREST_DATA_ROOT]/f3/var/tmp/f3Set the data directory for F3
FOREST_F3_BOOTSTRAP_EPOCHinteger-1100Set the bootstrap epoch for F3

FOREST_F3_SIDECAR_FFI_BUILD_OPT_OUT​

This is an environment variable that allows users to opt out of building the f3-sidecar. It's only useful when building the binary.

By default, the Go f3-sidecar is built and linked into Forest binary unless environment variable FOREST_F3_SIDECAR_FFI_BUILD_OPT_OUT=1 is set.

FOREST_DB_DEV_MODE​

By default, Forest will create a database of its current version or try to migrate to it. This can be overridden with the FOREST_DB_DEV_MODE environmental variable.

ValueDescription
current or (unset)Forest will either create a new database with the current version or attempt a migration if possible. On failure, it will create a new database.
latestForest will use the latest versioned database. No migration will be performed.
other values (e.g., cthulhu)Forest will use the provided database (if it exists, otherwise it will create one under this name)

The databases can be found, by default, under <DATA_DIR>/<chain>/, e.g., $HOME/.local/share/forest/calibnet.