Configuration Validator client or LiteServer
TON global config file update
By default, it is located at:
sudo nano /usr/bin/ton/global.config.json
Modify or download ton global configuration file:
Mainnet:
wget https://raw.githubusercontent.com/sova-network/mytonctrl/refs/heads/master/sova-mainnet-global.config.json -O /usr/bin/ton/global.config.json
Testnet:
wget https://raw.githubusercontent.com/sova-network/mytonctrl/refs/heads/master/sova-testnet-global.config.json -O /usr/bin/ton/global.config.json
Change the TON node global configuration file, add the sova
section, and set the enabled
parameter to true
. Add the server_addr
parameter and set it to the address of the SovaTON Engine. Add the private_key_path
parameter.
The Engine for TON Testnet is currently accessible at:
testnet-engine.sova.network:30020
The Engine for TON Mainnet is currently accessible at:
engine.sova.network:30020
Example:
"sova": {
"enabled": true,
"server_addr": "engine.sova.network:30020",
"private_key_path": "/var/ton-work/keys/private_key.bin"
}
To generate an ed25519 private key, you can use Generate a new keypair for the SovaTON Engine
Please provide the public key so we can whitelist it.
To apply the configuration file, you need to restart your validator
systemctl restart validator
Generate a new keypair for the SovaTON Engine
Generate a new private key using the ed25519 algorithm
Clone the repository:
git clone https://github.com/sova-network/keygen_ed25519.git
cd keygen_ed25519
Generate a new key pair:
python keygen.py
Example output:
Private Key (Hex): d41a89153...be4c9
Private Key (Base64): 1BqJFTYv8JGGXH...inj8b5Mk=
Public Key (Hex): 9882bdc4a916c...ee8a4b956
Public Key (Base64): mIK9xKkWw...juikuVY=
The new private key will also be saved as private_key.bin
.
Backup your new private key securely and never share it with anyone.
Add the path to the key to the section "sova.private_key_path"
Share the Public Key (Hex) with us for witelisting
Migration Instructions: Old Private Key to New Format
This guide helps you migrate your old Base64-encoded private key to a new format using a Python script.
Run the Migration Script
python migrate.py
Enter your old Base64-encoded private key when prompted.
The new private key will also be saved as private_key.bin
.
Backup your new private key securely and never share it with anyone.
Validator checks (optional)
By default, the validator saves logs to a file located in a folder /var/ton-work/
You can increase verbosity level for validator-engine in file /etc/systemd/system/validator.service
set to --verbosity 3
then restart the validator sudo systemctl restart validator
sudo grep "sova"/var/ton-work/log*
You should see the authentication success logs:
[ 3][t 0][2025-01-15 14:36:29.168342822][sova.cpp:40][&INFO] Generate auth challenge was successful
If you see the log as below, your public key will not be whitelisted. Contact us to add your key to the whitelist.
[ 1][t 0][2025-01-17 12:34:37.741579816][sova.cpp:43][&ERROR] Failed to generate authentication challenge Non-whitelisted public key
Optionally, you can set up logging in the journal.
Update sudo nano /etc/systemd/system/validator.service
to include logging redirection in the [Service] section:
StandardOutput=journal
StandardError=journal
remove the parameter --logname /var/ton-work/log
from ExecStart Then save changes and reload and restart the service:
sudo systemctl daemon-reload
sudo systemctl restart validator
And now you can monitor the logs using the command:
sudo journalctl -u validator.service -f --output cat
How to Restore and Set Up the Latest Testnet Database Dump (only for branch mev-testnet)
mev-testnet)
Download the latest testnet dump from https://dump.ton.org/
wget https://dump.ton.org/dumps/latest_testnet.tar.lz -O latest_testnet.tar.lz
Backup
config.json
andkeyring
dir from the old database directory:
cp /var/ton-work/db/config.json /var/ton-work/
cp -r /var/ton-work/db/keyring /var/ton-work/
3. Stop the validator service:
sudo systemctl stop validator
Rename the existing database directory:
mv /var/ton-work/db /var/ton-work/db_old
Create a new and empty database directory:
mkdir -p /var/ton-work/db
Extract the downloaded archive into the new database directory:
tar --lzip -xvf latest_testnet.tar.lz -C /var/ton-work/db
Move back
config.json
andkeyring
to the new database directory:
mv /var/ton-work/config.json /var/ton-work/db/
mv /var/ton-work/keyring /var/ton-work/db/
Ensure correct ownership of the new database directory:
chown -R validator:validator /var/ton-work/db
Start the validator service:
sudo systemctl start validator
Monitor logs and wait for synchronization:
sudo journalctl -u validator -f
or
sudo tail -f /var/ton-work/log*
Last updated