Skip to content

Commit 3d59f83

Browse files
authored
add custom overlays docs (#551)
1 parent 26da197 commit 3d59f83

File tree

2 files changed

+95
-0
lines changed

2 files changed

+95
-0
lines changed
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Custom overlays
2+
3+
TON `v2024.04` update introduces the ability to use custom overlays.
4+
Currently they can be used only for broadcasting external messages. The main idea is to create private overlay with
5+
sender nodes and validators. Only sender nodes can create broadcasts with external messages which will be (hopefully)
6+
received by block collator and get into the block.
7+
8+
## Default custom overlays
9+
10+
Mytonctrl uses default custom overlays available at https://ton-blockchain.github.io/fallback_custom_overlays.json. To
11+
stop participation in default custom overlays run commands
12+
```bash
13+
MyTonCtrl> set useDefaultCustomOverlays false
14+
MyTonCtrl> delete_custom_overlay default
15+
```
16+
17+
## Create custom overlay
18+
19+
### Collect adnl addresses
20+
21+
To add validators to a custom overlay you can use either their `fullnode adnl id` available with `validator-console -c getconfig`
22+
or `validator adnl id` which can be found in mytonctrl's status.
23+
To add liteservers to a custom overlay you must use their `fullnode adnl id`.
24+
25+
### Create a config file
26+
27+
Create a config file in format:
28+
29+
```json
30+
{
31+
"adnl_address_hex_1": {
32+
"msg_sender": true,
33+
"msg_sender_priority": 1
34+
},
35+
"adnl_address_hex_2": {
36+
"msg_sender": false
37+
},
38+
...
39+
}
40+
```
41+
42+
`msg_sender_priority` determines the order of external message inclusion to blocks: first processed messages from higher priority source. Messages from public overlay and local LS have priority 0.
43+
44+
**Note, all nodes listed in config should participate in overlay (in other words they need to add overlay with exactly this config), otherwise connectivity will be poor and broadcasts will fail**
45+
46+
There is special word `@validators` to create a dynamic custom overlay that mytonctrl will generate automatically
47+
each round adding all current validators.
48+
49+
### Add custom overlay
50+
51+
Use mytonctrl command to add custom overlay:
52+
53+
```bash
54+
MyTonCtrl> add_custom_overlay <name> <path_to_config>
55+
```
56+
57+
Note, that name and config file **must** be the same on all overlay members. Check that overlay has been created using
58+
mytonctrl `list_custom_overlays` command.
59+
60+
### Debug
61+
62+
You can set node verbosity level equals to 4 and grep logs with "CustomOverlay" word.
63+
64+
## Delete custom overlay
65+
66+
To remove custom overlay from a node, use mytonctrl command `delete_custom_overlay <name>`.
67+
If the overlay is dynamic (i.e. there is `@validators` word in config) it will be deleted within one minute, otherwise it will be removed instantly.
68+
To make sure that node has deleted custom overlay check `list_custom_overlays` mytonctrl and `showcustomoverlays` validator-console commands.
69+
70+
## Low level
71+
72+
List of validator-console commands to work with custom overlays:
73+
74+
* `addcustomoverlay <path_to_config>` - add custom overlay to local node. Note, that this config must be in a format other than config for mytonctrl:
75+
```json
76+
{
77+
"name": "OverlayName",
78+
"nodes": [
79+
{
80+
"adnl_id": "adnl_address_b64_1",
81+
"msg_sender": true,
82+
"msg_sender_priority": 1
83+
},
84+
{
85+
"adnl_id": "adnl_address_b64_2",
86+
"msg_sender": false
87+
}, ...
88+
]
89+
}
90+
```
91+
* `delcustomoverlay <name>` - delete custom overlay from node.
92+
* `showcustomoverlays` - show list of custom overlays node knows about.
93+
94+

sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,7 @@ const sidebars = {
641641
'participate/network-maintenance/nominators',
642642
'participate/network-maintenance/persistent-states',
643643
'participate/nodes/collators',
644+
'participate/network-maintenance/custom-overlays',
644645
],
645646
},
646647
{

0 commit comments

Comments
 (0)