Unveiling the Dilemma of Blockchain
Albert Einstein once said “If you can’t explain it simply, you don’t understand it well.”
This is evident and seems to be the case more often with with Blockchain technology. Everybody talks about it. Everybody wants to know more about it. But everyone seems to have a bit of confusion with the concept of Blockchain. This confusion emerges as a result of the tendency to think bitcoin and blockchain to be the same thing. The reason behind the reliance on this wrongful assumption lies in history where Blockchain was originally developed as a part of bitcoin and to Bitcoin to be successful blockchain was the key. Thus a question arises, is Bitcoin the sole purpose of blockchain technology? So this article is an attempt to make the reader understand the basics of Blockchain.
“The blockchain is an incorruptible digital ledger of economic transactions that can be programmed to record not just financial transactions but virtually everything of value.”
What is the problem addressed by blockchain?
To put it simply, Blockchain technology is changing the way we trust. Specifically the way we trust in business transactions. Trust is the fundamental currency of commerce which could often be subjected to a breach. When a person engages in a transaction there is an inherent mindset which carries the assumption that counter party or on whom the trust is reposed cannot be trusted. Blockchain is thus a mechanism of changing that assumption and filling the trust gap.
A real life example could be drawn from an instance where you are going to buy a vehicle. Yes, after checking all the features and the looks yet before you finalize the decision you ask the most important question. “Can I have a look on the registration certificate/log book?”, mainly because it contains comprehensive details regarding first registration, registration of transfers/ ownership, change of attributes and all other important things. That is the single ledger which carries detailed information about the history of the vehicle. So as the buyer you have to trust the content in it. What if there are records which are not included? What if some of the records are erased? And we all know such manipulations, misleading happen in Sri Lankan context. So clearly there is a trust gap. In here the trusted third party is the Department of Motor traffic, the authority responsible for maintaining logs.
What is a blockchain?
Blockchain technology has a built-in robustness. This is achieved by storing blocks of information that are identical across its network. Anything that happens on it is a function of the network as a whole.The blockchain cannot;
Be controlled by any single entity.
Has no single point of failure.
In other words blockchain is a distributed immutable ledger. Yes immutable is a strong word and its relevancy will be explained later in the article. Since there are a few terminologies in blockchains, I will explain the workflow of a blockchain while explaining the terminologies.
A hash function- This is a type of mathematical function which turns data into a fingerprint of that data and is called a hash. It’s like a formula or an algorithm which takes the input data of any length and turns it into an output of a fixed length, which represents the fingerprint of the data. There are many types of hash functions, and a common robust would be SHA-256
Blocks- These contain some transactions and also some other data including the previous block’s hash. As each block includes the previous block’s hash as a part of its data, a chain of blocks is formed. Now you are able to see where the chain comes from.
Nodes- Computers that are connected to a blockchain network are known as nodes. They use a client to perform the task of validating and relaying. This gets downloaded upon joining. The nodes are what determine consensus as all nodes must agree to the same rules which would otherwise result in nodes been forking off of the network.
Miners — These are a subset of nodes. They compete among other miners and try to validate the transaction first and to put into the ledger.
Miners are getting a reward for validating a transaction. It is based on the type of blockchain. For instance in Bitcoin miners get Bitcoin as the reward. We all know in stack overflow we can earn reputation by answering questions. This reward idea is quite similar to that because it provides the motivation for a person to spend computational power on a blockchain.
Principally every node can be a miner. Since a decentralized network has no authority to delegate this task blockchain needs some kind of mechanism to prevent one ruling party from abusing the chain. For example if someone creates thousands of peers and spreads forged transactions the blockchain would break immediately.
As a solution for this blockchain sets the rule that the miners need to invest some work of their computers to qualify for this task. In fact, they have the task of finding a hash that connects the new block with its predecessor. This is called the Proof-of-Work. In Bitcoin, it is based on the SHA 256 Hash algorithm. A key feature of Proof of work schemes is their asymmetry: the work must be moderately hard (but feasible) on the requester’s side but should be easy for the service provider to check.
How does the synchronization happens?
After a miner adds the transaction to the chain it distributes the solution. Other nodes thus take the broadcasted solution which is the key in adding the transaction to the chain. They add it and then compete for the validation of the next transaction.
How does the word immutable come into play?
Data in a blockchain is internally consistent, which means you can run some checks on it, and if the data and hashes don’t match up, there has definitely been some tinkering.
Blockchain network automatically checks in with itself every 10 minutes. The network reconcile every transaction that happens in the interval. In this scenario it recalculate all of the block hashes based on the block data, and checks whether the block hashes supplied are valid and consistent with the contents of each block. If there is a conflict, this means the transactions in the block don’t match the block’s hash, and block has been tampered.
Let’s consider a blockchain with 500 blocks. If someone tampers the data of 100th block then its hash changes. But 101st block will still be referencing the old block hash of 100th which no longer exists. This is an obvious failure of the current blockchain and it(blockchain) will detect this failure in reconcile. So to tamper with data, a hacker will need to rebuild and rehash each block following the tampered block, replacing the contents of the previous-block-hash pointers. However, there are safeguards to make it very hard or impossible to rebuild a blockchain. In public blockchains target hashes are used as proof of work.
How does safeguards work?
A block is only considered to be valid if the block hash follows a strict pattern. Namely the hash has to be smaller than a target number, often described by “starting with a certain number of zeroes”. So not only you do need to recalculate the block’s hash, but also you need to make sure that the recalculated hash is below a certain number. You need to re-mine the block by adjusting another part of the block’s contents (called the nonce) repeatedly until you find a hash that is smaller than the target number. This requires some significant computational power. This “Number of zeroes” is called as “difficulty”. When you take all these details into consideration creating a fake chain is highly infeasible.
What if someone changes existing data in a blockchain? This is where the ‘longest chain’’ rule comes into play which is the basis of consensus for most blockchains. The ‘longest chain’ rule broadly states that as a participant, if you see multiple competing valid chains, believe the one with more blocks. Implementation of the longest chain concept can differ. One possible way would be to keep the sum of “difficulty” in the blockchain.
This leaves with a single option which is to make the change and create a longer chain. Roughly to achieve this a hacker needs to invest 51% of the computing power of the whole blockchain network. So It’s clear that you need a significant amount of computing power to create at least a considerable possibility of outcompeting an existing proof-of-work.
Possible use-case of Blockchain Technology
Think of an instance where you are going to the market to buy an apple and you come across two distributors, who both have QR codes pasted on apples. Once you scan one of such apples from your mobile you are able to receive information regarding its history; namely the place from where it has been plucked, the chemicals that have been used from the beginning for its growth, the date on which they have been imported to Sri Lanka, whether there have been previous buyers etc.
One distributor is a user of blockchain technology and other one uses a centralized database to store those previous records. So whom would you trust from the two distributors? Would it be the user who uses an immutable ledger or the one who uses traditional ledger to store the records.The answer is obvious. Why would anyone repose their trust in a centralized database if there is a better mechanism which could be trusted with confidence?
Some say blockchain technology is overrated. On the one hand it’s reasonable as people tend to exaggerate on possible use cases with blockchain. But on the other my personal view believes that this will be a big innovation if it could be utilized in the right place,for a right purpose at the right time. So why not get your thinking cap on? Cheers :D