Demistifying blockchain - Part 1

Blockchain is one of those buzzwords everyone is listening nowadays, but what it really is?

In this series of posts we will dig one general concepts about BlockChain and a little bit of its relation with BitCoin, as well as we will develop a simple blockchain in Go.

To put it simple, and as its name states, it’s just a chain of blocks. The interesting detail is that is a cryptographic chain providing some characteristics that make them really useful:

  • Tamper-proof
  • Distributed
  • Decentralized

We say a blockchain is tamper-proof because once a block has been added to the chain, nobody can modify it without also modifying its signature or cryptographic hash. But what if the attacker would also modify the signature to make it match its new content? A block stores as part of its data, the signature of the previous block in the chain (and that’s why it’s a chain), so if an attacker would try to replace a block in the chain (even using the correct cryptographic signature), would have to cascade the changes across all blocks from that one on until the end of the chain.

Blockchain diagram

Even though, that’s a plausible attack scenario. How can BlockChain avoid it? Making the chain distributed and decentralized, so an attacker trying to modify the chain, would have to modify all instances ot the chain distributed across the world. And it has to be done at once to more than 50% of the nodes in the network, because being a decentralized network means that there is no golden copy of the chain. All instances in the network are equal.

This also means that whenever someone tries to attach a new node to the end of the chain, the network has to agree to that action. Once the network has acknowledged or achieved consensus, the new block is considered permanently and successfully added to the chain.

These characteristics are what make the Blockchain a secure, read-only and distributed database.

BlockChain is in the bare-bones of Bitcoin, as the cryptocurrency uses a blockchain implementation as the public ledger system, and thus since the boom of cryptocurrencies, this type of databases have caught the interest of more and more researchers and developers.

In the following video you will find a more detailed explanation of what we want to implement in this series of posts. If the concept of what a block chain is is still not clear, please have a look to the video before going further in the series:

In the following post we will start implementing our own blockchain in Go, as well as going more in detail into the characteristics of block mining.