pRuntimeas the Gatekeeper role, helping manage the keys in the network. However, Gatekeeper is not open for election now.
Phala Network is currently running its collators on Aura consensus. Aura is a simple block authoring engine that rotates the block producers among the registered collator candidates one by one.
Host Session Api Manager Collator <===== [Session] <--------- [CollatorSelection] node pallet pallet
On the blockchain, the block authoring is handled collaboratively by
CollatorSelection pallets. The
Session pallet controls how the blocks are produced and validated. Therefore it has a list of the selected block authors. However, the
Session doesn’t decide the list on its own. Instead, it delegates that to the
CollatorSelectionpallet implements the
SessionManagertrait and is injected as the manager of the
Sessionpallet in the runtime.
CollatorSelection pallet is a minimal PoS system. It has a configurable bound amount for all the collator candidates. Anyone can run a collator as long as they meet the minimal bound. It also kicks the unresponsive collator out after each session. Besides the public collators, it also holds a special group of collators called
invulnerables, who are not vulnerable to kicks even if they are offline.
Prepare a new collator
- Create an account with a minimum amount of bound available (16 PHA by default)
- Deploy a collator full node with the
- Generate a session key. Two options:
- Call RPC
api.rpc.author.rotateKeys()to generate a new session key in the node, and note the public key it outputs
- Generate the session key externally (dangerous), calculate the public key, and note it
- Call RPC
- Set the session (public) key of the collator account by calling
- Start the collator node
Enable an invulnerable collator
list is the full list of all the invulnerables collators including the old ones. The current invulnerable collator list can be found from
This operation can only be done with the Sudo permission.
Apply for a public collator
(Not officially supported yet.)