byzantine generals problem warrior

The biggest challenge to decentralized networks may also be the least understood.

How do you reach an agreement when you can’t trust communications from others? This internet-famous quandary is called The Byzantine Generals Problem, and it predates the first blockchain.

But Bitcoin’s algorithm solves this programming dilemma by replacing trust with its Proof-of-Work consensus mechanism. Bitcoin miners use specialized hardware to validate each block, a costly and energy-intensive process that disincentivizes fraud.

Why Is It Called the Byzantine Generals Problem?

The moniker of Byzantine Generals Problem, first coined in a 1982 research paper, offers a colorful way to describe the complexity of the challenge.

If multiple armies under multiple generals intend to invade a city, how do those generals communicate, choosing an exact time to invade?

byzantine generals problem illustration

If only one of the armies invade the formidable city, the result would be a resounding defeat for the invading army. Success requires a unified attack to succeed, which means the generals need to coordinate their advance.

But how do you coordinate such an attack while decentralized, and how does each general know that communications from the other generals are valid? After all, one of the generals could be a traitor, altering the messages to assure defeat for the other generals.

Applying the concept to Bitcoin’s blockchain, replace generals with nodes. A node is a computer on the network that keeps copies of the blockchain and decides which blocks are valid. But how do the nodes know the last block is valid and should be added to the blockchain?

Bitcoin trusts no one. Instead, the Bitcoin blockchain only moves ahead when there is a consensus amongst nodes that a block’s validity has been proven mathematically. With over 14,000 reachable nodes on the network, each ensuring that submitted blocks follow protocol rules, Bitcoin provides a digital army of validators to defend the blockchain’s integrity. Other estimates put the number of Bitcoin nodes at over 44,000, many of which establish private connections through the TOR network, making the true number of nodes difficult to track.

Putting armies aside for a moment, each new block and the transactions it contains can only be added to the Bitcoin blockchain after showing mathematical proof that the block is valid. Each new block also references the prior block, which references the block before itself, ad infinitum, making changes to prior blocks by bad actors nearly impossible.

A bad actor would need to re-mine the block it wants to change but also re-mine every subsequent block because each references the last in its hash value. And the bad actor would need to complete this intensive process before the next block is mined, which happens once every 10 minutes.

If one node broadcasts invalid information, thousands of other Bitcoin nodes recognize the information as invalid and ignore the information being broadcast. This structure is called Byzantine Fault Tolerance (BFT), meaning the network can form a consensus even if some nodes do not agree or if some nodes are bad actors. If a block follows Bitcoin’s protocol, however, it is added to the blockchain by the other nodes, confirming a path forward without a need for trust or a centralized authority.

In centralized networks, the Byzantine Generals Problem isn’t a problem at all. Instead, a centralized authority dictates what is and isn’t valid, a structure that creates a number of problems of its own, ranging from censorship to debasement to confiscation. In effect, fiat money, which is money by decree, also uses a validation system also determined by decree. Fiat puts its trust in a centralized authority, one which may or may not have values that align with yours.

While the Byzantine Generals Problem has other blockchain applications, its relevance becomes most apparent when we use cryptocurrency as money. Bitcoin is sound and neutral money due to its trustlessness.

Byzantine Generals Problem vs. the Two Generals Problem

Although similar in name to the Byzantine Generals Problem, the Two Generals Problem refers to a different challenge. The Two Generals Problem focuses on the question of confirmations.

How do you know that the last message was received by the other party?

Well, you send a confirmation, of course.

byzantine generals problem: two generals problem
Two generals’ problem infinite loop

But at some point, these confirmations have to end, or they could go on forever.

Networking applications use various solutions ranging from terminating the connection after X number of confirmations to predefined timeouts. But none of these solutions are perfect. Each still leaves room for error because there’s no way to know if the last message was received.

While not perfect, they are deemed good enough to be used in the real world. The internet route you used to navigate to this page used TCP with a finite number of confirmations. In other words, it makes an assumption that you’re connected.

By contrast, the Byzantine Generals Problem, in a cryptocurrency context, can’t leave room for error. Either it’s solved, or it isn’t. Anything less than a complete solution allows bad actors or errors to corrupt the network.

Bitcoin’s Solution to the Byzantine Generals Problem

Several validation methods seek to solve the Byzantine Generals Problem, including Proof-of-Work (PoW), Proof-of-Stake (PoS), Distributed Proof-of-Stake (DPoS), and Proof-of-History (PoH). However, Proof-of-Work is objectively the most rigorous of these methods, offering the most robust security by requiring considerable resources to add a new block of transactions to the blockchain. Once a block is added to the blockchain, altering a block also requires considerable cost, making backdated changes untenable.

Bitcoin’s PoW provides a clear path forward for network nodes and also prevents double spending while remaining decentralized. By comparison, in the current fiat money system, banks address double spending through a combination of real-time balance checks and reconciliation which takes place after the transaction has happened. In other words, fiat allows occasional (temporary) double spending, although there’s usually a financial penalty for banking overdrafts.

There’s still debate over whether other consensus mechanisms, such as Proof-of-Stake, solve the Byzantine Generals Problem. Crypto projects using other consensus methods often also have different goals or a focus on utility in various applications, possibly making the question less relevant within their respective spheres. Bitcoin, however, was designed to be peer-to-peer money, making a trustless form of consensus an absolute requirement.

Frequently Asked Questions

What is Byzantine Fault Tolerance (BFT)?

When a computer within a network responds with incorrect information or fails to respond at all, the condition is known as a Byzantine Fault. A network that can form a consensus (agreement on validity) despite this roadblock has Byzantine Fault Tolerance (BFT). Bitcoin’s protocol has BFT built into both its code and its ethos, making it possible for Bitcoin to operate reliably while remaining decentralized.

How old is the Byzantine Generals Problem?

Although Byzantium was an ancient Greek city, the Byzantine Generals Problem has more recent roots, tracing back to a computer science research paper authored in 1982. The commonly used term offers invading armies as an example when referring to the challenge of establishing trustless consensus within a decentralized network.

Similar Posts