Blockchain Knowledge Series-DPoS+Pipelined BFT consensus mechanism

EOS currently uses the DPoS+Pipelined BFT consensus mechanism.

DPoS consensus-how to become a block producer

DPoS (Delegated Proof of Stake) is an equity delegation proof mechanism. Compared with Bitcoin's PoW mechanism, DPoS does not have to waste computing resources to compete for the right to bookkeeping. Instead, by granting token holders the right to vote, EOS will vote for 21 "super nodes" to serve as bookkeepers (Block Producer: The role of block producer (BP for short) ensures the normal operation of the entire network.

Block generation mechanism

A block is produced every 0.5 seconds. Super nodes take turns out of blocks, and each super node produces 12 consecutive blocks in each round. Take 21*12 blocks as a cycle. At the beginning of each block generation cycle, 21 block producers will be voted for. At the same time, in order to prevent the super nodes from missing blocks due to network delays, EOS adopts a certain block generation sequence, and the super nodes with low communication delay are neighbor block producers.

Pipelined BFT-How to perform block confirmation

Pipelined BFT (Pipelined Byzantine Fault Tolerance) is a Byzantine fault tolerance mechanism based on pipeline.
Conventional PBFT (Practical Byzantine Fault Tolerance) is to produce a block, wait for consensus, and then produce a block. Therefore, the consensus takes a long time and cannot meet the demand of 0.5s to produce blocks.

EOS adopts different implementation methods. Block generation and consensus can work in parallel. After the block production is completed, it does not wait for the PBFT consensus. It continues to produce and participate in and process the PBFT consensus of the previous block. When the PBFT consensus is completed, Modified to an irreversible state.

Punishment mechanism

At any time, only one producer is authorized to produce blocks. If the block is not successfully produced within a certain period of time, the block is skipped. If the block producer misses a block and no block has been generated in the last 24 hours, the block producer will be deleted. This ensures the smooth operation of the network.

Will it fork

Under normal circumstances, the DPS blockchain will not experience a fork, because block producers cooperate to produce blocks instead of competing. If there is a block fork, the consensus will automatically switch to the longest chain. The length of a blockchain with more producers will grow faster than a blockchain with fewer producers. In addition, no block producer should produce blocks on two blockchain forks at the same time. If a block producer finds out that it has done so, it may be voted out.

Guess you like

Origin blog.csdn.net/wcc19840827/article/details/108730674