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 outputINFO (2)-v <level> (e.g., -v 2)
-V, --versionShows validator-engine build informationN/A-V
-h, --helpPrints help informationN/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 read/write local node configuration (addresses, keys, etc)N/A-c <file>
-I, --ipSpecifies the IP address and port of the instance. Used during the first runN/A-I <ip:port>
-D, --dbSpecifies the root directory for the databasesN/A-D <path>
-f, --fift-dirSpecifies the directory with Fift scriptsN/A-f <path>
-d, --daemonizeDaemonizes the process by closing standard input and creating a new sessionDisabled-d
-l, --lognameSpecifies the log file to write logsN/A-l <file>
-s, --state-ttlSets the TTL (time-to-live) for the state in seconds86400 seconds (1 day)-s <seconds>
-m, --mempool-numSpecifies the maximum number of external messages in the mempoolUnlimited-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 seconds604800 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 seconds3600 seconds (1 hour)-S <seconds>
-t, --threadsSpecifies the number of threads to use7-t <number>
-u, --userChanges the user running the processN/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 numberN/A-T <seqno>
-U, --unsafe-catchain-restoreEnables the slow and dangerous catchain recovery methodDisabled-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 subtrees0 (disabled)--celldb-compress-depth <depth>
--max-archive-fdSets a limit on the number of open file descriptors in the archive manager. 0 for unlimited0 (unlimited)--max-archive-fd <number>
--archive-preload-periodPreloads archive slices for the past X seconds on startup0 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 statisticsEnabled--disable-rocksdb-stats
--nonfinal-lsEnables special local state (LS) queries to non-finalized blocksDisabled--nonfinal-ls
--celldb-cache-sizeSets the block cache size for RocksDb in CellDb, in bytes1G (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 startupDisabled--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 preferredDisabled--celldb-in-memory
--catchain-max-block-delaySets the delay before creating a new catchain block, in seconds0.4 seconds--catchain-max-block-delay <seconds>
--catchain-max-block-delay-slowSets the maximum extended catchain block delay for too long rounds, in seconds1.0 seconds--catchain-max-block-delay-slow <seconds>
--fast-state-serializerEnables a faster persistent state serializer, requires more RAMDisabled--fast-state-serializer

Session Logs Options

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