Existing Validator Update
Configure Git to mark the TON source directory as a safe directory
git config --global --add safe.directory /usr/src/ton
Next step is needed only during Preview period. It is also necessary to share SSH public key with us to be able to clone Sova powered Validator client or LiteServer sources.
Start the SSH agent in the background. Add your SSH private key to the SSH agent. Test the SSH connection to GitHub
$ eval "$(ssh-agent -s)" && ssh-keyscan github.com >> ~/.ssh/known_hosts
$ ssh-add ~/.ssh/ton_secure_key
$ ssh -T git@github.com
Hi YOUR_USERNAME! You've successfully authenticated, but GitHub does not provide shell access.
Navigate to the TON source directory
cd /usr/src/ton
It is necessary to share SSH public key with us to be able to clone Sova powered Validator client or LiteServer sources.
Fetch the latest changes from the remote repository and merge them
Use sudo -E
for preserves the user's environment variables while executing a command with elevated privileges.
git remote add sova git@github.com:sova-network/ton-secured.git
git fetch sova && git pull
git checkout sova/[SOURCE_BRANCH]
You can choose one of SOURCE_BRANCH:
for accelerator use mev-accelerator
for testnet use mev-testnet
for master use mev-master
Initialize and update all Git submodules recursively
git submodule update --init --recursive
Install necessary packages and dependencies
sudo apt-get install --no-install-recommends -y wget curl git libatomic1 openssl libsecp256k1-dev libsodium-dev libmicrohttpd-dev liblz4-dev libjemalloc-dev iptraf-ng pv plzip libgrpc++-dev \
protobuf-compiler protobuf-compiler-grpc libgrpc-dev libgrpc++-dev libprotobuf-dev libabsl-dev openssh-client ca-certificates build-essential cmake clang libssl-dev zlib1g-dev gperf ninja-build pkg-config autoconf automake libtool lsb-release software-properties-common gnupg
Build the TON node
sudo mkdir build && \
cd build && \
sudo cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DPORTABLE=1 -DTON_ARCH= -DTON_USE_JEMALLOC=ON .. && \
sudo ninja storage-daemon storage-daemon-cli tonlibjson fift func validator-engine validator-engine-console generate-random-id dht-server lite-client
After success build, change ton global configuration file.
Go to page Configuration Validator client or LiteServer
By default, it is located at:
nano /usr/bin/ton/global.config.json
If you already have global.config.json with sova's key, don't forget to make a backup before copying. We also recommend making a backup using mytonctrl
command create_backup
Stop TON node and Mytoncore services
systemctl stop validator
systemctl stop mytoncore
Copy the build
directory content to the /usr/bin/ton
directory
cp -r /usr/src/ton/build/* /usr/bin/ton
then start the TON node
systemctl start validator
systemctl start mytoncore
For a quick update, you can merge commands:
sudo systemctl stop validator && sudo systemctl stop mytoncore && \
sudo cp -r /usr/src/ton/build/* /usr/bin/ton && \
sudo systemctl start validator && sudo systemctl start mytoncore
Last updated