TON Node Command-Line Flags Documentation
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
-v,--verbosityDescription: Sets the verbosity level of the log output.
Default:
INFO(represented by 2 in the code).Usage:
-v <level>Example:
-v 2-V,--versionDescription: Shows validator-engine build information.
Default: N/A
Usage:
-V-h,--helpDescription: Prints help information.
Default: N/A
Usage:
-h-C,--global-configDescription: Specifies the file to read global configuration (bootstrap nodes, public liteservers, init blocks etc). Example can be found here: https://github.com/ton-blockchain/ton-blockchain.github.io/blob/main/testnet-global.config.json
Default: N/A
Usage:
-C <file>-c,--local-configDescription: Specifies the file to write and read local node configuration: this node adnl addresses, public key for LS and validator console access, etc
Default: N/A
Usage:
-c <file>-I,--ipDescription: Specifies the IP address and port of the instance. Should be used during first run to create configuration, can be ommited later.
Default: N/A
Usage:
-I <ip:port>-D,--dbDescription: Specifies the root directory for the databases. Usually /var/ton-work/db is used.
Default: N/A
Usage:
-D <path>-f,--fift-dirDescription: Specifies the directory with Fift scripts.
Default: N/A
Usage:
-f <path>-d,--daemonizeDescription: Daemonizes the process by closing standard input and creating a new session.
Default: Disabled
Usage:
-d-l,--lognameDescription: Specifies the log file to write logs.
Default: N/A
Usage:
-l <file>-s,--state-ttlDescription: Sets the TTL (time-to-live) for the state in seconds.
Default:
86400seconds (1 day)Usage:
-s <seconds>-m,--mempool-numDescription: Specifies the maximum number of external messages in the mempool.
Default: Unlimited
Usage:
-m <number>-b,--block-ttlDescription: Sets the TTL (time-to-live) for blocks in seconds.
Default:
86400seconds (1 day)Usage:
-b <seconds>-A,--archive-ttlDescription: Sets the TTL for archived blocks in seconds.
Default:
604800seconds (7 days)Usage:
-A <seconds>-K,--key-proof-ttlDescription: Sets the TTL for key blocks in seconds.
Default:
315360000seconds (10 years)Usage:
-K <seconds>-S,--sync-beforeDescription: During initial sync, download all blocks for the last given number of seconds.
Default:
3600seconds (1 hour)Usage:
-S <seconds>-t,--threadsDescription: Specifies the number of threads to use.
Default:
7Usage:
-t <number>-u,--userDescription: Changes the user running the process.
Default: N/A
Usage:
-u <username>
Advanced Options
--shutdown-atDescription: Schedules the validator to shut down at the given Unix timestamp.
Default: N/A
Usage:
--shutdown-at <timestamp>-T,--truncate-dbDescription: Truncates the database with the specified sequence number as the new top masterchain block sequence number.
Default: N/A
Usage:
-T <seqno>-U,--unsafe-catchain-restoreDescription: Enables the slow and dangerous catchain recovery method.
Default: Disabled
Usage:
-U <catchain-seqno>-F,--unsafe-catchain-rotateDescription: Enables forceful and dangerous catchain rotation.
Default: Disabled
Usage:
-F <block-seqno>:<catchain-seqno>:<height>--celldb-compress-depthDescription: Optimizes CellDb by storing cells of depth X with whole subtrees.
Default:
0(disabled)Usage:
--celldb-compress-depth <depth>--max-archive-fdDescription: Sets a limit on the number of open file descriptors in the archive manager.
0for unlimited.Default:
0(unlimited)Usage:
--max-archive-fd <number>--archive-preload-periodDescription: Preloads archive slices for the past X seconds on startup.
Default:
0seconds (disabled)Usage:
--archive-preload-period <seconds>--enable-precompiled-smcDescription: Enables execution of precompiled smart contracts (experimental).
Default: Disabled
Usage:
--enable-precompiled-smc--disable-rocksdb-statsDescription: Disables the gathering of RocksDb statistics.
Default: Enabled
Usage:
--disable-rocksdb-stats--nonfinal-lsDescription: Enables special local state (LS) queries to non-finalized blocks.
Default: Disabled
Usage:
--nonfinal-ls--celldb-cache-sizeDescription: Sets the block cache size for RocksDb in CellDb, in bytes.
Default:
1G(1 Gigabyte)Usage:
--celldb-cache-size <size>--celldb-direct-ioDescription: Enables direct I/O mode for RocksDb in CellDb (only applies when cache size is >= 30G).
Default: Disabled
Usage:
--celldb-direct-io--celldb-preload-allDescription: Preloads all cells from CellDb on startup.
Default: Disabled
Usage:
--celldb-preload-all--catchain-max-block-delayDescription: Sets the delay before creating a new catchain block, in seconds.
Default:
0.4secondsUsage:
--catchain-max-block-delay <seconds>--catchain-max-block-delay-slowDescription: Sets the maximum extended catchain block delay for too long rounds, in seconds.
Default:
1.0secondsUsage:
--catchain-max-block-delay-slow <seconds>--fast-state-serializerDescription: Enables a faster persistent state serializer, which requires more RAM (enabled automatically on machines with >= 90GB RAM).
Default: Disabled
Usage:
--fast-state-serializer
Session Logs Options
--session-logs- Description: Specifies the file for validator session statistics.
- Default:
{logname}.session-stats - Usage:
--session-logs <file>
This documentation provides an overview of the options
available for configuring and running a TON validator node. Each option allows customization to suit various deployment scenarios.