How to Validate the Blockchain

How to Validate the Blockchain

Validator maintains the blockchain, stores its copies and confirms new transactions using its own servers and providing his work round-the-clock.

TON blockchain inflation is 0.6% per year from the total emission new coins issued by the blockchain annually. New coins are distributed between validators and nominators in proportion to their contribution, which is called a stake.

If you want to run your own validator you need a sufficient level of technical knowledge, as you will be responsible not only for your own money, but also for the funds of the nominators.

TON Staking
Thanks to the launch of the nominator’s smart contracts, every network user can now send their coins to staking and get up to 14% per annum in TON. How to stake TON coinGo to the pool’s page >2. Press the ADD STAKE button or scan the QR-code

What about costs?

You need at least 300 000 TON  to become a validator – this can be your personal coins or funds raised from nominators, but staking will not work until you have the right amount.

There are more than 200 validators on the blockchain at the moment, and their number will grow in the future and also the entry limit will grow in time.

Rounds

The validation process consists of 18-hour rounds, preceded by a 9-hour voting phase, then the stakes is frozen for another 9 hours.

Yield

Current interest rate is ≈11% APY.

Yield amount depends on the inflation rate, which is 0.6% per year and the total number of coins holding by validators. At the same time, in the original White Paper you can find information about the inflation target of 2%, perhaps over time this value will be accepted, which will increase the current profitability.

Setup and launch

We highly recommend to running your validator on the testnet first.

First you need to rent a dedicated server (Vultr for example) with the recommended configuration or better: 8 vCPUs, 64Gb Memory, 1Tb enterprise SSD with redundancy (hardware or software raid), Fixed IP and 1Gb/s connection.

⚠️ Do not run validators on cloud servers, Hetzner and OVH providers, as well as servers located in Germany and Finland. The network has reached the limit of validators from these locations.

1. Install mytonctrl:

Download the installation script. We recommend to install the tool under your local user account, not as Root. In our example a local user account is used:

wget https://raw.githubusercontent.com/ton-blockchain/mytonctrl/master/scripts/install.sh
wget output

Run the installation script as administrator:

sudo bash install.sh -m full

2. Operability test

Run mytonctrl from local user account used for installation at step 1:

mytonctrl

Check mytonctrl statuses, in particular the following:

  • mytoncore status: should be green.
  • Local validator status: should be green.
  • Local validator out of sync. First a big number displays. Once the newly created validator contacts other validators, the number is around 250k. As synchronization goes on, the number decreases. When it falls below 20, the validator is synchronized.
status

Look at the list of available wallets. In our example the validator_wallet_001 wallet was created at mytonctrl installation:

wallet list

3. Send the required number of coins to the wallet and activate it

Go to tonmon.xyz > Participant stakes to check the the minimum amount of coins required to participate in one election round.

  • The vas command displays the history of transfers
  • The aw command activates the wallet
account history

4. Now your validator is good to go

mytoncore automatically joins the elections. It divides the wallet balance into two parts and uses them as a bet to participate in the elections. You can also manually set the stake size:

set stake 50000 — set the stake size to 50k coins. If the bet is accepted and our node becomes a validator, the bet can only be withdrawn at the second election (according to the rules of the electorate).

setting stake

Feel free to command help.

To check mytoncrl logs, open ~/.local/share/mytoncore/mytoncore.log for a local user or /usr/local/bin/mytoncore/mytoncore.log for Root.

logs

Running the validator in nominator pool mode

1. Prepare the hardware for the validator - 8 vCPUs, 64gb memory, 1TB SSD, Fixed IP address, 1Gb/s.

Your hardware must comply with the specified configuration or be higher. Do not run the validator on weak hardware - this negatively affects the network and you will be fined.

2. Install and sync mytonctrl as described in https://github.com/ton-blockchain/mytonctrl/blob/master/docs/en/manual-ubuntu.md only paragraph 1, 2 and 3.

Video instruction

3. Send 1 TON to validator wallet address displayed in the list wl.

4.  Type aw to activate validator wallet.

5. Switch to a branch that supports pools:

update dev 

6. Create two pools (for even and odd validation round):

new_pool p1 0 1 1000 300000
new_pool p2 0 1 1001 300000

where

  • p1 is pool name;
  • 0 % is validator reward share (e.g. use 40 for 40%);
  • 1 is max nominators count in the pool (should be <= 40);
  • 1000 TON is minimum validator stake (should be >= 1K TON);
  • 300000 TON is minimum nominator stake (should be >= 10K TON);
(!) pools configurations don't have to be identical, you can add 1 to the minimum stake of one pool to make them different.

7. Type pools_list to display pools addresses:

pools_list
Name  Status  Balance  Address
p1    empty   0        0f98YhXA9wnr0d5XRXT-I2yH54nyQzn0tuAYC4FunT780qIT
p2    empty   0        0f9qtmnzs2-PumMisKDmv6KNjNfOMDQG70mQdp-BcAhnV5jL

8. Send 1 TON to each pool and activate the pools:

mg validator_wallet_001 0f98YhXA9wnr0d5XRXT-I2yH54nyQzn0tuAYC4FunT780qIT 1
mg validator_wallet_001 0f9qtmnzs2-PumMisKDmv6KNjNfOMDQG70mQdp-BcAhnV5jL 1
activate_pool p1
activate_pool p2

9. Type pools_list to display pools:

pools_list
Name  Status  Balance      Address
p1    active  0.731199733  kf98YhXA9wnr0d5XRXT-I2yH54nyQzn0tuAYC4FunT780v_W
p2    active  0.731199806  kf9qtmnzs2-PumMisKDmv6KNjNfOMDQG70mQdp-BcAhnV8UO

10. Open each pool by link "https://tonscan.org/nominator/<address_of_pool>" and verify pools configuration.

11. Make validator deposit to each pool:

deposit_to_pool validator_wallet_001 kf98YhXA9wnr0d5XRXT-I2yH54nyQzn0tuAYC4FunT780v_W 1005
deposit_to_pool validator_wallet_001 kf9qtmnzs2-PumMisKDmv6KNjNfOMDQG70mQdp-BcAhnV8UO 1005

where 1005 TON is deposit amount. Please note that 1 TON will be debited by the pool for deposit processing.

12. Activate pool mode:

set usePool true

13. Invite nominators to make deposits to your pools. Participation in validation will start automatically.

You need to have at least 200 TON/month on validator wallet for operation fees.

Pools configuration

If you want to lend to yourself then use new_pool p1 0 1 1000 300000 (1 nominator maximum, 0% validator share).

If you are creating a pool for many nominators then use something like this: new_pool p1 40 40 10000 10000 (40 nominators maximum, 40% validator share, 10K TON minimum participant stakes).

Switching a regular validator to nominator pool mode

  1. Type set stake 0 to disable participation in elections.
  2. Wait for both of your stakes to return from the elector.
  3. Complete the "Running the validator in nominator pool mode" steps starting from the 4th step.

You can find the original instructions in the official mytonctrl repository, thanks to igroman787 for the help!

Subscribe
to our Telegram channel