Blockchain for Dummies: A Gentle Introduction to Blockchain
By: Arif Ul Islam, Ron
Tags: Secure Blockchain, Blockchain, Hashing, Types Of Blockchain, Mining

$$ Introduction

Blockchain is a way of implementing a distributed database. Wait, what is a distributed database? 🤔 Wiki says,

A distributed database is a database in which not all storage devices are attached to a common processor. It may be stored in multiple computers, located in the same physical location; or may be dispersed over a network of interconnected computers.

So in Blockchain, a group of individuals controls a chain of blocks as a distributed database to store and share information. These independent users maintain data integrity without any central control. Nobody owns the Blockchain. This fact makes Blockchain so popular. But, though it is referred to as a database, it has not had all features that a database usually has.

Blockchain has permanent records of transactions. When a data/transaction is stored in a Blockchain, it is quite difficult to change the data. Why it is difficult, we will get on this point later. However, if someone wants to add data/transactions to the chain of blocks, the selected users of the blockchain network who have the right to validate data will verify the transaction.

The purpose of this post is to share a brief introduction to Blockchain and its related terms.

$$ Types of Blockchain

Three types of Blockchain are widely used.

→ 1. Public Blockchain 2. Private Blockchain 3. Consortium Blockchain

a. Public Blockchain — Anyone can join the network and create, write and participate in the network.

b. Private Blockchain — This type of blockchain is restricted to a particular group of people.

c. Consortium Blockchain — By sharing resources, cost with others, some organizations come together with a view to achieving a common goal.

$$ Block and Chain

Blocks are the container of valid transactions. Also, it stores some kinds of hash value used to link one block to other blocks. There are mainly two hash values in a block. One of them is the hash of the previous block and another one is it's own.

$$ Hash

Hash is a fixed-length string that is unique for a particular block. It is generated by a Hash function. The hash function will take anything and converts it to a fixed-length string. It is a one-way process, which means you can not revert the hash string to the input. Hash is also known as the fingerprint of the block.

$$ Difficult to change data?

So the question is why it is actually hard to change data in Blockchain. Suppose, Rahim is a hacker and trying to update the hash of Block B.

To update any data in a particular block, high computational power is needed. Assuming, Rahim is able to change the information in B. Rahim is very happy right now. Alas! he suddenly realizes he must update hash of consecutive blocks C, D, and consecutive blocks in order to get the control of the chain. Updating more blocks needs more computational power!!. Then Rahim stops hacking 😂.

$$ Adding a transaction

I believe you already have interpreted the above image and get to know that when a user tries to add a transaction, the network validates it. If the transaction is valid, it will be added to the chain otherwise it will be kicked out.

$$ Bitcoin vs Blockchain — are they same?

You probably hear that people are using blockchain and bitcoin interchangeably. Though they have common characteristics, they are not the same. Blockchain supports Bitcoin and Bitcoin is just a cryptocurrency like Ether for Ethereum blockchain.

People got the idea of Blockchain back in 1991. And Bitcoin was proposed in 2008 by an unknown person or a group using the name Satoshi Nakamoto. Satoshi Nakamoto used Blockchain to store transactions of Bitcoin securely. Later in 2014, Blockchain technology is separated from cryptocurrency. Currently, blockchain is implemented not only for cryptocurrencies but also for IoT, Healthcare, Music, Personal Identification, etc.

$$ Mining

When a block of data is requested to add to the chain, nodes of the network need to solve a mathematical puzzle to generate a hash. This requires high computational power. This is called Mining. You may ask why individuals willingly mine as it costs more computational power. Because for a successful mine, the miner will get rewards (they may get some crypto like bitcoin as a reward) 😎.

$$ Is Blockchain Secure?

Nothing is secure on the internet. But what makes Blockchain more secure? The keys to secure a Blockchain are Decentralization, Cryptography, and Consensus.

a. Decentralization — We already know, to add a new block to the set of blocks, all nodes of the network verify the block by mining. After successful validation, only then the block is appended to the chain. This addition of blocks makes an impact on other blocks. So if you change in your block illegally, others can sense it as invalid changes and will discard it.

b. Cryptography — The blocks are cryptographically hashed. One block is secured with Hashed value. There is no reverse engineer in Hashing, which makes Blockchain more secure.

c. Consensus — When a miner successfully solves a math puzzle based on the data in the block, at least 51% of nodes of the network must agree about the solution of the math, only then the block will be added. This is called proof of work.

$$ 51% Attack

The 51% attack sounds Fancy! If 51% of the mining power is owned by a group of nodes in the network, they can take control of the network and prevent other users to add blocks to the chain.