To help understand the blockchain, let’s examine a classic agreement issue known as The Byzantine Generals problem.
In this scenario, several army troops surround a castle they hope to conquer. Each troop has one general designated as the lead.
The troops are dispersed, so a central command is difficult.
To coordinate, the generals must relay a message instructing when to act, but only a simultaneous attack ensures victory.
The problem is that the generals do not know who is loyal and who is a traitor. So how can the generals reach a collective decision and conquer the castle?
This is where blockchain comes to the rescue.
The blockchain uses a distributed ledger, which functions like the distributed attack. Inputs to the ledger (like the attack messages) must be trusted.
Much like the troops surrounding the castle, how can a network trust the other members AND ensure that the messages are valid?
Here is how:
All participating members must agree on every message that is transmitted. If a member is corrupt -OR- the message is corrupt – then the message will be resisted, and the network will not be affected.
Before broadcasting their message to the block – a miner is required to compute a complex “proof-of-work” puzzle. Solving this correctly creates a hash, validates the message, and a “consensus” is reached.
In the case of the Byzantine generals, proof of work on the blockchain ensures that they can only send trusted messages to the troops, which guarantees a successful coordinated attack.