Skip to main content

Prerequisites

Maintain costs and expanses

  • Validator node network fee spends up to 200 TON monthly.
  • Validator deposit stake 700 000 TON ~ 4 000 000 TON.
  • 100 TB/month traffic at a peak load.

Minimal hardware requirements

  • 16-core CPU
  • 128 GB RAM
  • 1TB NVMe SSD or provisioned 64+k IOPS storage
  • 1 Gbit/s network connectivity
  • Public IP address (fixed IP address)
Typically, you’ll need at least a 1 Gbit/s connection to reliably accommodate peak loads (the average load is expected to be approximately 100 Mbit/s). We draw special attention of validators to IOPS disk requirements, it is crucially important for smooth network operation.

Software requirements

  • Ubuntu 22.04 LTS or 24.04 LTS
  • Python 3.10
  • Clang 16.0.0
run-validator-3.png
# Please check your clang version first
clang --version
# If it is of version 16 you don't need to do the below steps.

# Required for Ubuntu 20.04 only.
sudo apt update
sudo apt install -y manpages-dev software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update && sudo apt install gcc-11 g++-11

# Required for Ubuntu 20.04 and 22.04. Update current clang to clang-16
sudo apt install lsb-release wget software-properties-common gnupg
sudo wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 16 clang

# change default clang
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-16 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-16 100

Port forwarding for node

Mandatory
Configure your network on server according the following:
  • All outgoing connections to be open.
  • A static external IP address.
  • One UDP port forwarded for incoming connections
  • Server must also be visible to the outside world over the NAT.
To determine which UDP ports are open, use the following command:
netstat -tulpn

Validator updates announcements

Subscribe and follow instructions provided for validators with telegram channels
Do not ignore announcements for Testnet, validator that violate maintaining will be fined and excluded from network.
ChannelNetwork
@tonstatusMainnet
@testnetstatusTestnet

Prepare the validator account

  1. Create non-root user
create validator user
sudo adduser <USERNAME>
sudo usermod -aG sudo <USERNAME>
  1. Switch to it with reconnecting to server via ssh
reconnect as the new user
exit
ssh <USERNAME>@<SERVER_IP>

Validator node installation

  1. Download MyTonCtrl:
wget https://raw.githubusercontent.com/ton-blockchain/mytonctrl/master/scripts/install.sh
run-validator-4.png
  1. Run validator installation, installation takes approximately 20 minutes:
install for Mainnet
sudo bash install.sh -m single-nominator -n mainnet
run-validator-5.png
install for Testnet
sudo bash install.sh -m single-nominator -n testnet
  1. After installation, launch MyTonCtrl with command mytonctrl. Then, check synchronization status using the command:
mytonctrl
MyTonCtrl> status
run-validator-2.png
Initially you will see Local validator initial sync status: downloading blockchain state xxxx in status, that means you node started syncronization.
  1. Make sure your ports allowed. Print your engine.addr port configuration config.json file:
grep -A5 '"addrs"' -n /var/ton-work/db/config.json | grep '"port"' | head -1
run-validator-26.png
  1. Make sure UDP engine.addr port allowed with following command:
sudo ufw status
run-validator-26.png
  1. If you find out port filtered (absent in allowed), open this port:
sudo ufw allow <PORT_NUMBER>/udp
Then make sure with sudo ufw status.
  1. Disk latency is the common bottleneck. Benchmark storage with benchmark command:
MyTonCtrl> benchmark
  1. Wait until the node is fully synchronized approximately 3 hours (depends on network connection). Check the field Local validator initial sync status: x, the value x should become less than 20.
run-validator-8.png
Set up alert bot to receive a notification when the node is synchronized.

Configure validator

When installing, MyTonCtrl automatically creates a validator wallet for you. You need to top up and activate (deploy) this wallet so MyTonCtrl can operate Single nominator pool smart contract with it.
  1. Check a list of wallets:
MyTonCtrl> wl
You should see a wallet named validator_wallet_001 and its address. run-validator-7.png
  1. Make back-up of your validator wallet secret key:
MyTonCtrl> ew validator_wallet_001
run-validator-11.png
You can import this secret key with iw command.
  1. Explore your validator wallet by address with Tonviewer:
run-validator-6.png
  1. Credit validator wallet. Ensure you have at least 200 TON/month in your validator wallet for operation fees.
run-validator-9.png
  1. Activate the wallet:
MyTonCtrl> aw validator_wallet_001
run-validator-12.png That also reflect in Tonviewer, status will displayed as Active run-validator-14.png
  1. Create a single nominator pool for secure stake manegment.
As an owner-address, specify the beneficiary wallet address who will stake owned funds and receive rewards. We suggest use cold wallet (Ledger) for an owner to come with securest approach.
MyTonCtrl> new_single_pool <pool-name> <owner-address>
run-validator-15.png
If you’ve already created a pool, you can import it:
MyTonCtrl> import_pool <pool-name> <pool-addr>
  1. Display pool addresses using pools_list:
MyTonCtrl> pools_list
run-validator-16.png At the moment your pool didn’t deployed yet, and explorer will display this as Nonexist status: run-validator-17.png
  1. Activate the pool:
MyTonCtrl> activate_single_pool <pool-name>
run-validator-18.png
  1. After successfully activating the pool check it again with pools_list:
MyTonCtrl> pools_list
run-validator-19.png Blockchain explorer also should display now deployed contract with Active status run-validator-20.png
  1. Test deposit and withdrawal process with owner wallet. You able to make deposit from any address with direct transfer. Credit decent sum around 10 TON:
run-validator-21.png run-validator-22.png
  1. Send withdrawal request, a message with w comment from owner wallet to single nominator pool address:
Send withdrawal requestSend withdrawal request Once you restore your deposit (except 1 TON reserve on single nominator pool) to owner wallet, that means all system set securely and ready for real stake: run-validator-23.png

Set optimal stake for validator

Now you can top up this pool with funds enough for validation. On the next elections MyTonCtrl will automatically use this pool for staking.
If the pool’s balance is sufficient to participate in both rounds balance > min_stake_amount * 2, MyTonCtrl will automatically participate in both rounds using stake = balance / 2, unless you manually set the stake using the set stake command. This behavior differs from using a nominator pool but resembles staking with a validator wallet.
  1. Get cycle_info.min_stake and cycle_info.max_stake from API for two last cycles(WIP).
  2. Chose max within two cycle_info.min_stake and cycle_info.max_stake.
cycle_info.min_stake = 450 000
cycle_info.min_stake = 500 000

min_cycle_stake = 500 000
cycle_info.max_stake = 2 200 000
cycle_info.max_stake = 2 150 000

max_cycle_stake = 2 200 000
  1. Calculate expected effective stake by double max_cycle_stakeand min_cycle_stake:
max_expected_effective_stake = max_cycle_stake * 2 = 2 200 000 * 2 = 2 400 000

min_expected_effective_stake = min_cycle_stake * 2 = 500 000 * 2 = 1 000 000
Effective stake defined with: min_expected_effective_stake <= effective stake <= max_expected_effective_stake
  1. Deposit directly to single nominator pool address effective stake.
  2. Next election cycle (odd), mytonctrl will send half of stake from single nominator pool. Track this with browser.
  3. Next paired election cycle (even), mytonctrl will send second half of stake from single nominator pool. Track this with browser.
  4. Reward for odd validation cycle will return to single nominator pool united with stake. Track this with browser.
  5. Once you make sure you pair stakes circulated properly, you may focus on monitor validator health and updates.

Maintain validator

  1. Follow @tonstatus, turn on notifications, and be prepared for urgent updates if needed.
  2. Create validator backup. Learn about backups.
  3. Set up alerting in MyTonCtrl to notify you of critical issues with your validator. For more information, see MyTonCtrl private alerting bot or (and) check MyTonCtrl public alerting bot.
  4. Set up monitoring dashboards for RAM, disk, network, CPU usage and other metrics. See also MyTonCtrl prometheus export. For technical assistance, please contact @mytonctrl_help_bot.
  5. Monitor the efficiency of your validator with dashboards.
MyTonCtrl enables you to evaluate the performance of validators using the command check_ef. This command provides efficiency data for both the last round and the current round. The data is retrieved by calling the checkloadall utility. Make sure that your efficiency is above 90% for the entire round period.
If you encounter low efficiency, take action to resolve the issue. If necessary, contact technical support at @mytonctrl_help_bot.

Learn slashing policy

If a validator processes less than 90% of the expected blocks during a validation round, they will be fined by 101 TON. Learn more about the slashing policy.

Validation effectiveness APIs

Please set up dashboards to monitor your validators using the APIs provided below.

Penalized validators tracker

You can track penalized validators on each round with @tonstatus_notifications.

Validation API

You can use this API to obtain information about current and past validation rounds (cycles) - including the timing of rounds, which validators participated, their stakes, and more. Information regarding current and past elections for each validation round is also available.

Efficiency API

You can use this API to obtain information about the efficiency of validators over time. This API analyzes data from the catchain to provide an estimate of a validator’s efficiency. It serves as an alternative to the checkloadall utility. Unlike checkloadall, which only works on validation rounds, this API allows you to set any time interval to analyze a validator’s efficiency.
Workflow:
  1. To the API, provide the ADNL address of your validator along with a time interval (from_ts, to_ts). For accurate results, choose a sufficient interval, such as 18 hours ago to the present moment.
  2. Retrieve the result. If your efficiency percentage is below 80%, your validator is malfunctioning.
  3. Your validator must actively participate in validation and use the same ADNL address throughout the specified time period. For example, if a validator contributes to validation every second round, you should only indicate the intervals during which they participated. Failing to do so may result in an inaccurate underestimate. This requirement applies not only to MasterChain validators (with an index < 100) but also to other validators (with an index > 100).

Support

Contact technical support @mytonctrl_help_bot. This bot is for validators only and will not assist with questions for regular nodes.