Kusama Validator node

Build Full-node or Validator node.

Víctor | melea
Aug 24, 2019 · 8 min read

Kusama network is just born today, August 23.

https://medium.com/@gavofyork/kusama-rollout-and-governance-31eb18041044

https://medium.com/@gavofyork
Kusama Relay chain

Is Kusama one testnet?

No. Kusama is mainnet.

Can validate today in Kusama?

Today can declare intentions to be a validator, after POA ends (like a few weeks) can validate if you are in the selected validators at that moment.

How can get KSM aKa Kusama tokens?

https://guide.kusama.network/en/latest/start/claims/

https://guide.kusama.network/en/latest/

Learn more about Kusama

https://kusama.network/

ok, let's go to build.

Kusama is based in Substrate from Parity and runs in Polkadot software.

This guide is not official for Validate or run nodes and you are responsible for securing your server or network not this guide.

The same steps have been followed on a 2-core VPS server with 8 ram OS Ubuntu 18.04.

Build your own node.

A) Install from scratch

Let’s update the operating system set the time and install tools

sudo apt update && sudo apt upgrade -y && sudo apt install make clang pkg-config libssl-dev build-essential

Install rust

curl https://sh.rustup.rs -sSf | sh

Update rust if it is installed previously.

rustup update

Installing Kusama Software

git clone https://github.com/paritytech/polkadot.gitcd polkadotgit checkout v0.7.16
HEAD is now at 00769242 Kusama CC1
./scripts/init.sh
cargo build --release

This step takes time to be done.

After install check the Polkadot version for run Kusama

$ ./target/release/polkadot --version
polkadot 0.7.16

See the help flag for commands and more

$ ./target/release/polkadot --help

Now the software is installed, can sync the Kusama chain

Synchronize Kusama

./target/release/polkadot --name write-node-name-here
Sync Kusama and logs look like

OK, now can check the last block here:

https://telemetry.polkadot.io/#list/Kusama%20CC1

Or here

https://polkascan.io/

Your node name has to shows here on Telemetry and syncs the last blocks.

Node Sync and shows in Telemetry ok? Congrats

NOTE: Once the node is synchronized you can create accounts or add them to interact with the Kusama network, remember that transfers are deactivated while it functions as a POA, you can only declare intentions to be validator and expect the network to decentralize for start validating.

Also as transfers are deactivated, you can declare your intentions to be a validator with a single account you will not need two, but if you have two, you can use them to configure the validator too, once the transfers are activated, you can change the accounts and add another account if necessary, but meanwhile can do it only with one account.

Creating Accounts

AkA Generating keys

2 ways of generating accounts.

One is Subkey

Other is the PolkadotJS

https://polkadot.js.org/apps/#/explorer

Here you need to be sure what chain you are looking for.

https://polkadot.js.org/apps/#/settings

For Kusama
Kusama (Polkadot Canary, hosted by Parity)

Save and reload & go to explorer

https://polkadot.js.org/apps/#/explorer

Kusama = one Bird logo in the top.

Generating or recovering accounts

Polkadot, Kusama, and Substrate default accounts are different. be aware.

Add or Restore
Save the mnemonic seed in safe place.

Save the mnemonic seed in a safe place.

add a password, save, create a backup and save too.

Repeat for creating more accounts, if want to restore one account from seed, delete and add your mnemonic seed

Declare intentions to be a Validator

NOTE: Like I can't reproduce these steps today, just copy and paste from here:

https://guide.kusama.network/en/latest/try/validate/

Declare intentions

  • Bond the KSM of the Stash account. These KSM will be put at stake for the security of the network and can be slashed.
  • Select the Controller. This is the account that will decide when to start or stop validating.

First, go to the Staking section. Click on “Account Actions”, and then the “New stake” button.

  • Stash account — Select your Stash account. In this example, we will bond 100 milliKSMs — make sure that your Stash account contains at least this much. You can, of course, stake more than this.
  • Controller account — Select the Controller account created earlier. This account will also need a small amount of KSM in order to start and stop validating.
  • Value bonded — How much KSM from the Stash account you want to bond/stake. Note that you do not need to bond all of the KSM in that account. Also note that you can always bond more KSM later. However, withdrawing any bonded amount requires the bonding duration period to be over.
  • Payment destination — The account where the rewards from validating are sent. More info here.

Once everything is filled in properly, click Bond and sign the transaction (with your Stash account).

After a few seconds, you should see an “ExtrinsicSuccess” message. You should now see a new card with all your accounts (note: you may need to refresh the screen). The bonded amount on the right corresponds to the funds bonded by the Stash account.

Set the Session Key

Once your node is fully synced, stop it using Control-C. At your terminal prompt, you will now start your node in validator mode.

./target/release/polkadot --validator --name "name on telemetry"

NOTE: Kusama has launched! It is now the default option when you start running polkadot.

You can give your validator any name that you like, but note that others will be able to see it, and it will be included in the list of all servers using the same telemetry server. Since numerous people are using telemetry, it is recommended that you choose something likely to be unique.

You will generate your Session keys in the client via RPC. You can do this through Polkadot JS connected to your local node (Toolbox > RPC Calls > author > rotateKeys()). If you are doing this, make sure that you have your Polkadot explorer attached to your validator (in Settings).

or via CLI:

curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9933

The output will have a hex-encoded “result” field. This is an encoding of your four Session keys.

You need to tell the chain your Session keys by signing and submitting an extrinsic. This is what associates your validator with your Controller account.

Go to Staking > Account Actions, and click “Set Session Key” on the bonding account you generated earlier. Enter the output from author_rotateKeys in the field and click "Set Session Key".

Submit this extrinsic and you are now ready to start validating.

Validate

To verify that your node is live and synchronized, head to Telemetry and find your node. Note that this will show all nodes on the Kusama network, which is why it is important to select a unique name!

If everything looks good, go ahead and click on “Validate” in Polkadot UI.

  • Payment preferences — Rewards you will keep, the rest will be shared among you and your nominators.

Click “Validate”.

If you go to the Staking tab, you should see a list of active validators currently running on the network, as well as any nodes that have signaled their intention to be validators but have not yet been selected as being part of the current validator set. At the top of the page, it shows how many validator slots are available and how many nodes are intended to be a validator.

Your node will be shown in the next up queue. During soft launch period there will be no era changes, your node will remain in the queue until the transition to the Proof-of-Stake validator selection.

After POA ends: The validator set is refreshed every era. In the next era, if there is a slot available and your node is selected to join the validator set, your node will become an active validator. Until then, it will remain the next up queue. If your validator is not selected to become part of the validator set, it will remain in the next up queue until it is. There is no need to re-start if you are not selected for the validator set in a particular era. However, it may be necessary to increase the number of KSMs staked or seek out nominators for your validator in order to join the validator set.

*end copy and paste, when POA end and, I can reproduce these steps, just update this copy and paste*

Congratulations on building your own node and try to validate.

well done.

Docker?

https://forum.kusama.network/t/kusama-faqs-all-about-ksm/21
https://meleatrust.com/kusama/

Victor from melea and Polkadot Ambassador.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade