What Is Blockchain And How It Works?

what is blockchain and how it works?

What Is Blockchain And How It Works?

 |   |  0
Cyber World

What is blockchain and how it works?

What is blockchain? Everyone cared about the blockchain and what is really the blockchain and how its technology works?

Simply blockchain is

The blockchain is simply like a book or a diary and impossible to fake notes in it.


Let's let's take an example of money transaction between some people so they decided to write a transaction in a book or a diary.

  1. A give 3 rupees to B
  2. B give 5 rupees to C
  3. C give 3 rupees to A
  4. A give 1 rupees to D

For for example A, B, C, D have 10 rupees in their wallet. So after the transaction A has 9 rupees and B has 8 rupees and C has 12 rupees and D has 11 rupees.

C decided to steal money so he changed the transaction details in the book and he changed A gives 3 rupees to B to C. So the transaction is now is A gives 3 rupees to C. Now C has extra 3 rupees and B losed 3 rupees.

Someone noticed the change in book and they decided to change the model of writing. They created a program called hash function.

Hash function

Hash function turns a text into a set of numbers and letters. It is a string of numbers and letters. A hash function is a mathematical function that takes a variable number of characters and converts it into a string with a fixed number of characters. Even a small change in a string creates a completely new hash.


  1. A give 3 rupees to B => 0973da1782f1a430bf39752156e79fb0
  2. B give 5 rupees to C => 1cb12d1af0ce90e5c26f99f6769186e2
  3. C give 3 rupees to A => 5764b81f61525530ea316333bdafc23e
  4. A give 1 rupees to D => 55ced7984f608b94599c8455dafdaa81

For all transaction, they decided to put hash.

Then, C decided to change entries again. At night, he got to the book and changed the record and then generated a new hash.

C give 3 0 rupees to A => 5764b81f61525530ea316333bdafc23e c7d49d71b64eb9f1f7eabc1fe712a3d7

And someone noticed that somebody had changed data through the book again. He decided to complicate the record of each transaction. After each record, they inserted a hash generated from the record+last hash. So each transaction depends on the previous one.

  1. A give 3 rupees to B => 0973da1782f1a430bf39752156e79fb0
  2. B give 5 rupees to C => 0973da1782f1a430bf39752156e79fb0 1cb12d1af0ce90e5c26f99f6769186e2
  3. C give 3 rupees to A => 1cb12d1af0ce90e5c26f99f6769186e2 5764b81f61525530ea316333bdafc23e
  4. A give 1 rupees to D => 5764b81f61525530ea316333bdafc23e 55ced7984f608b94599c8455dafdaa81

Now look at that, if C wants to change a transaction, he will have to change the hash in all previous entries/transactions. But C really wanted more time, and he must spent the whole night calculating all the hashes. It is too much effort to change each hash.

But they (who carry the diary) did not want to give up and make more secure. They decided to add a number after each transaction. This number is called "Nonce". Nonce should be chosen like 001, 223 etc.. I choosing Nounce as 001, so that the generated hash ends in 001.

  1. A give 3 rupees to B => 0973da1782f1a430bf39752156e79fb0001
  2. B give 5 rupees to C => 0973da1782f1a430bf39752156e79fb0001 1cb12d1af0ce90e5c26f99f6769186e2001
  3. C give 3 rupees to A => 1cb12d1af0ce90e5c26f99f6769186e2001 5764b81f61525530ea316333bdafc23e001
  4. A give 1 rupees to D => 5764b81f61525530ea316333bdafc23e001 55ced7984f608b94599c8455dafdaa81001

Now, to change records, C would have to spend hours and hours, or even days to chose Nonce for each line and also for calculating hashes. Anyone can't figure-out too easily the nonce.

After some days later, The man who carry the book realized that there were too many transactions and that he couldn't keep in the book like this all time. So when he wrote 1000 transactions, he converted them to a one page spreadsheet in Google document and shared. Anyone can check that all transactions were right or not.

And also he shared the document all computer over the people at his place. The computers are called "Nodes". Every time a transaction occurs it has to be approved by the computers called nodes, each of whom checks its validity. Once every node has checked a transaction there is some sort of voting, as some nodes may think the transaction is valid and others think it is a fraud. If majority of nodes say that a transaction is valid then it is written into a sheet. The sheet now we call as a "Block". Each node is a copy of another one. So each one checks it's integrity.

Now, if C change one entry, all the other computers/nodes will have the original hash. They would not allow the change to occur because of the voting. Majority of nodes says it is a invalid transaction and disallow the change.

I already said that, the spreadsheet is calling as Block. The whole family of blocks or the spreadsheet is the Blockchain. Every node has a copy of the Blockchain. Once a block reaches a number of approved transactions then a new block is formed. Above I said it 1000 as an example. And don't take it seriously. It's just an example.

The Blockchain updates itself every number of minutes (scheduled). It does so automatically. No master or central computer instructs the computers to do this. So it is calling as decentralized system.

As soon as the spreadsheet or ledger or block is updated, it can no longer be changed. Thus, it's impossible to forge it. You can only add new entries to it. The registry is updated on all nodes on the network at the same time.

… continues

0 Claps

Show your love in the form of Claps and Comments...


No comments found. Leave your reply here.