From 9102d74b094f3d1d190b44eda40695befcf18497 Mon Sep 17 00:00:00 2001 From: Full-Hat Date: Thu, 22 Aug 2024 00:29:46 +0300 Subject: [PATCH 1/2] Update examples & add -t flag explanation --- docs/participate/run-nodes/full-node.mdx | 1 + docs/participate/run-nodes/mytonctrl.mdx | 137 +++++++++++++++++++++-- 2 files changed, 128 insertions(+), 10 deletions(-) diff --git a/docs/participate/run-nodes/full-node.mdx b/docs/participate/run-nodes/full-node.mdx index bd0a4ae6d6..b30a87d57f 100644 --- a/docs/participate/run-nodes/full-node.mdx +++ b/docs/participate/run-nodes/full-node.mdx @@ -124,6 +124,7 @@ This will reduce synchronization time by several times. * `-c ` - If you want to use not public liteservers for synchronization. _(not required)_ * `-i` - Ignore minimum requirements, use it only if you want to check compilation process without real node usage. * `-m` - Mode, can be `validator` or `liteserver`. +* `-t` - Disable telemetry. **To use testnet**, `-c` flag should be provided with `https://ton.org/testnet-global.config.json` value. diff --git a/docs/participate/run-nodes/mytonctrl.mdx b/docs/participate/run-nodes/mytonctrl.mdx index f2bccf239a..50cc5243b5 100644 --- a/docs/participate/run-nodes/mytonctrl.mdx +++ b/docs/participate/run-nodes/mytonctrl.mdx @@ -73,6 +73,12 @@ Enable a specific mode. MyTonCtrl> enable_mode ``` +Example: + +```bash +MyTonCtrl> enable_mode validator +``` + ### disable_mode Disable a specific mode. @@ -81,6 +87,12 @@ Disable a specific mode. MyTonCtrl> disable_mode ``` +Example: + +```bash +MyTonCtrl> disable_mode validator +``` + ### about Provide a description of the specified mode @@ -89,12 +101,24 @@ Provide a description of the specified mode MyTonCtrl> about ``` +Example: + +```bash +MyTonCtrl> about validator +``` + ### get Get the value of a specific setting in JSON format ```bash -MyTonCtrl> setting +MyTonCtrl> get +``` + +Example: + +```bash +MyTonCtrl> get stake ``` ### set @@ -105,16 +129,28 @@ Set the specified value of a specified setting. Skip setting existence checking MyTonCtrl> set [--force] ``` +Example: + +```bash +MyTonCtrl> set stake 9000 +``` + ### rollback -No args, rollback to mytonctrl 1.0. +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 `` ```bash -MyTonCtrl> getconfig +MyTonCtrl> getconfig # config id can be omitted +``` + +Example: + +```bash +MyTonCtrl> getconfig 0 ``` ### get_pool_data @@ -125,8 +161,16 @@ Retrieves and prints the JSON representation of the pool data specified by ` get_pool_data < | > ``` +Example: + +```bash +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](/participate/network-maintenance/custom-overlays). + ### add_custom_overlay Adds a custom overlay with the given `` using the configuration specified by `` @@ -135,6 +179,12 @@ Adds a custom overlay with the given `` using the configuration specified MyTonCtrl> add_custom_overlay ``` +Example: + +```bash +add_custom_overlay custom /config.json # check link from above to know what config this command requires (https://docs.ton.org/participate/network-maintenance/custom-overlays) +``` + ### list_custom_overlays No args, prints custom overlays @@ -154,7 +204,7 @@ MyTonCtrl> delete_custom_overlay Votes for the offer specified by `` ```bash -MyTonCtrl> vo +MyTonCtrl> vo # use `ol` to get offers ``` ### ve @@ -166,11 +216,19 @@ No args, vote for election Votes for the complaint specified by `` in the election specified by `` ```bash -MyTonCtrl> vc <, > +MyTonCtrl> vc +``` + +Actually, even this will work, but you should use data from your current mytonctrl state: + +```bash +MyTonCtrl> vc 0 0 ``` ## Pool commands +Get more information [at nominator pool page](/participate/network-maintenance/nominator-pool). + ### deposit_to_pool Deposits the specified `` to the pool specified by `` @@ -179,6 +237,12 @@ Deposits the specified `` to the pool specified by `` MyTonCtrl> deposit_to_pool ``` +Example: + +```bash +MyTonCtrl> deposit_to_pool kf_JcC5pn3etTAdwOnc16_tyMmKE8-ftNUnf0OnUjAIdDJpX 1 +``` + ### withdraw_from_pool Withdraws the specified `` from the pool specified by `` @@ -187,6 +251,12 @@ Withdraws the specified `` from the pool specified by `` MyTonCtrl> withdraw_from_pool ``` +Example: + +```bash +MyTonCtrl> withdraw_from_pool kf_JcC5pn3etTAdwOnc16_tyMmKE8-ftNUnf0OnUjAIdDJpX 1 +``` + ### cleanup No args, cleanup validator database @@ -197,6 +267,8 @@ No args, prints table with several tests ## Single pool +Get more information [at single nominator pool page](/participate/network-maintenance/nominator-pool). + ### new_single_pool Creates a new single pool with the specified `` and `` @@ -205,12 +277,18 @@ Creates a new single pool with the specified `` and `` MyTonCtrl> new_single_pool ``` +Example: + +```bash +MyTonCtrl> new_single_pool name kf9tZrL46Xjux3ZqvQFSgQkOIlteJK52slSYWbasqtOjrKUT +``` + ### activate_single_pool Activates the single pool specified by `` ```bash -MyTonCtrl> activate_single_pool +MyTonCtrl> activate_single_pool # pool name from above ``` ## Wallet management @@ -229,6 +307,11 @@ MyTonCtrl> iw Here, `` is your private key in base64 format. +Example: + +```bash +MyTonCtrl> iw kf9tZrL46Xjux3ZqvQFSgQkOIlteJK52slSYWbasqtOjrKUT AAAH++/ve+/vXrvv73vv73vv73vv71DWu+/vWcpA1E777+92Ijvv73vv70iV++/ve+/vUTvv70d77+9UFjvv71277+9bO+/ve+/vXgzdzzvv71i77+977+9CjLvv73vv73vv71i77+9Bu+/vV0oJe+/ve+/vUPvv73vv73vv70= +``` #### Importing Using a Mnemonic Phrase If you have a mnemonic phrase (a sequence of 24 words like `tattoo during ...`), follow these steps: @@ -268,9 +351,15 @@ Also you can create new empty wallet: MyTonCtrl> nw [ ] ``` +Example: + +```bash +MyTonCtrl> nw 0 name v3 # by default subwallet is 0x29A9A317 + workchain +``` + ### Activate a local wallet -If you want to use wallet it have to be activated: +If you want to use wallet, it has to be activated: ```bash MyTonCtrl> aw @@ -315,6 +404,12 @@ This command is needed when a modified wallet with interaction methods similar t MyTonCtrl> swv ``` +Example: + +```bash +MyTonCtrl> swv kf9tZrL46Xjux3ZqvQFSgQkOIlteJK52slSYWbasqtOjrKUT v3 +``` + ### Export a wallet It's possible to get a certain wallet address and secret key. @@ -341,7 +436,7 @@ MyTonCtrl> dw To check account status and its transaction history use the following command: ```bash -MyTonCtrl> vas +MyTonCtrl> vas # for example you can get address of validator wallet by wl command and use vas to get more information ``` ![](/img/docs/mytonctrl/vas.png) @@ -351,7 +446,7 @@ MyTonCtrl> vas To check account transaction history use the following command using the number of listed operations as `limit`: ```bash -MyTonCtrl> vah +MyTonCtrl> vah # limit is just unsigned integer number ``` ![](/img/docs/mytonctrl/vah.png) @@ -407,6 +502,12 @@ You can create already created pool to the list of local pools: MyTonCtrl> import_pool ``` +Example: + +```bash +MyTonCtrl> import_pool name kf_JcC5pn3etTAdwOnc16_tyMmKE8-ftNUnf0OnUjAIdDJpX +``` + ## Bookmarks You can create an alias (bookmark) for an account address to simplify it usage. @@ -540,6 +641,12 @@ Possible arguments: | `state-ttl` | ttl of blockchain states that node keep | 3600 | | `archive-ttl` | ttl of blocks node stores | 2592000 if liteserver mode was enabled during installation process, otherwise 86400 | +Example: + +```bash +MyTonInstaller> set_node_argument --state-ttl 3601 +``` + ### enable Enable one of the modes, for `ton-http-api` creates config @@ -558,10 +665,20 @@ Modes can have following names: - LSP - ls proxy - TSP - TON storage + TON storage provider +Example: + +```bash +MyTonInstaller> enable FN +``` + ### update Same as `enable` of mytoninstaller +```bash +MyTonInstaller> update FN +``` + ### plsc Print liteserver config @@ -596,7 +713,7 @@ Dangerous recovery validator config file ### setwebpass -Set a password for the web admin interface, runs `python3 /usr/src/mtc-jsonrpc/mtc-jsonrpc.py -p`. +No args. Set a password for the web admin interface, runs `python3 /usr/src/mtc-jsonrpc/mtc-jsonrpc.py -p`. ## See Also From e31828d12d0578c1abd7b4e6423300dce3e10aaa Mon Sep 17 00:00:00 2001 From: Full-Hat Date: Thu, 22 Aug 2024 00:41:40 +0300 Subject: [PATCH 2/2] Complete examples --- docs/participate/run-nodes/mytonctrl.mdx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/participate/run-nodes/mytonctrl.mdx b/docs/participate/run-nodes/mytonctrl.mdx index 50cc5243b5..23a3a640ba 100644 --- a/docs/participate/run-nodes/mytonctrl.mdx +++ b/docs/participate/run-nodes/mytonctrl.mdx @@ -459,6 +459,12 @@ Transfer coins from local wallet to an account: MyTonCtrl> mg ``` +Example: + +```bash +MyTonCtrl> mg wallet_004 kQBxnZJq4oHVFs4ban3kJ5qllM1IQo57lIx8QP69Ue9A6Psp 1 +``` + :::caution Wallet version 'v4' is not supported for the transfering ::: @@ -471,6 +477,12 @@ Transfer coins from local wallet to an account through a proxy: MyTonCtrl> mgtp ``` +Example: + +```bash +MyTonCtrl> mgtp wallet_004 kQBxnZJq4oHVFs4ban3kJ5qllM1IQo57lIx8QP69Ue9A6Psp 1 +``` + ## General Pools Commands There are two types of pools in **MyTonCtrl**: