Do you still have questions about what a blockchain is? This step-by-step analysis begins with a simple idea like a computer and progresses from there.
What the Hell Is a Blockchain, Exactly?
People who work in mathematics, cryptography, and network engineering frequently discuss blockchains using a lot of technical language. Blockchains, it turns out, are simpler than you may assume, at least in most cases.
As a person born in 1995, I've always considered myself computer literate, yet I battled for a long time to understand what a blockchain was. Starting with the most fundamental notions and gradually building up from there was what ultimately worked for me.
So, in this explainer, we'll start with the basics of a computer and work our way up to a blockchain.
* A blockchain is a database, specifically a distributed database.
* The information maintained on a blockchain is comprised of cryptocurrency transactions.
* Unlike traditional databases, blockchains store data (transactions) in chronological groups known as blocks, rather than folders and tables.
* Unlike a centralised database managed by a firm or government, the blockchain of Bitcoin is open and accessible to anybody.
* Unlike databases, which may add, remove, or amend information, blockchains can only be added to.
What exactly is a computer?
A computer is an electronic device that can read and manipulate data. Desktops, laptops, tablets, game consoles, and cellphones are all examples of computers.
Data is simply information, and it can take many forms, including videos, photographs, and text. Previously, we saved this type of information on physical items such as paper or film. We can store this information digitally using computers.
The combination of components in modern computers enables us to rapidly and easily access and alter all of that data in digital representation.
What exactly is a server?
Servers are computers that provide hosting for websites, files, databases, and other services. When you visit a website or utilise a service, you are connecting to the server that hosts it. For example, when you access your Gmail inbox, you are connecting to a Google server that provides the Gmail service.
Every computer has an IP address (internet protocol address), which is effectively the machine's mailing address. The name of a website is basically just a code for the server's IP address where the site is hosted. When you type Google into your browser's search box, you are directed to the server that houses Google.
Servers can be configured such that multiple servers use the same IP address, allowing major websites like Google to distribute traffic across thousands of servers.
What exactly is a database?
The next step in comprehending blockchain is comprehending what a database is.
A database is a massive collection of information that is stored on servers and is easily accessible, maintained, and updated.
This massive collection of information, or "data," may necessitate the use of hundreds or thousands of servers housed in massive facilities known as server farms (huge buildings with thousands of computers).
Large internet corporations, such as Amazon and Google, keep their websites, apps, and users' data on huge server farms. These databases are typically controlled by a small number of authorised individuals and are housed in a single central place. This means that its security is solely dependent on the server farm not malfunctioning or those with access not being infiltrated by hackers.
Data could be destroyed if a fire breaks out at the farm, or it could be disclosed if a hack occurs. The central location and control points provide obvious targets for hackers. As a result, some databases are distributed among computers in several physical locations. This type of database is known as a distributed database.
What exactly is a Distributed Database?
For security purposes, distributed databases are stored in servers that are geographically spread rather than in a single central place. These servers are commonly referred to as nodes in the context of a distributed database.
As a result, if one location fails or is hacked, the other nodes in various locations can continue to run and maintain the database.
Because blockchain is essentially a distributed database, you should have a better understanding of it now that you've grasped the ideas up to this point.
What exactly is a blockchain?
Consider a blockchain to be a type of database, specifically a distributed database. The primary differences are the sort of data stored, how it is stored, who has access to it, and the fact that data on a blockchain cannot be changed or destroyed.
It should be noted that blockchains can be “permissionless” (available to anybody, like Bitcoin) or “permissioned” (built by a company or group that only gives certain people access). This article covers blockchain in the context of Bitcoin, a permissionless cryptocurrency.
What it stores: The blockchain of Bitcoin is a form of distributed database that stores Bitcoin transactions.
How it stores stuff: Unlike a traditional database, which stores information in arbitrary folders, Bitcoin transactions are recorded in “blocks.” As new transactions occur, they are bundled together in what are known as blocks.
These blocks can only hold so many transactions before being chained onto the preceding block and added to the long chain of transactions (thus the term "blockchain").
This generates a chronological history of transactions, similar to a ledger, beginning with the first transaction in the first block and ending with the last transaction in the most recent block. The blockchain stores these blocks in a fashion that allows us to see a complete history of Bitcoin transactions.
Who has permission to enter: Bitcoin's blockchain, like a database, requires a collection of computers to work. Bitcoin's blockchain, like distributed databases, is not stored in a single central location. Instead, it is scattered among a number of machines and places. This way, even if one computer fails, the data (the ledger of transactions) is kept alive by a large number of others.
The computers that run normal databases are operated by governments or corporations, but Bitcoin is run by ordinary people using personal computers. Those who want to run the blockchain as a node download Bitcoin's open-source software as well as the entire, or partial, history of Bitcoin transactions.
Transactions cannot be modified or deleted: Another key distinction between databases and Bitcoin is that, unlike databases, Bitcoin transactions are irreversible. In that respect, Bitcoin's blockchain is analogous to a database that can only be added to, with no transactions that can be changed or erased.
What Is So Special About Bitcoin If Blockchain Is Just a Type of Database?
Not only that, but how does such a database keep its data up to date? And how can it be considered secure if anyone can simply start running a node and participate?
These are all excellent questions, and here is where Bitcoin truly shines. While the underlying notion of Bitcoin's blockchain is simple, it contains elements that make it a significant accomplishment in computer science.
The Byzantine Generals Problem in computer science had never been completely addressed until Satoshi Nakamoto introduced Bitcoin. During a NASA-sponsored computer science project in 1978, Robert Shostak discovered and defined the problem.
An analogy to the problem, as detailed in a 1982 paper by scholars Leslie Lamport, Robert Shostak, and Marshall Pease, goes as follows:
“We envisage numerous divisions of the Byzantine army camped outside an enemy city, each with its own general. Only messengers can communicate between the generals. They must agree on a single plan of attack after observing the enemy. Some of the generals, however, may be traitors attempting to hinder the loyal generals from reaching an accord."
So, how do the generals ensure that everyone is on the same page and that the information they are receiving is correct? If they don't all work together, they might lose the battle.
Consider this, but instead of generals, consider nodes in a database. How can a database develop a consensus on the right set of data if certain nodes in the database fail and begin providing false information to the others?
While a centralised database maintained by a government or organisation has administrators who can remedy the mistake, a distributed database controlled by random internet users, such as a blockchain, may not be able to.
Satoshi Nakamoto created a consensus mechanism known as proof-of-work to tackle this problem.
What Exactly Is a Consensus Mechanism?
A consensus mechanism is a technology that enables nodes in a distributed computer system (database, blockchain, or another) to "agree" on the proper set of data. Simply explained, it is a set of norms that permits everyone to agree on what is correct and incorrect.
This provides security to blockchain networks and allows participants (nodes) to verify the legitimacy of data transactions without needing to trust each other.
To tackle the Byzantine problem, Nakamoto created a consensus technique known as Proof-of-Work (PoW), which uses the Bitcoin keyword "mining."
Simply explained, proof-of-work refers to the method through which Bitcoin nodes compete for the opportunity to update the blockchain with a new block of transactions. The goal is to solve a very complex puzzle before the other nodes.
This problem is extremely difficult to solve, but once completed, it is easily verifiable by the remaining nodes. As a result, the node must supply an answer, often known as a "proof," that everyone else can simply verify whether or not it is correct.
Nathaniel Popper's book, Digital Gold, contains one of the better metaphors I've read for the complex puzzles nodes solve.
“... it is very simple to multiply 2,903 and 3,571 using a piece of paper and a pencil, but it is much, much more difficult to figure out which two numbers can be multiplied together to produce 10,366,613.”
In this instance, the node must estimate various permutations of numbers until the proper result is reached by determining what two numbers multiplied together result in 10,366,613. The node then sends the answer (which is 2,903 and 3,571), or "evidence," to other nodes, who can quickly multiply the numbers and confirm that it is true.
The first node to solve the challenge gets to broadcast the block of transactions to the other nodes. This ensures that only those who have expended sufficient effort and computational capacity are granted the ability to add new transactions to the ledger.
When nodes get a new block, they do a sort of audit of prior transactions to confirm that the new transactions add up correctly and that the correct amount of Bitcoin is still on the ledger.
After all nodes confirm that the transactions in the new block make sense in relation to the prior ledger entries, the new block is chained to the previous block and saved to the blockchain in perpetuity. The node that solved the problem receives Bitcoin as a reward.
This is sometimes referred to as "mining," because the computer effort required by a node to earn the Bitcoin reward can be thought of as the digital equal to the real-world work required by gold mine.
Because adding a new block to the chain requires so much processing work, it becomes hard to attempt to add fraudulent transactions such as adding extra Bitcoin to one's wallet. If someone wanted to try this, they would need to control more than half of all Bitcoin nodes and computing power in order to create a new block and have the majority of nodes accept and validate it as authentic.
Given the size of Bitcoin's blockchain now, the initial expense of the computing equipment required to undertake such a thing would be essentially impossible for any party or even government to achieve.
Even if it was effective, people would discover a flaw in the system and sell their shares, depreciating the cash they were attempting to counterfeit.
As a result, the proof-of-work mechanism successfully addresses the byzantine problem since nodes may trust new transactions (data on the blockchain) without having to trust or know each other. And, because there is a financial incentive to join rather than attack the network, Bitcoin's blockchain will stay Byzantine fault-tolerant for as long as people believe Bitcoin has value.
The combination of these characteristics yields an indelible log of economic transactions owned by the collective of its users rather than any firm, government, or group.