Introduction to Byzantine Fault Tolerance (BFT) Algorithm

#1
Bitcoin directs the world's attention to the blockchain. Unfortunately, the Bitcoin version of the blockchain cannot solve many problems in the blockchain industry. That's because:

1. Bitcoin's POW consensus wastes a lot of energy.

2, the transaction is very slow, a transaction takes an hour or even longer.

3. There is no incentive mechanism to motivate POW miners to be loyal to a chain, so it will be difficult to upgrade.

We need a safe consensus and will not impose a huge energy cost on our planet. This method is based on Byzantine Fault Tolerance (BFT) proof of interest (POS). We call it BFT-PoS.

Before we dive into the BFT-PoS, we only need to know the Byzantine errors and we don't need to know the details of the Byzantine issue. In a distributed system, data needs to be replicated on hundreds or thousands of nodes. From time to time, the computer is interrupted or offline. Therefore, some fault tolerance mechanisms or consensus algorithms are required. Then if some of these nodes fail, the entire system still needs to reach consensus.

Standard fault-tolerant consensus algorithms (such as Raft and Paxos) assume that when a node fails, it simply stops working without replying to the message. Google, Facebook, and some existing database products have used this series of consensus algorithms in their firewalls to ensure that services are still available when the machine fails.

However, these algorithms do not apply to public blockchains because there is no firewall in the public blockchain. Anyone who has a PoW or PoS can participate and can even try to disrupt the network. In order to reach consensus, we need Byzantine's fault-tolerance capabilities. In Byzantine faults, faulty nodes can operate in a completely arbitrary manner. Nodes can even collude to try to do evil and maximize their destructive power.

Therefore, in essence, the purpose of the BFT consensus algorithm is to establish trust between nodes in a network that is not trusted, such as the World Wide Web. BFT is not a new concept. The concept was first introduced in a 1982 academic paper by Lamport, Shostak, and Pease. But Lamport et al. demonstrated the theoretical feasibility of the algorithm only in a synchronous environment (all messages always arrive in time). But in the real world, you can't really believe that the Internet can deliver anything in a timely manner.

So in 1988, Dwork, Lynch, and Stockmeyer (DLS) proposed an algorithm that works in most asynchronous environments. In late 1999, Miguel Castro and Barbara Riscov proposed a practical solution for the ongoing BFT consensus, which is still by far the most advanced BFT algorithm.

But for a long time, the mainstream media ignored these creations. No one understands the importance of BFT beyond academics and major institutions such as IBM and DARPA until Bitcoin came in 2009. Bitcoin is the first open decentralized application that provides a BFT consensus for global currency books, but has adopted a completely new solution to the Byzantine general problem: PoW. In the PoW, who is the most powerful, who is most likely to pack out transactions, get the transaction fee and the newly generated bitcoin. Today, many mining companies are producing mining machines, and many miners are joining the mine.

On the other hand, PoS completely eliminates PoW's energy dependence. In the PoS, miners are replaced with "certifiers" who have equity in the system. Verifiers do not have to invest in expensive processing systems, but they must purchase “equity tokens”. Any ordinary laptop is enough to solve the calculation. Peercoin, BitShares, Nxt, etc. have used some form of PoS, while Ethereum is planning to launch PoS in the near future. However, although PoS has practical significance, many people oppose the use of PoS, claiming that this is impossible. But this is not a fact at all. With BFT, you can definitely protect your PoS. Only we have not seen any public chain implement BFT-PoS.

Although this theory may be difficult to interpret or understand, the final results provided by an appropriate BFT algorithm are easy to grasp. Unlike the PoW blockchain, the BFT-PoS blockchain is not bifurcated at all. For double-flower attacks, unless one-third or more of the verifiers coordinate such attacks. And, when one-third or more of the verifiers do cause a dual-cost attack, we can calculate which verifiers need to be responsible for the attack, and then they can destroy their equity tokens and remove them from the network, just as if the miners Unite together to control the entire chain.

Up to now, there is no consensus algorithm including POW algorithm that can achieve the fault tolerance level of BFT-PoS. The BFT-PoS performed very well. Today, in the public chain of hundreds of verification nodes around the world, you can easily obtain transaction confirmation within 3 seconds. This "immediate confirmation" of the optimal fault tolerance threshold theory has been proven by tendermint. Although the consensus rate will be slower as the verification node increases, following the Nielsen's law (network bandwidth and response speed growth), certain nodes can be added every year, and the performance will not change.

In addition, BFT-PoS will also increase the security of mobile wallets. The existing mobile wallets rarely make full use of the security provided by Bitcoin because no one wants to wait an hour to confirm the transaction. In contrast, most wallets only assume that the person who transfers will not double spend. And, although we don't have time to delve deeper here, an efficient mobile wallet protocol or "light client SPV" protocol is the key to future blockchain interoperability.

Although PoW performed well in Bitcoin, it was expensive, slow, and unfriendly. The best choice now is BFT-PoS. It is a long-lasting, energy-efficient solution that works well in asynchronous environments. Most importantly, because the BFT is the best and most intelligent development organization in the computer science community, it proves safe.