Spin up a Collator
Collators are responsible for the network stability, it is very important to be able to react at any time of the day or night in case of trouble. We strongly encourage collators to set up a monitoring and alerting system, learn more about this from our secure setup guide.
Service Parameters
- Astar
- Shiden
- Shibuya
./astar-collator \
--state-pruning 1000 \
--blocks-pruning 1000 \
--collator \
--name {COLLATOR_NAME} \
--chain astar \
--base-path /var/lib/astar \
--telemetry-url 'wss://telemetry.polkadot.io/submit/0' \
-- \
--sync warp
./astar-collator \
--state-pruning 1000 \
--blocks-pruning 1000 \
--collator \
--name {COLLATOR_NAME} \
--chain shiden \
--base-path /var/lib/astar \
--telemetry-url 'wss://telemetry.polkadot.io/submit/0' \
-- \
--sync warp
./astar-collator \
--state-pruning 1000 \
--blocks-pruning 1000 \
--collator \
--name {COLLATOR_NAME} \
--chain shibuya \
--base-path /var/lib/astar \
--telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' \
-- \
--sync warp
Verify synchronization
Before jumping to the next steps, you have to wait until your node is fully synchronized. This can take a long time depending on the chain height. Please note that syncing to one of our networks requires the node to sync with the network and with the relay chain.
Check the current synchronization:
journalctl -f -u shibuya-node -n100
Session Keys
Author session keys
Run the following command to author session keys:
curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9944
The result will look like this (you just need to copy the key):
{"jsonrpc":"2.0","result":"0x600e6cea49bdeaab301e9e03215c0bcebab3cafa608fe3b8fb6b07a820386048","id":1}
Set session keys
Go to the Polkadot.js portal and connect to respective network (Astar, Shiden or Shibuya).
Go to Developper > Extrinsic and select your collator account and extrinsic type: session / setKeys
Enter the session keys and set proof to 0x00
:
Submit the transaction.
Identity
Set identity
On the Polkadot.js portal select Accounts.
Open the 3 dots next to your collators address: Set on-chain Identity:
Enter all fields you want to set:
Send the transaction.
Request judgment
On the Polkadot.js portal select Developer > Extrinsic.
Select your collator account and extrinsic type: identity / requestJudgment.
Send the transaction.
Bond funds
To start collating, you need to have 32 000 SDN tokens for Shiden or 3 200 000 ASTR tokens for Astar.
On the Polkadot.js portal select Developer > Extrinsic.
Select your collator account and extrinsic type: CollatorSelection / registerAsCandidate:
Submit the transaction.
Production blocks
Onboarding takes place at n+1
session.
Once your collator is active, you will see your name inside Network tab every time you produce a block:
Leave candidacy
Once you become a collator and enter a session, you are required to produce blocks for that session. To avoid slashing, candidates must first initiate the leave process.
On the Polkadot.js portal select Developer > Extrinsic.
Select your collator account and extrinsic type: CollatorSelection / leaveIntent:
The collator has now removed themselves from the next session. After the current session has ended, candidates can withdraw their bond.
On the Polkadot.js portal select Developer > Extrinsic.
Select your collator account and extrinsic type: CollatorSelection / withdrawBond: