A Brief Introduction Of HyperLedger Fabric

What is HyperLedger

In this post, we look through a brief introduction of HyperLedger Fabric. But before that we need to understand HyperLedger.  HyperLedger (HL) is an umbrella project founded by the Linux Foundation and backed by many corporate businesses. It was formed around 2015-16. They are involved in blockchain technologies, building products, services and solutions on top of Hyperledger code bases that are important to various lines of business.

Hence you may think that HL is just all about Blockchain but it is far more than that. It contains a variety of entities. Some of them are tools,  frameworks, blockchain technologies like smart contracts, ledger frameworks, GUI, sample apps and utility libraries. The Hyperledger foundation project encourages the re-use of common building blocks along with development of Distributed Ledger Technology (DLT) entities. You can also support HL either by becoming a corporate member or by joining the developer community.

HL has grouped all projects under 2 categories:
Frameworks : Fabric, Burrow, Indy, Iroha and Sawtooth
Tools : Caliper, Cello, Composer, Explorer and Quilt

HyperLedger Projects
Image Source: https://www.hyperledger.org/

You can find more information on its official website at https://www.hyperledger.org/

HyperLedger Fabric

HL Fabric is basically a Distributed Legder Technology (DLT) under the HL project. It is a blockchain framework implementation for developing applications with a modular architecture. It is also called as a private ‘consortium’ based network. HL Fabric allows components, such as consensus and membership services, which can be plugged in and out. Fabric makes use of docker container technology to host its code base also called as Chaincode. Chaincode are equivalent of Smart Contracts w.r.t the Ethereum project. Chaincode is the application logic of the system.

Below are some of the features of HyperLedger Fabric which sets it apart from other ledger based frameworks:

Permissioned Based Network

In a typical blockchain framework the network consists of nodes and transactions and all nodes can see all transactions. This is termed as a permission less public network. This is where Hyperledger Fabric comes in with a lot of new changes. First of all it is a permissioned private network. It means that you can choose to create your own private network with permissions (read roles).

For e.g. If you are a seller, you might choose to give a special discount to buyer A, but you don’t want buyer B to see your transaction with buyer A. Hence you can create your own private network with buyer A and do transactions. If the same transaction was done on any other network like the Bitcoin network, then your transaction would be seen by all nodes since its a permission-less public blockchain network.

Identity Management via Public Key Infrastructure (PKI) – CA

These roles are governed by a Certificate Authority (CA) which the network uses to identify different nodes. It involves a Membership Service Provider (MSP) which generates x509. certificates which then can by trusted by nodes on the private network. All these cryptogenic material can be created by
a. Cryptogen tool  b. Fabric CA c. External CA

Types of Nodes

Membership Service Provider (MSP) – Acts as the certificate authority for the network
Ordering Service Nodes (OSN) – Responsible for maintaining consensus among the peers
Client – Represents the end-user / client application which triggers blockchain events
Peers – Nodes in the network
Endorsing Peers – They simulate transactions and ensure that the transactions are well-formed and valid

Roles

Endorser – Simulates transactions, prevents unstable or non-deterministic transactions. All endorsers are committers.
Committer – Appends validated transactions to their specific ledger.
Consentor – Responsible for maintaining the consensus algorithm on the network

ChainCode

If you have some basic idea about Bitcoins, blockchain or Ethereum then you might be aware of the term Smart Contracts. These are nothing but small executable functionality which are self containing / executing once deployed on the network. They are basically an ‘agreement’ between two parties participating in the network for doing transactions hence the name ‘Smart Contracts’.

For e.g. A smart contract can be written between a landlord and the paying guest that once the landlord’s account receives x amount of money, the copy of the digitally signed agreement should be mailed to the paying guest. In the HL Fabric world, smart contracts are called as Chaincode. Chaincode also plays a role in security. All chaincode executes on channels which can have specific permissions.

Consensus

The basis of any blockchain is consensus, meaning the validity of any transaction is arrived on an agreement by majority. This is achieved by running some alogrithm on that transaction (mining). Once the validity is established, that transaction is relayed to the network. In the case of Bitcoin, the algorithm in action is Proof Of Work (POW). In the same way Fabric uses the Byzantine Fault Tolerance (BFT) algorithm. Explaining consensus algorithms would be outside the scope of this article but might come up in future articles.

Separate execution

The above Chaincode and Consensus are run on separate run-times which makes its more scalable, modular and pluggable. Also you can choose only to download a particular section from the entire network based on your requirements. This is unlike the Bitcoin network where everything is executed and viewed by all entities in the network making scalability and performance a thing to consider.

Cryptocurrency

Since hyperledger fabric is a consortium based network, the organisations participating can decide on having or not having a cryptocurrency in their network. Hence fabric does not neccessarily have any cryptocurrency but instead it is optional.

Summary

In this brief introduction of Hyperledger Fabric, we saw that is one of the projects implementing the blockchain technology. In a similar way, there are other projects like Ethereum, etc which have a different way of implementing blockchain.

Hitesh Boricha

I have a little over a decade experience in the IT industry. Having worked in various roles in this industry, I am passionate about technology.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.