Reference
tenraid command line
Every tenraid command and option with its default. Network and data, API, P2P, storage, TenQ, validator and logging.
tenraid [command] [options]Without a command tenraid starts the node, as tenraid run does; the options of run follow either form. A command-line option overrides node.json, which overrides the default.
Commands
| Command | What it does |
|---|---|
run | Starts the node. Also what tenraid does without a command |
init | Creates the chain database from the genesis manifest and prints the head |
inspect | Prints the finalized head |
genesis | Prints the chain ID, genesis ID and parameter hash of the genesis manifest |
verify-store | Opens the database, checks it against the manifest and prints the head |
reset-db --yes | Deletes the chain database. Node identity and peer book stay |
reset-peers --yes | Forgets every learned peer. Configured peers stay |
reset-identity --yes | Deletes the node identity; the next start creates a new one. Validator overlay keys stay |
validator-endpoint [--route <HOST[:PORT]>] | Prints the endpoint bytes for a validator registration. A host stands for TCP and QUIC on the overlay port; up to four routes, none when the port is closed |
prepare-genesis-validator-signer | For a validator of a new chain's genesis: prepares its local signer journal. Only valid before the first finalized cut |
Network and data
Every command takes these.
| Option | Default | Meaning |
|---|---|---|
--network <NAME> | mainnet | mainnet, testnet, testnet100 or development. Mainnet and development have a built-in manifest |
--manifest <FILE> | built in | Genesis manifest. It also sets the network |
--data-dir <DIR> | %LOCALAPPDATA%\Tenrai\<network>, elsewhere ~/.tenrai/<network> | Chain database, node identity, peer book and node.json |
run
| Option | Default | Meaning |
|---|---|---|
-c, --config <FILE> | node.json in the data directory | Settings file. The default one is created on the first start |
--reset-db | Deletes the chain database before starting |
API
| Option | Default | Meaning |
|---|---|---|
--rpc-bind <IP[:PORT]> | 127.0.0.1:28701 | HTTP API and WebSocket events |
--mining-bind <IP[:PORT]> | 127.0.0.1:28702 | Mining control for the miner and the stratum bridge. Loopback only |
--mine-when-not-synced | off | Hands out mining work while the node is not synchronized, for a new chain or a lone test node; same as "mine_when_not_synced": true |
--browser-origin <ORIGIN> | no web pages | Admits a web page to the API and its sockets. Repeatable; replaces browser_origins |
--no-api-landing-page | page on | No overview page of routes and limits at / |
--metrics-bind <IP[:PORT]> | off | Prometheus metrics at /metrics on a listener of their own, port 28790 unless given |
The ports shown are those of mainnet; a testnet node uses 28706 and 28707, a development node 28711 and 28712.
P2P
| Option | Default | Meaning |
|---|---|---|
--listen <IP[:PORT]> | 0.0.0.0:28700, testnet 28705, development 28710 | Listens on QUIC and TCP. Repeatable |
--peer <HOST[:PORT]> | built-in peers on mainnet | Peer to connect to: an IP or host name, on the network's P2P port unless one is given. IDENTITY@MULTIADDR accepts only that node. Repeatable |
--sync-peer <HOST[:PORT]> | Peer the node prefers to sync from, written like --peer; other peers take over when it fails | |
--relay-peer <IDENTITY@MULTIADDR> | Peer that relays for nodes behind NAT. Repeatable | |
--max-inbound <N> | 24, bootstrap 64 | Inbound peers, at most the default |
--max-outbound <N> | 8, bootstrap 16 | Outbound peers, at most the default |
--connections-per-ip <N> | 8 | Connections from one network: an IPv4 /24 or an IPv6 /64 |
--relay-fanout <N> | 6 | Peers each new block and transaction is pushed to |
--quic-congestion-control <cubic|bbr> | cubic | Congestion control on QUIC connections, the validator overlay's included |
--p2p-role <ROLE> | standard | bootstrap accepts more connections and needs no peer of its own |
--upnp | off | Asks the router to forward the P2P port, and on a validator the overlay port |
--no-relay-service | Relays for no validator, even when other nodes reach this node |
A public network runs its P2P without any of these options. The development network starts it only with --listen, --peer, --sync-peer or public_p2p in node.json. Networking and peers shows the peer forms.
Storage
| Option | Default | Meaning |
|---|---|---|
--storage-mode <MODE> | full | full, archive or pruned, see Storage |
--prune-days <1-100> | 2 | Days of block bodies a pruned node keeps |
--peer-snapshot-bootstrap | off | Starts a fresh pruned mainnet node from the checkpoint built into the release and its pinned peers, instead of syncing from genesis |
--peer-snapshot-replace-existing | off | With --peer-snapshot-bootstrap: replaces an existing older database once the snapshot is verified. The old data is kept aside |
A validator, or a node that sends automatic heartbeats, needs every block body since genesis: full or archive on a database synced from genesis. Resync a pruned or snapshot-started database before enabling either.
TenQ
| Option | Default | Meaning |
|---|---|---|
--tenq-threads <N> | from node.json | Builds the 2 GiB TenQ dataset with N threads. Public networks need the dataset or --tenq-light; the node.json of the first start sets it |
--tenq-light | off | Checks blocks from the 32 MiB cache. Several times slower; not for validators |
--tenq-prefetch <HEIGHTS> | 1024 | Cuts before an epoch at which its dataset is built ahead; 0 turns it off |
--no-tenq-prefetch | off | Builds each dataset only when its epoch starts; block checks wait for it |
Validator
| Option | Meaning |
|---|---|
--validator-key-file <FILE> | Encrypted ML-DSA validator key. The validator overlay then listens on port 28704, testnet 28709, development 28714 |
--validator-key-password-file <FILE> | Password of that key |
--dev-validator | Development only: finalizes a cut every 2.5 s with the built-in key |
The automatic heartbeat has no command-line option. It is set in the validator section of node.json, together with the key, see Run a validator.
Logging
Every command takes these.
| Option | Meaning |
|---|---|
-d, --debug | Detail for developers |
--log-file <FILE> | Also appends the log to a file |
--no-color | Plain console output |
The environment variable RUST_LOG replaces both levels, for example RUST_LOG=warn,tenrai_node::p2p=debug.
