Byzantine Generals Problem

in crypto •  2 years ago 

Picture this hypothetical scenario: There is an army of soldiers surrounding the Byzantine Empire. These soldiers are ready to attack, but the generals must first decide on a common plan of action. If all generals attack at the same time, victory is guaranteed. But if they attack at different times, then the battle is lost.

These generals have no secure communication channels amongst themselves; the enemy could intercept or tamper with any messages. This begs the question: What can they do to ensure all generals attack at the same time?

The Byzantine Generals Problem is a highly relevant issue for cryptocurrencies, as they are a distributed computer system without a central authority. Like the generals trying to reach a consensus, these computers, also known as nodes, have the job of achieving consensus on cryptocurrency transactions.

How to Agree

In the simplest of terms, a blockchain is data that is processed and recorded by a group of computers, who work together to ensure the authenticity and security of these data transactions.

But how can we ensure that these transactions are, in fact, verified and secure? Blockchains are, by nature, decentralised and distributed, meaning that there is no central authority to exercise governance over the system. To ensure that protocol rules are being followed and prevent any unethical behaviour, blockchains apply various algorithms to achieve what’s known as consensus between trustless entities.

Quick Definition of Consensus

Consensus can be defined as the agreement of a group of agents on their common states via local interaction.

In the context of blockchain, consensus is a procedure in which the peers of a Blockchain network reach agreement about the present state of the data in the network. It’s these consensus algorithms that establish reliability and trust in Blockchain systems.

While consensus is fairly easy to achieve in centralised networks where one governing authority is trusted to validate transactions and safeguard records, it is far less straightforward in the case of decentralised systems.

Consensus in Blockchain

Blockchain works by adding blocks of data and the essence of consensus is to ensure that every block that is added to the chain is the one and only version of the truth that’s agreed upon by all the nodes in the system. It is a key feature of the decentralised nature of blockchain.

The base rules for consensus in blockchain include:

  • The objective of coming to an agreement
  • Collaboration, cooperation, and equal rights to every node/peer, and
  • Mandatory participation of each node in the process

There are many different approaches to reaching consensus on decentralised systems. Here we look at different ways to agree and form consensus.

Nakamoto Consensus

The mother of all blockchain consensus, the Nakamoto consensus protocol was devised by Satoshi Nakamoto in 2009 as a new means of verifying the authenticity of a blockchain network and preventing double-spending. It is a Byzantine fault tolerant consensus algorithm that works in conjunction with proof of work (PoW) to govern the Bitcoin blockchain.

Byzantine fault tolerance (BFT) is a condition where a distributed system can remain fault-tolerant in the presence of malicious actors and network imperfection.

While PoW refers to the cryptographic mechanism whereby miners compete against one another to solve extremely complex (and expensive) computational puzzles in order to earn the right to validate a new block and earn a ‘block reward’. This monetary reward incentivises miners to follow the rules and stay honest, while the participation costs serve as an economic disincentive for them to attack the Bitcoin network, further securing the blockchain.

Through the combination of BFT and PoW, Nakamoto sought to circumnavigate some of BFT’s inherent issues with scalability, while deterring bad actors. By creating a standard measurement for the blockchain’s validity – in this case, the amount of computational resources (or ‘hashing power’) spent on it – Nakamoto opened a new direction for solving the Byzantine Generals Problem in a permissionless setup. One that would lead to the emergence of many new consensus algorithms, including proof of stake (PoS), proof of history(PoH), proof of authority (PoA), proof of reputation (PoR), and proof of importance (PoI).

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 BLURT!