- November 22, 2017
- Posted by: Ratheesh KrishnaGeeth
- Category: Thinking Beyond, blog
In the previous blog, I explained block chain in basic terms and its possible use cases.
In this blog, let us look at the high level mechanics of “How does Block chain work?”
Please note that I have conveniently abstracted most of the complexities to make it easier for reader to understand.
In simple terms block chain can be thought of as a distributed database.
Take it one step further, now think of a distributed database where ‘all’ data is distributed across ‘all’ participating nodes. Take it one step further, where each node is intelligent enough to independently validate a transaction without ‘trusting’ any other nodes in the network. Take it one step further, where once a validated entry is stored, it becomes an immutable entry and cannot be modified. At a high level, this is what block chain is!
The explanation above implies some key characteristics of block chain as well.
Each step mentioned above can be associated correspondingly with the characteristics listed below:
1. High Availability
2. High Resilience
3. Decentralized Consensus
4. Non-repudiation & Transparency
Blockchain’s original use case as devised by ‘Satoshi Nakamoto‘ was for transferring cryptocurrency (Bitcoin) without the need for a central authority. In other words, if there a N participating nodes, the system can be compromised through a sybil attack if one malaicious user decides to create thousands of simulated nodes thereby taking majority control of the network.This is where Nakamoto came up with the ingenious idea of ‘proof of work’ which is a purposefully computationally intensive problem that needs to be solved. This would ensure that it is very difficult to have enough computational power to take the majority share in a network. I can see how this works today with millions of nodes and their collective computational power overpowering any malicious user. However I just wonder what it would have been when this concept was implemented initially as the system had probably only few hundred nodes and could have been vulnerable to sybil attacks. BTW, I don’t have an answer for that (yet)!
As explained above, the fundamental aspect of block chain is a ‘transaction‘.
A transaction in simple terms means that one of the owner of bitcoins would like to transfer some bitcoins to another user in the network. For this, the original owner of the bitcoin has to create a digital signature to prove that he owns the currency and include the public key of the receiver. Once this is validated, the transaction is propagated to the next node in the network and so on using a peer to peer protocol. Usually there will be thousands of transactions in the network and subset of these transactions are committed together into the distributed ledger as a group of transactions called blocks. Since blockchain is not centrally controlled, this block determination and transaction validation is done in a distributed way by a group of participating nodes called ‘miners’. In order to prevent the sybil attack mentioned earlier, the miner has to solve a computationally intensive problem and present the “proof of work” to show that he solved the problem. Once other nodes sees a new block, it would check the proof of work and independently validate all transactions in the block before adding it into its own ledger. Why would a miner want to participate in such a system? Miners are provided an incentive to do this as they get a certain number of bitcoins for solving a block. This incentive creates a system where several thousands of miners are competing to solve the problem simultaneously and create a given block and add it to block chain and receive the bitcoin incentive.Currently, the problems are set in such a way that any one miner will solve the given problem in about 10 minutes. If the average time to solve becomes less or more, the system will automatically adjust the level of difficulty of the problem so that the average problem solving time stays at around 10 minutes.
As I mentioned earlier, I have abstracted several concepts to keep things simple for now. In the next set of blogs, we will look at blockchain transactions, network architecture, blockchain structure & mining in more detail and understand the algorithms and mechanisms behind the same. Till then, Adios!