Existing Validator Update

Configure Git to mark the TON source directory as a safe directory

git config --global --add safe.directory /usr/src/ton

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

Fetch the latest changes from the remote repository and merge them

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

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