MyTonCtrl
Overview
To install and manage your own node, use the MyTonCtrl open-source tool developed by the TON Foundation. The majority of TON Nodes are reliable and tested by MyTonCtrl.
MyTonCtrl is a console application that is a convenient wrapper for fift, lite-client, and validator-engine-console. It has been specifically developed to streamline wallet, domain, and validator management tasks on the Linux operating system.
We are actively seeking feedback about the installation process. If you have any questions or suggestions, please contact us.
General Commands
help
No args, print help text
clear
No args, clear console
exit
No args, exit from console.
update
Update mytonctrl. Param combinations:
Format name | Format | Example | Description |
---|---|---|---|
No args | update | update | Update from current repo |
URL format | update [https://github.com/author/repo/tree/branch] | update https://github.com/ton-blockchain/mytonctrl/tree/test | Update from specified URL |
Branch Only format | update [BRANCH] | update test | Update from specified branch of current repo |
Branch Override format | update [https://github.com/authorName/repoName/tree/branchName] [BRANCH] | update https://github.com/ton-blockchain/mytonctrl/tree/master test | Update from branch specified by second argument of specified repository |
upgrade
Update node. Param combinations:
Format name | Format | Example | Description |
---|---|---|---|
No args | upgrade | upgrade | Upgrade from current repo |
URL format | upgrade [https://github.com/author/repo/tree/branch] | upgrade https://github.com/ton-blockchain/ton/tree/master | Upgrade from specified URL |
Branch Only format | upgrade [BRANCH] | upgrade master | Upgrade from specified branch of current repo |
Branch Override format | upgrade [https://github.com/authorName/repoName/tree/branchName] [BRANCH] | upgrade https://github.com/ton-blockchain/ton/tree/master testnet | Upgrade from branch specified by second argument of specified repository |
status
Get current mytonctrl and node status. Param combinations:
Format name | Format | Example | Description |
---|---|---|---|
No args | status | status | Full status report including validator efficiency and online validators. |
Fast | status fast | status fast | Must be used on TestNet. Status report without validator efficiency and online validators count. |
installer
No args, run the installer of TON modules (script /usr/src/mytonctrl/mytoninstaller.py)
status_modes
No args, show MTC modes.
status_settings
No args, show all available settings with their description and values.
enable_mode
Enable a specific mode.
MyTonCtrl> enable_mode <mode_name>
Example:
MyTonCtrl> enable_mode validator
disable_mode
Disable a specific mode.
MyTonCtrl> disable_mode <mode_name>
Example:
MyTonCtrl> disable_mode validator
about
Provide a description of the specified mode
MyTonCtrl> about <mode_name>
Example:
MyTonCtrl> about validator
get
Get the value of a specific setting in JSON format
MyTonCtrl> get <setting_name>
Example:
MyTonCtrl> get stake
set
Set the specified value of a specified setting. Skip setting existence checking if --force
enabled
MyTonCtrl> set <setting> <value> [--force]
Example:
MyTonCtrl> set stake 9000
rollback
No args, rollback to mytonctrl 1.0. You shouldn't use mytonctrl 1.0 in any case.
getconfig
Retrieves and prints the JSON representation of the configuration specified by <config-id>
MyTonCtrl> getconfig <config_id> # config id can be omitted
Example:
MyTonCtrl> getconfig 0
get_pool_data
Retrieves and prints the JSON representation of the pool data specified by <pool-name>
or <pool-addr>
.
MyTonCtrl> get_pool_data <<pool-name> | <pool-addr>>
Example:
get_pool_data pool_name # you can check possible pool names using ls /home/install_mytonctrl/.local/share/mytoncore/pools
Overlays
Read more about overlays here.
add_custom_overlay
Adds a custom overlay with the given <name>
using the configuration specified by <path_to_config>
MyTonCtrl> add_custom_overlay <name> <path_to_config>
Example:
add_custom_overlay custom /config.json # check link from above to know what config this command requires (/v3/guidelines/nodes/custom-overlays)
list_custom_overlays
No args, prints custom overlays
delete_custom_overlay
Deletes the custom overlay with the specified <name>
MyTonCtrl> delete_custom_overlay <name>
Validator
vo
Votes for the offer specified by <offer-hash>
MyTonCtrl> vo <offer-hash> # use `ol` to get offers
ve
No args, vote for election
vc
Votes for the complaint specified by <complaint-hash>
in the election specified by <election-id>
MyTonCtrl> vc <election-id> <complaint-hash>
Actually, even this will work, but you should use data from your current mytonctrl state:
MyTonCtrl> vc 0 0
check_ef
Outputs validator efficiency data for the current and previous rounds.
Note: The efficiency data for the current round becomes more accurate as the round progresses.
Based on the validator index
(can be received by status
command), there are three possible scenarios:
-
Validator index is in the range [0,
max_main_validators
): Thevalidator efficiency
must be above 90% (number can be changed in future based on statistics) for the entire round; otherwise, a penalty (fine) may be imposed. -
Validator index is in the range [
max_main_validators
,max_validators
): Thevalidator efficiency
should still be above 90% (number can be changed in future based on statistics) for the full round. Currently, no penalty will be applied, but this may change in future updates. -
The user is not a validator: No penalties apply, but the user is not eligible for rewards either. No
validator efficiency
to check. This can be caused by a low stake or incorrect node configuration. Additionally, ensure thatmytonctrl
is running continuously.
Read more about max_validators
and max_main_validators
on config parameters page. Get the actual values for mainnet and for testnet.
Pool commands
Get more information at nominator pool page.
deposit_to_pool
Deposits the specified <amount>
to the pool specified by <pool-addr>
MyTonCtrl> deposit_to_pool <pool-addr> <amount>
Example:
MyTonCtrl> deposit_to_pool kf_JcC5pn3etTAdwOnc16_tyMmKE8-ftNUnf0OnUjAIdDJpX 1
withdraw_from_pool
Withdraws the specified <amount>
from the pool specified by <pool-addr>
MyTonCtrl> withdraw_from_pool <pool-addr> <amount>
Example:
MyTonCtrl> withdraw_from_pool kf_JcC5pn3etTAdwOnc16_tyMmKE8-ftNUnf0OnUjAIdDJpX 1
cleanup
No args, cleanup validator database
benchmark
No args, prints table with several tests
Single pool
Get more information at single nominator pool page.
new_single_pool
Creates a new single pool with the specified <pool-name>
and <owner-address>
MyTonCtrl> new_single_pool <pool-name> <owner-address>
Example:
MyTonCtrl> new_single_pool name kf9tZrL46Xjux3ZqvQFSgQkOIlteJK52slSYWbasqtOjrKUT
activate_single_pool
Activates the single pool specified by <pool-name>
MyTonCtrl> activate_single_pool <pool-name> # pool name from above