How blockchains work?

Arun Tigeraniya - 2020-09-01

an example ..

Let us assume you have an accountant, and you keep credit-debit transaction's on the paper register. Let us also assume the accountant is a fraud and you cannot fire him. Now you came to know that he removes some pages from the register and pockets that amount. To counter this, you got a bright idea and put page numbers on each page of the register and gave it to your accountant. This is in some ways similar to a Database based solution where each row has a row id and if someone removes that row we can know the deletion.

Register pages

Now frustrated by fact that he cannot remove pages, he left some portion of pages vacant and later put in credits and debits on them to play his tricks. As you were already vigilant, you understood this quickly and hence asked him to put in no of transactions at bottom of the page.

Register pages

The Accountant now started to rub and overwrite transactions. Now you also got one step ahead and asked him to count alphabets in transactions and write them next to the transaction and sum them and write on the bottom of the page.

Register pages

The accountant now started to pull out pages from the cash register and paste another page similar to it with different transactions. Your first thought of asking him to use the last page of the cash register to write down the page number and alphabet count of page, but realized that he would just change the last page every time along with the previous page. Then suddenly you have another bright idea, you asked him to write down the previous page alphabet count on the current page. This way accountant will have to change all pages after his target page. You also didn't require page numbers now as he cannot remove pages in-between.

Register pages

This is the base principle of why and how blockchain works. Instead of alphabet count, we use hashes to define transaction signature and then use hash for total block transactions. We also use the hash of the previous page, similar to the way we used the alphabet count of the previous page in our example.

Register pages

But this is still a very basic introduction, as there are many other concepts at play which make blockchain work in a no-trust network environment. Wait for the next blog release to find out what happened when the accountant started to change the whole register or how blockchain work with a no-trust model.