Archive node
Before this article, read about Full node.
Overview
An archive node is a type of full node that stores the entire block history of the TON blockchain. If you are creating a blockchain explorer or a similar application that requires access to historical data, it is recommended that you use an archive node as an indexer.
OS requirements
We highly recommend installing MyTonCtrl on the following supported operating systems:
- Ubuntu 22.04
- Ubuntu 24.04
- Debian 11
Minimal hardware requirements
- 16-core CPU
- 128 GB RAM
- 12 TB SSD OR Provisioned 64+k IOPS storage
- 1 Gbit/s network connectivity, both inbound and outbound
- 16 TB/month traffic on peak load
- Linux OS with open files limit above 400k
- A public IP address (fixed IP address)
Currently, uncompressed data requires ~14 TB of storage. A ZFS volume with compression reduces this to ~12.4 TB with a compression ratio of about 1.08x. Archive size grows over time; check the dump index for the current size.
Installation
Install ZFS and prepare volume
Dumps come in the form of ZFS snapshots compressed using zstd or plzip (varies by dump). You need to install ZFS on your host and restore the dump. See Oracle Documentation for more details.
Usually, it's a good idea to create a separate ZFS pool for your node on a dedicated SSD drive. This will allow you to manage storage space and back up your node easily.
- Install ZFS:
sudo apt install zfsutils-linux
- Create a pool on your dedicated ≥12 TB
<disk>
(or large enough to hold the restored dataset) and name itdata
:
sudo zpool create data <disk>
- We recommend enabling compression on the parent ZFS filesystem before restoring. This will save you a significant amount of space. To enable compression for the
data
volume, use the root account to enter the following:
sudo zfs set compression=lz4 data
- Create ZFS dataset and set the mount point to
/var/ton-work
:
sudo zfs create data/ton-work
sudo zfs set mountpoint=/var/ton-work data/ton-work
Install MyTonCtrl
To install MyTonCtrl and run the interactive CLI installer, use:
wget https://raw.githubusercontent.com/ton-blockchain/mytonctrl/master/scripts/install.sh
sudo bash install.sh
After choosing liteserver
mode and specifying the network, send 1
to the prompt Do you want to download archive blocks via TON Storage?
to set up an archive node.
After specifying all required info, it is recommended to choose MyTonCtrl installation in the background (last question), as block downloading takes a long time (up to several days).
You can track this progress in the MyTonCtrl installation logs.
Run an archive node
After the MyTonCtrl installation is complete, the node has downloaded all blocks and started the process of importing them.
This process may take a long time (up to several weeks) depending on your hardware.
To check the synchronization status, use the status
command and check the Local validator initial sync status
field.
You can also set up an alert bot to get a notification when the node is fully synchronized.
Set correct ownership
After installation, verify file ownership for the node directories:
- The owner of the
/var/ton-work/db
directory should be thevalidator
user:
sudo chown -R validator:validator /var/ton-work/db
- The owner of the
/var/ton-work/keys
directory should be the user that installed MyTonCtrl (replace<install_user>
with your username):
sudo chown -R <install_user>:<install_user> /var/ton-work/keys
Troubleshooting
Importing blocks logs
To check the logs of importing blocks, you need to increase node log verbosity:
MyTonCtrl> installer set_node_argument --verbosity 3
tail -f /var/ton-work/log*
You should see logs like this:
[ 2][t49][2025-01-01 00:00:00.632794989][import-db-slice-local.cpp:629][!archiveimport] Imported archive in 2.755176s : mc_seqno=761229 shard_seqno=761229
If you see timeout errors and logs like Importing archive for masterchain seqno #8242118 from net
, that probably means your disk is not powerful enough to import blocks.
Note: Don't forget to set verbosity back to 1
after you check the logs.
ZFS Snapshots
You can create regular filesystem snapshots for rollback capability. For automated snapshot management, zfsnap handles rotation effectively.
If, for some reason, something does not work or breaks, you can always roll back to a snapshot on your ZFS filesystem.
To restore from a snapshot, follow these steps:
- Stop the validator process (Never skip this!):
sudo -s
systemctl stop validator.service
- Check the snapshot name:
zfs list -t snapshot
- Roll back to the snapshot:
zfs rollback data/ton-work@<snapshot-name>
Support
Contact technical support at @ton_node_help.