Skip to content

Commit 87823a0

Browse files
authored
Merge pull request #489 from ton-blockchain/dev
Dev
2 parents 3816eb2 + 8dc797a commit 87823a0

27 files changed

+291
-321
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,4 @@ test.py
122122
venv/
123123
venv38/
124124
sandbox/
125+
/dev/

README.md

Lines changed: 73 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -1,120 +1,88 @@
11
![GitHub stars](https://img.shields.io/github/stars/ton-blockchain/mytonctrl?style=flat-square&logo=github) ![GitHub forks](https://img.shields.io/github/forks/ton-blockchain/mytonctrl?style=flat-square&logo=github) ![GitHub issues](https://img.shields.io/github/issues/ton-blockchain/mytonctrl?style=flat-square&logo=github) ![GitHub pull requests](https://img.shields.io/github/issues-pr/ton-blockchain/mytonctrl?style=flat-square&logo=github) ![GitHub last commit](https://img.shields.io/github/last-commit/ton-blockchain/mytonctrl?style=flat-square&logo=github) ![GitHub license](https://img.shields.io/github/license/ton-blockchain/mytonctrl?style=flat-square&logo=github)
22

3-
<!-- omit from toc -->
43
# MyTonCtrl
54

6-
<!-- omit from toc -->
7-
## Contents
8-
9-
- [What is MyTonCtrl?](#what-is-myttonctrl)
10-
- [MyTonCtrl Documentation](#mytonctrl-documentation)
11-
- [Functionality](#functionality)
12-
- [List of tested operating systems](#list-of-tested-operating-systems)
13-
- [Installation](#installation)
14-
- [Installation scripts overview](#installation-scripts-overview)
15-
- [Installation modes](#installation-modes)
16-
- [Installation for Ubuntu](#installation-for-ubuntu)
17-
- [Installation for Debian](#installation-for-debian)
18-
- [Telemetry](#telemetry)
19-
- [MyTonCtrl installer mode](#mytonctrl-installer-mode)
20-
- [Web admin panel](#web-admin-panel)
21-
- [Local copy of toncenter](#local-copy-of-toncenter)
22-
- [Useful links](#useful-links)
23-
24-
25-
# What is MyTonCtrl?
26-
MyTonCtrl is a console application that serves as a convenient wrapper for `fift`, `lite-client`, and `validator-engine-console`. It has been specifically developed for node (validator) management tasks on the Linux operating system.
27-
28-
![MyTonCtrl Status](screens/mytonctrl-status.png)
29-
30-
# MyTonCtrl Documentation
31-
32-
Mytonctrl's documentation can be found at https://docs.ton.org/participate/run-nodes/mytonctrl.
33-
34-
# Functionality
35-
- [x] Show TON network status
36-
- [x] Management of local wallets
37-
- [x] Create local wallet
38-
- [x] Activate local wallet
39-
- [x] Show local wallets
40-
- [x] Import wallet from file (.pk)
41-
- [x] Save wallet address to file (.addr)
42-
- [x] Delete local wallet
43-
- [x] Show account status
44-
- [x] Show account balance
45-
- [x] Show account history
46-
- [x] Show account status from bookmarks
47-
- [x] Transferring funds to the wallet
48-
- [x] Transfer of a fixed amount
49-
- [x] Transfer of the entire amount (all)
50-
- [x] Transfer of the entire amount with wallet deactivation (alld)
51-
- [x] Transferring funds to the wallet from bookmarks
52-
- [x] Transferring funds to a wallet through a chain of self-deleting wallets
53-
- [x] Manage bookmarks
54-
- [x] Add account to bookmarks
55-
- [x] Show bookmarks
56-
- [x] Delete bookmark
57-
- [x] Offer management
58-
- [x] Show offers
59-
- [x] Vote for the proposal
60-
- [x] Automatic voting for previously voted proposals
61-
- [x] Controlling the validator
62-
- [x] Participate in the election of a validator
63-
- [x] Return bet + reward
64-
- [x] Autostart validator on abnormal termination (systemd)
65-
- [x] Send validator statistics to https://toncenter.com
66-
67-
## List of tested operating systems
68-
| Operating System | Status |
69-
|-------------------------------|----------------------------|
70-
| Ubuntu 16.04 LTS (Xenial Xerus) | Error: TON compilation error |
71-
| Ubuntu 18.04 LTS (Bionic Beaver) | OK |
72-
| Ubuntu 20.04 LTS (Focal Fossa) | OK |
73-
| Ubuntu 22.04 LTS (Jammy Jellyfish) | OK |
74-
| Ubuntu 24.04 LTS (Noble Numbat) | OK |
75-
| Debian 8 | Error: Unable to locate package libgsl-dev |
76-
| Debian 9 | Error: TON compilation error |
77-
| Debian 10 | OK |
78-
79-
# Installation
80-
Please note that during the installation and upgrade procedure, `mytonctrl` will need to escalate privileges using the sudo or su methods in order to upgrade / install system wide components. Depending on your environment, you may be prompted to enter the password for the root or sudo user.
81-
## Installation scripts overview
82-
- `toninstaller.sh`: clones `TON` and` mytonctrl` sources to `/usr/src/ton` and`/usr/src/mytonctrl` folders, compiles programs from sources and writes them to `/usr/bin/`.
83-
- `mytoninstaller.py`: configures the validator and `mytonctrl`; generates validator connection keys.
84-
85-
## Installation modes
86-
There are two installation modes: `liteserver` and `validator`. They both **compile** and install `TON` components and run the node/validator. Use `liteserver` mode if you want to use your node as Liteserver only.
87-
Use `validator` mode if you want to participate in the validator elections (you still can use that node as Liteserver).
88-
89-
Learn more about node types: https://docs.ton.org/participate/nodes/node-types
90-
91-
## Installation for Ubuntu
92-
1. Download and execute the `install.sh` script in the desired installation mode. During installation the script prompts you for the superuser password several times.
93-
```sh
94-
wget https://raw.githubusercontent.com/ton-blockchain/mytonctrl/master/scripts/install.sh
95-
sudo bash install.sh -m <mode>
96-
```
5+
MyTonCtrl is a console application that is used for launching and managing TON blockchain nodes.
6+
7+
The extended documentation can be found at https://docs.ton.org/v3/documentation/nodes/mytonctrl/overview and https://docs.ton.org/v3/guidelines/nodes/overview.
8+
9+
## Operating Systems
10+
11+
It is recommended to use Ubuntu 22.04 LTS or Ubuntu 24.04 LTS for using MyTonCtrl. However, the full list of tested OS is below:
12+
13+
| Operating System | Status |
14+
|------------------|---------------|
15+
| Ubuntu 20.04 LTS | OK |
16+
| Ubuntu 22.04 LTS | OK |
17+
| Ubuntu 24.04 LTS | OK |
18+
| Debian 10 | Deprecated |
19+
| Debian 11 | OK |
20+
| Debian 12 | OK |
21+
| Debian 13 | Not supported |
22+
23+
## Installation
24+
Please note that during the installation and upgrade procedures, MyTonCtrl will need to escalate privileges using the `sudo` or `su` methods in order to upgrade / install system wide components. Depending on your environment, you may be prompted to enter the password for the root or sudo user.
9725

98-
2. Done. You can try to run the `mytonctrl` console now.
99-
```sh
100-
mytonctrl
101-
```
10226

27+
### Modes
28+
There are three main installation modes: `liteserver`, `validator` and `collator`. They all compile and install `TON` components and run node. Use `liteserver` mode if you want to use your node as Liteserver only.
29+
Use `validator` mode if you want to participate in the validator elections (you still can use that node as Liteserver). Use `collator` if you want your node to collate blocks for validators.
10330

104-
## Installation for Debian
105-
1. Download and execute the `install.sh` script in the desired installation mode. During installation the script prompts you for the superuser password several times.
106-
```sh
31+
Learn more about node types: https://docs.ton.org/v3/documentation/nodes/overview
32+
33+
### Install
34+
35+
1. Download installation script:
36+
```shell
10737
wget https://raw.githubusercontent.com/ton-blockchain/mytonctrl/master/scripts/install.sh
108-
su root -c 'bash install.sh -m <mode>'
10938
```
11039

111-
2. Done. You can try to run the `mytonctrl` console now.
112-
```sh
113-
mytonctrl
40+
2. Run script with desired options:
41+
```shell
42+
sudo bash install.sh -m <mode>
11443
```
44+
Or for Debian:
45+
```shell
46+
su root -c 'bash install.sh -m <mode>'
47+
```
48+
49+
To view all available installation options use `sudo bash install.sh --help`
50+
51+
### Installation configuration
52+
53+
You can also configure some installation parameters using environment variables. For example:
54+
* `VALIDATOR_CONSOLE_PORT` - port for validator console (default: random port in range 2000-65000)
55+
* `LITESERVER_PORT` - port for liteserver (default: random port in range 2000-65000)
56+
* `VALIDATOR_PORT` - port for validator (default: random port in range 2000-65000)
11557

116-
# Telemetry
117-
By default, `mytonctrl` sends validator statistics to the https://toncenter.com server.
58+
You can provide `env` file with allowed variables to installation script:
59+
```shell
60+
sudo bash install.sh -m <mode> --env-file /path/to/env/
61+
```
62+
63+
### Interactive CLI installer
64+
65+
To install MyTonCtrl using convenient interactive CLI installer, run the installation script without providing mode to it:
66+
67+
```shell
68+
sudo bash install.sh [args]
69+
```
70+
You will be prompted to choose the installation mode and other options.
71+
72+
To run the interactive installer in `dry-run` mode, which will show you all the options you have selected and command
73+
that will be executed during installation without actually installing MyTonCtrl, use flag `--print-env`:
74+
75+
```shell
76+
sudo bash install.sh --print-env
77+
```
78+
79+
After installation, you can run MyTonCtrl console using the command:
80+
```shell
81+
mytonctrl
82+
```
83+
84+
## Telemetry
85+
By default, MyTonCtrl sends validator statistics to the https://toncenter.com server.
11886
It is necessary to identify network abnormalities, as well as to quickly give feedback to developers.
11987
To disable telemetry during installation, use the `-t` flag:
12088
```sh
@@ -125,25 +93,3 @@ To disable telemetry after installation, do the following:
12593
```sh
12694
MyTonCtrl> set sendTelemetry false
12795
```
128-
129-
# MyTonCtrl installer mode
130-
131-
## Web admin panel
132-
To control the node/validator through the browser, you need to install an additional module:
133-
`mytonctrl` -> `installer` -> `enable JR`
134-
135-
Next, you need to create a password for connection:
136-
`mytonctrl` -> `installer` -> `setwebpass`
137-
138-
Ready. Now you can go to https://tonadmin.org site and log in with your credentials.
139-
git: https://github.com/igroman787/mtc-jsonrpc
140-
141-
## Local copy of toncenter
142-
To set up a local https://toncenter.com copy on your server, install an additional module:
143-
`mytonctrl` ->`installer` -> `enable PT`
144-
145-
Ready. A local copy of toncenter is available at `http://<server-ip-address>:8000`
146-
git: https://github.com/igroman787/pytonv3
147-
148-
# Useful links
149-
* https://docs.ton.org/

functions/session_stats.py

Lines changed: 0 additions & 136 deletions
This file was deleted.

0 commit comments

Comments
 (0)