Skip to content

Commit 135b2f4

Browse files
authored
Merge branch 'main' into tonkeeperwallet
2 parents d7d2a6c + 7a9c187 commit 135b2f4

38 files changed

+1354
-467
lines changed

contribute/style-guide-extended.mdx

Lines changed: 132 additions & 29 deletions
Large diffs are not rendered by default.

docs.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@
254254
"ecosystem/node/setup-mytonctrl",
255255
"ecosystem/node/setup-mylocalton",
256256
{
257-
"group": "MyTonCtrl CLI",
257+
"group": "MyTonCtrl Reference",
258258
"pages": [
259259
"ecosystem/node/mytonctrl/overview",
260260
"ecosystem/node/mytonctrl/core",
@@ -310,7 +310,9 @@
310310
"standard/tokens/jettons/how-to-burning",
311311
"standard/tokens/jettons/how-to-find",
312312
"standard/tokens/jettons/how-to-transfer",
313+
"standard/tokens/jettons/how-to-get-wallet-data",
313314
"standard/tokens/jettons/how-to-get-supply-data",
315+
"standard/tokens/jettons/how-to-get-wallet-data",
314316
"standard/tokens/jettons/API",
315317
"standard/tokens/jettons/mintless/overview",
316318
"standard/tokens/jettons/mintless/how-to-deploy"
@@ -321,6 +323,7 @@
321323
"pages": [
322324
"standard/tokens/nft/overview",
323325
"standard/tokens/nft/how-works",
326+
"standard/tokens/nft/comparison",
324327
"standard/tokens/nft/cNFT-how-it-works"
325328
]
326329
},

ecosystem/node/mytonctrl/alerting.mdx

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,105 @@
1-
## MyTonCtrl alerting commands
2-
3-
The alert-bot module integrates with Telegram to notify operators about node issues. The commands below help you configure, inspect, and test alerts.
1+
---
2+
title: "Alerts"
3+
description: "The alert-bot module integrates with Telegram to notify operators about node issues. The commands below help you configure, inspect, and test alerts."
4+
---
45

56
## Operational notes
7+
68
- Alerts cover wallet balance thresholds, database usage, validator efficiency/blocks, synchronization, ADNL health, stake acceptance, slashes, and other key metrics. Review the alert keys in `modules/alert_bot.py` to understand the available triggers.
79
- Each alert has an associated cooldown (`timeout`) to prevent spam. Info-level ok alerts reset state without sound notifications.
810
- The bot requires network access to the Telegram API. Ensure outbound HTTPS is permitted from the server.
911
- When validator mode is enabled, the alert bot automatically includes wallet and ADNL context in messages. In collator-only or other modes, some alerts may be skipped because prerequisites are missing.
1012

11-
## setup_alert_bot
13+
## setup\_alert\_bot
14+
1215
**Purpose:** Configure the alert bot with the Telegram bot token and chat ID, then start sending events.
1316

1417
**Syntax**
18+
1519
```mytonctrl
1620
setup_alert_bot
1721
```
1822

1923
**Behavior**
24+
2025
- Launches the alert-bot configuration flow (interactive prompts) to store `BotToken` and `ChatId` in the local database.
2126
- Validates the token by sending test requests; fails fast if the bot or chat ID is incorrect.
2227
- Should be run after enabling `alert-bot` mode so the background scheduler picks up the alerts.
2328

29+
## list\_alerts
2430

25-
## list_alerts
2631
**Purpose:** Show all predefined alerts and whether they are currently enabled.
2732

2833
**Syntax**
34+
2935
```mytonctrl
3036
list_alerts
3137
```
3238

3339
**Behavior**
40+
3441
- Lists every alert key (for example: `low_wallet_balance`, `db_usage_80`, `out_of_sync`) along with the enabled flag and the UNIX timestamp when it was last sent.
3542
- Helps you audit which alerts are muted and whether recent warnings have fired.
3643

44+
## enable\_alert
3745

38-
## enable_alert
3946
**Purpose:** Re-enable a previously muted alert.
4047

4148
**Syntax**
49+
4250
```mytonctrl
4351
enable_alert <alert_name>
4452
```
4553

4654
**Behavior**
55+
4756
- Accepts any alert key defined in the alert module (for example: `low_efficiency`, `service_down`, `validator_slashed`).
4857
- Sets the alert’s `enabled` flag to `true` so future events can trigger notifications.
4958

5059
**Example**
60+
5161
```mytonctrl
5262
enable_alert low_wallet_balance
5363
```
5464

55-
## disable_alert
65+
## disable\_alert
66+
5667
**Purpose:** Temporarily suppress a specific alert.
5768

5869
**Syntax**
70+
5971
```mytonctrl
6072
disable_alert <alert_name>
6173
```
6274

6375
**Behavior**
76+
6477
- Marks the alert as disabled; the scheduler skips sending messages for it until re-enabled.
6578
- Use when you expect noisy conditions (e.g., during planned maintenance) but still want other alerts to deliver.
6679

6780
**Example**
81+
6882
```mytonctrl
6983
disable_alert service_down
7084
```
7185

72-
## test_alert
86+
## test\_alert
87+
7388
**Purpose:** Send a simple message through the configured alert channel to verify connectivity.
7489

7590
**Syntax**
91+
7692
```mytonctrl
7793
test_alert
7894
```
7995

8096
**Behavior**
97+
8198
- Requires successful initialization (bot token and chat ID saved). If initialization hasn’t run yet, the command triggers it.
8299
- Sends `Test alert` with `info` severity so you can confirm the chat receives notifications.
83100

84-
85101
### Available alert names
102+
86103
- `low_wallet_balance`: Validator wallet balance below 10 TON while the node is working and in sync.
87104
- `low_wallet_balance_ok`: Balance recovered to ≥10 TON after a low-balance alert.
88105
- `db_usage_80`: TON database usage exceeded 80% (but ≤95%).
@@ -95,7 +112,7 @@ test_alert
95112
- `service_down_ok`: Validator service resumed normal operation after downtime.
96113
- `adnl_connection_failed`: Remote ADNL connectivity checks failed for all probe hosts.
97114
- `adnl_connection_ok`: ADNL check succeeded again after a failure.
98-
- `zero_block_created`: No blocks produced in roughly the last half validation period (~8h on mainnet).
115+
- `zero_block_created`: No blocks produced in roughly the last half validation period (\~8h on mainnet).
99116
- `zero_block_created_ok`: Block production resumed after a zero-block alert.
100117
- `validator_slashed`: Validator was slashed in the previous validation round.
101118
- `stake_not_accepted`: Election stake submission was rejected (validator missing from current validator list).

ecosystem/node/mytonctrl/backups.mdx

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,34 @@
1-
## MyTonCtrl backup commands
1+
---
2+
title: "Backup"
3+
description: "MyTonCtrl bundles helper scripts for creating and restoring node backups."
4+
---
25

3-
MyTonCtrl bundles helper scripts for creating and restoring node backups. These commands wrap the shell scripts located in `mytonctrl/scripts/` and handle temporary files, keyring exports, and user selection.
6+
import { Aside } from "/snippets/aside.jsx";
47

5-
<Warning>Exporting and restoring backups exposes private keys and validator configuration.
8+
<Aside type="caution">Exporting and restoring backups exposes private keys and validator configuration.
69
Risk: key leakage allows account takeover; config mistakes can halt validation.
710
Scope: this node’s keys and validator state.
811
Rollback: create a fresh backup first; you can restore it if needed.
9-
Environment: test on TON Testnet before using on TON Mainnet.</Warning>
12+
Environment: test on TON Testnet before using on TON Mainnet.</Aside>
1013

1114
## Operational notes
15+
1216
- Backups capture MyTonCtrl data, validator config, and keyring files. Always store backup archives securely (they contain private keys).
1317
- Restoration overwrites existing configuration. Ensure the donor node is offline before restoring its backup to avoid data divergence.
1418
- Both scripts expect `sudo` or equivalent privileges when manipulating system files. Use the `-u` flag to match the original install user if necessary.
1519

16-
## create_backup
20+
## create\_backup
21+
1722
**Purpose:** Generate a compressed archive containing MyTonCtrl configuration, keyring, and validator data.
1823

1924
**Syntax**
25+
2026
```mytonctrl
2127
create_backup [filename] [-u <user>]
2228
```
2329

2430
**Behavior**
31+
2532
- Exports the validator keyring via `exportallprivatekeys`, captures the current `config.json`, and stages them in a temporary directory.
2633
- Invokes `scripts/create_backup.sh` with:
2734
- `-m` pointing to the MyTonCtrl working directory (usually `/var/ton-work`).
@@ -31,20 +38,24 @@ create_backup [filename] [-u <user>]
3138
- Removes the temporary directory afterwards and prints `create_backup - OK` or `... - Error` based on the script’s exit code.
3239

3340
**Examples**
41+
3442
```mytonctrl
3543
create_backup
3644
create_backup mynode-backup-2024-05-01.tar -u validator
3745
```
3846

39-
## restore_backup
47+
## restore\_backup
48+
4049
**Purpose:** Restore a previously created backup archive into the current node environment.
4150

4251
**Syntax**
52+
4353
```mytonctrl
4454
restore_backup <filename> [-y] [--skip-create-backup] [-u <user>]
4555
```
4656

4757
**Behavior**
58+
4859
- Requires the backup archive filename. Optional flags:
4960
- `-y` skips the interactive confirmation prompt.
5061
- `--skip-create-backup` prevents MyTonCtrl from making a safety backup of the current state before restoring.
@@ -55,6 +66,7 @@ restore_backup <filename> [-y] [--skip-create-backup] [-u <user>]
5566
- Exits MyTonCtrl after a successful restore so you can restart with the new configuration.
5667

5768
**Examples**
69+
5870
```mytonctrl
5971
restore_backup mynode-backup-2024-05-01.tar
6072
restore_backup mynode-backup-2024-05-01.tar -y --skip-create-backup -u validator
Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,67 @@
1-
## MyTonCtrl BTC Teleport commands
2-
3-
The BTC Teleport module manages the optional Bitcoin bridge (Teleport) client shipped with MyTonCtrl. Use these commands to inspect proposals, vote on them, or remove the Teleport installation when no longer needed.
1+
---
2+
title: "BTC Teleport"
3+
description: "The BTC Teleport module manages the optional Bitcoin bridge (Teleport) client shipped with MyTonCtrl. Use these commands to inspect proposals, vote on them, or remove the Teleport installation when no longer needed."
4+
---
45

56
## Operational notes
7+
68
- Teleport installation happens automatically when validator mode is enabled unless `btcTeleportDisabled` is set. Use these commands to check governance participation or clean up.
79
- Voting attaches 1.5 TON from the validator wallet. Ensure the wallet has sufficient balance before sending votes.
810
- The module caches proposals it has voted on (`saveOffersBtcTeleport`) to avoid duplicate submissions.
911

10-
## print_offers_btc_teleport_list
12+
## print\_offers\_btc\_teleport\_list
13+
1114
**Purpose:** Show the current Teleport governance proposals and voting status.
1215

1316
**Syntax**
17+
1418
```mytonctrl
1519
print_offers_btc_teleport_list [--json] [hash]
1620
```
1721

1822
**Behavior**
23+
1924
- Queries the Teleport configurator contract and lists each proposal hash, the number of validators who have voted, approval percentage, and whether the proposal has passed.
2025
- By default, hashes are trimmed (use the `hash` literal to see full values). Add `--json` to print the raw proposal dictionary.
2126

2227
**Examples**
28+
2329
```mytonctrl
2430
print_offers_btc_teleport_list
2531
print_offers_btc_teleport_list --json
2632
print_offers_btc_teleport_list hash
2733
```
2834

29-
## vote_offer_btc_teleport
35+
## vote\_offer\_btc\_teleport
36+
3037
**Purpose:** Vote on one or more Teleport proposals using the validator wallet.
3138

3239
**Syntax**
40+
3341
```mytonctrl
3442
vote_offer_btc_teleport <offer-hash> [additional_offer_hashes...]
3543
```
3644

3745
**Behavior**
38-
- Requires the node to be an active masterchain validator (validator index < `mainValidators`). Non-masterchain validators are skipped.
46+
47+
- Requires the node to be an active masterchain validator (validator index \< `mainValidators`). Non-masterchain validators are skipped.
3948
- For each offer hash:
4049
- Verifies that the proposal still exists and hasn’t already been voted on by this validator.
4150
- Saves the offer locally, builds the vote request, signs it with the validator key, wraps it in a wallet transaction (1.5 TON attach), and submits it to the Teleport configurator.
4251
- Outputs warnings for missing or already-voted offers and continues processing the rest.
4352

4453
**Example**
54+
4555
```mytonctrl
4656
vote_offer_btc_teleport 0xabc123... 0xdef456...
4757
```
4858

49-
## remove_btc_teleport
59+
## remove\_btc\_teleport
60+
5061
**Purpose:** Uninstall the Teleport binaries, keystore, and system service.
5162

5263
**Syntax**
64+
5365
```mytonctrl
5466
remove_btc_teleport [--force]
5567
```
@@ -61,11 +73,13 @@ Rollback/Mitigation: reinstall Teleport or restore from a backup of `/usr/src/to
6173
Environment: applies on both TON Testnet and TON Mainnet nodes.</Caution>
6274

6375
**Behavior**
76+
6477
- Runs `scripts/remove_btc_teleport.sh` to delete the Teleport repository (`/usr/src/ton-teleport-btc-periphery`), keystore, and systemd service.
6578
- By default, refuses to run if the validator is currently a masterchain participant. Use `--force` only when the node is not producing masterchain blocks or after exiting the validator set.
6679
- Prints an error if the removal script fails.
6780

6881
**Example**
82+
6983
```mytonctrl
7084
remove_btc_teleport --force
7185
```

0 commit comments

Comments
 (0)