A Brief Guide to Blockchain
Blockchain promises to radicalize dozens of industries ranging from Financial Technology to Real Estate to Voting. The technology has seen investment in billions from some of the biggest players like JP Morgan and IBM. Millions of people are already reaping benefits and saving money using Blockchain. It’s imperative to understand this technology to benefit from it.
What is Blockchain?
The blockchain is a distributed database that maintains an expanding ledger of data and records. It is encrypted and tamper-proof. It is time-stamped making the data on Blockchain immutable. This provides tremendous opportunities for many fields.
Technically, Blockchain is a data structure with an ordered back-linked list of blocks of transactions. It is stored as a flat file or in a simple database. They are linked ‘back’, each referring to the previous block.
Each block is identified by a hash, generated using the SHA256 cryptographic algorithm. The block also references to a previous block (parent block). This forms a sequence of hashes linking each block to its parent all the way to the first block. This first block is known as the Genesis Block. The hash and the reference to parent are placed in the header of the block.
Structure of Block
A block is a data structure which contains all the transactions needed for inclusion in the public ledger. The block is made of a header, containing metadata, followed by a long list of transactions.
The block header consists of three sets of metadata. First, there is a reference to the previous hash block. The second set of metadata relate to mining completion and are Difficulty, Timestamp, and Nonce. The final metadata is the Merkle Tree Root. This summarizes all the transactions of the block.
Block Identifiers: Block Header Hash and Block Height
The identifier of a block is it cryptographic hash known as the Block Header Hash. It can be seen as a digital fingerprint. This is made by hashing the block header twice through the SHA256 algorithm.
Another way to identify a block is by its position in the blockchain. This is known as the block height. The genesis block has a height of 0. Subsequent blocks are added on top of the genesis block and the height gets incremented by 1. The block height as on 10 April 2018 is 517,518. This means that 517,518 blocks were added on top of the genesis block.
Block height isn’t a unique identifier as there may be two blocks with the same height. This occurs in the case the blockchain forks. Also, remember block height isn’t part of the metadata stored in the block header. It is dynamically computed by the node.
A summary of all transactions in the blockchain is stored in the block using Merkle Trees. A Merkle Trees also are known as a Binary Hash Tree is a data structure used to summarize and verify the integrity of the data. These trees are binary trees with cryptographic hashes stored in them.
The trees are made by recursively hashing pairs of nodes until there is only the root hash. This is called as the Merkle Root. Double SHA256 is used as the hashing algorithm for this process. Whether there is one transaction or a hundred thousand transactions in the block, the Merkle root always summarizes them into 32 bytes. To prove that a transaction is included in a block, a node needs to produce log2(N) 32 bytes hashes. This is very efficient, as the number of transactions increases the corresponding base 2 logarithm increases much slower.
Different Types of Blockchain
There are various types of Blockchain are Private, Public, Centralized, Decentralized, Permissioned, and Permissionless. All this could be configured depending on the requirement of the network. Corporations and Governments across the world are at the moment trying out their own versions of Blockchain to solve problems ranging from supply chain management to cross-border payments.
Benefits of Blockchain
The blockchain is more secure than traditional databases. There is a network of thousands of computers (nodes) that are validating transactions in real time. To manipulate the records on the blockchain you’ll have to manipulate the records on all the nodes involved in the network.
Blockchain also eliminates the cost and trims waste. Since it’s a shared ledger the job of auditing records is much easier and faster. Smart contracts are leading the way here. Smart contracts are pieces of code that automate many jobs. This code sits on the blockchain and once deployed they perform their intended function without fail.
If one node updates all the other nodes, the blockchain is centralized. If any node can update other nodes, the blockchain is said to be decentralized. To do this securely, a way to reach consensus in the network is necessary. This is usually done by the means of a Proof of Work (PoW) method. With PoW, a consensus is achieved without the necessity of Middlemen. Gone are the days of Banks, Middlemen, or Regulators. There is no need to verify a block or the transactions contained in the block.
So far in the article, we have covered what Blockchain is, how it is implemented and the significance. You can see various benefits that blockchain offers and how it can revolutionize various industries.
The brevity of the article hardly does justice to the full power of Blockchain. This is however intentional as it converts jargons into meaningful terms which will help you build an understanding of the revolution that is happening right now. You can from here engage better with news and ponder upon how your industry can benefit from public distributed ledgers.