Installing TON Node
There are three types of nodes:After installing you can get an access to mytonctrl. Execute in shell:and find **validator-engine** process with UDP port and configure your firewalls and routers. Only this port is required for synchronization.In mytonctrl execute:In installer execute:You will get config for your lite client, like: Open **port** on your router/firewalls to make lite server accessible from outside.
- Lite node
- Full node
- Archive node
Lite Node
Lite node has only intermediate state and basically just proxy all requests to other nodes. This is useful to moderate the workload. Lite node requires **~10GB** of disk space.Full node
Full node have full state (but not transaction history) of a blockchain, it is useful for stable access to a blockchain. Full node requires **~10GB** of disk space at the beginning, but will be growing by **~10GB** per week.Archive node
Archive node is a full node but it has an access to the whole history of a blockchain. Current recommendation is to have **6TB** SSD.Installing Lite or Full Node
The easiest way to install node is to use mytonctrl.Execute in this command in bash replacing mode with **lite** or **full**:bash wget https://raw.githubusercontent.com/igroman787/mytonctrl/master/scripts/install.sh sudo bash install.sh -m <mode></mode>bash mytonctrlExposing Ports
Each node exposes random UDP port. To find it execute:bash sudo netstat -tunlpConnect to Lite Server
Lite server is component of TON node that serves client connections and performs various queries. If you want to use outside of local node you have to get lite client config.Start mytonctrl:bash mytonctrlbash installerbash plsc{
"ip": "<ip>",
"port": "<port>",
"id": {
"@type": "pub.ed25519",
"key": "<key>"
}(Advanced) Installing Archive Node
First you need to have 6TB SSD on your server, but current method relies on ZFS and you can use 3TB if you enable ZFS compression.- Install zfs, create new pool (`data`).
- Enable compression: `zfs set compression=lz4 data`
- Create volume: `zfs create data/ton-work`
- Install `mytonctrl`
- Stop validator process: `systemctl stop validator`
- Backup configs: `mv /var/ton-work /var/ton-work.bak`
- Apply dump (see below)
- Mount zfs: `zfs set mountpoint=/var/ton-work data/ton-work && zfs mount data/ton-work`
- Copy config.json, keys and db/keyring from backup to `/var/ton-work`
- Fix permissions: `chown -R validator:validator /var/ton-work`
- Start validator: `systemctl start validator`
Apply Dump
Request credentials at http://anode2.ton.swisscops.com.After getting credentials, execute:bash sudo apt-get instapp pv plzip curl -u <username>:<password> -s http://anode2.ton.swisscops.com/dumps/<link_for_last_dump> | pv | plzip -d -n48 | zfs recv data/ton-workTestnet Node
bash wget https://raw.githubusercontent.com/igroman787/mytonctrl/master/scripts/install.sh sudo bash install.sh -m full -c https://newton-blockchain.github.io/testnet-global.config.json