Skip to content

Commit 2be1b6a

Browse files
committed
refactor mytonctrl help menu
1 parent f909b9a commit 2be1b6a

File tree

1 file changed

+361
-2
lines changed

1 file changed

+361
-2
lines changed

docs/participate/run-nodes/mytonctrl.mdx

Lines changed: 361 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,216 @@ Actually, there is [MyTonCtrl2](https://github.com/ton-blockchain/mytonctrl/tree
1010

1111
We are actively seeking feedback about the installation process. If you have any questions or suggestions, please [contact us](https://t.me/Alexgton).
1212

13+
## General Commands
1314

14-
## Wallet management
15+
### help
16+
17+
No args, print help text
18+
19+
### clear
20+
21+
No args, clear console
22+
23+
### exit
24+
25+
No args, exit from console.
26+
27+
### update
28+
29+
Update mytonctrl. Param combinations:
30+
31+
| Format name | Format | Example | Description |
32+
|:-----------------------|:---------------------------------------------------------------------------|:----------------------------------------------------------------------------|-------------------------------------------------------------------------|
33+
| No args | `update` | `update` | Update from current repo |
34+
| URL format | `update [https://github.com/author/repo/tree/branch]` | `update https://github.com/ton-blockchain/mytonctrl/tree/mytonctrl2` | Update from specified URL |
35+
| Branch Only format | `update [BRANCH]` | `update mytonctrl2` | Update from specified branch of current repo |
36+
| Branch Override format | `update [https://github.com/authorName/repoName/tree/branchName] [BRANCH]` | `update https://github.com/ton-blockchain/mytonctrl/tree/master mytonctrl2` | Update from branch specified by second argument of specified repository |
37+
38+
### upgrade
39+
40+
Update node. Param combinations:
41+
42+
| Format name | Format | Example | Description |
43+
|:-----------------------|:----------------------------------------------------------------------------|:--------------------------------------------------------------------|--------------------------------------------------------------------------|
44+
| No args | `upgrade` | `upgrade` | Upgrade from current repo |
45+
| URL format | `upgrade [https://github.com/author/repo/tree/branch]` | `upgrade https://github.com/ton-blockchain/ton/tree/master` | Upgrade from specified URL |
46+
| Branch Only format | `upgrade [BRANCH]` | `upgrade master` | Upgrade from specified branch of current repo |
47+
| 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 |
48+
49+
### status
50+
51+
Get current mytonctrl and node status. Param combinations:
52+
53+
| Format name | Format | Example | Description |
54+
|-------------|---------------|---------------|--------------------------------------------------------------------------------------------------|
55+
| No args | `status` | `status` | Full status report including validator efficiency and online validators. |
56+
| Fast | `status fast` | `status fast` | Must be used on TestNet. Status report without validator efficiency and online validators count. |
57+
58+
### installer
59+
60+
No args, run the installer of TON modules (script /usr/src/mytonctrl/mytoninstaller.py)
61+
62+
### status_modes
63+
64+
No args, show MTC modes.
65+
66+
### status_settings
67+
68+
No args, show all available settings with their description and values.
69+
70+
### enable_mode
71+
72+
Enable a specific mode.
73+
74+
```bash
75+
MyTonCtrl> enable_mode <mode_name>
76+
```
77+
78+
### disable_mode
79+
80+
Disable a specific mode.
81+
82+
```bash
83+
MyTonCtrl> disable_mode <mode_name>
84+
```
85+
86+
### about
87+
88+
Provide a description of the specified mode
89+
90+
```bash
91+
MyTonCtrl> about <mode_name>
92+
```
93+
94+
### get
95+
96+
Get the value of a specific setting in JSON format
97+
98+
```bash
99+
MyTonCtrl> setting <setting_name>
100+
```
101+
102+
### set
103+
104+
Set the specified value of a specified setting. Skip setting existence if `--force` enabled
105+
106+
```bash
107+
MyTonCtrl> set <setting> <value> [--force]
108+
```
109+
110+
### rollback
111+
112+
No args, rollback to mytonctrl 1.0.
113+
114+
### getconfig
115+
116+
Retrieves and prints the JSON representation of the configuration specified by `<config-id>`
117+
118+
```bash
119+
MyTonCtrl> get <config_id>
120+
```
121+
122+
### get_pool_data
123+
124+
Retrieves and prints the JSON representation of the pool data specified by `<pool-name>` or `<pool-addr>`.
125+
126+
```bash
127+
MyTonCtrl> get_pool_data <<pool-name> | <pool-addr>>
128+
```
129+
130+
## Overlays
131+
132+
### add_custom_overlay
133+
134+
Adds a custom overlay with the given `<name>` using the configuration specified by `<path_to_config>`
135+
136+
```bash
137+
MyTonCtrl> add_custom_overlay <name> <path_to_config>
138+
```
139+
140+
### list_custom_overlays
141+
142+
No args, prints custom overlays
143+
144+
### delete_custom_overlay
145+
146+
Deletes the custom overlay with the specified `<name>`
147+
148+
```bash
149+
MyTonCtrl> delete_custom_overlay <name>
150+
```
151+
152+
## Validator
153+
154+
### vo
155+
156+
Votes for the offer specified by `<offer-hash>`
157+
158+
```bash
159+
MyTonCtrl> vo <offer-hash>
160+
```
161+
162+
### ve
163+
164+
No args, vote for election
165+
166+
### vc
167+
168+
Votes for the complaint specified by `<complaint-hash>` in the election specified by `<election-id>`
169+
170+
```bash
171+
MyTonCtrl> vc <<election-id>, <complaint-hash>>
172+
```
173+
174+
## Pool commands
175+
176+
### deposit_to_pool
177+
178+
Deposits the specified `<amount>` to the pool specified by `<pool-addr>`
179+
180+
```bash
181+
MyTonCtrl> deposit_to_pool <pool-addr> <amount>
182+
```
183+
184+
### withdraw_from_pool
185+
186+
Withdraws the specified `<amount>` from the pool specified by `<pool-addr>`
187+
188+
```bash
189+
MyTonCtrl> withdraw_from_pool <pool-addr> <amount>
190+
```
191+
192+
### cleanup
193+
194+
No args, cleanup validator database
195+
196+
### benchmark
197+
198+
No args, prints table with several tests
199+
200+
### activate_ton_storage_provider
201+
202+
No args, activates "provider_wallet_001" wallet and sends some amount of tons
203+
204+
## Single pool
205+
206+
### new_single_pool
207+
208+
Creates a new single pool with the specified `<pool-name>` and `<owner-address>`
209+
210+
```bash
211+
MyTonCtrl> new_single_pool <pool-name> <owner-address>
212+
```
213+
214+
### activate_single_pool
215+
216+
Activates the single pool specified by `<pool-name>`
217+
218+
```bash
219+
MyTonCtrl> activate_single_pool <pool-name>
220+
```
221+
222+
## Wallet management
15223
16224
### Importing a wallet
17225
@@ -47,7 +255,7 @@ If you have a mnemonic phrase (a sequence of 24 words like `tattoo during ...`),
47255
6. Open the mytonctrl console and list the wallets using the `wl` command.
48256
7. Verify that the wallet has been imported and displays the correct balance.
49257
8. You can now send funds using the `mg` command. Enter `mg` to view the help documentation.
50-
Remember to replace placeholders (words inside `< >`) with your actual values when running commands.
258+
Remember to replace placeholders (words inside `< >`) with your actual values when running commands.
51259
52260
### Show the list of wallets
53261
@@ -233,6 +441,157 @@ MyTonCtrl> db <bookmark-name> <bookmark-type>
233441
234442
![](/img/docs/mytonctrl/db.png)
235443
444+
## Other mytonctrl commands
445+
446+
### ol
447+
448+
Show offers list
449+
450+
| Format name | Format | Example | Description |
451+
|--------------------|---------------------------------------------|--------------------------------------------|----------------------------------------------------------------------------------------------------|
452+
| No arguments | `[]` | `PrintOffersList(ton, [])` | Prints the table with the hashes reduced. |
453+
| JSON output | `["--json"]` | `PrintOffersList(ton, ["--json"])` | Prints the JSON representation of `data`. |
454+
| Full hash output | `["hash"]` | `PrintOffersList(ton, ["hash"])` | Prints the table with full hashes. |
455+
| JSON with full hash| `["--json", "hash"]` | `PrintOffersList(ton, ["--json", "hash"])` | Prints the JSON representation of `data`. The `"hash"` argument has no effect in this case. |
456+
457+
### od
458+
459+
Retrieves the offer diff
460+
461+
```bash
462+
MyTonCtrl> od [offer-hash]
463+
```
464+
465+
### el
466+
467+
Show election entries list
468+
469+
| Format name | Format | Description |
470+
|-----------------------------------|--------------------------------------------------|--------------------------------------------------------------------------------|
471+
| No arguments | `[]` | Prints the table with ADNL, Pubkey, and Wallet reduced. |
472+
| Any combination of following args | `["--json", "adnl", "pubkey", "wallet", "past"]` | Full ADNL, Pubkey, Wallet, and past election entries in JSON representation. |
473+
474+
Descriptions for each arg:
475+
- --json: Prints the JSON representation of data.
476+
- past: Includes past election entries.
477+
- adnl: Prints full ADNL.
478+
- pubkey: Prints full Pubkey.
479+
- wallet: Prints full Wallet.
480+
481+
### vl
482+
483+
Show active validators
484+
485+
| Format name | Format | Description |
486+
|------------------------------------|--------------------------------------------------|--------------------------------------------------------------------------------|
487+
| No arguments | `[]` | Prints the table with ADNL, Pubkey, and Wallet reduced. |
488+
| Any combination of following args | `["--json", "adnl", "pubkey", "wallet", "past"]` | Full ADNL, Pubkey, Wallet, and past validator entries in JSON representation. |
489+
490+
Descriptions for each arg:
491+
- --json: Prints the JSON representation of data.
492+
- past: Includes past validator entries.
493+
- adnl: Prints full ADNL.
494+
- pubkey: Prints full Pubkey.
495+
- wallet: Prints full Wallet.
496+
- offline: Excludes online validators.
497+
498+
### cl
499+
500+
Show complaints list
501+
502+
| Format name | Format | Description |
503+
|-----------------------------------|--------------------------------------------|------------------------------------------------------------------------------------------------------------------|
504+
| No arguments | `[]` | Prints the table with ADNL reduced. |
505+
| Any combination of following args | `["--json", "adnl", "past"]` | Full ADNL with past complaints in JSON representation. |
506+
507+
Descriptions for each parameter:
508+
- --json: Prints the JSON representation of data.
509+
- past: Includes past complaints.
510+
- adnl: Prints full ADNL.
511+
512+
## Installer
513+
514+
### help
515+
516+
prints all available commands
517+
518+
### clear
519+
520+
clear terminal
521+
522+
### exit
523+
524+
exit from mytoninstaller terminal
525+
526+
### status
527+
528+
prints Services status (of Full node, Mytoncore, V.console, Liteserver) and node arguments
529+
530+
### set_node_argument
531+
532+
| Format name | Format | Description |
533+
|--------------------|---------------------------------------------|----------------------------------------------------------------------------------------------------|
534+
| Add or replace arg | `set_node_argument [-ARG_NAME] [ARG_VALUE]` | Add argument or replace it value if it exists. `-ARG_NAME` must have `-` or `--` at the beginning |
535+
| Delete arg | `set_node_argument [-ARG_NAME] -d` | Delete argument from list. |
536+
537+
### enable
538+
539+
Enable one of the modes, for `ton-http-api` creates config
540+
541+
```bash
542+
MyTonInstaller> enable <MODE_NAME>
543+
```
544+
545+
Modes can have following names:
546+
- FN - Full Node
547+
- VC - Validator Console
548+
- LS - Lite Server
549+
- DS - DHT Server
550+
- JR - Jsonrpc
551+
- THA - TON HTTP API
552+
- LSP - ls proxy
553+
- TSP - TON storage + TON storage provider
554+
555+
### update
556+
557+
Same as `enable` of mytoninstaller
558+
559+
### plsc
560+
561+
Print liteserver config
562+
563+
Example:
564+
```json
565+
{
566+
"ip": 1111111111,
567+
"port": 11111,
568+
"id": {
569+
"@type": "pub.ed25519",
570+
"key": "UURGaaZZjsBbKHvnrBqslHerXYbMCVDKdswKNJvAHkc="
571+
}
572+
}
573+
```
574+
575+
### clcf
576+
577+
Create local config file
578+
579+
### print_ls_proxy_config
580+
581+
Print ls proxy config
582+
583+
### create_ls_proxy_config_file
584+
585+
Do nothing for now, on development stage
586+
587+
### drvcf
588+
589+
Dangerous recovery validator config file
590+
591+
### setwebpass
592+
593+
Set a password for the web admin interface, runs `python3 /usr/src/mtc-jsonrpc/mtc-jsonrpc.py -p`.
594+
236595
## See Also
237596
238597
* [FAQ](/participate/run-nodes/faq)

0 commit comments

Comments
 (0)