What is Blockchain?
Cryptocurrencies are almost always built on top of a distributed public ledger called the Blockchain. This ledger is a core part of crypto’s architecture. It is designed to maintain that the network stays decentralized, that is not controlled by any one central party.
Before getting into what the Blockchain is, it would be beneficial to start with how we got here in the first place. The Blockchain is – at a most basic level – a simple and powerful solution to a famous problem in Computer Science.
The Byzantine General Problem (BGP)
Imagine it’s the year 500 and you’re a General serving in the army of the Byzantine Empire. You command a division of the army and there are more Generals like you, each commanding their own division.
But alas, the city’s residents are putting up a good fight and refusing to surrender.
As a group, you have to decide what to do: do you attack the city or retreat? [Generals vote on whether or not to attack.] The most important thing is that attack will only work if all the Generals participate in it at the same time; if only half of the Generals lead an attack, it will not be successful.
Here is where it gets complicated. The Generals are spread apart geographically and can only communicate with each other through messengers. Some of these messengers may deliver votes inaccurately. Worse, some Generals might be traitors and may deliberately deliver one vote to attack to one party and another vote to retreat to a second party.
Since communication can only be done via messenger, a messenger can also lie about the message received or send conflicting messages:
The illustrations above show a small number of Generals and therefore a small number of messages (or communication channels) between them. With a small number of these links, we can already see a lot of potential problems. Imagine what happens as the number of Generals and messengers (the parties in the system) increase.
What do you do? How do you guarantee that you and your loyal General friends reach a majority agreement and that any traitor General can’t cause a problem?
This scenario, first proposed in a 1982 academic paper titled, “The Byzantine Generals Problem,” has been a long-standing issue in distributed systems, a field of computer science.
The creator of Bitcoin, a person, or persons, going by the pseudonym Satoshi Nakamoto, was the first to propose an elegant solution to this famous problem, through what they called a Blockchain.
The Blockchain is simply a public database that has a record of every transaction in a system in chronological order. If the Generals were using such a method, it could look like something like a list of lines with such statements as:
- General A told General B attack at 5pm
- General B told General C attack at 6pm
- General C told General D to retreat
and so on and so forth
Nakamoto built a system where any user can download this public database (or ledger) of all transactions since the Bitcoin network started. There is no central record keeper - like a bank or a government - that controls this ledger. Rather, it is distributed across the world and anyone - including you or I - can download the Blockchain and see all the transactions that have ever happened from the very beginning.
We can do even more than that. We can write new entries in this Blockchain - to add new transactions - or we can verify that what others have written to the Blockchain is truthful and not forged. What is revolutionary about this is that the Blockchain allows a group of people spread across multiple geographies and perhaps distrustful of each other to reach a distributed consensus.
How does that actually happen? If anyone can download this Blockchain, how do we make sure that all these Blockchains are kept in sync and identical?
We saw a traitor General get the message “Attack” but lie and say that the message was actually “Retreat”. How can we ensure that no malicious party falsely edits a previous transaction or message?
We also saw a traitor General send two conflicting messages, simultaneously telling one General to “Attack” and another to “Retreat”. How does the Blockchain receive conflicting messages and realize which one is truthful and which one is false? How does it know which message to accept and which to ignore?