But what exactly is Blockchain?

A simple approach to understand how Blockchain works.

Harsh Jain
The Capital
Published in
7 min readJan 18, 2020

--

Since Satoshi Nakamoto introduced Bitcoin in 2008, everyone has been super-excited about the blockchain technology, often comparing this new technology to be a game-changer as big as the introduction of the Internet in the early 1990s. With the introduction of blockchain, 2008 also marks the beginning of Internet 2.0, a shift from the “The Internet of Knowledge” to “The Internet of Value”, where individuals can even transfer valuables (like money) to other individuals without relying on third parties (like banks, payment gateways, etc) or worrying about the government regulations. However, many of us still do not completely understand how Blockchain technology works.

First things first, often blockchain and bitcoin are considered to be one and the same. Well, they are not. Blockchain is a technology and Bitcoin is a cryptocurrency (digital alternative for fiat currencies like Dollars or Rupees) built using Blockchain. To get a gist of what I mean to say, think of Blockchain (the technology) as a lego box and Bitcoin (the cryptocurrency) as a house model that you just prepared using the lego pieces. There are other models like a train and a yacht, built using the lego products, similarly, there are other cryptocurrencies like Ethereum and Litecoin built using the blockchain technology. However, keep in mind that the Blockchain technology is not limited to being used to create a cryptocurrency, but there are endless applications of blockchain. It can be used for supply chain management, conducting online voting, protecting individual privacy on social media, storing information on the cloud, and the list is never-ending.

So now we understand that bitcoin is just a cryptocurrency built using blockchain. But what the hell is a blockchain? Wikipedia states -

Blockchain is a growing list of records, called blocks, that are linked using cryptography. Each block contains a cryptographic hash of the previous block, a timestamp, and transaction data. By design, a blockchain is resistant to modification of the data.

Prrrewww, I seriously did not understand a word of that. Let’s make this simple.

Think of Blockchain as your diary. Every night you write about the events that occurred during the day in your diary, for eg. 17 January 2020: 8 AM-2 PM school, 3 PM-5 PM tuition, 6 PM-8 PM football practice with Ronaldo and Messi. You mention the date and time against each event so that you can look up the diary and remember which event occurred on what day. Every night, as you write about new events, the story of your life grows in the diary. Once you have written about an event, you cannot ever remove it from the diary as the ink won’t come off the paper (and you obviously can’t go in the past to change an event). Now think your diary as a blockchain and the story that you write each night as a record. As a new record gets entered, the blockchain grows, hence “blockchain is a growing list of records”, where each event is timestamped. On top of that, it is immutable, that is, once a record (a.k.a. block) has been entered into the blockchain, no one can ever modify or delete the record.

But we know for a matter of fact, anything stored on a computer can easily be modified. By simply pressing a backspace, you can remove a letter in a word document.

How does blockchain ensure that the record is not modified?

Before we go on, imagine that you are very particular about what you write in your diary, and you do not like anyone adding anything in your story behind your back. So, every night before writing a new record, you count the number of letters in the record of the previous night and mention the previous records’ letter count at the beginning of the new record (the letter count of the previous day record also includes the number of digits in the letter count of the day before). This way, you can easily verify if anyone has added even as much as a letter in any record of your diary, by simply counting the number of letters in a record and comparing it to the count in the next days’ record. See, what a neat simple hack.

Something similar happens in the case of a blockchain. Only, instead of storing the number of letters, the “hash” of a block is stored in the subsequent block. This hash is referred to as “Previous Hash” in the blockchain world. A “hash“ is a cryptographic function that takes some input (of any length) and provides a unique output (of fixed size). If the input to the function changes, the output changes too. So imagine, if in a 10-block blockchain, someone tampers with block number 7 (i.e. adds, removes or modifies even a single letter in the block), the input to the hash function changes and hence, the hash of block 7 changes. This changes the “Previous Hash” of block number 8 (the subsequent block), resulting in a modification in block 8 (“Previous Hash” is also a part of the block). This now leads to change in input to the hash function (for block 8) and thus, the “Previous Hash” of the next block, i.e. block 9 changes. You see where I am going with this. A single change in any block in the blockchain penetrates up to the last block and modifies the hash of the last block. Thus, by simply keeping a track of the hash of the last block, one can easily know if any changes were made in the blockchain. If this hash does not match in the future, you know that the data has been tampered with. You simply replace your copy of the blockchain with another copy in the blockchain peer-to-peer network where the hash matches (and thus you know the data in that copy is correct). What a clever solution.

Wait, what? A copy in the blockchain what? Okay, stick with me, let’s make this simple. We now already know that blockchain is a very powerful concept as it has so many applications. But we still have to discuss one of the most powerful aspects of blockchain.

Remember the demonetization of Indian Currency back in November 2016? Or the Facebook-Cambridge Analytica data scandal in March 2018? People have since then hated that all the decision making power lies in the hands of so few people (Centralization of power) and they misuse this power. But what is the solution? Well, here comes blockchain to the rescue.

New information gets added to the blockchain in the form of blocks, which are connected to the previous block by a hash value (Remember, every block stores the hash value of the previous block?). The twist is, everyone in the world holds the same copy of the blockchain. The addition of a new block in a blockchain means that the same change has to be made on every other copy of the blockchain stored on other devices. All these devices communicate with each other to propagate and add the new block to their own copies of the blockchain. But before adding the new block to their own copy of the blockchain, each device individually verifies if the information being added to the blockchain is legit or not. Thus, in a way, everyone has the power over their own blockchain copy, but no one literally holds the power over the blockchain as a whole, as they can not prevent others from adding the block to their copy of the blockchain. Whatever information is accepted by more than 50% of the people (that is has a majority) is accepted to be legit and true.

All these devices together form what is known as a blockchain peer-to-peer network. The devices ensure that everyone on the network agrees about the same state of the blockchain by using a consensus algorithm. Let’s leave for some other time what consensus algorithm is and how it works. For now, just think that magically, all the devices communicate and agree on the same state of the blockchain and if any device misbehaves or tries to convey false information, it is automatically ignored by the rest of the members in the network (Same state meaning that every device agrees which block comes after which, i.e. the order of the blocks in every copy of the blockchain is the same). Since there is no unique location/computer/mobile where the blockchain is stored, no one can control what is stored and what is not stored on the blockchain. Thus, there is no central authority controlling the blockchain.

The idea of not having a single authority acting as the central authority is known as decentralization. And the idea of storing the information at multiple locations is known as distributed. Thus,

“A blockchain is a decentralized, distributed, and a public, digital ledger that is used to record transactions (information) across many computers so that any involved record cannot be altered retroactively, without the alteration of all subsequent blocks.” — Wikipedia.

--

--