Which protocols and algorithms should you learn to understand Bitcoin?
3 February 2021This article was published on 2017, updated february 2021.
Innovations from Bitcoin and Blockchain-related technologies have given birth to a new species of distributed systems. Today, these distributed systems are entirely decentralized. They are valued at billions of dollars and are already operational on a massive scale.
On the technical side, the field is exploding with innovation. It can be hard to keep track as each week new discussions, algorithms, and projects pop up.
So, as a developer, how do you get started with Blockchain? Where to start to understand these technologies? And which algorithms should you learn to create your own blockchain, or dig into the existing ones?
As I explained in a previous post, the revolutionary power of Blockchain is its ability to generate Consensus in a decentralized & hostile environment. Here’s a quick recap of an example illustrating this:
I have a network of computers. They communicate with each other by sending and receiving messages.
I want this network to make decisions, like moving money from one account to the other.
I also want to protect some rules despite the presence of hostile machines on the network. For example, a cheater should not be able to spend twice the same unit of Bitcoin.
There are 3 Fundamental Components of systems like Ethereum and Bitcoin:
- They allow for data to be efficiently exchanged in an organic network
- They ensure the Data’s integrity
- They enable the network to converge to a new state
These mechanisms run in a decentralized setup. By design, no member of the network has more power than the others.
1. Exchanging data efficiently in an organic network
Any individual may connect and exchange data with the rest of the network. We rely on the Peer-to-Peer (P2P) protocol for this. The name “Bitcoin” comes from its proximity to “BitTorrent”.
With this protocol,
- Participants may join and leave the network without consequences
- Hostile members won’t hamper communications in the network
- The network is self-organizing and self-optimizing; no central Orchestrator filters and organizes the participants.
2. Ensuring the data’s integrity
Every participant should be able to verify the current state, as well as check and accept new states quickly. For that, we use Blockchain structures.
With these structures:
- Participants agree on a set of rules and can ensure these rules have been respected at any time
- Each member may accept and verify the whole data set; there’s no central authority responsible for the quality of the data
- If a hostile node tries to tamper with the data, it is detected and denied quickly
3. Converging to a new state
At this point, we can exchange data (P2P) and verify it (Blockchain). Now we want the system to be able to make decisions.
It should be able to process operations like: Transfer money from account A to account B
.
Or more generic: Modify storage space X with data Y
.
With a single user, that’s easy:
- The user sends a transaction to one machine of the network.
- The machine verifies the transaction then propagates it through the network.
- Other machines verify, accept and propagate the transaction.
That’s how a distributed database works.
But as the scale increases to millions of participants and millions of concurrent transactions, the way you pick and propagate new states becomes critical.
Some methods limit, by force, how often new states are proposed to the network (Proof Of Work). Other methods mimic the “classic” approach of Leader Election (Proof Of Stake). Some platforms choose to relax some of the constraints on the Blockchain to go around the problem(Tangle).
What all these algorithms have in common, however, is:
- That every participant may propose modifications to the state of the system.
- That each node can be part of the consensus protocol that picks the next state (the current block).
- That the network quickly converges, despite concurrency, conflicts and hostile participants.
Finished? That’s only the beginning!
These are the three fundamental pillars of decentralized systems like Bitcoin. They enable the design of a reliable system without a center or borders.
The network is organic (P2P). We can enforce rules (Blockchain). And the system can progress and take decisions (PoW, PoS).
Note that this domain is far from mature. We should expect a Cambrian Explosion of solutions and use cases for this Decentralized Consensus in the near future. But understanding these three mechanisms will help you a LOT to understand the Blockchain Ecosystem. They are at the heart of understanding the “Quantum Leap” that started the Bitcoin & Inc boom.
In the next articles, I’ll detail each of these mechanisms and provide examples. If you want to get details about the algorithms and how to implement them, I’m launching a newsletter: register below!
Laurent Senta
I wrote software for large distributed systems, web applications, and even robots.
These days I focus on making developers, creators, and humans more productive through IPDX.co.