Rollback to the original TON version
You can use the built-in upgrade
command in Mytonctrl to update your TON node from the official GitHub repository.
Always back up critical data before upgrading.
MyTonCtrl> create_backup
MyTonCtrl> upgrade https://github.com/ton-blockchain/ton/tree/v2024.10
Manual rollback
Navigate to the TON source directory. Add a new remote repository named 'upstream' that points to the official TON repository on GitHub. Fetch the latest changes from the 'upstream' repository. Check out the 'master' branch from the 'upstream' repository.
$ cd /usr/src/ton
$ git remote add origin https://github.com/ton-blockchain/ton.git
$ git fetch origin && git pull
$ git remote -v
sova git@github.com:sova-network/ton-secured.git (fetch)
sova git@github.com:sova-network/ton-secured.git (push)
origin https://github.com/ton-blockchain/ton.git (fetch)
origin https://github.com/ton-blockchain/ton.git (push)
$ git checkout -f origin/master
$ git submodule update --init --recursive
Build the TON node
mkdir build && \
cd build && \
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DPORTABLE=1 -DTON_ARCH= -DTON_USE_JEMALLOC=ON .. && \
ninja storage-daemon storage-daemon-cli tonlibjson fift func validator-engine validator-engine-console generate-random-id dht-server lite-client
Download ton global configuration file from the official source and copy it to the /usr/src/ton/build
directory:
Mainnet:
wget https://ton.org/global-config.json -O /usr/src/ton/build/global.config.json
Testnet:
wget https://ton.org/testnet-global.config.json -O /usr/src/ton/build/global.config.json
Stop the TON node
systemctl stop validator.service
systemctl stop mytoncore.service
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.service
systemctl start mytoncore.service
Last updated