Here is the optimized version in English:
MyTonCtrl is a wrapper that stores its files in two places:
~/.local/share/mytonctrl/
- Long-term files such as logs are stored here./tmp/mytonctrl/
- Temporary files are stored here.
MyTonCtrl also includes another script, mytoncore, which in turn stores files in the following locations:
~/.local/share/mytoncore/
- Permanent files, the main configuration will be stored here./tmp/mytoncore/
- Temporary files, parameters used for elections will be saved here.
MyTonCtrl downloads the source code for itself and the validator into the following directories:
/usr/src/mytonctrl/
/usr/src/ton/
MyTonCtrl compiles the validator components into the following directory:
/usr/bin/ton/
MyTonCtrl creates a working directory for the validator here:
/var/ton/
The configurations will be stored differently:
/usr/local/bin/mytonctrl/
/usr/local/bin/mytoncore/
Run the script as an administrator and remove the compiled TON components:
sudo bash /usr/src/mytonctrl/scripts/uninstall.sh
sudo rm -rf /usr/bin/ton
During this process, ensure you have sufficient permissions to delete or modify these files or directories.
If you encounter issues running MyTonCtrl as a different user or wish to change the working directory of the validator, this guide provides some solutions.
Running MyTonCtrl as a different user may trigger the following error:
Error: expected str, bytes or os.PathLike object, not NoneType
To resolve this, you should run MyTonCtrl as the user who installed it.
If you wish to change the working directory of the validator prior to installation, there are two ways to do so:
-
Fork the project - You can fork the project and make your changes there. Learn how to fork a project with
man git-fork
. -
Create a symbolic link - You can also create a symbolic link with the following command:
ln -s /opt/ton/var/ton
This command will create a link /var/ton
that points to /opt/ton
.
If you want to change the working directory of the validator from /var/ton/
after installation, perform the following steps:
-
Stop services - You will need to stop the services with these commands:
systemctl stop validator systemctl stop mytoncore
-
Move validator files - You then need to move the validator files with this command:
mv /var/ton/* /opt/ton/
-
Update configuration paths - Replace the paths in the configuration located at
~/.local/share/mytoncore/mytoncore.db
. -
Note on experience - There is no prior experience with such a transfer, so consider this when moving forward.
Remember to make sure you have sufficient permissions to make these changes or run these commands.
This document will help you understand how to confirm if MyTonCtrl has become a full validator and how to restart your validator.
You can confirm if your node has become a full validator by checking the following conditions:
- Validator Desynchronization - The desynchronization of the local validator should be less than 20.
- Validator Index - The validator index should be greater than -1.
To view the performance factor of your validator, you can use the vl
command in MyTonCtrl:
- Find your validator in the list by its ADNL address (
adnlAddr
). - If the
mr
andwr
coefficients are close to 1, it means that your validator is working correctly.
If you need to restart your validator, you can do so by running the following command:
systemctl restart validator
Ensure you have sufficient permissions to execute these commands and make necessary adjustments. Always remember to back up important data before performing operations that could potentially affect your validator.