In fault-tolerant computer systems, and in particular distributed computing systems, Byzantine fault tolerance (BFT) is the characteristic of a system that tolerates the class of failures known as the Byzantine Generals' Problem.
For each block, one validator is chosen to propose a block. This block is then sent to other validators to validate. If more than 2/3 of validators agree that the block is valid, the block is accepted.
In a distributed, trustless system, a 2/3 majority of votes agreeing is sufficient to have high confidence that the state of the system is valid.
dPOS is preferable for energy use and scalability.
There are six phases to Semux BFT Consensus. On each block, the validators will go through these phases to forge the next block.
Set height to lastHeight + 1
Send new height message to all peers.
If there are rejected votes, clear them, and increment view.
If you are the primary validator, propose a block, and broadcast it.
Send new view message to all peers.
If you have received a proposal, validate it, and vote on results.
If you did not receive a proposal, vote no.
Send validate vote to all peers.
Check if there is 2/3 validators approved votes, if so vote yes.
Else vote no.
Send preCommit vote to all peers.
Send message confirming receiving preCommit message.
If received other commit messages, move on to finalize.
Check precommit votes again, just to be sure.
Set the votes on the block.
Add block to the chain.