Collators are the parachain nodes which collect pending transactions, order them and propose new blocks on Integritee Network. Their operation is critical for availability, but not for security. The latter is provided by the validators of the Polkadot and Kusama relay chains.
Integritee’s aura consensus is based on a quasi-static set of authorities which can be mutated every 6 hours. This collator set consists of permanent, invulnerable nodes and a dynamic, unpermissioned set of nodes. Anyone can join the set of unpermissioned collators by submitting a candidacy and bonding some stake in TEER. Candidates are selected based on their stake until the desired set is full.
See the above chapter on how to run a full-node. There is only one difference: The parachain CLI (the part before the --
) needs the --collator
flag.
Collators need to manage two types of keys:
- A session key which is used to sign blocks. this key must always be online and is therefore not considered highly secure. It should be rotated regularly.
- An authority key which used to submit candidacy, bond funds and change session keys. This key isn't needed very often and should be kept secure.
To generate an authority key, please follow the steps in How to set up a wallet. In the following, we assume that you use a browser extension to keep your authority key safe.
The best way to rotate session keys is to let the collator itself do this. The author_rotateKeys
rpc call will generate a new key and print the public key. On your collator machine, run the following command:
curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9944
Take note of the fresh public key in hex format which is returned returned as json response.
Use the session.setKeys call to register your key.
keys
: your session key in hex format with0x
prefixproof
: not needed. just put0x
Use your authority key to call collatorSelection.registerAsCandidate. This will bond 500 TEER. Please make sure your free balance is higher than that.
Your collator should appear on the collator dashboard. In any case, you'll need to wait for the next session (up to 6 hours)
When there are more candidates than desired nodes, preference will be given to the candidates with highest bonds. If you wish to update your bond, please call collatorSelection.updateBond
Should you be selected into the set of active collators, any downtime can lead to degraded block times. Should your node fail to propose blocks, you may be removed for the upcoming session.