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
| Option | Description | Default | Usage | 
|---|---|---|---|
| -v,--verbosity | Sets the verbosity level of the log output. | INFO(2) | -v <level>(e.g.,-v 2) | 
| -V,--version | Shows validator-engine build information. | N/A | -V | 
| -h,--help | Prints help information. | N/A | -h | 
| -C,--global-config | Specifies the file to read global configuration (bootstrap nodes, public liteservers, init blocks, etc). | N/A | -C <file> | 
| -c,--local-config | Specifies the file to write/read local node configuration (addresses, keys, etc). | N/A | -c <file> | 
| -I,--ip | Specifies the IP address and port of the instance. Used during the first run. | N/A | -I <ip:port> | 
| -D,--db | Specifies the root directory for the databases. | N/A | -D <path> | 
| -f,--fift-dir | Specifies the directory with Fift scripts. | N/A | -f <path> | 
| -d,--daemonize | Daemonizes the process by closing standard input and creating a new session. | Disabled | -d | 
| -l,--logname | Specifies the log file to write logs. | N/A | -l <file> | 
| -s,--state-ttl | Sets the TTL (time-to-live) for the state in seconds. | 86400seconds (1 day) | -s <seconds> | 
| -m,--mempool-num | Specifies the maximum number of external messages in the mempool. | Unlimited | -m <number> | 
| -b,--block-ttl | Sets the TTL for blocks in seconds. | 86400seconds (1 day) | -b <seconds> | 
| -A,--archive-ttl | Sets the TTL for archived blocks in seconds. | 604800seconds (7 days) | -A <seconds> | 
| -K,--key-proof-ttl | Sets the TTL for key blocks in seconds. | 315360000seconds (10 years) | -K <seconds> | 
| -S,--sync-before | During initial sync, download all blocks for the last given number of seconds. | 3600seconds (1 hour) | -S <seconds> | 
| -t,--threads | Specifies the number of threads to use. | 7 | -t <number> | 
| -u,--user | Changes the user running the process. | N/A | -u <username> | 
Advanced Options
| Option | Description | Default | Usage | 
|---|---|---|---|
| --shutdown-at | Schedules the validator to shut down at the given Unix timestamp. | N/A | --shutdown-at <timestamp> | 
| -T,--truncate-db | Truncates the database with the specified sequence number as the new top masterchain block sequence number. | N/A | -T <seqno> | 
| -U,--unsafe-catchain-restore | Enables the slow and dangerous catchain recovery method. | Disabled | -U <catchain-seqno> | 
| -F,--unsafe-catchain-rotate | Enables forceful and dangerous catchain rotation. | Disabled | -F <block-seqno>:<catchain-seqno>:<height> | 
| --celldb-compress-depth | Optimizes CellDb by storing cells of depth X with whole subtrees. | 0(disabled) | --celldb-compress-depth <depth> | 
| --max-archive-fd | Sets a limit on the number of open file descriptors in the archive manager. 0for unlimited. | 0(unlimited) | --max-archive-fd <number> | 
| --archive-preload-period | Preloads archive slices for the past X seconds on startup. | 0seconds (disabled) | --archive-preload-period <seconds> | 
| --enable-precompiled-smc | Enables execution of precompiled smart contracts (experimental). | Disabled | --enable-precompiled-smc | 
| --disable-rocksdb-stats | Disables the gathering of RocksDb statistics. | Enabled | --disable-rocksdb-stats | 
| --nonfinal-ls | Enables special local state (LS) queries to non-finalized blocks. | Disabled | --nonfinal-ls | 
| --celldb-cache-size | Sets the block cache size for RocksDb in CellDb, in bytes. | 1G(1 Gigabyte) | --celldb-cache-size <size> | 
| --celldb-direct-io | Enables direct I/O mode for RocksDb in CellDb (only applies when cache size is >= 30G). | Disabled | --celldb-direct-io | 
| --celldb-preload-all | Preloads all cells from CellDb on startup. | Disabled | --celldb-preload-all | 
| --celldb-in-memory | Stores 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-delay | Sets the delay before creating a new catchain block, in seconds. | 0.4seconds | --catchain-max-block-delay <seconds> | 
| --catchain-max-block-delay-slow | Sets the maximum extended catchain block delay for too long rounds, in seconds. | 1.0seconds | --catchain-max-block-delay-slow <seconds> | 
| --fast-state-serializer | Enables a faster persistent state serializer, requires more RAM. | Disabled | --fast-state-serializer | 
Session Logs Options
| Option | Description | Default | Usage | 
|---|---|---|---|
| --session-logs | Specifies the file for validator session statistics. | {logname}.session-stats | --session-logs <file> |