Guide
Storage
Where tenraid keeps its data, the full, archive and pruned storage modes, maintenance commands and free space.
On this page
Data directory
| System | Default |
|---|---|
| Windows | %LOCALAPPDATA%\Tenrai\<network> |
| Linux, macOS | ~/.tenrai/<network> |
--data-dir moves it. It holds the chain database, the node identity, the peer book and node.json. Keep one directory per network.
The node stores block bodies, transactions and state masked with the key in network/local-persistence-mask-v1.key, so no payload lies on disk as it was sent. The database cannot be read without that key. Move or back up the directory as a whole, with the node stopped and the file permissions kept, for example robocopy /E /COPYALL on Windows or cp -a elsewhere: the node refuses a key file that a plain copy made readable for others.
Storage modes
| Mode | Keeps |
|---|---|
full (default) | Headers, bodies, the authenticated state and the active branch data |
archive | Everything full keeps, plus permanent history indexes; serves body ranges from height one |
pruned | Headers, the authenticated state and the recent block bodies: --prune-days 1 to 100, 2 by default |
tenraid run --storage-mode archiveA pruned node cannot serve bodies older than its window. Run full or archive when an explorer, an index or other nodes depend on your node's history.
Validators and nodes that send automatic heartbeats need the complete history: full or archive on a database that holds every block body since genesis. The node refuses them on a pruned database or one that started from a later point; resync it from genesis first.
The storage mode is a local choice. It never changes the chain, its state or which blocks are valid.
Maintenance
| Command | What it does |
|---|---|
tenraid inspect | Prints the finalized head |
tenraid verify-store | Opens the database, checks it against the manifest and prints the head |
tenraid reset-db --yes | Deletes the chain database; identity and peer book stay |
tenraid run --reset-db | Deletes the database, then starts and syncs again |
Every command takes --manifest, --network and --data-dir like run.
Free space
The database grows with the chain. Watch the free space, and set the thresholds of the disk pressure guard so the node stops taking new public transactions before the disk fills up.
