There are two consensus mechanisms in Knowchain. The Know Layer uses Delegated Proof of Stake and The Ano Layer uses both Proof of Stake and Proof of Authority. In this post we will focus only in Know Layer’s consensus.
Bitcoin uses Proof of Work as consensus mechanism for Full Nodes and Miners to work with others. The concept of Proof of Work is that the Validators need to prove for their work by solving CPU or GPU consumed problems. The advantage of Proof of Work algorithms is that there will be very hard for a Miner or a group of Miners to control the network. Attackers of Proof of Work blockchains have to possess at least 51% of the hash power in the network to be successfully in manipulating it. Along with the growth of the network, the difficulties to attack and control the network increase. It means that is impossible to attack Bitcoin network (currently in 2018 there are 26 million tera hashes per second — a tera hashes is a trillion of hashes) until quantum computers are completed to use commercially. However, the disadvantage of Proof of Work is that the electricity using for mining process is very high and that electricity is somehow useless.
Proof of Stake can be more energy efficient than Proof of Work. Proof of Stake algorithm chooses the next Validators (the block creators) from stakers who hold a certain amount of the cryptocurrency in their accounts. The Validators can be chosen randomly or following a process of selection. In Know Layer of Knowchain, we use the consensus algorithm called Delegated Proof of Stake. What is Delegated Proof of Stake algorithm features in Know Layer? The answers is broken down from these questions:
• Who should create the next blocks?
• When should the next block be created?
• What transactions should be included in the block?
• How are changes to the protocol applied?
• How should competing transaction histories be resolved?
Who should create the next blocks in Know Layer? In Know Layer, the next blocks are created by Validators. Validators are the top 37 Delegates who are chosen from votes of stakers — Know stake holders. Every Know stakers in Knowchain will have the right to vote for up to 37 Know stake holders. The weights of the votes depend on the amount of Know the stake holders have. To vote for a Delegate, a Know staker needs to use Vote transaction type. Every Know stake holders can register to become a Delegate by using Register as Delegates type of transaction.
All Full Nodes must agree on the Delegated Proof of Stake process to maintain the network integrity and avoid forking. Next blocks will be created by up to 37 Validators in Rounds. A Round contains 37 consecutive blocks. The block time is 10 seconds, it means every 10 seconds, a new block will be created by a certain Validator. The process of selecting Validators is as below:
• Full Nodes who have Know (Know stake holders) vote for up to 37 Delegates by Vote transaction.
• Each Delegate has a Vote point based on the Votes (with weights) received from Know stake holders.
• Each Round, there are 37 Validators who will be chosen from top 37 Delegates with the highest Vote points.
• The orders of 37 Validators will be random from 1st to 37th.
• The 1st block of the Round (total 37 blocks) will be processed by the Validator in order 1st. The last block (37th block) will be processed by the Validator in order 37th.
• Next round, 37 new Validators will be defined with a new random order and the process repeats.
Each turn in the total 37 turns will follow a process of Validator Committee Communication to reach a consensus between the Committee. After the Validator Committee reaches the consensus on the new blocks, they will be finalized on chain to prevent forks in Knowchain. The process is similar will Byzantine Fault Tolerance algorithms introduced by Miguel Castro and Barbara Liskov in 1999.
Given that the order of 37 Validators are settled and there will be 37 turns to process 37 new blocks of the network. In every turn, the Validator in turn will play a role as the Commander, the other Validators will play the roles as Counselors. When the Commander proposes a new block of his turn, the Counselors (36 other Validators) will receive the message of the new block and return their responses to all Validators including the Commander. After 2 rounds of Validator Committee Communication, the Committee reaches the consensus of accepting or rejecting the new block proposed by the Commander, and the turn will be closed.
Hi! I am a robot. I just upvoted you! I found similar content that readers might be interested in:
https://medium.com/knownetwork/whats-the-consensus-mechanism-used-in-know-layer-of-knowchain-and-how-it-works-6eebf8a20e44