Blockchain- The next trend in information technology

What is Blockchain?

--

Blockchain has been presented as the future technology in the era of information technology. This is one of the underlying technologies of bitcoin where it’s main role is to serve as a public ledger for all transactions. More specifically, Blockchain is a distributed database of continuously growing list of records (that is our block) [from wiki]. Each block is secured and contains the fingerprint from its previous block and that is how makes a chain of block. However in 2014, in definition of Blockchain 2.0, it is now moving forward with so many different applications. One of them is smart contract. I have seen Blockchain is no longer being mentioned as only a distributed database, it has also been mentioned as protocol or design pattern now-a-days which is being used to developed different kind of API such as :

  • API’s to allocate digital resources such as energy, bandwidth, storage, and computation to the connected devices or services that need them. [FileCoin]
  • API’s for virtual transactions.
  • Micropayment API’s .

My learning of Blockchain starts with this video. This video introduces the idea of bitcoins and simplify the idea of BlockChain.

What is Blockchain?

From technological point of view, the main underline technologies for Blockchain are as following

The most well organized definition of Blockchain that I found after minutes of googling is as following from The Blockchain Explained to Web Developers, Part 1: The Theory.

A blockchain is a ledger of facts, replicated across several computers assembled in a peer-to-peer network. Facts can be anything from monetary transactions to content signature. Members of the network are anonymous individuals called nodes. All communication inside the network takes advantage of cryptography to securely identify the sender and the receiver. When a node wants to add a fact to the ledger, a consensus forms in the network to determine where this fact should appear in the ledger; this consensus is called a block.

From this above definition, we found a number of keywords

  1. ledger
  2. peer-to-peer network
  3. facts / records
  4. cryptography
  5. consensus
  6. block

These are the main key players in the field of Blockchain. So if we anatomize the definition we can find out the following properties of Blockchain:

  • The Blockchain is a shared Ledger of records.
  • Here records can be any transactions or content signature. The only criteria of the record is that it has to be valid, secured secured from tampering and revision.
  • The Ledger is shared among business parties.
  • The shared Ledger has been secured using cryptographic technology to make it secure and only accessible to those parties who has permission.
  • The ledger is replicated and distributed among networks.
  • The business network that shared the ledger is a decentralized peer-to-peer network.
Peer-to-peer decentralized network. (This image is from here )
  • Transaction against this ledger will be immutable, unchangeable and final.
  • All transactions against the ledger will require consensus across the network.

At this point, we need to understand some of its concept as following more in deep

  • How Blocks are being generated in Blockchain
  • How Consensus mechanism select the next block to be added

How Blocks are added to Blockchain

There is only single chain of blocks globally shared and replicated over networks. Each block chain consists of a number of block. Each block carry the fingerprint of previous block.

Blockchain- One block after another in time

If you take a look at https://blockchain.info/ , you might see the continuous transaction and blocks those are being generated

Blocks from blockchain.info
  1. When a block of transactions is created, miner took the information of the transaction and generates a corresponding Hash for it. The reason of generating hash is, each hash for each block is unique. Hash for any two different blocks will be different even if they are different by a single character. It is easy to generate hash for a large amount of data, on the other hand, reproduce the exact data using the hash is still expensive computational operation.
  2. Transactions those has no block yet, are called unconfirmed transaction. Any node in the network can pick an unconfirmed transaction and broadcast to the network as a potential candidate to be added to the global Blockchain. Now it needs a mechanism to pick the next block to be added to the Blockchain.
Pick next block to be added

Here comes the consensus mechanism to pick the next block.

How Consensus mechanism approve the validity of any of the block to be added to Blockchain

There are a number of different consensus mechanism are being used for the purpose to validate the next candidate block to be added to the global block of chain. A comparative analysis of different consensus mechanism for Blockchain has been discussed here. Lets take a look at ‘Proof of Work’ consensus mechanism here.

Proof of Work

The following image gives an overview of the procedure of proof of work

Proof of Work (PoW)

Mining Difficulty: How the next block is chosen from pending pull

Bit coin uses SHA-256 in order to select the valid block to be added to the blockchain next. So in the pull there are a number of blocks pending and waiting to be added in the globally distributed Blockchain, that contains all the valid block for all valid transaction.

For example if we calculate the SHA-256 for any two string ‘Hello1’ and ‘Hello2’, even with a slight difference, in this case one character, each of their corresponding SHA-256 representation will be completely different. This is how any of the two blocks in the pull of pending block will have different SHA-256 representation.

SHA-256(‘Hello1’) → 948edbe7ede5aa7423476ae29dcd7d61e7711a071aea0d83698377effa896525

And SHA-256(‘Hello2’) → be98c2510e417405647facb89399582fc499c3de4452b3014857f92e6baad9a9

Now to pickup the valid block from the pull as the next valid candidate to be added to the Blockchain, bit cont uses a simple challenges, it pick the block that has ’n’ number of 0 at the beginning of it’s SHA-256 representation. This number ’n’ is called ‘difficulty’. This difficulty is adjusted for network periodically. This process of looking for blocks is called mining difficulty .

  • Miner takes header+proposed block + nonce and generate the Hash
  • Hash is then matched with the difficulty criteria which is called Target here
  • If the Hash can satisfy the target of mining difficulty, the proposed new block is a successful candidate to be added to the Blockchain.

Therefore, in order to find the exact SHA-256 hash, tens of thousands of SHA operations need to run, therefore, it is still a tough one to fraud. Currently, bitcoin networks can generated 500 quadrillion hashes per second and it takes 10 minutes on average to find a block.

--

--

Mansura H.
Blockchain- The next trend in information technology

Platform Architect @ IBM; Author of Hybrid Cloud Infrastructure and Operations Explained ..