Collators and validators in MyTonCtrl
Please be aware that collator nodes used by validators should be treated as mission-critical assets, especially if more than one validator utilizes a collator machine. Great care should be taken to ensure the flawless operation and failover of these nodes. Any configuration changes to collators must be thoroughly tested and reviewed before being implemented.
Collators
Installation
To install and set up a new node in collator mode, you can use the interactive installer:
wget https://raw.githubusercontent.com/ton-blockchain/mytonctrl/master/scripts/install.sh
sudo bash install.sh
There, you should choose collator mode and provide the shards you want to sync and collate blocks for.
In the process of installation, MyTonCtrl will enable collator mode, create a specific ADNL address for the collator and
set up the node to monitor specified shards and collate blocks for them.
Enabling collator on existing node
If you already have an installed MyTonCtrl instance, you can enable collator mode by running the following command:
enable_mode collator
Note that to enable collator mode, you first have to turn off validator or liteserver modes if they are enabled.
After this, you can run blocks collation using:
setup_collator [--adnl <ADNL address>] <shard1> [shard2] ...
MyTonCtrl will create an ADNL address for the collator, edit the node configuration to monitor only specified shards and start collating blocks for them.
You can actually specify the ADNL address with the --adnl option if you want to use one that already exists in your node configuration.
Example of the command:
setup_collator --adnl 5889072E81219A0E656F31E8784EA09C93A562AA74308E1B25364EE87EEE6631 0:2000000000000000 0:6000000000000000
Adding new shards to monitor on an existing node that is already monitoring other shards is not recommended, as it may cause performance issues or unexpected behavior.
When using setup_collator, MyTonCtrl checks if the provided shards are already included in the nodes already monitored and raises an error if they are not.
However, it's entirely ok to add new ADNL addresses to the collator to collate blocks for already monitored shards and broadcast them with a different ADNL address.