What is a blockchain?

Basics

To define it straightly, a blockchain is a decentralized digital storage system.

Let’s define these terms.

Digital storage system

A digital storage system is basically a set of hardware and software that allow for the storage and retrieval of digital information. You have surely already have such system at home if you have a computer, a digital camera or a phone.

Inside computers for instance, the data is stored onto an hard drive. In a digital camera, information can be stored on a memory card. And in your phone, you also have some kind of hard drive where you apps, photos, messages… are stored.

Therefore a blockchain basically serves the same role as a hard drive or a memory card: it is used to save information. But what makes it really particular is the fact that it is decentralized.

Decentralization

A computer hard drive, or a memory card is some kind of centralized storage. The person who owns or manages it has all the rights about it. If it gets stolen or destroyed, you lose all the data that is stored on it. If you fall for a ransomeware, your data is locked and you lose the freedom to access it. Or if the software on your computer or camera suddenly decides to make you pay to access your content, you are no longer able to access your data freely. Centralization therefore leads your data to be easily at risk and not fully under your control.

To avoid this risk, you can for instance distribute your data on different storages. You can keep a copy of your files on an external hard drive, or on a second memory card or on the cloud for instance. But again, if you are unlucky, you computer could crash and your cloud storage provider go bankrupt, or you could discover that your secondary storage has been corrupted. Or a pirate could take control of your computer and lock both your local data and your access to your cloud provider. Therefore even if the risk is slightly reduced, it is still present.

Decentralization pushes the data distribution to its extreme. The data is being copied to hundreds, thousands or even more places. This therefore makes it virtually impossible your data to get erased or for someone to fully take control of your data.

How it works

The blockchain runs on a set of computers, called nodes, linked together over the Internet. Every piece of data that is to be stored on the blockchain is sent to all of these nodes. The nodes will periodically package this data in blocks, and put a signature on the block to certify its authenticity before the block is being dispatched to all the other nodes and a new block is started.

This is where the name blockchain comes from. It stores data as a sequence of blocks, each block containing different pieces of data. Each block also keeps a reference to its predecessor to ensure the time order of the data, and thus create a data chain.

Mining nodes and miners

The signature is what makes the blockchain secure. But the signature we are speaking of is not just a simple stamp. This is in fact a complex mathematical challenge that makes it impossible for a bare human to calculate, and complicated for a computer to do so. The computers performing the calculation to solve the challenge is what is called a mining nodes.

These mining nodes are therefore standard nodes that hold a copy of the blockchain, but that also provide some computing power to find signatures. And a person which operates such mining node is called a miner.

The difficulty of the signature challenge is set so that among all the mining nodes on the blockchain network, only one, or perhaps two of them can solve the problem in a given amount of time.

Once a mining node has solved the problem, it sends the signed block to other nodes that will themselves cascade the information until all of the nodes, mining or not, have received the information.

Solving conflicts

But, you might ask, what if it happened that two different mining nodes solved the problem at the same time?

Well, in that case the blockchain network will temporarily contain two or more different versions of the blockchain. Temporarily as the problem will be solved thanks to a set of simple rules embedded in each node:

Rule 1: If a node receives a chain of blocks longer than the one it owns, then it shall use that new chain instead of the one it was using.

This is therefore the nominal scenario of a standard node receiving a signed block, or a mining node which failed at solving the challenge and that also receives a signed block.

Rule 2: If a node receives a chain of blocks of the same length as the one it owns, then the received chain is discarded and the node continues with its own chain.

This is the case which might happen in the case multiple nodes have solved the challenge at the same time and which will lead to multiple versions of the chain to coexist.

But in the end that second case will finally be resolved when the next block signature will be solved.

Let’s imagine we have two versions of the blockchain labelled A and B. As the probability of two mining nodes again solving the challenge at the same time is low, the chances are therefore high that this is the version of the chain owned by the mining node that will solve the next block signature that will replace the version owned by all the other nodes. Therefore, if the mining node that solves the new signature challenge had version A of the blockchain, A will become the only one remaining as the node will dispatch the blockchain A + the new block to all other nodes, and these nodes will take this new chain of blocks as their baseline by applying Rule 1.

And even if by an extreme fortune multiple nodes were again to find a signature at the same time, the problem will be solved by the next block signature with an even higher probability.

Security

This signature challenge and the rules are also what make it really hard for anybody to hack a blockchain.

Someone that would like to hack the blockchain would have to own sufficient computation power to have a chance to sign its version of the blockchain before any other node can do so, as if he is late his version of the blockchain will be rejected by the other nodes by applying Rule 1.

The risk is still present, though, if the number of mining nodes is limited. For instance, if you just had 100 of these mining nodes, therefore with 50 computers on his side a hacker might have fair chances to succeed. That’s the reason why a blockchain network must reach a critical size to prevent such attacks.

For instance, networks such as the Bitcoin blockchain network contain more than 1,000,000 miners, many with powerful and expensive mining rigs costing several thousands of dollars, or farms that might cost hundred thousands of dollars. This would therefore make it really expensive for anyone to try to hack such blockchain.

Stef

Leave a Reply

Your email address will not be published. Required fields are marked *