n*rd*nc*d

What is a 'Blockchain'? [Read me first]

The beginning

Suppose you are still confused after googling the word 'Blockchain'. This article will hopefully help you because I aim to help you understand the word's meaning!

If you wanna know more about "Blockchain", you must have heard of "Bitcoin". It's one of the first digital currencies that uses Blockchain as its protocol.

Bitcoin white paper (released in 2008) is unique and revolutionary because it outlines how Bitcoin can make a peer-to-peer transaction in a decentralised network. The protocol was considered radical compared to the centralised network we were and are primarily in today.

Wait, you might ask - what is the centralised and decentralised system? Why is it a big deal?! Good question. Here is an article that should help you 🦊

breathe...

Blockchain definition

A Blockchain is a type of Digital Ledger Technology that consists of a growing list of records, called blocks, that are securely linked together using cryptography.
Wikipedia
Heh?

Wait, what is Digital Ledger Technology? A growing list of records for what? And why linked? Cryptography is something like Benedict Cumberbatch did at The Imitation Game, right?

So many questions in one paragraph, some people get this right away, and some don't. This article is for those who don't because I can relate with them so much.

breathe...

Story

Ok, so forget about all the jargon and imagine this...

It was the year 2008...

There are three best friends named Eki, Dwi, and Tri. They dream of building a fancy shared house where they will grow old together. Yes, they got it all figured out 🌈

So starting January 1st 2008, they pledge to give 10% of their monthly income to their joined account. Mind that they are entrepreneurs, so their monthly payments are never the same, and they don't want to involve any banks because they have been hearing about this financial crisis that might push banks to go to shitholes. Spoiler alert, they were right. Banks did go to shitholes, and lots of people lost money.

Before they started saving, the trio mulled the security aspect of protecting their assets without the bank and devised three rules. These rules are simple yet robust:

  • Data of transactions

    Purpose: Keep track of who gives how much, the flow of the money, etc

  • Fingerprint hash

    Purpose: Hide the data they store above using fingerprint recognition and cryptographic methods

  • Fingerprint hash from the previous block

    Purpose: To form a chain history and to make sure that everything matches as it should be (tamper-resistance)

breathe...

Fingerprint hash?!

What the heck is "fingerprint recognition and cryptographic methods"?

It's just a fancy way of saying when you type something, it will encrypt your data into something unreadable to humans.

As an example, if you put data:

Eki  200, Dwi  199, Tri  90

It will be encrypted to hash:

00000d8f25735dfa0c6c0a95cda7f612204fe5d2f2890f43b768bfbd1b8a4640

This hash will change if you change the data. Yes, even a slight change.
`Eki` to `Eka`? Hash won't match.
`€ 200` to `€ 201`? Hash won't match.
You get my point.

The combination together of
Data of transactions,
Fingerprint hash, and
Fingerprint hash from the previous block
will look something like this:

Example Blockchain flow
Each block contains the previous block's hash, forming a chain structure. Hence the name "Blockchain".
breathe...

How is this secure?

Let's do this in a realistic case with Eki, Dwi, and Tri. Say they have been saving for years.

There are 120 blocks before this...

Latest hash: 8ff4f69bd4aa061d730be249cc4ec2d9d435280943cbf39dbd84a297678a5a56
  • Data: Eki € 150, Dwi € 100, Tri € 105
  • Previous hash: 8ff4f69bd4aa061d730be249cc4ec2d9d435280943cbf39dbd84a297678a5a56
  • Hash: 000075d7082edbcb33f29d7fa2130dab1824dc4327e457c5acc222971a18e06e
Block 121 Mined
  • Data: Eki € 300, Dwi € 180, Tri € 250
  • Previous hash: 000075d7082edbcb33f29d7fa2130dab1824dc4327e457c5acc222971a18e06e
  • Hash: 9f4e1bcd0898ea6da1fba11c5e2611d56468cff8ba86a316541d09cb367b4870
Block 122 Mined
  • Data: Eki € 100, Dwi € 280, Tri € 350
  • Previous hash: 9f4e1bcd0898ea6da1fba11c5e2611d56468cff8ba86a316541d09cb367b4870
  • Hash: abb2ff08143b2b8f535605077c564f35ff5f0bca5b3316dd3518f5785d7f5d7e
Block 123 Mined

There are many more blocks coming...

For example, someone wants to cheat on block 121 and change the amount of money they contribute. The hashes won't match anymore, the block 121 and blocks chaining afterwards will become obsolete.

  • Data: Eki € 150 Eki € 300, Dwi € 100, Tri € 105
  • Previous hash: 8ff4f69bd4aa061d730be249cc4ec2d9d435280943cbf39dbd84a297678a5a56
  • Hash: 000075d7082edbcb33f29d7fa2130dab1824dc4327e457c5acc222971a18e06e 408265557989b2e71fc5877d86af90b809c9b45accddb803ec3ae892ff5eb574 Hash changes
Block 121 Mined
  • Data: Eki € 300, Dwi € 180, Tri € 250
  • Previous hash: 000075d7082edbcb33f29d7fa2130dab1824dc4327e457c5acc222971a18e06e
  • Hash: 9f4e1bcd0898ea6da1fba11c5e2611d56468cff8ba86a316541d09cb367b4870
Prev hash is no match Block 122 Mined
  • Data: Eki € 100, Dwi € 280, Tri € 350
  • Previous hash: 9f4e1bcd0898ea6da1fba11c5e2611d56468cff8ba86a316541d09cb367b4870
  • Hash: abb2ff08143b2b8f535605077c564f35ff5f0bca5b3316dd3518f5785d7f5d7e
Prev block is corrupted Block 123 Mined

The rest of the blocks are no longer valid

So the only way a hacker/cheater wants to commit an offence successfully is by changing all the history related to the block they have corrupted. Not so easy right!

breathe...

You got it!

If you get this far, you have grasped the basic idea of Blockchain.

A Blockchain is a digital ledger consisting of a growing list of blocks. Each block contains encrypted data and is securely linked together using cryptography.

It doesn't end here. This trio realised early on that it doesn't matter how secure and tamper-proof the protocol is. If this data only has one source of truth, they would be fucked anyway if the computer is lost or hacked.

Read next chapter: Peer to peer network in Blockchain