A Beginner’s Detailed Guide to Blockchain

blog_img
D.D.Agrawal, one of our project leads takes an exhaustive session on the new buzzing technology of Blockchain.

Blockchain at this point is a technology that almost everyone’s heard of but few people actually understand. If you ask around, “It’s a kind of decentralized ledger”- is the most common and to some extent, a reasonably accurate definition you would find. But the problem is, this definition poses more questions than it solves. What’s a public ledger anyway? If it’s public, who manages it? How can they be trusted? And perhaps most importantly- Why do we even need it? Isn’t our current system just fine? We will try and answer each one of them over the course of this discussion but let’s fist get down to the basics.

The original sin

Internet has been the most remarkable development of the last century- from its conception to rapid evolution and subsequent adoption by half the global population is a phenomena unparalled by any other invention. But in the rush to make information widely available, we overlooked one of its fatal flaws- the centralized design. At this point, almost all the personal and business data sensitive to snooping and leakage is stored on third-party clouds owned and operated by multinational corporations like Amazon, Google, Microsoft, among others.

As Brian Behlendorf- creator of the Apache Web Server puts it, Internet was conceptualized to be decentralized but its centralized design in implementation was the original sin. Not only has it put businesses in control of user data- which is bad at many levels, but has also made vulnerable entire systems relying on such architecture. Blockchain aims to right that wrong- to give back the control of user data to users themselves.

Enter Blockchain:

The earliest description of the concept- timestamps, on which Blockchain functions, can be traced back to 1991. But it wasn’t until 2008 that a formal paper was published describing the technology and was subsequently implemented in 2009. The invention is attributed to the author of that paer, Satoshi Nakamoto- a person or a group of people who remain unidentified till date.

The first implementation was that of building a distributed public payments network that had its own unit- Bitcoin. This was later termed by US Treasury as a decentralized virtual currency which later gained the title of cryptocurreny. As of now, there are dozens of cryptocurrencies in the market but their actual worth and legal status remains disputed. But we have an important point to make here- because cyptocurrency was the first application of Blockchain, they remained inseparable for a very long time and it is only in recent years that Blockchain is being seen as an independent technology with limitless possibilities beyond crptocurrencies.

What’s special about Blockchain:

We will get to the operational features of Blockchain in a moment but let’s first take a look at what exactly makes it such an appealing technology:

Decentralized

No central authority controls the data.

Transparent

The system is open for anyone to see and participate.

Immutable

Data once written can’t be modified or deleted.

Let’s create a Blockchain

The words Block and Chain were used separately in Satoshi Nakamoto’s original paper indicating Block as a component and Chain as a process. So we’ll follow the same lead here:

A Block

A block contains two components- the transaction data and the block header.

For a crptocurrency transaction, data would be the sender’s address, the receiver’s address and the amount to be transferred. As for the header, it contains four components:

Hash of the block

Hash is generated through SHA-265 algorithm and is meant to ensure data integrity.

Hash of the previous block

The use of the hash of previous block is to verify the state of the database.

Timestamp

It indicates the time at which the current block was hashed.

There are also two other components- target difficulty and nonce, which will skip here for the sake of simplicity.

timestamp

Image Credit: youtube.com/watch?v=SSo_EIwHSd4

As you would know, generating hashes requires a lot of computational resources- this lies at the heart of the entire Blockchain operation. To create or to mine a block, miners need to solve a complex mathematical problem. The one who solves it first, get a reward, and the Block is used to store transactions. Different Blockchains have their algorithms for deciding how many Blocks can be mined per unit time by adjusting its difficulty level and nonce. Bitcoin for instance, allows one Blocks to be mined every 10 minutes while for Etherum, it is around 15 seconds.

Chain ‘em up

The first block in a chain is called the genesis block and it is mined during the creation of Blockchain or at ICO’s for cryptocurrencies. The first block of Bitcoin was mined by Satoshi Nakamoto in 2009 and as you would expect, the genesis block doesn’t have a hash of the previous block.

chain em-up

Thereafter, every time a new block is mined, it is linked to the previous Block and added to the Blockchain. If two or more blocks are forked at the same time, there are different consensus mechanisms to overcome the issue and only one is added. The point is, if you start backtracking from the latest block in any Blockchain, you would eventually reach the genesis block- thus the name chain.

Who verifies new blocks?

Unlike our current architecture where a central database stores and verifies all transactions, Blockchain relies on several hundred or thousands of nodes and miners spread across the globe for the task. While the nodes store the latest state of the leger, miners commit all the changes.

new block

When any miner gets a new Block, they club all the transactions in that Block and add it to the Chain. For each new update, nodes independently verify its hash and the hash of the previous block. If it’s valid, they commit the transaction and update the state of their ledger.

new blocks

Failsafe

Now there are two possibilities of conflicts here- if a malicious user alters any transaction, the hash of the corresponding Block would also change- which would conflict with the header of the next Block. Thus it would be rejected.

There is also possibility that two or more miners get a block at the same time. In this case, different Blockchains use various consensus mechanisms to sort out the discrepancies and only one of them is rewarded. Generally, when more than half of the nodes commit to any particular transaction, all the nodes must update their ledgers to reflect that change.

failsafe

How is it trustworthy?

No technology is bulletproof but Blockchain is far more secure than our current client/server model, especially given the level of transparency it offers. There are basically two ways you can exploit any system:

  • Fool the server (MitM, DDoS, etc)
  • Hack the server (SQL injection, XSS, etc)

The decentralized and consensus mechanism of Blockchain makes it virtually immune against both these kinds of attacks. Technically speaking, attackers could always compromise 51% of the of nodes, flood the Blockchain network, or snoop the ISP networks, but these kinds of attacks are so resource intensive that attackers have no incentive to even try. They would gain more by simply mining more blocks than hacking it.

But cyptocurrencies do get stolen

Well, there is also a third way to exploit any system- hack the user! Every case of cypto fraud exploits the vulnerabilities of users and not Blockchain. Be it through Phising to steal credentials or hacking an ICO’s website to alter its wallet address, every attack till date has taken place outside Blockchain’s ecosystem. After all, if someone steals you Facebook ID and password, it’s you and not the Facebook that’s been hacked!

Proof of Work

To prevent against DDoS attacks, most of the systems deploy some kind of proof-of-work mechanism where the users have to do some kind of computational task for their request to be deemed valid. In Blockchain, the mathematical work that we earlier talked about, serves the same purpose. Any transaction can only take place once the miners complete that task. This is the reason why a Bitcoin transaction takes 10 minutes to be processed while an Ether transaction can be processed in 15 seconds. Other Blockchains with lower difficulty level can process it even faster.

proof of work

Features of Blockchain:

Cryptography

Instead of relying on a central authority, Blockchain deploys robust cryptographic algorithms for users to transact in a secure environment. As mentioned, it commonly uses SHA-256 algorithm- which technically can be breached in 2^256 attempts but that’s such a large number that it’s simply not feasible.

Decentralized

The decentralized nature of Blockchain ensures that a single entity does not control user data and by extension, eliminates any scope of data manipulation or censorship.

Distributed ledger

A distributed ledger is an asset database that can be shared. It is maintained cryptographically through the use of keys and are resistant to unauthorized changes.

P2P Network

Blockchain harnesses the power of distributive computing by replacing the central server model with P2P networks that share the workload and are responsible for all the data processing.

Etherum

It is the world’s largest open source Blockchain- with three times the number of nodes as Bitcoin and has corporate backing from the likes of Walmart and Microsoft. You can use it to build Blockchain-based applications that would be independent from any third-party control and would be transparent to users.

The recent case of massively popular mobile app Fortnite is worth mentioning here. As you know, both Apple and Google charge a share from and have considerable control over the apps on their platform. So once Fortnite gained considerable momentum from App Store, they completely bypassed Google’s Playstore by offering their app from their Website. The company however, still controls user data and relies on many other third-party services.

Etherum wishes to takes this fight against data control a step further. For instance, if you build an email application on Etherum Blockchain, not only it would be independent from corporate control and government censorship, but even you would have no authority to manipulate user’s data in any way.

Looking Beyond Cyptocurrencies

As mentioned earlier, it took quite a while for Blockchain to emerge from the shadows of Cyptocurrency as an independent technology. But now, it’s being explored by almost every industry and government around the world to solve some of their most intricate problems. While it is certainly not the technology to end all technologies, it offers much superior solutions when you want to:

  • Store something immutably
  • Append records without disturbing the older entries
  • Decentralize the control
  • Prove the ownership

Be it supply chains of retail industry, heath records of medical industry, notary and court records through egovernance, and beyond, we can expect Blockchain to go mainstream in coming years. As hyperbole as it may sound, some tech experts are even of the opinion that it would have an even larger impact than the Internet itself. Now that is something we’ll believe only when we see it.

About Author
Mrityunjay Kumar

Mrityunjay Kumar

Mrityunjay is a content developer at Konstant Infosolutions- a leading mobile app development firm that caters to enterprises of all scales and industries with cutting-edge tech solutions. Being an engineer by education, a reader by passion, and a writer by profession, he finds no topic truly boring, yet nothing seems to content his craving as well- an essence he leaves in everything he writes.

MAKE YOUR IDEA REACH ITS GRAND DESTINY

WITH PRO WEB AND MOBILE SOLUTIONS

Looking for a development partner?

Portfolio

Visit Our Portfolio

Top Mobile Blog Winner

Top 15 Latest Mobile Blogs

Mobile App Blog Winner

Mobile App Blogs

SUBSCRIBE TO OUR BLOG

Top

Get a perfect quote

We’re eager to work with you. Please share your project goals and contact information. We respond to 97% of messages within 1-2 business day. Really!

Or send us an email at: [email protected]