Consensus Algorithm (BFT-DPOS)

in eos •  4 years ago 

EOS.IO software adopts the only decentralized consensus algorithm that can meet the above performance requirements so far, that is, the delegation of authorization (DPOS). According to this algorithm, the holder of the token on the EOS blockchain can continuously select the block producer through the voting system. Anyone can become a block producer as long as he can convince the token holder to get enough votes.

EOS.IO software can produce a block with precision every 0.5 seconds, and only one producer is authorized to produce the block at a given point in time. If it is not generated within a predetermined time, skip the block. When one or more blocks are skipped, there will be an interval of 0.5 seconds or more in the blockchain.

Use EOS.IO software to produce 126 rounds (a total of 21 producers, each producer produces 6 blocks). At the beginning of each round, 21 different block producers are selected based on the votes of the token holders. The production sequence of selected producers shall be arranged in an order agreed upon by 15 or more producers.

If a producer misses a block and has not produced any block in the past 24 hours, it will be deleted until it informs the blockchain that it intends to produce the block again. By excluding unreliable producers, the number of missing blocks is minimized and the smooth operation of the network is ensured.

In theory, the DPOS blockchain will not experience any forks, because in the process of block production, producers are cooperative rather than competitive. If there is a fork, the consensus will automatically switch to the longest chain. Its working principle is that under the consensus mechanism, the speed of adding new blocks to the forked blockchain is directly related to the proportion of producers in the forked chain. In other words, a blockchain with more producers will grow much faster than a chain with fewer producers, because a forked chain with a higher proportion of producers will lose fewer blocks.

In addition, no block producer should produce blocks on two forks at the same time. If a block producer is found to do so, it may be voted out. The cryptographic evidence left by this double production can also be used to automatically eliminate abusers.

By allowing all producers to sign all blocks, the Byzantine fault tolerance mechanism is added to traditional DPOS, as long as no producer signs two blocks with the same timestamp or the same block height. Once 15 producers have signed a block, the block is considered irreversible. If a Byzantine producer signs two blocks with the same timestamp or the same block height, the system will generate cryptographic evidence of its infidelity. In this mode, an irreversible consensus should be reached within 1 second.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!