diff --git a/components/RPC-Connection.jsx b/components/RPC-Connection.jsx index 91cf2b11322f..5a88b61deb94 100644 --- a/components/RPC-Connection.jsx +++ b/components/RPC-Connection.jsx @@ -1,6 +1,6 @@ import { useState, useEffect } from "react"; import { ApiPromise, WsProvider } from "@polkadot/api"; -import { HumanReadable, Precise, BlocksToDays, ArrayLength } from "./utilities/filters"; +import { HumanReadable, Precise, BlocksToDays, Percentage, ArrayLength } from "./utilities/filters"; /* This component connects to the Polkadot/Kusama APIs and renders the response data. @@ -143,6 +143,9 @@ function applyFilter(value, filter, network, setReturnValue) { case "blocksToDays": BlocksToDays(value, setReturnValue); break; + case "percentage": + Percentage(value, setReturnValue); + break; case "arrayLength": ArrayLength(value, setReturnValue); break; diff --git a/components/utilities/filters.js b/components/utilities/filters.js index 36922b45627c..792ef90e91ee 100644 --- a/components/utilities/filters.js +++ b/components/utilities/filters.js @@ -61,6 +61,12 @@ module.exports = { setReturnValue(value.toString()); }, + Percentage: function (value, setReturnValue) { + value = (value) / 10000000; + // Update value + setReturnValue(value.toString()); + }, + ArrayLength: function (value, setReturnValue) { value = value.split(',').length; // Update value diff --git a/docs/maintain/kusama/maintain-guides-how-to-validate-kusama.md b/docs/maintain/kusama/maintain-guides-how-to-validate-kusama.md index 3de06be9c2d7..7223f3e6d920 100644 --- a/docs/maintain/kusama/maintain-guides-how-to-validate-kusama.md +++ b/docs/maintain/kusama/maintain-guides-how-to-validate-kusama.md @@ -7,15 +7,95 @@ keywords: [validate, validator, kusama, stake, maintain] slug: ../../maintain-guides-how-to-validate-kusama --- -Running a validator on the Kusama network is identical to running a Polkadot validator. Check out -the [Polkadot guide](../maintain-guides-how-to-validate-polkadot.md) on how to setup a validator. +import RPC from "./../../../components/RPC-Connection"; + +import MinimumStake from "./../../../components/Minimum-Stake"; + +## Preliminaries + +Running a validator on a live network is a lot of responsibility! You will be accountable for not +only your own stake, but also the stake of your current nominators. If you make a mistake and get +slashed, your tokens and your reputation will be at risk. However, running a validator can also be +very rewarding, knowing that you contribute to the security of a decentralized network while growing +your stash. + +:::warning + +It is highly recommended that you have significant system administration experience before +attempting to run your own validator. + +You must be able to handle technical issues and anomalies with your node which you must be able to +tackle yourself. Being a validator involves more than just executing the binary file. + +::: + +Since security is so important to running a successful validator, you should take a look at the +[secure validator](maintain-guides-secure-validator.md) information to make sure you understand the +factors to consider when constructing your infrastructure. As you progress in your journey as a +validator, you will likely want to use this repository as a _starting point_ for your own +modifications and customizations. + +If you need help, please reach out on the +[Kusama Validator Lounge](https://matrix.to/#/#KusamaValidatorLounge:polkadot.builders) on Element. +The team and other validators are there to help answer questions and provide tips from experience. + +### How many KSM do I need to become an active Validator? + +You can have a rough estimate on that by using the methods listed +[here](../../general/faq.md/#what-is-the-minimum-stake-necessary-to-be-elected-as-an-active-validator). +To be elected into the set, you need a minimum stake behind your validator. This stake can come from +yourself or from [nominators](../../learn/learn-nominator.md). This means that as a minimum, you +will need enough KSM to set up Stash and Controller [accounts](../learn/learn-cryptography.md) with +the existential deposit, plus a little extra for transaction fees. The rest can come from +nominators. To understand how validators are elected, check the +[NPoS Election algorithms](../../learn/learn-phragmen.md) page. -Make sure to adjust the Polkadot guide to run a Kusama network validator: +:::info On-Chain Data for Reference -1. When starting the node pass `--chain=kusama` CLI flag: +On Kusama, the minimum stake backing a validator in the active set is +{{ kusama: :kusama }} +{{ polkadot: :polkadot }} in the +era +{{ kusama: . :kusama }} +{{ polkadot: . :polkadot }} + +On Polkadot, the minimum stake backing a validator in the active set is +{{ polkadot: :polkadot }} +{{ kusama: :kusama }} in the era +{{ polkadot: . :polkadot }} +{{ kusama: . :kusama }} + +::: + +:::tip Join the Thousand Validator Programme + +[The Thousand Validator Programme](../../general/thousand-validators.md) is an initiative by Web3 +Foundation and Parity Technologies to use the funds held by both organizations to nominate +validators in the community. + +::: + +**Warning:** Any KSM that you stake for your validator is liable to be slashed, meaning that an +insecure or improper setup may result in loss of DOT tokens! If you are not confident in your +ability to run a validator node, it is recommended to nominate your DOT to a trusted validator node +instead. + +### Validator Rewards + +On Kusama, one day is approximately four eras whereas on Polkadot, one era is approximately a day. +In each era, the validators elected to the active set earn era points which correspond to the actual +rewards earned that are distributed proportionally to the nominators after deducting the validator +commission. Currently, the minimum validator commission is set to +{{ kusama: %. :kusama }} +{{ polkadot: %. :polkadot }} +For more information, check the [validator payout](../maintain-guides-validator-payout.md) document. + +## Run a Kusama Validator + +Running a validator on the Kusama network is identical to running a Polkadot validator. Check out +the [Polkadot guide](../maintain-guides-how-to-validate-polkadot.md) on how to setup a validator. -```sh -./target/release/polkadot --pruning=archive --chain kusama -``` +Make sure to adjust the Polkadot guide to run a Kusama network validator (the instructions will also +be available in the Polkadot Validator guide): -2. Similar to Polkadot network Kusama has its own token called KSM +- When starting the node pass `--chain=kusama` CLI flag diff --git a/docs/maintain/maintain-guides-how-to-validate-polkadot.md b/docs/maintain/maintain-guides-how-to-validate-polkadot.md index 322ea7e45f12..48041b279e23 100644 --- a/docs/maintain/maintain-guides-how-to-validate-polkadot.md +++ b/docs/maintain/maintain-guides-how-to-validate-polkadot.md @@ -11,12 +11,11 @@ import RPC from "./../../components/RPC-Connection"; import MinimumStake from "./../../components/Minimum-Stake"; -:::info - -The following information applies to the Polkadot network. If you want to set up a validator on -Kusama, check out the [Kusama guide](kusama/maintain-guides-how-to-validate-kusama.md) instead. +:::tip -This guide will instruct you how to set up a validator node on the Polkadot network. +If you are a beginner, it is recommended that you start your validator journey on Kusama network. +Check the [Kusama guide](kusama/maintain-guides-how-to-validate-kusama.md) for details on how to get +started. ::: @@ -24,7 +23,7 @@ This guide will instruct you how to set up a validator node on the Polkadot netw Running a validator on a live network is a lot of responsibility! You will be accountable for not only your own stake, but also the stake of your current nominators. If you make a mistake and get -slashed, your money and your reputation will be at risk. However, running a validator can also be +slashed, your tokens and your reputation will be at risk. However, running a validator can also be very rewarding, knowing that you contribute to the security of a decentralized network while growing your stash. @@ -40,19 +39,16 @@ tackle yourself. Being a validator involves more than just executing the Polkado Since security is so important to running a successful validator, you should take a look at the [secure validator](maintain-guides-secure-validator.md) information to make sure you understand the -factors to consider when constructing your infrastructure. Web3 Foundation also maintains a -[reference implementation for a validator set-up](https://github.com/w3f/polkadot-validator-setup) -that you can use by deploying yourself (video walkthrough is available -[here](https://www.youtube.com/watch?v=tTn8P6t7JYc)). As you progress in your journey as a +factors to consider when constructing your infrastructure. As you progress in your journey as a validator, you will likely want to use this repository as a _starting point_ for your own modifications and customizations. If you need help, please reach out on the -[Polkadot Validator Lounge](https://matrix.to/#/!NZrbtteFeqYKCUGQtr:matrix.parity.io?via=matrix.parity.io&via=matrix.org&via=web3.foundation) -on Riot. The team and other validators are there to help answer questions and provide tips from +[Polkadot Validator Lounge](https://matrix.to/#/#polkadotvalidatorlounge:web3.foundation) on +Element. The team and other validators are there to help answer questions and provide tips from experience. -### How many DOT do I need? +### How many DOT do I need to become an active Validator? You can have a rough estimate on that by using the methods listed [here](../general/faq.md/#what-is-the-minimum-stake-necessary-to-be-elected-as-an-active-validator). @@ -66,17 +62,17 @@ understand how validators are elected, check the :::info On-Chain Data for Reference On Polkadot, the minimum stake backing a validator in the active set is -{{ polkadot: :polkadot }} -{{ kusama: :kusama }} in the era -{{ polkadot: . :polkadot }} -{{ kusama: . :kusama }} +{{ polkadot: :polkadot }} +{{ kusama: :kusama }} in the era +{{ polkadot: . :polkadot }} +{{ kusama: . :kusama }} On Kusama, the minimum stake backing a validator in the active set is -{{ kusama: :kusama }} -{{ polkadot: :polkadot }} in the +{{ kusama: :kusama }} +{{ polkadot: :polkadot }} in the era -{{ kusama: . :kusama }} -{{ polkadot: . :polkadot }} +{{ kusama: . :kusama }} +{{ polkadot: . :polkadot }} ::: **Warning:** Any DOT that you stake for your validator is liable to be slashed, meaning that an @@ -373,6 +369,17 @@ validator mode right away: ./target/production/polkadot ``` +:::info + +If you want to run a validator on Kusama, you have an option to specify the chain. With no +specification, this would default to Polkadot. + +```sh +./target/production/polkadot --chain=kusama +``` + +::: + ``` 2021-06-17 03:07:07 Parity Polkadot 2021-06-17 03:07:07 ✌️ version 0.9.5-95f6aa201-x86_64-linux-gnu