Skip to main content

TON Node Command-Line Flags

This document describes the various flags and options available when running a TON node. Each flag has a short name, a long name, a default value (if applicable), and a description of its functionality.

General Options

OptionDescriptionDefaultUsage
-v, --verbositySets the verbosity level of the log output.INFO (2)-v <level> (e.g., -v 2)
-V, --versionShows validator-engine build information.N/A-V
-h, --helpPrints help information.N/A-h
-C, --global-configSpecifies the file to read global configuration (bootstrap nodes, public liteservers, init blocks, etc).N/A-C <file>
-c, --local-configSpecifies the file to write/read local node configuration (addresses, keys, etc).N/A-c <file>
-I, --ipSpecifies the IP address and port of the instance. Used during the first run.N/A-I <ip:port>
-D, --dbSpecifies the root directory for the databases.N/A-D <path>
-f, --fift-dirSpecifies the directory with Fift scripts.N/A-f <path>
-d, --daemonizeDaemonizes the process by closing standard input and creating a new session.Disabled-d
-l, --lognameSpecifies the log file to write logs.N/A-l <file>
-s, --state-ttlSets the TTL (time-to-live) for the state in seconds.86400 seconds (1 day)-s <seconds>
-m, --mempool-numSpecifies the maximum number of external messages in the mempool.Unlimited-m <number>
-b, --block-ttlSets the TTL for blocks in seconds.86400 seconds (1 day)-b <seconds>
-A, --archive-ttlSets the TTL for archived blocks in seconds.604800 seconds (7 days)-A <seconds>
-K, --key-proof-ttlSets the TTL for key blocks in seconds.315360000 seconds (10 years)-K <seconds>
-S, --sync-beforeDuring initial sync, download all blocks for the last given number of seconds.3600 seconds (1 hour)-S <seconds>
-t, --threadsSpecifies the number of threads to use.7-t <number>
-u, --userChanges the user running the process.N/A-u <username>

Advanced Options

OptionDescriptionDefaultUsage
--shutdown-atSchedules the validator to shut down at the given Unix timestamp.N/A--shutdown-at <timestamp>
-T, --truncate-dbTruncates the database with the specified sequence number as the new top masterchain block sequence number.N/A-T <seqno>
-U, --unsafe-catchain-restoreEnables the slow and dangerous catchain recovery method.Disabled-U <catchain-seqno>
-F, --unsafe-catchain-rotateEnables forceful and dangerous catchain rotation.Disabled-F <block-seqno>:<catchain-seqno>:<height>
--celldb-compress-depthOptimizes CellDb by storing cells of depth X with whole subtrees.0 (disabled)--celldb-compress-depth <depth>
--max-archive-fdSets a limit on the number of open file descriptors in the archive manager. 0 for unlimited.0 (unlimited)--max-archive-fd <number>
--archive-preload-periodPreloads archive slices for the past X seconds on startup.0 seconds (disabled)--archive-preload-period <seconds>
--enable-precompiled-smcEnables execution of precompiled smart contracts (experimental).Disabled--enable-precompiled-smc
--disable-rocksdb-statsDisables the gathering of RocksDb statistics.Enabled--disable-rocksdb-stats
--nonfinal-lsEnables special local state (LS) queries to non-finalized blocks.Disabled--nonfinal-ls
--celldb-cache-sizeSets the block cache size for RocksDb in CellDb, in bytes.1G (1 Gigabyte)--celldb-cache-size <size>
--celldb-direct-ioEnables direct I/O mode for RocksDb in CellDb (only applies when cache size is >= 30G).Disabled--celldb-direct-io
--celldb-preload-allPreloads all cells from CellDb on startup.Disabled--celldb-preload-all
--celldb-in-memoryStores the whole celldb in memory. For validators with default settings, size of celldb ~80-100GB, so 128 Gb is absolutely necessary and 256 is preferred.Disabled--celldb-in-memory
--catchain-max-block-delaySets the delay before creating a new catchain block, in seconds.0.4 seconds--catchain-max-block-delay <seconds>
--catchain-max-block-delay-slowSets the maximum extended catchain block delay for too long rounds, in seconds.1.0 seconds--catchain-max-block-delay-slow <seconds>
--fast-state-serializerEnables a faster persistent state serializer, requires more RAM.Disabled--fast-state-serializer

Session Logs Options

OptionDescriptionDefaultUsage
--session-logsSpecifies the file for validator session statistics.{logname}.session-stats--session-logs <file>