Trending
Crypto
  • EUROC
    1.08 -0.15%
  • BTC
    27365.73 2.15%
  • ETH
    1859.58 2.38%
  • SOL
    19.9 2.36%
  • ADA
    0.37 1.09%
  • AVAX
    14.85 1.09%
  • DOT
    5.4 1.77%
  • LTC
    92.43 1.8%
  • BCH
    116.46 1.4%
  • CRO
    0.06 0.65%
  • MATIC
    0.88 1.7%
  • LINK
    6.58 0.7%
  • XLM
    0.09 0.58%
  • UNI
    5.14 1.28%
  • SHIB
    0 1.02%

Fundament of the week: Byzantine fault tolerance

Since the invention of Bitcoin as a peer-to-peer electronic cash system in 2008, many other cryptocurrencies have been developed. Each with a specific mechanism. But one thing that almost all cryptocurrencies have in common is the blockchain as a major element of their architecture.

With a few exceptions, blockchains are intentionally designed to be decentralized, functioning as a digital ledger maintained by a distributed network of computer nodes. For this reason, blockchain technology has made it possible to create credible economic systems in which it was possible to carry out transparent and reliable financial transactions without the need for intermediaries. Cryptocurrencies are being accepted as a viable alternative to traditional bank payment systems, which are heavily dependent on trust.

Like a majority of distributed computing systems, cryptocurrency network participants must regularly agree on the current state of the blockchain, in other words, they have to reach a consensus. However, reaching a consensus on distributed networks in a way that is both secure and efficient is far from easy.

So how can a distributed network of computer nodes agree on a decision if there is a certain probability that some of the nodes will fail or act dishonestly? This is a fundamental question of the problem of the so-called Byzantine generals, which gave birth to the concept of Byzantine fault tolerance.

What is the Byzantine generals’ problem?

In short, the problem of Byzantine generals was conceived in 1982 as a logical dilemma that illustrates how a group of Byzantine generals may face communication problems as they try to agree on their way forward.

The dilemma assumes that each general has his own army with each of them being located in a different location in the vicinity of the city they intend to attack. The generals must agree on either an attack or a retreat. It does not matter if they attack or retreat unless all the generals reach a consensus on what to do next.

Therefore, we can consider the following requirements:

  • Each general must decide: to attack or retreat (yes or no)
  • Once the decision is made it cannot be changed
  • All generals must agree on the same decision and act in a synchronized manner
  • byzantine generals dilema Figure 1: Byzantine general dilemma

    The above-mentioned communication problems are related to the fact that each general is able to communicate with the other only via messages forwarded by the courier. Therefore, the central challenge to the problem of Byzantine generals is that messages may be delayed, destroyed, or lost in some way.

    In addition, even if a message is successfully delivered, one or more generals may choose (for whatever reason) to act in a malicious manner and send a fraudulent message to confuse the other generals, leading them all to complete failure.

    The only way to reach a consensus on these types of distributed systems is to have at least ? of reliable and honest network nodes. This means that once the majority of the network decides to act maliciously, the system is prone to failures and attacks (for example, 51% attack).

    Byzantine fault tolerance (BFT)

    Simply put, Byzantine fault tolerance is a feature of the system that is able to withstand the failures not dissimilar to the problem of Byzantine generals. This means that the BFT system is able to continue to operate even if some of the nodes fail or act maliciously.

    There is more than one possible solution to the problem of Byzantine generals and thus more ways to build a BFT system. Likewise, there are different approaches to blockchain to achieve Byzantine error tolerance, which leads us to so-called consensus algorithms.

    Blockchain consensus algorithms

    The consensus algorithm can be defined as the mechanism by which a blockchain network reaches consensus. The most common implementations are Proof of Work (PoW) and Proof of Stake (PoS). Take Bitcoin as an example.

    While the Bitcoin protocol prescribes the primary rules of the system, the PoW consensus algorithm is what defines how these rules will be followed to reach a consensus (for example, when verifying transactions).

    Although the concept of Proof of Work is older than cryptocurrencies, Satoshi Nakamoto developed a modified version of it as an algorithm that allowed the creation of Bitcoins as a BFT system.

    Sources: academy.binance.com, medium.com

    Jakub is a crypto trader and founder of Trader 2.0 project, which helps hundreds of traders from central Europe to understand cryptocurrency trading and its challenges. Jakub not o...

    Comments

    Comments are closed.