How to Become a Validator

Stratos Chain relies on a set of validators to secure the network. This document explains how to become a validator step by step. In testing phase, the mechanisms and values are susceptible to change.

About Validator

The role of validators is to run a full-node and participate in consensus by broadcasting votes which contain cryptographic signatures signed by their private key. Validators commit new blocks in the blockchain and receive revenue in exchange for their work. They must also participate in governance by voting on proposals. Validators are weighted according to their total stake.

A full node is a program that fully validates transactions and blocks of a blockchain. In practice, running a full node implies running a non-compromised and up-to-date version of the software with low network latency and with no downtime.

The weight(i.e. voting power) of a validator is determined by the amount of staking tokens (STOS) bonded as collateral. These bonded staking tokens can be self-delegated directly by the validator or delegated to the validator by other tokens holders.

Not all the validators will actively participate in block processing. In testing phase, only the top 64 validators, sorted by their weight(voting power), will be in the active list.

Becoming a validator

1. Get Connected to Stratos Chain Testnet

Please refer to stratos-chain-testnet to

2. Directory Structure

After the node has caught up to the latest block, your Stratos-chain Wallet has been created and fed with an amount of tokens, the $HOME directory should include the following directories and files.

By default, the two binary executable files stchaincli and stchaind as well as two directories .stchaincl and .stchaind have been saved or created in the $HOME folder. If you are not sure what is your$HOMEfolder, in terminal, use 'echo $HOME' to check. In the following instruction, we suppose you have entered the $HOMEfolder

.stchaincli contains the folder keyring-test-cosmos, which holds the wallet info and wallet address

.stchaind contains config and data folders.

In config folder:

  • addrbook.json stores peer addresses.

  • app.toml contains the default settings required for app.

  • config.toml contains various options pertaining to the stratos-chain configurations.

  • genesis.json defines the initial state upon genesis of stratos-chain.

  • node_key.json contains the node private key and should thus be kept secret.

  • priv_validator_key.json contains the validator address, public key and private key, and should thus be kept secret.

In data folder:

  • All *.db folders are Tendermint databases

  • Tendermint uses a write ahead log (WAL) for consensus

  • priv_validator_state.jsonholds the validator's state

3. Check the account balance

4. Get a new validator's pubkey

Validators are actors on the network committing new blocks by submitting their votes. It refers to the node itself, not a single person or a single account. In Stratos Chain, The protocol requires a fixed known set of validators, where each validator is identified by their public key. To get the node public key, run the following command.

5. create-validator command: Create a new validator and declare its flags

we can make a node as a validator by sending a create-validator transaction command, where some flags must be filled out:

  • pubKey: The private key associated with this Tendermint PubKey is used to sign prevotes and precommits. Got form step4

  • moniker: the validator's name

  • website: website(Optional)

  • description: description(Optional)

  • commission-rate: The commission rate on block rewards and fees charged to delegators

  • commission-max-rate: The maximum commission rate which this validator can charge. This flags cannot be changed after create-validator is processed

  • commission-max-change-rate: The maximum daily increase of the validator commission. This flags cannot be changed after create-validator is processed

  • min-self-delegation: Minimum amount of tokens the validator needs to have bonded at all time. If the validator's self-delegated stake falls below this limit, their entire staking pool will unbond. The minimum amount of tokens that must be delegated to be a bonded validator is "1" = 1000000ustos.

Example:

Response:

We can also take a look at the blockchain log

From the above information, we noticed the create-validator transaction was committed successfully at height=226, with its initial voting-power=100.

6. Different Validator States

After a validator is created with a create-validator transaction, the validator is in one of three states:

  • In validator set: Validator is in the active set and participates in consensus. Validator can be slashed for misbehavior.

  • Jailed: Validator misbehaved and is in jail.

  • Unbonded: Validator is not in the active set. Validator cannot be slashed. It is still possible to delegate tokens to an unbonded validator. Undelegating from an unbonded validator is immediate.

In the response of query staking validators command in Step7, the value of jailed implies if a validator is in jail, while the value of status implies its bonding status:

7. Verify myValidator in the staking validators list

As an active validator, the value of status should be 2 and jailed is false.

We listed some examples of commonly used commands for validators:

responsible for the proof of stake (PoS) layer of the Stratos-chain. It contains create/edit validator parameters as well as bond/unbond delegation operations.

  • Create new validator initialized with a self-delegation to it.

  • Edit(modify) an existing validator Info(params). You can add more information to the validator, such as --website, or --memo.

  • Delegate an amount of liquid coins to a validator from your wallet.

  • Unbond an amount of bonded shares from a validator.

  • Query delegations for an individual delegator on all validators.

  • Query details about an individual validator.

  • Query values for amounts stored in the staking pool.

responsible for distributing staking rewards between validators, delegators, and the Community Pool. It contains operations to claim rewards form a validator and specially, query all slashes of a validator. You cannot withdraw a part of reward. Every time you withdraw, all reward will be withdrawn.

  • Withdraw rewards from a given delegation address and optionally withdraw validator's commission if the delegation address given is a validator operator.

  • Withdraw all delegation rewards for a delegator.

  • Query all rewards earned by a delegator, optionally restrict to reward from a single validator.

  • Query distribution outstanding (un-withdrawn) rewards for a validator and all their delegations.

  • Query all coins in the community pool.

  • Query all slashes of a validator for a given block range.

responsible for enabling Stratos Chain to penalize any validator for an attributable violation of protocol rules by slashing (i.e. partially destroying) the bonded tokens. We usually use unjail command to un-jail a validator and Information about validator's liveness activity is tracked through signing-info.

  • Unjail a jailed validator.

  • Use a validators' consensus public key to find the signing-info for that validator.

9. Slashing

slashing is a validator punishment mechanism. If a validator misbehaves, its bonded stake along with its delegators' stake will be slashed. As Cosmos states, there are 3 main faults that can result in slashing of funds for a validator and its delegators:

  • Double signing: occurs when a validating entity (private key) submits two signed messages for the same block. double signing makes it more difficult for the network to reach consensus. The system will then permanently burn ("slash") that validator's total delegations (stake-backing) by the parameter SlashFractionDoubleSign(5% currently). All delegators to an offending validator will lose 5% of all STOSs delegated to this validator. At this point the validator will be "tombstoned," which means the validator will be permanently removed from the active validator set, and can never unjail.

  • Unavailability(Downtime): It occurs when a validator is unavailable to sign transactions on a blockchain for a certain period of time. for example, if a validator in the active set is offline for too long(missing more than 95% of the last 10.000 blocks), the validator will be slashed by the parameter SlashFractionDowntime(0.01%) and temporarily removed from the active set(jailed) for at least the DowntimeJailDuration(10 minutes currently). If the jailing is due to being offline for too long, the validator can send an unjail transaction in order to re-join the validator set.

  • Non-voting: If a validator did not vote on a proposal and once the fault is reported, its stake will receive a minor slash.

Validators FAQ

Why the validator status is 0 and cannot find it in active list?

Validator status is 0 means that the validator stake is Unbonded. When using create-validator transaction, you have defined the flag min-self-delegation, the minimum amount of stake the validator needs to have bonded at all time. If the validator's self-delegated stake falls below this limit, their entire staking pool will unbond and the validator status is 0. Although this validator has been created, it will not show in the validator set.

You need to delegate more tokens to this validator until the amount of stake is above min-self-delegation. Note, min-self-delegation=1 means the minimum amount of stake is 1000000ustos.

Why my validator is jailed? What can I do next?

Sometimes, you may see your validator is jailed and the voting power become 0. The shares of the validator are unbonded in order to not affecting the running of the network. If this happens, check your validator information and see if your validator was jailed.

This means the validator is jailed and the validator status is unbonding.

A lot of scenarios may lead to a validator jailing, like:

  • Double signing. Validator cannot re-join to validator set.

  • Unbond too many stake, making the bonded stake is lower than the min-self-delegation

  • Downtime: unavailable to sign transactions on a blockchain for a certain period of time

  • Non-voting

  • Low on disk space

  • node crashes(node does not start or does not catch up to the latest block)

Except for double signing, you have to wait for your node finishes catch-up and wait for at least 10 minutes(downtime jail duration). Then, you can unjail your validator. Finally, check your validator again to see if the validator's voting-power is back.

How can I check my validator info such as voting-power?

There are three ways to check it:

Is there any minimum amount of stake to delegate to a validator? and is there a minimum amount of STOS that must be delegated to be an active (bonded) validator?

There's no limitation for delegating the validator, but a tiny amount of delegation may be ignored by the algorithm when distributing rewards.

When you use create-validator transaction to create a validator, the flag --min-self-delegation defines the minimum amount of stake. If a validator's bonded stake goes below the limit that it predefined, this validator and all of its delegators will unbond. In testing phase, the system takes only the top 64 validators with the highest weight(voting power) into the active list. The more bonded stake a validator has, the more possible to be an active one. We recommend 100,000,000,000ustos (100STOS) when you create your validator. Note, --min-self-delegation=1 means 1000,000ustos.

What is self-delegation? How can I increase my self-delegation?

Self-delegation is a delegation of stake from a validator to itself. The delegated amount can be increased by sending a delegate transaction from your validator's wallet address.

Last updated