Skip to content

Commit 1d7b5c4

Browse files
pixelplexFull-Hat
andauthored
Examples (#736)
* Update examples & add -t flag explanation * Complete examples --------- Co-authored-by: Full-Hat <nikita3131228@gmail.com>
1 parent 57e7b5d commit 1d7b5c4

File tree

2 files changed

+140
-10
lines changed

2 files changed

+140
-10
lines changed

docs/participate/run-nodes/full-node.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ This will reduce synchronization time by several times.
124124
* `-c <path>` - If you want to use not public liteservers for synchronization. _(not required)_
125125
* `-i` - Ignore minimum requirements, use it only if you want to check compilation process without real node usage.
126126
* `-m` - Mode, can be `validator` or `liteserver`.
127+
* `-t` - Disable telemetry.
127128

128129
**To use testnet**, `-c` flag should be provided with `https://ton.org/testnet-global.config.json` value.
129130

docs/participate/run-nodes/mytonctrl.mdx

Lines changed: 139 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ Enable a specific mode.
7575
MyTonCtrl> enable_mode <mode_name>
7676
```
7777

78+
Example:
79+
80+
```bash
81+
MyTonCtrl> enable_mode validator
82+
```
83+
7884
### disable_mode
7985

8086
Disable a specific mode.
@@ -83,6 +89,12 @@ Disable a specific mode.
8389
MyTonCtrl> disable_mode <mode_name>
8490
```
8591

92+
Example:
93+
94+
```bash
95+
MyTonCtrl> disable_mode validator
96+
```
97+
8698
### about
8799

88100
Provide a description of the specified mode
@@ -91,12 +103,24 @@ Provide a description of the specified mode
91103
MyTonCtrl> about <mode_name>
92104
```
93105

106+
Example:
107+
108+
```bash
109+
MyTonCtrl> about validator
110+
```
111+
94112
### get
95113

96114
Get the value of a specific setting in JSON format
97115

98116
```bash
99-
MyTonCtrl> setting <setting_name>
117+
MyTonCtrl> get <setting_name>
118+
```
119+
120+
Example:
121+
122+
```bash
123+
MyTonCtrl> get stake
100124
```
101125

102126
### set
@@ -107,16 +131,28 @@ Set the specified value of a specified setting. Skip setting existence checking
107131
MyTonCtrl> set <setting> <value> [--force]
108132
```
109133

134+
Example:
135+
136+
```bash
137+
MyTonCtrl> set stake 9000
138+
```
139+
110140
### rollback
111141

112-
No args, rollback to mytonctrl 1.0.
142+
No args, rollback to mytonctrl 1.0. You shouldn't use mytonctrl 1.0 in any case.
113143

114144
### getconfig
115145

116146
Retrieves and prints the JSON representation of the configuration specified by `<config-id>`
117147

118148
```bash
119-
MyTonCtrl> getconfig <config_id>
149+
MyTonCtrl> getconfig <config_id> # config id can be omitted
150+
```
151+
152+
Example:
153+
154+
```bash
155+
MyTonCtrl> getconfig 0
120156
```
121157

122158
### get_pool_data
@@ -127,8 +163,16 @@ Retrieves and prints the JSON representation of the pool data specified by `<poo
127163
MyTonCtrl> get_pool_data <<pool-name> | <pool-addr>>
128164
```
129165
166+
Example:
167+
168+
```bash
169+
get_pool_data pool_name # you can check possible pool names using ls /home/install_mytonctrl/.local/share/mytoncore/pools
170+
```
171+
130172
## Overlays
131173
174+
Read more about [overlays here](/participate/network-maintenance/custom-overlays).
175+
132176
### add_custom_overlay
133177
134178
Adds a custom overlay with the given `<name>` using the configuration specified by `<path_to_config>`
@@ -137,6 +181,12 @@ Adds a custom overlay with the given `<name>` using the configuration specified
137181
MyTonCtrl> add_custom_overlay <name> <path_to_config>
138182
```
139183
184+
Example:
185+
186+
```bash
187+
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)
188+
```
189+
140190
### list_custom_overlays
141191
142192
No args, prints custom overlays
@@ -156,7 +206,7 @@ MyTonCtrl> delete_custom_overlay <name>
156206
Votes for the offer specified by `<offer-hash>`
157207
158208
```bash
159-
MyTonCtrl> vo <offer-hash>
209+
MyTonCtrl> vo <offer-hash> # use `ol` to get offers
160210
```
161211
162212
### ve
@@ -168,11 +218,19 @@ No args, vote for election
168218
Votes for the complaint specified by `<complaint-hash>` in the election specified by `<election-id>`
169219
170220
```bash
171-
MyTonCtrl> vc <<election-id>, <complaint-hash>>
221+
MyTonCtrl> vc <election-id> <complaint-hash>
222+
```
223+
224+
Actually, even this will work, but you should use data from your current mytonctrl state:
225+
226+
```bash
227+
MyTonCtrl> vc 0 0
172228
```
173229
174230
## Pool commands
175231
232+
Get more information [at nominator pool page](/participate/network-maintenance/nominator-pool).
233+
176234
### deposit_to_pool
177235
178236
Deposits the specified `<amount>` to the pool specified by `<pool-addr>`
@@ -181,6 +239,12 @@ Deposits the specified `<amount>` to the pool specified by `<pool-addr>`
181239
MyTonCtrl> deposit_to_pool <pool-addr> <amount>
182240
```
183241
242+
Example:
243+
244+
```bash
245+
MyTonCtrl> deposit_to_pool kf_JcC5pn3etTAdwOnc16_tyMmKE8-ftNUnf0OnUjAIdDJpX 1
246+
```
247+
184248
### withdraw_from_pool
185249
186250
Withdraws the specified `<amount>` from the pool specified by `<pool-addr>`
@@ -189,6 +253,12 @@ Withdraws the specified `<amount>` from the pool specified by `<pool-addr>`
189253
MyTonCtrl> withdraw_from_pool <pool-addr> <amount>
190254
```
191255
256+
Example:
257+
258+
```bash
259+
MyTonCtrl> withdraw_from_pool kf_JcC5pn3etTAdwOnc16_tyMmKE8-ftNUnf0OnUjAIdDJpX 1
260+
```
261+
192262
### cleanup
193263
194264
No args, cleanup validator database
@@ -199,6 +269,8 @@ No args, prints table with several tests
199269
200270
## Single pool
201271
272+
Get more information [at single nominator pool page](/participate/network-maintenance/nominator-pool).
273+
202274
### new_single_pool
203275
204276
Creates a new single pool with the specified `<pool-name>` and `<owner-address>`
@@ -207,12 +279,18 @@ Creates a new single pool with the specified `<pool-name>` and `<owner-address>`
207279
MyTonCtrl> new_single_pool <pool-name> <owner-address>
208280
```
209281
282+
Example:
283+
284+
```bash
285+
MyTonCtrl> new_single_pool name kf9tZrL46Xjux3ZqvQFSgQkOIlteJK52slSYWbasqtOjrKUT
286+
```
287+
210288
### activate_single_pool
211289
212290
Activates the single pool specified by `<pool-name>`
213291
214292
```bash
215-
MyTonCtrl> activate_single_pool <pool-name>
293+
MyTonCtrl> activate_single_pool <pool-name> # pool name from above
216294
```
217295
218296
## Wallet management
@@ -231,6 +309,11 @@ MyTonCtrl> iw <wallet-addr> <wallet-secret-key>
231309
232310
Here, `<wallet-secret-key>` is your private key in base64 format.
233311
312+
Example:
313+
314+
```bash
315+
MyTonCtrl> iw kf9tZrL46Xjux3ZqvQFSgQkOIlteJK52slSYWbasqtOjrKUT AAAH++/ve+/vXrvv73vv73vv73vv71DWu+/vWcpA1E777+92Ijvv73vv70iV++/ve+/vUTvv70d77+9UFjvv71277+9bO+/ve+/vXgzdzzvv71i77+977+9CjLvv73vv73vv71i77+9Bu+/vV0oJe+/ve+/vUPvv73vv73vv70=
316+
```
234317
#### Importing Using a Mnemonic Phrase
235318
236319
If you have a mnemonic phrase (a sequence of 24 words like `tattoo during ...`), follow these steps:
@@ -270,9 +353,15 @@ Also you can create new empty wallet:
270353
MyTonCtrl> nw <workchain-id> <wallet-name> [<version> <subwallet>]
271354
```
272355
356+
Example:
357+
358+
```bash
359+
MyTonCtrl> nw 0 name v3 # by default subwallet is 0x29A9A317 + workchain
360+
```
361+
273362
### Activate a local wallet
274363
275-
If you want to use wallet it have to be activated:
364+
If you want to use wallet, it has to be activated:
276365
277366
```bash
278367
MyTonCtrl> aw <wallet-name>
@@ -317,6 +406,12 @@ This command is needed when a modified wallet with interaction methods similar t
317406
MyTonCtrl> swv <wallet-addr> <wallet-version>
318407
```
319408
409+
Example:
410+
411+
```bash
412+
MyTonCtrl> swv kf9tZrL46Xjux3ZqvQFSgQkOIlteJK52slSYWbasqtOjrKUT v3
413+
```
414+
320415
### Export a wallet
321416
322417
It's possible to get a certain wallet address and secret key.
@@ -343,7 +438,7 @@ MyTonCtrl> dw <wallet-name>
343438
To check account status and its transaction history use the following command:
344439
345440
```bash
346-
MyTonCtrl> vas <account-addr>
441+
MyTonCtrl> vas <account-addr> # for example you can get address of validator wallet by wl command and use vas to get more information
347442
```
348443
349444
![](/img/docs/mytonctrl/vas.png)
@@ -353,7 +448,7 @@ MyTonCtrl> vas <account-addr>
353448
To check account transaction history use the following command using the number of listed operations as `limit`:
354449
355450
```bash
356-
MyTonCtrl> vah <account-addr> <limit>
451+
MyTonCtrl> vah <account-addr> <limit> # limit is just unsigned integer number
357452
```
358453
359454
![](/img/docs/mytonctrl/vah.png)
@@ -366,6 +461,12 @@ Transfer coins from local wallet to an account:
366461
MyTonCtrl> mg <wallet-name> <account-addr | bookmark-name> <amount>
367462
```
368463
464+
Example:
465+
466+
```bash
467+
MyTonCtrl> mg wallet_004 kQBxnZJq4oHVFs4ban3kJ5qllM1IQo57lIx8QP69Ue9A6Psp 1
468+
```
469+
369470
:::caution
370471
Wallet version 'v4' is not supported for the transfering
371472
:::
@@ -378,6 +479,12 @@ Transfer coins from local wallet to an account through a proxy:
378479
MyTonCtrl> mgtp <wallet-name> <account-addr | bookmark-name> <amount>
379480
```
380481
482+
Example:
483+
484+
```bash
485+
MyTonCtrl> mgtp wallet_004 kQBxnZJq4oHVFs4ban3kJ5qllM1IQo57lIx8QP69Ue9A6Psp 1
486+
```
487+
381488
## General Pools Commands
382489
383490
There are two types of pools in **MyTonCtrl**:
@@ -409,6 +516,12 @@ You can create already created pool to the list of local pools:
409516
MyTonCtrl> import_pool <pool-name> <pool-addr>
410517
```
411518
519+
Example:
520+
521+
```bash
522+
MyTonCtrl> import_pool name kf_JcC5pn3etTAdwOnc16_tyMmKE8-ftNUnf0OnUjAIdDJpX
523+
```
524+
412525
## Bookmarks
413526
414527
You can create an alias (bookmark) for an account address to simplify it usage.
@@ -559,6 +672,12 @@ Possible arguments:
559672
| `state-ttl` | ttl of blockchain states that node keep | 3600 |
560673
| `archive-ttl` | ttl of blocks node stores. _To force node not to store archive blocks use the value `86400`_ | 2592000 if liteserver mode was enabled during installation process, otherwise 86400 |
561674
675+
Example:
676+
677+
```bash
678+
MyTonInstaller> set_node_argument --state-ttl 3601
679+
```
680+
562681
### enable
563682
564683
Enable one of the modes, for `ton-http-api` creates config
@@ -577,10 +696,20 @@ Modes can have following names:
577696
- LSP - ls proxy
578697
- TSP - TON storage + TON storage provider
579698
699+
Example:
700+
701+
```bash
702+
MyTonInstaller> enable FN
703+
```
704+
580705
### update
581706
582707
Same as `enable` of mytoninstaller
583708
709+
```bash
710+
MyTonInstaller> update FN
711+
```
712+
584713
### plsc
585714
586715
Print liteserver config
@@ -615,7 +744,7 @@ Dangerous recovery validator config file
615744
616745
### setwebpass
617746
618-
Set a password for the web admin interface, runs `python3 /usr/src/mtc-jsonrpc/mtc-jsonrpc.py -p`.
747+
No args. Set a password for the web admin interface, runs `python3 /usr/src/mtc-jsonrpc/mtc-jsonrpc.py -p`.
619748
620749
## See Also
621750

0 commit comments

Comments
 (0)