What is Blockchain?
This is a part from my ongoing writing series on how I started working with blockchain. I think it deserves a special post because I probably will reference it in my future talks.
Famously, blockchain is the technology, design, algorithm that makes Bitcoin possible. Luckily, basic structure is loosely coupled to Bitcoin requirements, so that it has many use cases in various fields. Through out 2 years, many people asked me the same question, what is blockchain, again and again and my answer kept evolving. Current draft of my answer is as follows:
- Think of a basic linked list.
- In this linked list you keep data on each node which makes it a database candidate
- Everyone has a copy of this linked list because no one trusts anyone else. Better to check to catch any suspicious activity.
- People want to store their data on this database, however there needs to be an order because everyone wants to have the same linked list. Or else, a “data sharing/accessing between multiple threads” problem might emerge.
- Mutex(mutual exclusion) among all participants is impossible. Instead, lets give everyone a really hard math problem(DOH!) and first one to solve it gets the right to add a new node on this linked list. But don’t forget to add waiting transactions(write requests of others).
- There are bad people but in general we are not total jerks. Let’s give this guy a credit and accept his new node, add it to our linked list. Also, if nothing seems suspicious and he added many write requests of others, give him a little reward for doing such a good job.
- Now, everyone has the same linked list with ordered data. So we can look at back and see whether anyone ever cheated.
Q&A:
- Q: What if two bright students solve the problem at the same time and their nodes are different?
- A: They are both right. Let’s wait for someone else to propose a new node. Whichever competing node that new node is supporting, we also support that. Rule 1 LCW: The longest chain wins.
- Q: Some bad guy wants to erase or modify something that I put in, what then?
- A: Thank god we have Public Key Cryptography. Unless s/he can prove your identity, no one can change a damn thing you own.
- Q: I made a mistake adding my data, can I reverse that?
- A: 2 options. Choose whichever you want to take: A) Go back to the node you made erroneous action, fix it, starting from there solve as many math problems as you need to win the longest chain competition. B) Make a reverse action, submit for addition to the list at the next node, quickly fixed!
- Q: That bad guy is back with more evil. Now the purpose is to change everything.
- A: Look at previous answer option A. If this evil guy is so intelligent at math that he proves he is better than other good intended people, he actually wins (51% rule). One option is to say forget this guy, we take our linked list and go somewhere else. He can bully other nerds!
I think this is my current draft on what blockchain is. Now to understand how Bitcoin uses this is very easy. We need to make some changes to the keywords we used:
- Linked List: Blockchain
- Node: Block
- Data: Transaction
I guess this mapping was obvious from the start but do not forget that I needed this to explain so many times.
