Blockchain Explained

kiran patil
YML Innovation Lab
Published in
6 min readDec 28, 2016

In this post I am going to explain about the Blockchain — the Technology behind Bitcoin, and I will go through the problem what it solves. In my next post, I will showcase the IBM’s Blockchain offering and how I implemented payment transfer between users on IBM’s Blockchain network using golang.

Blockchain

Blockchain, as it’s called, is something new in computing. A blockchain is cryptographically secured. It is a distributed information that maintains a continuously-growing list of ordered records called blocks. Each block contains a list of transactions, nounce, timestamp and a link to the previous block.

By design, blockchains are inherently immune to modification of the data once recorded, the data in any block can’t be altered. Each block is reviewed by network participants or nodes(on public blockchains they are called “miners”). When the nodes agree via an agreement that info within the block is correct then the block is created without the need of central authority. The distributed ledger makes it easier to make efficient business networks wherever anything of value can be tracked and traded — without requiring a central purpose of management.

Now let’s understand the main concepts/components involved blockchain one by one.

Block in Blockchain

Block can be said as a file which records the transaction data permanently. Blocks are organized into a linear sequence over time. Miners are responsible for processing the transactions and adding them to the end of the chain. Blocks once added by the network can never be changed or removed.

Each block contains, among other things, a record of some or all recent transactions, and a reference to the block that came immediately before it. It also contains the answer to difficult-to-solve mathematical — the answer which is unique to all the blocks. New blocks cannot be added to the network without the correct answer wherein the process of mining comes in.

Mining in Blockchain

Mining is the process carried out by miners(“nodes”) to find the answer for a block (called as “nounce”) so as to create a new block in the network. Finding the answer for the block is a not a easy process. It involves hashcash proof of work , but once a valid answer is found, it is very easy for the rest of the network to confirm that the solution is correct.

Why Hashing is used in Blockchain and How is the data secured ?

Hashcash method is used to create a hash in order to keep the data cryptographically secure. A Merkle tree is created for blocks which are constructed by hashing the paired data (leaves), then pairing and hashing the results until a single hash remains, the Merkel root. Hash of Merkle tree is used along with previous block hash and nounce to create a hash for a block. For Bitcoin, the leaves of Merkle tree are the transactions from the single block. If someone managed to manipulate the data at the transaction level, then hash gonna change for a block which makes every next block info as invalid.

Merkel Tree

From the above figure, you may see that the transaction is manipulated at the low level (Alice->Bob is changed to Alice->Eve) as a result hash of that transaction and other transactions will not give the required hash as shown in the figure. Since the Blockchain database is distributed, the original data can be restored at that level with the help of other nodes who share the database.

You can go through this video to have a visual understanding of the basic concepts of blockchain and how data in the blockchain is secured. You can use blockchain technology in decentralize applications like the recording of events, title, medical records, identity management and transaction processing etc.

What Problem does Blockchain solve ?

Most of the Applications use the centralized database, which simply cannot talk to each other without a layer of expensive fault-prone human administration or managerial central authority supervising every node. Whereas concept behind Blockchain is decentralization. Blockchain is single, decentralized database managed by software and shared by multiple users, without any third party involvement. This makes processing transactions cost effective and less error-prone.

Centralisation

It is a normal approach for almost every server applications to enable databases to communicate each other and combine them to a single database, hoping that enough commonality would exist to patch them together. Generally, the work of merging similar entities of data is done by mergers and acquisitions of corporations where similar kind of entities are combined under a central authority. Centralization also comes with inefficiencies such as top-heavy, monopoly, obfuscation, stagnation and vulnerability to external shocks. Failures are generally treated with the help of blanket legislation and government regulations. Another problem related to centralization is that it is managed by a central authority and data exist only at one place which gives hackers opportunity to hack. Already there are so many data breaches and most of them are of centralized databases.

Decentralisation

A typical way to eliminate intermediaries and enable data to be shared between organizations is to allow everyone to use the same database. Multiple writers can populate data simultaneously with no controls, consensus or centralized authority. The network grows exponentially. Unfortunately, there would be no way to stop a person from cheating another person, or increasing the value for himself, or going back to change the conditions of a contract, or double spending a unit of account. For decentralized databases, these are precisely the problems that blockchain solves.

Blockchain solves all above problems as it is a single, decentralized database managed by software and shared by multiple users, without any third party authority, which makes process transactions more cost effective and fewer error prone. Blockchain a ‘software-managed architecture’ will be faster, more reliable and cheaper while the marginal cost of additional capacity tend to zero. Blockchain can handle large and complex transactions or scale down to accommodate billions of micro-transaction with little difference in operations cost.

Industry Usage of Bitcoin and Blockchain

Mainly bitcoin and blockchain can be used in any of the following ways:

  1. Bitcoin can be used as A Bank & Currency to reduce the cost of the transaction, increase the bank performance and provide security for the customers etc.

2. Bitcoin can also be used as a platform wherein you can store valuable information in the blocks for less than $0.00001 cents.For example car ownership records, shipping records, notary records etc.

3. Blockchain as a platform wherein you can have your own programming and transactional platform to replace the currency component with any transactional data that you want. It can be public, private or hybrid.For example Ethereum.

Alternative Blockchains

Alternative blockchains, also known as altchains , are based on bitcoin technology in concept and/or code.They differ in the functionalities but the basic design they follow is of the blockchain itself. They target anonymity, performance, storage and applications such as smart contracts. Blockchain was first developed for bitcoin a financial application , however it is now extending to activities including decentralized applications and collaborative organizations that eliminate a middleman.Some of the notable altchains are Lazooz (real time ride sharing), Swarm and Koinify ( decentralized crowd-funding), Hyperledger (cross-industry collaborative effort to support blockchain-based distributed ledgers), Bitcache , Bitnation etc.

Ethereum — A Blockchain Platform

Ethereum allows developers around the world for developing applications and running them on a blockchain network. It is a programmable blockchain. It allows users to create their own operations of any complexity they wish, rather giving users a set of predefined operations(e.g. Bitcoin transactions). Because of this it serves as a platform for decentralized blockchain applications, including but not limited to cryptocurrencies. Many companies started building ethereum platform and now allow users to use their platform to build blockchain applications. (e.g. BlockApps Azure Strato, IBM’s Blockchain Service)

IBM blockchain service is built on the top of hyperledger framework. IBM is one of the top company who provide the blockchain service with all the latest features and highest level of security.

In my next article I will showcase how I explored the IBM’s blockchain Service to build up a wallet system and allow users to transfer amount to other users.

--

--