Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
55c9441
add controller
igroman787 May 29, 2023
3b01f11
Update mytoncore.py
igroman787 Jun 14, 2023
998f509
add controller checks
igroman787 Jun 20, 2023
fd1bfd2
Update controllers.md
igroman787 Jun 21, 2023
f2b4203
Update controllers.md
igroman787 Jun 21, 2023
e2f0972
controllers_translate_added
reveloper Jun 21, 2023
f70d86a
Merge pull request #132 from reveloper/controller
igroman787 Jun 21, 2023
c292552
add `calculate_annual_controller_percentage`
igroman787 Jul 1, 2023
6591e36
bugfix
igroman787 Jul 1, 2023
a095227
bugfix
igroman787 Jul 1, 2023
fde7460
bugfix
igroman787 Jul 2, 2023
121ff31
add `ton-http-api` service
igroman787 Jul 5, 2023
518da35
update `controllers.md`
igroman787 Jul 5, 2023
8abb5fb
bugfix
igroman787 Jul 9, 2023
906cdf7
withdraw_from_controller bugfix
igroman787 Jul 9, 2023
a8abde0
add error display when requested to ton-http-api
igroman787 Jul 9, 2023
aa91b52
ton_http_api installet bugfix
igroman787 Jul 10, 2023
446a6a6
add SignElectionRequestWithController log
igroman787 Jul 12, 2023
318b637
update controller balance and stake difference
igroman787 Jul 12, 2023
c484dca
add `add_controller` and `stop_controller` commands
igroman787 Jul 15, 2023
a8cd483
add `check_liquid_pool` command
igroman787 Jul 15, 2023
987b09e
Add seamless transition to new controllers
igroman787 Jul 18, 2023
da61de8
Update mytoncore.py
igroman787 Jul 18, 2023
3dfd068
controllerData bugfix
igroman787 Jul 18, 2023
e421d48
add error text for controller
igroman787 Jul 19, 2023
47055a1
bugfix
igroman787 Jul 19, 2023
2c5217b
rename controllers vars
igroman787 Jul 19, 2023
42976f5
fix a defaulted loan
igroman787 Jul 27, 2023
ac484ec
bugfix
igroman787 Aug 2, 2023
b3be300
WithdrawFromControllerProcess bugfix
igroman787 Aug 21, 2023
a82ffd8
update `mypylib`
igroman787 Sep 14, 2023
25df7de
Create session_stats.py
igroman787 Sep 14, 2023
f2ece10
Update mytoncore.py
igroman787 Sep 14, 2023
351c15d
Update mytonctrl.py
igroman787 Sep 14, 2023
e995600
Update mytonctrl.py
igroman787 Sep 14, 2023
735e78b
Add follow redirects flag to curl
sonofmom Jan 5, 2024
b9d5937
Merge pull request #156 from sonofmom/master
igroman787 Jan 6, 2024
5866bb1
debug CalculateLoanAmount
igroman787 Jan 25, 2024
56a1039
debug CalculateLoanAmount
igroman787 Jan 25, 2024
8037490
bugfix
igroman787 Jan 25, 2024
9c574c3
bugfix
igroman787 Jan 25, 2024
41d522d
bugfix
igroman787 Jan 25, 2024
45b96a7
fix git config
yungwine Feb 23, 2024
32afd4d
dont participate in elections if there is no adnl address in vconfig
yungwine Feb 23, 2024
777b1bf
bugfix
yungwine Feb 23, 2024
dcb0198
Merge pull request #188 from yungwine/mytonctrl2_dev
igroman787 Feb 23, 2024
bd6f79a
Clone OpenSSL using tag name instead of branch name
neodix42 Feb 25, 2024
cb83ecf
Clone OpenSSL using tag name instead of branch name
neodix42 Feb 25, 2024
7879f80
Merge pull request #189 from neodix42/mytonctrl2_dev
igroman787 Feb 25, 2024
adaf704
add offers garbage collector
yungwine Feb 27, 2024
1cb2204
add deleting old files from temp dir
yungwine Feb 27, 2024
d19883a
improves
yungwine Feb 27, 2024
cbdd56c
improves
yungwine Feb 27, 2024
84b4241
Merge pull request #190 from yungwine/mytonctrl2_dev
igroman787 Feb 27, 2024
2742f7b
fix offers gc
yungwine Feb 28, 2024
b8b8e6e
Merge pull request #191 from yungwine/mytonctrl2_dev
igroman787 Feb 28, 2024
ff977ef
add ls-proxy installer
igroman787 Feb 28, 2024
4c1243c
improve save_offers db storage
yungwine Feb 29, 2024
229adf1
bugfix
yungwine Feb 29, 2024
7c83bfb
Merge remote-tracking branch 'origin/controller_dev_1' into mytonctrl…
yungwine Feb 29, 2024
319be9a
bugfix
yungwine Feb 29, 2024
0db8293
add controllecrs to mytonctrl.py
yungwine Feb 29, 2024
19dacf2
Merge pull request #192 from yungwine/mytonctrl2_dev
igroman787 Feb 29, 2024
a5f19f3
Merge pull request #193 from yungwine/mytonctrl2_dev_1
igroman787 Feb 29, 2024
8bb9d4e
fix typo
yungwine Feb 29, 2024
78275ac
Merge pull request #195 from yungwine/mytonctrl2_dev
igroman787 Feb 29, 2024
f5c470b
Merge pull request #196 from yungwine/mytonctrl2_dev
igroman787 Feb 29, 2024
6438876
Merge pull request #194 from ton-blockchain/mytonctrl2_dev_installer
igroman787 Mar 1, 2024
a4969d6
Delete mytoninstaller.py
igroman787 Mar 1, 2024
3d3f642
Merge pull request #197 from ton-blockchain/mytonctrl2_controllers
igroman787 Mar 1, 2024
0dc1f6d
rm mytoncinstaller
yungwine Mar 1, 2024
16fb8a1
Merge pull request #5 from yungwine/master-1
yungwine Mar 1, 2024
64bcbf3
Merge pull request #199 from yungwine/mytonctrl2_dev
igroman787 Mar 1, 2024
08e41d7
add modes modules structure, add Controller mode
yungwine Mar 4, 2024
24157c6
improves
yungwine Mar 4, 2024
fafe4e1
Merge pull request #201 from yungwine/mytonctrl2_dev
igroman787 Mar 4, 2024
390b431
modes improves
yungwine Mar 5, 2024
e430afd
Merge pull request #202 from yungwine/mytonctrl2_dev
igroman787 Mar 5, 2024
6cb38f1
add more modes
yungwine Mar 6, 2024
62cfb02
rm nominationController
yungwine Mar 6, 2024
5bb21ba
add validator mode
yungwine Mar 6, 2024
cfeda1c
fix controller
yungwine Mar 6, 2024
7f78be2
move some functions from mytoncore.py to mytonctrl/modules
yungwine Mar 6, 2024
28d264e
bugfix
yungwine Mar 6, 2024
dacbad5
Merge pull request #203 from yungwine/mytonctrl2_dev
igroman787 Mar 6, 2024
cc91ccc
bugfix
yungwine Mar 6, 2024
4ee3a79
Merge pull request #204 from yungwine/mytonctrl2_dev
igroman787 Mar 6, 2024
4fca7aa
refactor complaints validation
yungwine Mar 8, 2024
cfd23bd
bugfix
yungwine Mar 8, 2024
2fbc372
Merge pull request #206 from yungwine/mytonctrl2_dev
igroman787 Mar 8, 2024
1497b20
bugfix
yungwine Mar 11, 2024
b94c826
Merge pull request #208 from yungwine/mytonctrl2_dev
igroman787 Mar 11, 2024
5f2355e
fix checking offers
yungwine Mar 11, 2024
00da0db
Merge pull request #209 from yungwine/mytonctrl2_dev
igroman787 Mar 11, 2024
591b967
Create roll_back_001.sh
igroman787 Mar 11, 2024
8f30ba1
print elections time in UTC
yungwine Mar 12, 2024
c1f59b6
add migration to modes
yungwine Mar 13, 2024
e8fa8de
move modules to root
yungwine Mar 13, 2024
443e08e
Merge branch 'ton-blockchain:mytonctrl2_dev' into mytonctrl2_dev
yungwine Mar 13, 2024
e7ac528
Merge remote-tracking branch 'origin/mytonctrl2_dev' into mytonctrl2_dev
yungwine Mar 13, 2024
b712acc
bugfix
yungwine Mar 13, 2024
a9214f2
Merge pull request #212 from yungwine/mytonctrl2_dev
igroman787 Mar 13, 2024
08bd78e
add rollback
yungwine Mar 14, 2024
f78b206
check branch exists before update
yungwine Mar 14, 2024
242d066
Merge pull request #213 from yungwine/mytonctrl2_dev
igroman787 Mar 14, 2024
09c9053
fix rollbacks
yungwine Mar 14, 2024
cb7b39e
Merge pull request #214 from yungwine/mytonctrl2_dev
igroman787 Mar 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions docs/en/controllers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Controllers

## Launching a Validator in Controller Mode

1. Prepare the hardware for the validator - 32 virtual cores, 64GB of memory, 1TB SSD, fixed IP address, and 1Gb/s internet speed.

To maintain network stability, it is recommended to place validators in different locations around the world, rather than concentrating them in a single data center. You can use [this site](https://status.toncenter.com/) to determine the load on various locations. According to the map, there is a high load on data centers in Europe, especially in Finland, Germany, and Paris. Therefore, using providers such as Hetzner and OVH is not recommended.

> Ensure your hardware meets or exceeds the specified configuration. Running the validator on inappropriate hardware can harm the network and result in penalties.
> Since May 2021, Hetzner has prohibited mining on its servers. This rule currently applies to both PoW and PoS algorithms. Even installing a regular node will be considered a breach of contract.

2. Install and synchronize **mytonctrl** according to the description in [this instruction](https://github.com/ton-blockchain/mytonctrl/blob/master/docs/en/manual-ubuntu.md) — follow **only** paragraphs 1, 2, and 3.

You can also refer to this [Video Tutorial](https://docs.ton.org/participate/run-nodes/full-node#installation) for additional help.

3. Transfer 1 TON to the validator wallet address, which is displayed in the `wl` list.

4. Use the `aw` command to activate the validator's wallet.

5. Transfer enough TON to the validator wallet address.

6. Enable the ton-http-api service:
```
mytonctrl -> installer -> enable THA
```
Exit installer mode with `Ctrl+D`

7. Set liquid-staking mode:

```bash
enable_mode liquid-staking
set stake null
```

> (!) If you were previously using nominator pools, do not forget to disable them using the `disable_mode nominator-pool` command.

8Set the liquid pool address, which will lend TON for validation:
```
set liquid_pool_addr <liquid-pool-address>
```

9. Set the lending parameters that acceptable to you:
```
set min_loan 41000
set max_loan 43000
set max_interest_percent 1.5
```

where
* `41000` is the minimum loan amount we are willing to receive from the liquid pool,
* `43000` is the maximum loan amount we are willing to receive from the liquid pool,
* `1.5` 1.5 is the maximum interest rate value for the liquid pool per validation cycle, which we have agreed upon.

10. Display the annual percentage of profit from the liquid pool:
```
calculate_annual_controller_percentage
```

11. Create two controllers with a single command:

```
new_controllers
```

12. Enter `controllers_list` to display the controller addresses:

```
controllers_list
Address Status Balance
kf89KYOeRPRRDyjt_3bPsz92cKSghRqw64efNr8mT1eeHDaS active 0.704345
kf_lT8QNykLh5PN5ictNX22maiyIf9iK787fXg6nJ_zB-jbN active 0.720866
```

13. Make a validator deposit in each controller:


```
deposit_to_controller kf89KYOeRPRRDyjt_3bPsz92cKSghRqw64efNr8mT1eeHDaS 10000
deposit_to_controller kf_lT8QNykLh5PN5ictNX22maiyIf9iK787fXg6nJ_zB-jbN 10000
```


where `10000` TON is the deposit amount.

14. Get approval for the controllers. Each pool may have its own approval issuance policy, check with the operator.

## Switching a Regular Validator to Controller Operating Mode

1. Enter `set stake 0` to stop participating in elections.

2. Wait until both of your deposits have been returned from the Elector.

3. Follow the instructions under "Launching a Validator in Controller Mode", beginning with **Step 6**.
28 changes: 14 additions & 14 deletions docs/en/nominator-pool.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@

4. Use the `aw` command to activate your validator wallet.

5. Create two pools (for even and odd validation rounds):
5. Activate pool mode:

```bash
enable_mode nominator-pool
set stake null
```

6. Create two pools (for even and odd validation rounds):

```bash
new_pool p1 0 1 1000 300000
Expand All @@ -38,7 +45,7 @@

> (!) Use https://tonmon.xyz/ to determine the current minimum validator stake.

6. Type `pools_list` to display pool addresses:
7. Type `pools_list` to display pool addresses:

```bash
pools_list
Expand All @@ -47,7 +54,7 @@
p2 empty 0 0f9qtmnzs2-PumMisKDmv6KNjNfOMDQG70mQdp-BcAhnV5jL
```

7. Send 1 TON to each pool and activate the pools:
8. Send 1 TON to each pool and activate the pools:

```bash
mg validator_wallet_001 0f98YhXA9wnr0d5XRXT-I2yH54nyQzn0tuAYC4FunT780qIT 1
Expand All @@ -56,7 +63,7 @@
activate_pool p2
```

8. Type `pools_list` to display pools:
9. Type `pools_list` to display pools:

```bash
pools_list
Expand All @@ -65,9 +72,9 @@
p2 active 0.731199806 kf9qtmnzs2-PumMisKDmv6KNjNfOMDQG70mQdp-BcAhnV8UO
```

9. Open each pool via the link "https://tonscan.org/nominator/<address_of_pool>" and verify pool configurations.
10. Open each pool via the link "https://tonscan.org/nominator/<address_of_pool>" and verify pool configurations.

10. Proceed with the validator deposit to each pool:
11. Proceed with the validator deposit to each pool:

```bash
deposit_to_pool validator_wallet_001 <address_of_pool_1> 1005
Expand All @@ -76,7 +83,7 @@

In these commands, `1005` TON is the deposit amount. Be aware that 1 TON will be deducted by the pool for processing the deposit.

11. Proceed with the nominator deposit to each pool:
12. Proceed with the nominator deposit to each pool:

Visit the pool link (from **Step 9**) and click **ADD STAKE**.
You can also make a deposit using **mytonctrl**, using the following commands:
Expand All @@ -92,13 +99,6 @@

> To withdraw a nominator deposit, send a transaction with the comment `w` to the pool address (attach 1 TON to process the transaction). You can also perform this action using **mytonctrl**.

12. Activate pool mode:

```bash
set usePool true
set stake null
```

13. Invite nominators to deposit into your pools. The participation in validation will commence automatically.

> (!) Ensure that you have at least 200 TON/month in your validator wallet for operation fees.
Expand Down
92 changes: 92 additions & 0 deletions docs/ru/controllers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Контроллеры

## Запуск валидатора в режиме работы контроллеров

1. Подготовьте аппаратное обеспечение для валидатора - 32 виртуальных ядер, 64GB памяти, 1TB SSD, фиксированный IP-адрес, скорость интернета 1Gb/s.

Для поддержания стабильности сети рекомендуется разместить валидаторы в различных местах по всему миру, а не концентрировать их в одном дата-центре. Вы можете использовать [этот сайт](https://status.toncenter.com/) для определения нагрузки на различные места. Согласно карте, высокая нагрузка на дата-центры в Европе, особенно в Финляндии, Германии и Париже. Поэтому использование провайдеров, таких как Hetzner и OVH, не рекомендуется.

> Ваше оборудование должно соответствовать указанной конфигурации или быть выше. Запуск валидатора на слабом оборудовании негативно влияет на сеть и может привести к штрафам.
> С мая 2021 года Hetzner запретил майнинг на своих серверах, в настоящее время под это правило попадают алгоритмы PoW и PoS. Установка даже обычного узла будет считаться нарушением условий договора.
2. Установите и синхронизируйте **mytonctrl** в соответствии с описанием в [этой инструкции](https://github.com/ton-blockchain/mytonctrl/blob/master/docs/ru/manual-ubuntu.md) — следуйте **только** пунктам 1, 2 и 3.

Вы также можете обратиться к этой [Видеоинструкции](https://docs.ton.org/participate/run-nodes/full-node#installation) для дополнительной помощи.

3. Переведите 1 TON на адрес кошелька валидатора, который отображается в списке `wl`.

4. Используйте команду `aw` для активации кошелька валидатора.

5. Переведите достаточно TON на адрес кошелька валидатора.

6. Включите ton-http-api службу:
```
mytonctrl -> installer -> enable THA
```
Выйдите из режима установщика сочетанием клавиш `Ctrl+D`

7. Активируйте режим работы контроллеров:

```bash
enable_mode liquid-staking
set stake null
```

> (!) Если до этого вы использовали номинатор-пулы, не забудьте отключить их использование командой `disable_mode nominator-pool`.

8. Задайте адрес ликвидного пула, который будет одалживать TON для валидации:
```
set liquid_pool_addr <liquid-pool-address>
```

9. Задайте параметры кредитования, которые вам подходят:
```
set min_loan 41000
set max_loan 43000
set max_interest_percent 1.5
```

где
* `41000` - это минимальная сумма кредита который мы готовы получить у ликвидного пула,
* `43000` - это максимальная сумма кредита который мы готовы получить у ликвидного пула,
* `1.5` - это максимальная процентная ставка ликвидного пула за один цикл валидации на которую мы согласны.

10. Отобразите годовой процент прибыли от ликвидного пула:
```
calculate_annual_controller_percentage
```

11. Создайте два контроллера одной командой:

```
new_controllers
```
12. Введите `controllers_list` чтобы отобразить адреса контроллеров:
```
controllers_list
Address Status Balance
kf89KYOeRPRRDyjt_3bPsz92cKSghRqw64efNr8mT1eeHDaS active 0.704345
kf_lT8QNykLh5PN5ictNX22maiyIf9iK787fXg6nJ_zB-jbN active 0.720866
```
13. Совершите депозит валидатора в каждый контроллер:
```
deposit_to_controller kf89KYOeRPRRDyjt_3bPsz92cKSghRqw64efNr8mT1eeHDaS 10000
deposit_to_controller kf_lT8QNykLh5PN5ictNX22maiyIf9iK787fXg6nJ_zB-jbN 10000
```
где `10000` TON - это сумма депозита.
14. Получите аппрувал контроллеров. У каждого пула может быть своя политика выдачи аппруволов, уточняйте у оператора.
## Переключение обычного валидатора в режим работы контроллеров
1. Введите `set stake 0`, чтобы отключить участие в выборах.
2. Дождитесь, когда оба ваших депозита вернутся от электора.
3. Следуйте инструкциям "Запуск валидатора в режиме работы контроллеров", начиная с **6-го шага**.
30 changes: 15 additions & 15 deletions docs/ru/nominator-pool.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@

4. Используйте команду `aw` для активации кошелька валидатора.

5. Создайте два пула (для четного и нечетного раунда проверки):
5. Активируйте режим пула:

```bash
enable_mode nominator-pool
set stake null
```

6. Создайте два пула (для четного и нечетного раунда проверки):

```
new_pool p1 0 1 1000 300000
Expand All @@ -38,7 +45,7 @@

> (!) Используйте https://tonmon.xyz/, чтобы определить текущую минимальную ставку валидатора.

6. Введите `pools_list` чтобы отобразить адреса пулов:
7. Введите `pools_list` чтобы отобразить адреса пулов:

```
pools_list
Expand All @@ -47,7 +54,7 @@
p2 empty 0 0f9qtmnzs2-PumMisKDmv6KNjNfOMDQG70mQdp-BcAhnV5jL
```

7. Отправьте по 1 TON в каждый пул и активируйте пулы:
8. Отправьте по 1 TON в каждый пул и активируйте пулы:

```
mg validator_wallet_001 0f98YhXA9wnr0d5XRXT-I2yH54nyQzn0tuAYC4FunT780qIT 1
Expand All @@ -56,7 +63,7 @@
activate_pool p2
```

8. Введите `pools_list` чтобы отобразить адреса пулов:
9. Введите `pools_list` чтобы отобразить адреса пулов:

```
pools_list
Expand All @@ -65,9 +72,9 @@
p2 active 0.731199806 kf9qtmnzs2-PumMisKDmv6KNjNfOMDQG70mQdp-BcAhnV8UO
```

9. Откройте каждый пул по ссылке "https://tonscan.org/nominator/<address_of_pool>" и проверьте конфигурацию пулов.
10. Откройте каждый пул по ссылке "https://tonscan.org/nominator/<address_of_pool>" и проверьте конфигурацию пулов.

10. Совершите депозит валидатора в каждый пул:
11. Совершите депозит валидатора в каждый пул:

```bash
deposit_to_pool validator_wallet_001 <address_of_pool_1> 1005
Expand All @@ -76,7 +83,7 @@

где `1005` TON - это сумма депозита. Обратите внимание, что пул вычтет 1 TON за обработку депозита.

11. Совершите депозит номинатора в каждый пул:
12. Совершите депозит номинатора в каждый пул:

Перейдите по ссылке пула (из **шага 9**) и нажмите **ADD STAKE**.
Вы также можете сделать депозит, используя **mytonctrl**, с помощью следующих команд:
Expand All @@ -92,13 +99,6 @@

> Чтобы снять депозит номинатора, отправьте транзакцию с комментарием `w` на адрес пула (должен быть прикреплен 1 TON для обработки транзакции). Вы также можете сделать это с помощью **mytonctrl**.

12. Активируйте режим пула:

```bash
set usePool true
set stake null
```

13. Пригласите номинаторов сделать депозиты в ваши пулы. Участие в валидации начнется автоматически.

> (!) Убедитесь, что у вас на кошельке валидатора есть как минимум 200 TON в месяц на операционные расходы.
Expand All @@ -109,7 +109,7 @@

Если вы создаете пул для многих номинантов, то используйте что-то вроде этого: `new_pool p1 40 40 10000 10000` (максимум 40 номинантов, 40% доли валидатора, минимальная ставка участника 10K TON).

## Переключение обычного валидатора в режим номинантского пула
## Переключение обычного валидатора в режим номинаторского пула

1. Введите `set stake 0`, чтобы отключить участие в выборах.

Expand Down
Loading