Setting up a Validator

Once a Proxy Account has been set up, it can be used to set up a validator by following the same steps as with a Stash Account.

CLI Instructions

To run a validator node, use the Creditcoin Docker image provided at gluwa/creditcoin3 and follow the instructions in the Validator Setup Guide.

The minimum amount to stake for a validator is 20 000 CTC.

Using the Validator Wizard

Run the Validator Wizard with the desired CTC amount to bond and the stash address as the proxied account:

$ docker exec -it creditcoin-validator creditcoin wizard --proxy-for "<stash-address>" --amount <ctc-amount>

It will show the current staking settings, make sure to check them before continuing.

🧙 Running staking wizard...
Using the following parameters:
💰 Stash account: 5CUnLxUCFqtGkre7MZwyX66E3kPMKDXra4FYtiYp5SoDUwKM
🪙  Amount to bond: 20000 CTC
🎁 Reward destination: Staked
📡 Node URL: ws://127.0.0.1:9944
💸 Commission: 0
🔐 Blocked: No
Continue? (y/n): y

If your account is already bonded, skip the bonding step by running wizard without the amount flag.

After continuing, the Wizard will create all required extrinsics (i.e. transactions) and communicate with the node to pair it with the stash account.

Once the transactions are sent, the new validator should be in the waiting queue.

Use the status command to get information about the status of a particular validator by entering its Stash address.

Manual Setup

Setting a validator can also be done by sending each required command manually.

First bond CTC using your Stash account and enter the CTC amount to stake.

$ docker exec -it creditcoin-validator creditcoin bond --amount <ctc-amount> --proxy-for <stash-address>

Set the validator node keys. The --rotate flag specifies that the node will generate new keys. Existing keys can be used with the --keys <key-string> option.

$ docker exec -it creditcoin-validator creditcoin set-keys --rotate --proxy-for <stash-address>

Once keys are set up, the last step is signaling the network the intention to validate. Use the --commission <commission-percent> option to set up a portion of the block reward that will not be shared with nominators or the --blocked flag to block nominations.

$ docker exec -it creditcoin-validator creditcoin validate --commission <commission-percent> --proxy-for <stash-address>

Stopping a Validator

Stop a running validator with the chill command. This will remove the validator from the active/waiting set in the next session.

$ docker exec -it creditcoin-validator creditcoin chill --proxy-for <stash-address>

Unbonding & withdrawing CTC

To unbond locked CTC, validators must first mark their tokens for unbonding, then wait for the unlocking period to end and finally withdraw the unbonded funds.

$ docker exec -it creditcoin-validator creditcoin unbond --amount <amount> --proxy-for <stash-address>

The status command shows when the next unlocking chunk will be available to withdraw.

$ docker exec -it creditcoin-validator creditcoin status --substrate-address <stash-address>
Validator 5CGBosx2Fw34u9jJtSgEQkoNTtHkPLKgsfjJiE3mDSWb44MW:
┌────────────────┬─────────────────────────────────┐
│ Status         │                                 │
├────────────────┼─────────────────────────────────┤
│ Bonded         │ Yes                             │
├────────────────┼─────────────────────────────────┤
│ Validating     │ Yes                             │
├────────────────┼─────────────────────────────────┤
│ Waiting        │ Yes                             │
├────────────────┼─────────────────────────────────┤
│ Active         │ No                              │
├────────────────┼─────────────────────────────────┤
│ Can withdraw   │ No                              │
├────────────────┼─────────────────────────────────┤
│ Next unlocking │1000 CTC in 6 minutes, 5 seconds │
└────────────────┴─────────────────────────────────┘

After the unbonding period has passed, withdraw the funds.

$ docker exec -it creditcoin-validator creditcoin withdraw-unbonded --proxy-for <stash-address>

Last updated