How to run collators for parallel?
October 30, 2021 ยท View on GitHub
Parallel/Heiko network will open collators to the community once the chain becomes stable for some days. You will be able to run collators using the following methods.
Method One - Governance (not advised, mostly for Parallel Team)
You'll need to submit a motion first to increase the default invulerables set. If the council agreed on this motion, you can then start to run your collators.
The steps are as following:
-
Submit motion,
collatorSelection -> setInvulerablesand add your collator's account id. -
Generate collator's keystore using key command
./target/debug/parallel key insert -d . --keystore-path keystore --key-type aura
- Launch collator
./scripts/collator.sh <NODE_KEY> <KEYSTORE_PATH> <TELEMETRY_DISPLAY_NAME>
- Set session keys
You'll need to prepare your collator's Sr25519 public key, and then use it to set collator's session keys
subkey inspect <SURL> --scheme Sr25519
Then connect to polkadot.js, add use collator account to sign the following extrinsic:
Extrinsics -> session -> setKeys(sr25519_pubkey, 0x1234)
- Wait the next session (6 hours)
If everything has been done successfully, your collator will be able to start producing blocks in around 6 hours (the next session)
Method Two - Register as candidate
Before registering yourself as collator candidate, you'll need to prepare enough HKO, a fixed number of HKO will be locked util that you get kicked for not producing blocks.
The steps are as following:
-
Prepare HKO
-
Launch collator and insert key
curl http://localhost:9944 -H "Content-Type:application/json;charset=utf-8" -d '{
"jsonrpc": "2.0",
"id": 1,
"method": "author_insertKey",
"params": ["<aura/gran>", "<mnemonic phrase>", "<public key>"]
}'
-
Connect to collator using polkadot.js
-
Rotate keys
Developer -> RPC calls -> author -> rotateKeys
- Set session keys using collator account
Developer -> Extrinsics -> session -> setKeys(sr25519_pubkey, 0x1234)
- Register as collator candidate
Developer -> Extrinsics -> collatorSelection -> registerAsCandidate
- Wait the next session (6 hours)