Blockchain is recent buzz in today’s technology world. Let us see what it is and why it’s hyped so much. I will try to put it in simple words so you can get an high level of overview of the concept.
What is Blockchain?
There are two things. A block and a chain. So from very high level we can say that it is just a chain of blocks. Here digital information is divided into blocks and all such blocks are linked together.The blockchain is used for the secure transfer of items like money, property, contracts, etc. without requiring a third-party intermediary like bank or government. Once a data is recorded inside a blockchain, it is very difficult to change it. Why ?
Let’s deep dive further.
Each of these blocks has something called a hash. A hash is a set of characters (eg. “1hi515AHA5H” ). In simple word assume hash as a Key. (similar to like a Key for opening the door).
Hash is derived from the information contained in the block.
Every successive block will contain the previous block’s hash. This is what binds them together. If someone tampers the first block to add new content. The new hash/key changes. However, the succeeding block has already stored the old hash. This mismatch will break the chain. So the purpose of hash is to make sure no one tampers it.
What if someone changes the contents of a block and update the hash of successive blocks? This is possible but there is one thing I didn’t tell you. The data of the blockchain doesn’t lie in one computer. It is replicated in the computers of every user in the network. If you join a blockchain network, your computer will download these blocks. If someone tampers his version, the network will consider what majority say is correct.
Also, in a Blockchain network, not only data but the program is also replicated. Most internet apps are centralised. Consider Google or Facebook, its data and program lies on its servers. Your computer requests information from Facebook’s server on a need to know basis. In case of blockchain, there is no central thing. It relies on its user’s computer to host its program.
Popular myth that Blockchain is Bitcoin. False !
• Blockchain is not Bitcoin, but it is the technology behind Bitcoin• You can't have Bitcoin without blockchain, but you can have blockchain without Bitcoin.
Proof of Work
Hashes are an excellent mechanism to prevent tempering but computers these days are high-speed and can calculate hundreds of thousands of hashes per second. In a matter of few minutes, an attacker can tamper with a block, and then recalculate all the hashes of other blocks to make the blockchain valid again.To avoid the issue, blockchains use the concept of Proof-of-Work. It is a mechanism which slows down the creation of the new blocks.
In case of Bitcoin, it takes almost 10-12 minutes to calculate the required proof-of-work to add a new block to the chain. Considering our example, if a hacker would to change data in Block 2, he would need to perform proof of work (which would take 10 minutes) and only then make changes in Block 3 and all the succeeding blocks.
This kind of mechanism makes it quite tough to tamper with the blocks so even if you tamper with even a single block, you will need to recalculate the proof-of-work for all the following blocks. Thus, hashing and proof-of-work mechanism make a blockchain secure.
Distributed P2P Network
Instead of using a central entity to manage the chain, Blockchains use a distributed peer-peer network, and everyone is allowed to join. Each computer is called a node.Let's see what happens when any user creates a new block. This new block is sent to all the users on the network. Each node needs to verify the block to make sure that it hasn't been altered. After complete checking, each node adds this block to their blockchain. Nodes in the network will reject blocks that are tampered with.
Is Blockchain secure ?
So, to successfully tamper with a blockchain1. You will need to tamper with all blocks on the chain
2. Redo the proof-of-work for each block
3. Take control of greater than 50% of the peer-to-peer network.
After doing all these, your tampered block become accepted by everyone else. This is next to impossible task. Hence, Blockchains are so secure.
How Blockchain Transaction Works?
1.Some person requests a transaction. The transaction could be involved cryptocurrency, contracts, records or other information.2. The requested transaction is broadcasted to a P2P network with the help of nodes.
3. The network of nodes validates the transaction and the user's status with the help of known algorithms.
4. Once the transaction is complete the new block is then added to the existing blockchain. In such a way that is permanent and unalterable.
Why do we need Blockchain?
Reliability: Blockchain certifies and verifies the identities of the interested parties.Unchangeable transactions: By registering transactions in chronological order, Blockchain certifies the unalterability, of all operations which means when any new block has been added to the chain of ledgers, it cannot be removed or modified.
Fraud prevention: The concepts of shared information and consensus prevent possible losses due to fraud or embezzlement. In logistics-based industries, blockchain as a monitoring mechanism act to reduce costs.
Security: Attacking a traditional / Server based database is the bringing down of a specific target. With the help of Distributed Ledger Technology, each party holds a copy of the original chain, so the system remains operative, even the large number of other nodes fall.
Decentralized: There are standards rules on how every node exchanges the blockchain information. This method ensures that all transactions are validated, and all valid transactions are added one by one.
Transparency: Changes to public blockchains are publicly viewable to everyone. This offers greater transparency, and all transactions are immutable.
Real-Life Use Cases of Blockchain
Mahesh and NikitaMahesh hasn’t paid his rent for five months. When Nikita questions he promise to pay later. She is helpless. She can’t afford a lawyer. Courts take eight months to almost a year to enforce action. The only option is to persuade Mahesh.
Rajiv’s business
Rajiv is a businessman. He does business with different corporates on a frequent basis. A few months ago he signed a contract with a retailer. Though the conditions of the contract were met. The retailer refused to pay. These people take advantage of the legal system and persuade Rajiv to settle for less pay. He went to court. The time and money he spent there cost him his profits.
How do we help Nikita and Rajiv?
Have we solved this problem elsewhere? In Nikita’s case, we need to make Mahesh pay the rent every month. A time-based trigger. Your calendar app uses such trigger to give you notifications of predefined events.
In Rajiv’s case, once terms of the agreement is met the party needs to pay. It’s a condition based trigger. Consider the last time you purchased an ebook from Amazon. Amazon will only deliver it once the payment is confirmed.
The point is computer programs execute such instructions consistently. It did when you clicked on this article, scrolled down, etc . In order to help Nikita, we need to convert the agreements of the contract into code.
Pseudo code of the smart contract between Nikita and Mahesh
If today’s date is 30th and rent is not paid then
Transfer $500 from Mahesh’s account to Nikita’s account
But where do we deploy this code? It should be deployed on computers of all parties involved. Nikita’s and Mahesh’s bank will be part of a private Blockchain network. Rajiv and Nikita will sign a coded contract(a.k.a smart contract). Then it’s deployed on the network. Both Mahesh’s and Nikita’s bank will have a copy. On 30th of every month when the clock ticks 12.00. The agreed amount gets transferred from Mahesh’s account to Nikita’s account. Rajiv started using smart contracts to enforce his clients to pay the agreed amount.
Nikita is happy because she doesn’t have to trust Mahesh’s consent to transfer rent. Rajiv’s glad because he doesn’t have to go to a court for justice. Instead, he can spend those efforts to grow his business.
Private blockchain will be restricted to the parties involved in the business. Rajiv won’t be a part of the Nikita’s and Mahesh’s Blockchain network.
Myths about Blockchain and reality ?
Limitations of Blockchain technology
Smaller ledger: It not possible to a full copy of the Blockchain, potentially which can affect immutability, consensus, etc.Higher costs: Nodes seek higher rewards for completing Transactions in a business which work on the principle of Supply and Demand
Risk of error: There is always a risk of error, as long as the human factor is involved. In case a blockchain serves as a database, all the incoming data has to be of high quality. However, human involvement can quickly resolve the error.
Slower transactions: Nodes prioritize transactions with higher rewards, backlogs of transactions build up
How do I Get Started in Blockchain Development?
The blockchain is an infrastructural technology, which means it will underlie other software such as web and mobile applications.Fortunately, as the technology becomes increasingly popular, the tools and applications that facilitate its use are increasing in number.
If you're a C# programmer, Blockchain Programming in C# is an in-depth and free book that will get you started on blockchain programming.
Blockchain as a Service (BaaS)
An alternative to quickly get started with blockchain technology is to sign up with one of the blockchain cloud providers. Some of the more popular services are IBM Blockchain and Microsoft Azure Blockchain.The benefit of using a cloud-based blockchain service is that it abstracts away the complexities of implementation. This can help you harness and master the technology and its uses without the need to acquire sophisticated skills.
A blockchain is basically like a distributed ledger which stores the database of assets and transactions done across a peer to peer network.
Summary
• A Blockchain is a chain of blocks that contain information• Every block contains hash.
• Each block has a hash of the previous block
• Blockchain require Proof of Work before a new block is added
• The blockchain is not Bitcoin, but it is the technology behind Bitcoin
• The blockchain database is disturbed amongst multiple peers and is not centralized.
• Bitcoin uses blockchain technology which is not governed by any central authority or banks
• Slower transactions, Higher cost, small ledger, the risk of error are some disadvantage of using this technology
3 Comments
thanks for sharing..easy and simple to understand
ReplyDeleteyour article on digital marketing is very good. keep it up thank you for sharing.
ReplyDeleteblockchain training in hyderabad
Nice Blog.
ReplyDeleteThis is really a nice blog which speaks the journey of Blockchain from its inception. The investment in cryptocurrency and then the role of bitcoin and other details are also defined in a proper manner.
Thanks for sharing such a great article, I was looking to
hire dedicated blockchain development company and found this blog.
Thanks for sharing such a great blog.
hire dedicated blockchain developers
ethereum blockchain development