MyTonCtrl
概述
要安装和管理自己的节点,请使用 TON 基金会开发的MyTonCtrl开源工具。大多数 TON 节点都是可靠的,并通过 MyTonCtrl 进行了测试。
MyTonCtrl 是一个控制台应用程序,是对 fift、lite-client 和 validator-engine-console 的便捷封装。它专门用于简化 Linux 操作系统上的钱包、域和验证器管理任务。
我们正在积极寻求有关安装过程的反馈意见。如果您有任何问题或建议,请 联系我们。
一般命令
help
无参数,打印帮助文本
clear
无参数,清除控制台
exit
无参数,从控制台退出。
update
更新 mytonctrl。参数组合:
Format name | Format | Example | Description |
---|---|---|---|
No args | update | update | 从当前版本库更新 |
URL format | update [https://github.com/author/repo/tree/branch] | update https://github.com/ton-blockchain/mytonctrl/tree/test | 从指定 URL 更新 |
Branch Only format | update [BRANCH] | update test | 从当前版本库的指定分支更新 |
Branch Override format | update [https://github.com/authorName/repoName/tree/branchName] [BRANCH] | update https://github.com/ton-blockchain/mytonctrl/tree/master test | 从指定存储库的第二个参数指定的分支更新 |
upgrade
更新节点。参数组合:
Format name | Format | Example | Description |
---|---|---|---|
No args | upgrade | upgrade | 从当前版本库升级 |
URL format | upgrade [https://github.com/author/repo/tree/branch] | upgrade https://github.com/ton-blockchain/ton/tree/master | 从指定 URL 升级 |
Branch Only format | upgrade [BRANCH] | upgrade master | 从当前版本库的指定分支升级 |
Branch Override format | upgrade [https://github.com/authorName/repoName/tree/branchName] [BRANCH] | upgrade https://github.com/ton-blockchain/ton/tree/master testnet | 从指定版本库第二个参数指定的分支升级 |
status
获取当前的 mytonctrl 和节点状态。参数组合:
Format name | Format | Example | Description |
---|---|---|---|
No args | status | status | 完整的状态报告,包括验证器效率和在线验证器。 |
Fast | status fast | status fast | 必须在 TestNet 上使用。状态报告不含验证器效率和在线验证器计数。 |
installer
无参数,运行 TON 模块安装程序 (script /usr/src/mytonctrl/mytoninstaller.py)
status_modes
无参数,显示 MTC 模式。
status_settings
无参数,显示所有可用设置及其说明和值。
enable_mode
启用特定模式。
MyTonCtrl> enable_mode <mode_name>
例如
MyTonCtrl> enable_mode validator
disable_mode
禁用特定模式。
MyTonCtrl> disable_mode <mode_name>
例如
MyTonCtrl> disable_mode validator
about
提供指定模式的说明
MyTonCtrl> about <mode_name>
例如
MyTonCtrl> about validator
get
以 JSON 格式获取特定设置的值
MyTonCtrl> get <setting_name>
例如
MyTonCtrl> get stake
set
设置指定设置的指定值。如果启用 "强制",则跳过设置存在性检查
MyTonCtrl> set <setting> <value> [--force]
例如
MyTonCtrl> set stake 9000
rollback
无参数,退回到 mytonctrl 1.0。无论如何,你都不应该使用 mytonctrl 1.0。
getconfig
读取并打印由 <config-id>
指定的配置的 JSON 表示。
MyTonCtrl> getconfig <config_id> # config id can be omitted
例如
MyTonCtrl> getconfig 0
get_pool_data
读取并打印由 <pool-name>
或 <pool-addr>
指定的池数据的 JSON 表示形式。
MyTonCtrl> get_pool_data <<pool-name> | <pool-addr>>
例如
get_pool_data pool_name # you can check possible pool names using ls /home/install_mytonctrl/.local/share/mytoncore/pools
Overlays
了解更多有关 overlays 的信息。
add_custom_overlay
使用 <path_to_config>
指定的配置,在给定的 <name>
中添加自定义叠加。
MyTonCtrl> add_custom_overlay <name> <path_to_config>
例如
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
无参数,打印自定义覆盖层
delete_custom_overlay
使用指定的 <name>
删除自定义叠加。
MyTonCtrl> delete_custom_overlay <name>
Validator
vo
<offer-hash>
所述提议的投票权
MyTonCtrl> vo <offer-hash> # use `ol` to get offers