Introduction to Blockchain

Dilshani Senanayake
4 min readFeb 13, 2022
Photo by Tezos on Unsplash

What is Blockchain?

You might heard about Bitcoin…

When we transfer money from one account to another account, a bank always intervenes as a third party. But Bitcoin is a digital currency that is not managed by outside people or authorities such as the central bank. It has a decentralized system that keeps the records of every transaction in a ledger. This ledger is called as the blockchain.

Ledger??? What is a ledger? You may think so

Ledger: It is a centralized database which is a series of blocks on which transaction details are recorded. Every machine connected to the blockchain contains this ledger (Every machine is having the same copy of the ledger).

Why is this ledger more important than a normal one? Because no one can change this like a traditional database. The reason is that if you are willing to change something, you have to hack every system connected to the whole chain. That is not possible!

Blockchain is little bit similar to Linked list. If you are a programmer you may familiar with data structures including Linked list. Linked list has formed from nodes connected to each other. Blockchain contains separate blocks similar to nodes. We can see in the below image shows that how connections happen between the blocks.

https://www.google.com/url?sa=i&url=https%3A%2F%2Fintellipaat.com%2Fblog%2Ftutorial%2Fblockchain-tutorial%2Fhow-does-blockchain-work%2F&psig=AOvVaw2f5Gznd4kMvFADfQlb6E5i&ust=1644290151706000&source=images&cd=vfe&ved=0CAsQjRxqFwoTCMi33qbQ7PUCFQAAAAAdAAAAABAD

We can see that a one-block contains some separate parts such as block number, the message header, Hash value, previous block’s hash value, etc

What is Hash Value ?

Hash value is a numeric value of a fixed length that can be used to uniquely identify the data. This is also known as one-way function. Because when we hash some data, we cannot regenerate the input data based on the result.

Such that blockchain uses this hashing concept to secure the data.

What happens if someone cheats on this?

This cannot be happen as I mentioned above. Because the hash value of the current block depends on the hash value of the previous block. Let me explain this further using an example.

Assume that we can get the details of the 3 blocks in the network as below. Each block contains a Hash value which is generated using a particular hashing algorithm.

Block 1 → D1 is the data and H1 is the hash value.

Block 2→ D2 is the data and H2 is the hash value.

Block 3→ D3 is the data and H3 is the hash value.

Let's get as someone hacked and changed the data D1 to D1`` in block 1. But that person does not change the data and hash values in block 1 and 3.

It will be unstable if H2 and H3 do not match with the new values that are generated by the previous block 1.

H2`` = Hashing Algorithm (D1``, D2)

H2 = Hashing Algorithm (D1, D2)

H2`` is not equal to H2 and block 1 will be invalid.

Somehow maximumly the hacker can also modify the data of the next two or three blocks. But when it comes to one by one block at a time in the chain, the hash values ​​do not match and the network can be identified that there might be a trouble.

Such that hacker needs to done end to end modification.(Not possible)

That’s why blockchain becomes more secure…

Forks : This is a term that is used when trying to add a block to the blockchain using the same money that is already spent. It creates a fork in the blockchain.

Public Blockchain vs Private Blockchain

Private blockchains are referred as permissioned blockchains. Unlike public blockchains, where anyone can interact with the blockchain. Below I have given some differences between these two.

Where do we use blockchain ?

Blockchain concept become more popular these days in any industry. Mostly in banking sector, now it is trending. Other than that there are uses such as,

  • Digital currency
  • Internet of Things
  • Product lifecycle
  • Certifications
  • Secure info sharing
  • Virtual products

This is the end of the article…So hope you enjoyed it!💛

Thanks for reading!🤩

--

--