Lifecycle of a Validator Explanation

The life cycle of a validator

While running a pNode is easy with its plug-and-play design, if you’re considering hosting a virtual or physical node on the Incognito Chain, it’s helpful to understand the validation process that your node will go through. In this article, you’ll learn the step-by-step process by which block validation happens, and be prepared to start earning block rewards.

First, let’s define some key features of Incognito that are relevant to this discussion:

1. Sharding

Most blockchains today are just a single chain of all the nodes in linear succession. With sharding, chains are expanded to consist of a main linear chain, called a beacon chain, and several “shards” branching off the beacon which each handle a portion of the process of block validation. This way, where a single chain can handle n number of transactions per second, a sharded chain can handle n(s) number of transactions, where s is the number of shards.

Screen Shot 2020-03-20 at 12.06.10 AM

The sharding model is designed to be inherently scalable, so that the transaction speed doesn’t suffer with an increasing number of transactions.

2. Proof-of-Stake (PoS) Validation

Most blockchains currently run on a Proof-of-Work (PoW) consensus mechanism, by which your validator earns rewards proportionate to the amount of work your CPU performs. However, this is slow and inefficient for a large scale, and leaves blockchain networks open to majority attacks. With Proof-of-Stake, validators instead stake the network-local coins, in this case PRV, to be entered into the validator pool, from which they will be randomly selected to perform the validation. Having a pool of available validators that aren’t wasting time and energy competing to complete transactions (like with PoW) enables both Incognito Chain and the validators to be more efficient.

The Incognito validation process

Below is a diagram of the process overview.

From the right of the middle (both the shards and the beacon chain) is the entire blockchain itself. The far right line is the beacon chain, which coordinates the different shards, and to the left of it are the shards themselves. Currently at 8 shards, the number of shards run by Incognito will grow over time with a goal of reaching 64 shards in the near future.

The nodes you run are within each shard, and are called validators. The row of icons to the left of the shards are the substitutes. Substitutes are nodes that are on hold, waiting to join the validators. On the far left is the candidate pool, comprised of nodes which are waiting to be randomly selected. The process occurs in just six steps:

  1. You run a node and stake the required 1750 PRV. It is held as collateral in the network until you unstake it and stop running the node.

  2. Your node is placed into the candidate pool.

  3. The node is then randomly selected to be moved to the substitutes group, currently comprised of eight substitutes per shard.

  4. Substitutes wait two full epochs (one epoch is 350 blocks, currently about 4 hours) before being moved to the shards. During the waiting period, the substitutes must be online the entire time, and sync all block data for their shard, to be ready for validation.

If a substitute fails to stay online or sync all block data, then the substitute is moved to a greylist, where they wait for three epochs before they are returned to the candidate pool. This is how the system ensures nodes are healthy enough to perform the job of validation.

  1. Then, the substitute moves to a shard and becomes a validator. Here, the validator nodes sign (verify) blocks which contain transactions. They propose blocks in a Round Robin sequence. Once the transactions are validated, the validating nodes receive transaction fees (in the currency the transactor selected) and block rewards (in PRV). Block rewards are split evenly between the validators.

  2. Each epoch, the four oldest validators in each shard are recycled back into the candidate pool to be chosen again.

As mentioned earlier, in a PoW mechanism, validators are competing to see who can get the nonce the fastest, and receive the reward. With PoS, the competition is removed so the process is less wasteful. Initial selection is completely random, so each node has equal chance every turn. Validators receive equal rewards split between them, to ensure fairness and profitability for all participants. In addition, Validators on a shard take turns proposing blocks, which are then signed by all validators together. This results in a fair, fast, and scalable process that is energy and cost efficient.

Screen Shot 2020-03-20 at 11.36.20 PM
(Comparison of TPS between various blockchains.)

Performance

Validators are given a time window within which they must propose a block, which is equal to the elapsed time of the previous three blocks combined. This ensures consistent time limits which don’t prevent functional blocks from participating, but which limits the time a problem can waste.

As with substitutes that fail their tasks, validators that fail are temporarily moved to the greylist for three epochs and don’t receive their rewards, before being re-entered in the candidate pool. Unlike other PoS instances, with Incognito, you do not lose your staked PRV if your node is moved to the greylist.

Summary

Epochs are a measurement of a step in the cycle. Each epoch, validators are cycled through the existing shards to participate in block proposal and validation. The four validators which have been there the longest are released back into the candidate pool to start the process anew*. Then, the four oldest members of the substitute group are promoted to validators, and four random candidates are chosen to join the substitutes. So, every group moves forward in batches of four nodes per shard.

*Note: Nodes are automatically restaked. If you choose to withdraw your staked PRV at any point in the process, the withdrawal will take place after the current earning process, before the next restaking period. This can potentially cause a long wait, depending on the remaining length of the current cycle.

That’s all there is to it! It’s an automatic, easy process designed to bring fairness, efficiency, and scalability to block validation. The transaction fees allow you to earn various popular cryptocurrencies like BTC or ETH, while earning block rewards in PRV.

Feeling adventurous? Grab yourself a pNode here and start earning today!

3 Likes