Skip to content

Latest commit

 

History

History
85 lines (55 loc) · 2.16 KB

COLLATOR.md

File metadata and controls

85 lines (55 loc) · 2.16 KB

How to run collators for parallel?

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:

  1. Submit motion, collatorSelection -> setInvulerables and add your collator's account id.

  2. Generate collator's keystore using key command

./target/debug/parallel key insert -d . --keystore-path keystore --key-type aura
  1. Launch collator
./scripts/collator.sh <NODE_KEY> <KEYSTORE_PATH> <TELEMETRY_DISPLAY_NAME>
  1. 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)
  1. 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:

  1. Prepare HKO

  2. 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>"]
}'
  1. Connect to collator using polkadot.js

  2. Rotate keys

Developer -> RPC calls -> author -> rotateKeys
  1. Set session keys using collator account
Developer -> Extrinsics -> session -> setKeys(sr25519_pubkey, 0x1234)
  1. Register as collator candidate
Developer -> Extrinsics -> collatorSelection -> registerAsCandidate
  1. Wait the next session (6 hours)