What is the Blockchain?
Blockchain is the technology foundation of cryptocurrencies, which has brought it into mainstream discussion. But trying to understand blockchain can be difficult, you’ve probably already searched many different articles and just want to simply understand what a blockchain is? That is what we intend to give you today “just what is blockchain”.
Let’s get started shall we.
What is a blockchain and what can it be used for?
Blockchains are about trust. They provide a mechanism through technology in which interested parties can trust each other by recording transactions in a distributed system which cannot be changed by anyone.
Before blockchain and generally in society today when we want to implement trust between untrusted parties we use intermediaries. If we think about the financial sector there are many well-known intermediaries for example Visa, MasterCard and American Express they guarantee credit card transactions.
We don’t just use intermediaries in finance. Think about another situation where we need trust between untrusted parties, for example voting in an election. When we cast our vote we need to know that it has been collected and counted accurately and fairly. Today we rely on a trusted institution, generally the government. However as we have seen institutions can fail. Consider the banking crisis of 2008 which has brought significant financial downward pressure to the world economy and the challenges of elections, even the US election has come under scrutiny in recent times.
What if there was a technology we could use to eliminate the intermediaries who are potential single points of failure and prone to self-interest, corruption and other concerns? We have this, it is a blockchain.
Blockchain was invented in 2008 when a white paper was published under the name of Satoshi Nakamoto which proposed a new cash system which would become known as Bitcoin.
Let’s consider some of the other uses we could have for a technology which acted as an arbitrator of trust. Blockchain could be used in any circumstance where trust is required, so the list is almost endless, but let’s quickly run through a few examples to build on our understanding:
Diamonds – blockchain will be able to unquestionably verify the authenticity and quality of a diamond
Payments – used as part of cryptocurrency payments like bitcoin. Allowing quick peer to peer payments
Luxury goods – similar to Diamonds blockchain is very good for tracking goods because it cannot be changed
Passports – A digital passport that due to the blockchain was impossible to change and issued without a central authority
Insurance – Records held in a blockchain so that they cannot be amended
How does Blockchain work?
So now we understand what it does let’s look at how it works. Again to keep this understanding of blockchain simple I am going to break it down into the components that make up a blockchain and explain each. Also at the beginning of each section I’ll provide a one line summary which if you don’t want to dig into detail you can use.
A block is a container of data, for example financial transactions on the Bitcoin network. Each block is assigned a unique identifier called a hash. The hash is based on the contents of the block, so if the block is changed in anyway so will the hash.
Show a single block in a blockchain
The first building block of a blockchain is in fact a block. A block is a collection of data that has been stored. If we think about the Bitcoin network as an example, every 10 minutes a block is written to the blockchain. That block contains all the transactions that occurred in the last 10 minutes, recording how much is being spent by who and to whom it is being transferred to. In the Bitcoin blockchain transactions would obviously be financial data but the blockchain can store lots of different data, so could just as easily contain data on an insurance claim.
Each block is given a unique identifier called a hash. A hash is a collection of letters and numbers and it’s based on the contents of a block, you can think of it as like a fingerprint for the block. A hash like a fingerprint is unique and based on the contents of the block, this gives us the first interesting property of a blockchain. We can maintain and track the integrity of data that has been written, because should anything change in a block its hash will also change.
A blockchain is a collection of blocks. All blocks in a blockchain reference the block before it and after it by its hash (unique identifier). Any change to any block, will also change its hash which will be seen by those blocks linked to it making the blockchain invalid. For this reason any data written to the blockchain cannot be changed or manipulated.
As the blocks all reference each other with a unique identifier based on their contents any change to the already written data will make the blockchain invalid.
I’m sure you’ve guessed this by now but a blockchain is basically a number of blocks. As more data needs to be written more blocks are added. A blockchain is formed as more blocks are added all referencing the block before it and after it by its unique identifier. The fact that each block has a unique identifier and each block in the blockchain references each other makes it super hard to change any information on the blockchain.
Showing a chain of blocks in a blockchain. Each with a unique hash shown as a finger print
Taking the example of Bitcoin every 10 minutes there are more transactions to record, these are added to the blockchain by the addition of an another block. It’s called a blockchain because each block not only contains the data of transactions taking place but also a reference to the hash of the block before it and after it. If you remember the hash of a block is unique to that block and the data within it.
This leads us to the next unique property of a blockchain that makes it so secure. If someone wanted to tamper with a block in a blockchain not only would they have to change that block but also the following blocks since through the chain they would all reference the one that has changed. This is why we call data written to the blockchain immutable. This basically means anything that has been written to the blockchain cannot be changed
Proof of Work
To add the next block in the blockchain computers in the Bitcoin network race to solve a complex math puzzle. The first computer to solve it adds the next block and is said to have mined the block.
Additionally to this, the blockchain nodes perform a proof of work operation. This is an activity that must be performed by the computers on the blockchain network to add the next block. This is by design a difficult task, in the case of Bitcoin the challenge is a math puzzle which takes approximately 10 minutes to solve. Hence why a block is added to the Bitcoin blockchain every 10 minutes.
This further increases the difficulty of changing a block and of course its hash. Since when the block changes you would again need to complete the proof of work again, which remember is a complex math problem that takes time. Not only would you need to change the hash of the block you are trying to manipulate but also all the blocks after it that refer back to it. Of course all this needs to be completed in the 10 minutes before the other nodes in the network add the next block.
The network is made safe by containing many participants, they agree on the state of the data through consensus.
Traditional computer systems operate in a many to one relationship with very tight security. A distrusted network is a many to many relationship with loose security anyone can join or leave. Security is ensured by the system design.
If the blockchain was handled by one computer this would be a little easier to understand. However, for additional security and because blockchains are about decentralization they exist on a decentralized network.
A centralized network is where all information is stored by one central body. For example anyone trying to look up something on Google will connect to Google’s web servers. All the millions of Google users connect through a single entry point. This is a many to one relationship.
Blockchains exist on a decentralized network, this means that the information in the blockchain is not held by one central body but by everybody taking part in the network. This can be hundreds or thousands of computer nodes, and the nodes do not need to trust each other because the technology takes care of everything. Each node contains a full copy of the blockchain and anyone can join or leave a network at any time.
As transactions come into the network all participating computer nodes race to add the next block. Specifically by solving the math problem we discussed earlier called proof of work. When a node solves the puzzle it is said to have mined the block and adds it to the chain. The node that mined the block then broadcasts to its nearest neighbor on the new block. These nodes now check that the blockchain looks correct with all expected hashes in place and if it does it also adds a new block. This process continues with each node informing its neighbors of the new block until all nodes in the network know about the new block. With this information they then resume mining, all racing to solve the math problem and to add the next block.
The distributed nature of the network makes it hard to attack, there is no one central computer to target. To attack the network from the inside you would need to control more than 50% of all nodes on a network.
In summary the blockchain is a trust machine. For the first time eliminating the need for intermediaries and central institutions who could potentially act in self-interest. The technology is decentralized and impartial only delivering the truth.