The Mina daemon and its associated tools read several environment variables on startup. This page documents all of them.
A comma-separated list of CIDR masks that are allowed to connect to the
daemon's client (RPC) port. Only the listed IP ranges may issue RPC commands.
By default only 127.0.0.0/8 (localhost) is trusted.
Example:
MINA_CLIENT_TRUSTLIST="10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"The list can also be managed at runtime with
mina advanced client-trustlist add|remove|list.
Path to an alternative runtime configuration file. When set, the daemon reads genesis constants and other runtime configuration from this file, overriding compiled-in defaults where specified.
Example:
MINA_CONFIG_FILE=/etc/mina/runtime_config.jsonPassphrase used to decrypt wallet private keys and the block-producer key. When
this variable is set the daemon (and CLI tools such as mina accounts) will use
it non-interactively rather than prompting for a passphrase.
Path to a private key file for the block producer. Setting this variable is
equivalent to passing --block-producer-key to the daemon.
Note: The
--block-producer-keyCLI flag is deprecated in favour of this environment variable.
Passphrase used to decrypt the libp2p keypair. Required when the libp2p key file is encrypted.
Passphrase used to decrypt the uptime-service keypair.
When set (to any value) the daemon enables incentivised testnet (ITN) features.
Base interval in minutes at which the libp2p helper process is automatically restarted. When this variable is not set the helper is not restarted automatically.
The actual restart time is base ± MINA_LIBP2P_HELPER_RESTART_INTERVAL_DELTA
(capped at base / 2).
Jitter in minutes applied to MINA_LIBP2P_HELPER_RESTART_INTERVAL_BASE. The
restart time is chosen uniformly in [base − delta, base + delta].
Defaults to 2.5 minutes when not set.
Expected download time per block in seconds during catchup. Used to estimate how long it will take to download a batch of blocks and set an appropriate timeout.
Default: 15.0
Overrides the flush-size of the persistent frontier diff buffer (integer number of diffs). When not set the compiled-in default capacity is used.
Duration of each OCaml GC compaction call in milliseconds.
Default: 6000 (6 seconds)
Interval between successive OCaml GC compaction calls in milliseconds. When not set the compiled-in default interval is used.
Directory that the daemon searches for pre-computed proving/verification keys.
When not set the default path /var/lib/coda is used (a legacy path name from
when the project was called Coda).
Base URL of the S3 bucket from which snark keys are fetched when they are not found locally.
Default: https://s3-us-west-2.amazonaws.com/snark-keys-ro.o1test.net
Config directory expected by the hard-fork dispatcher. If this variable is set and does not match the daemon's actual config directory, the daemon raises an error on startup.
The following three variables must all be set to enable block uploads to GCS.
Path to a Google Cloud service-account JSON key file used to authenticate block uploads.
Name of the GCS bucket that blocks are uploaded to.
Name of the network. Used as a path component when uploading blocks to GCS and as a filter in the delegation-verification tool.
Required. Maximum number of connections in the Postgres connection pool
used by the Rosetta API server. Typical values are 64 or 128.
Interval in seconds at which the Rosetta server polls the Postgres archive database.
Default: 30.0
Maximum allowed difference between the Rosetta-reported chain height and the actual best-tip height. Requests that exceed this delta are rejected.
Default: 0 (no tolerance)
Set to true, 1, or yes to write Pickles circuit data (constraint counts,
gate types, etc.) to disk for debugging.
Enable detailed timing instrumentation inside the Pickles SNARK library. Set to
any non-empty string (other than 0 or false) to enable.
Set to true or t to treat a proof-cache miss as a fatal error instead of
regenerating the proof. Useful in CI to ensure the proof cache is up to date.
Directory where proof cache files are written during tests.
Maximum number of SNARK proofs processed in a single verifier batch. Useful for tuning memory usage on machines with limited RAM.
When set (to any value), enables total currency computation in the transition frontier mask visualization. This is used during frontier shutdown to display currency totals across attached ledger masks. Warning: enabling this causes the frontier mask visualization at shutdown to be exceptionally slow on mainnet.
Offset in seconds added to the system clock when computing block times. Used in demo mode and testing to simulate a different genesis time.
Default: 0
PostgreSQL connection URI used by archive-node unit tests.
Example:
MINA_TEST_POSTGRES="postgresql://localhost:5432/archivedb"PostgreSQL connection URI used by the mina_automation test fixtures for the
archive node.
Path to the directory containing network data files used by mina_automation
integration test fixtures.
PostgreSQL connection URI used by various tools (e.g. the archive benchmark).
Git commit SHA embedded into the binary at build time and reported by
mina version. This variable is set by the build system, not by the operator.
Path to a runtime configuration file. Used by the ledger_export_benchmark
tool.
Directory used by the disk-cache deadlock test.
Timeout in seconds for the disk-cache deadlock test.