Collator Operation Guide
Generate Session Key And Bonding
- Use RPC to generate an author ID and create/convert session keys by sending
RPC calls to HTTP endpoints using the
author_rotateKeys
method in your terminal.
curl http://127.0.0.1:9933 -H \
"Content-Type:application/json;charset=utf-8" -d \
'{
"jsonrpc": "2.0",
"id":1,
"method": "author_rotateKeys",
"params": []
}'
Mapping Author IDs and setting session keys:
Head to Polkadot.js
Choose
Developer
-Extrinsics
Select the account you want to be associated
Choose
authorMapping
andaddAssociation(authorId)
Fill your author Id and submit transaction
Check the mapping settings:
Head to Polkadot.js
Choose
Developer
-Chain state
Choose
authorMapping
andmappingWithDeposit
Fill your author Id and submit your request, you will get your mapping infomation.
Get Candidate Pool Size
Add the candidate pool to get the candidate pool size, select Developer-Javascript in Polkadot.js.
// Simple script to get candidate pool size
const candidatePool = await api.query.parachainStaking.candidatePool();
console.log(`Candidate pool size is: ${candidatePool.length}`);
Join The Candidate Pool
Head to Polkadot.js
Choose
Developer
-Extrinsics
Select the account you want to be associated
Choose
parachainStaking
andjoinCandidates
Fill your bond amount (in Pennock, which means you need to multiply 10^10, so the minimum number you should fill in is
640000000000
) and candidate count which you can get from thereSubmit this transaction and if it succeeds, you will join the candidate pool.
Leave Candidate Pool
If you want to leave candidate pool, you need to first schedule a request to leave the pool and wait for an exit delay(10 blocks), after this delay you can execute this request and stop working as a collator.
We also support temporarily leaving the candidate pool without unbonding your tokens.
Schedule Request to Leave Candidates
Head to Polkadot.js
Choose
Developer
-Extrinsics
Select the account you want to be associated
Choose
parachainStaking
andscheduleLeaveCandidates
Fill candidate count which you can get from there
Submit this transaction and if it succeeds, you need to wait out the exit delay before the request executes.
Execute Request to Leave Candidates
Head to Polkadot.js
Choose
Developer
-Extrinsics
Select the account you want to be associated
Choose
parachainStaking
andexecuteLeaveCandidates
Fill candidate delegation count which you can get from there
Submit this transaction and if it succeeds, you will stop working as a collator
Temporarily Leave the Candidate Pool
Head to Polkadot.js
Choose
Developer
-Extrinsics
Select the account you want to be associated
Choose
parachainStaking
andgoOffline
Submit this transaction and if it succeeds, you wiil temporarily leave the candidate pool
Change Bond Amount
Bond More
Head to Polkadot.js
Choose
Developer
-Extrinsics
Select the account you want to be associated
Choose
parachainStaking
andcandidateBondMore
Fill your increased amount (in Pennock, which means you need to multiply 10^10, so if you want to bond 10 ZTG more you should fill it in as
100000000000
)Submit the transaction
Bond Less
Same as leaving candidate pool, if you want to bond less, you need to first schedule a request and wait for an exit delay(10 blocks), after this delay you can execute this request and bond less.
Schedule Bond Less Request
Head to Polkadot.js
Choose
Developer
-Extrinsics
Select the account you want to be associated
Choose
parachainStaking
andscheduleCandidateBondLess
Enter your decreased amount (in Pennock, which means you need to multiply 10^10, so if you want to bond 10 ZTG less you should fill it in is
100000000000
)Submit this transaction and if it succeeds, you need to wait an exit delay to execute.
Execute Bond Less Request
Head to Polkadot.js
Choose
Developer
-Extrinsics
Select the account you want to be associated
Choose
parachainStaking
andexecuteCandidateBondLess
Submit this transaction