DevTeam.Space Product Development Blog

Explore our in-depth product development tutorials and new technology announcements published by our software development experts

All articles

Pros and Cons of Hyperledger Fabric for Blockchain Networks

Enterprises are increasingly interested in blockchain due to its promise of improved efficiency and cost reduction. However, they can’t use the permissionless public blockchains because of a lack of privacy, low scalability, and less transaction throughput.

Businesses need enterprise blockchains, and Hyperledger Fabric is increasingly looking like a good option for them.

In this article, I explain the pros and cos of Hyperledger Fabric for blockchain networks. However, I will first briefly describe why businesses require enterprise blockchains over public blockchains.

Contents

Why Hyperledger Fabric for blockchain
What is Hyperledger Fabric?
Advantages of Hyperledger Fabric: 1. Modular architecture
The 2nd advantage: you can use the Hyperledger Fabric to build permissioned blockchain
The 3rd among the pros of Hyperledger Fabric: Performance and scalability
The 4th advantage of Hyperledger Fabric: ’Channels‘ for partitioning data
Rich querying capability is the 5th among the pros of Hyperledger Fabric
Hardware-based protection of digital keys is the 6th advantage of Hyperledger Fabric
The 7th advantage of Hyperledger Fabric is the rich community support
Perceived disadvantages of Fabric

Why Hyperledger Fabric for blockchain

Businesses can‘t use public blockchains due to the following reasons:

  • Privacy issues: Public blockchains like Bitcoin are permissionless. Anyone can join it, including anonymous and pseudonymous users. Many businesses such as financial services institutions and healthcare providers work under stringent privacy requirements. They can‘t allow just anyone to see their sensitive information. Find out more about this in this article “Fundamental challenges with public blockchains”.
  • Scalability: Most public blockchains have low scalability because all the nodes on the network are required to process transactions. This also results in low transaction throughput.
  • Immutability of smart contracts: Smart contracts can‘t be changed once deployed and their execution results are irreversible. Businesses need ways to ensure they are bug-free before deploying these.
  • Storage issues: Since every full node stores all the data on the public blockchain, storage requirements are very high, continually increasing over time. This excessive storage redundancy isn‘t practical for businesses.
  • Unsustainable consensus algorithm: Bitcoin and Ethereum use the ’proof of work‘ (POW) algorithm, which requires lots of computing power and is energy-intensive. As time passes, the processing power and energy requirements increase making it impractical in the business context. More information about POW is found in this article “Proof of work vs proof of stake comparison”.
  • Lack of governance: No one controls public blockchains, making it the responsibility of individual developers or developer communities to execute improvement projects. Businesses need sufficient governance to run blockchain effectively over the long-term.

Businesses have specific requirements from a blockchain network:

  • They need a blockchain where they can control who joins the network, and they must be able to validate the identity of a new user with their organizational identity management system;
  • Enterprises need scalability and fast transaction execution;
  • Businesses must be able to set access control rules for their sensitive information;
  • The consensus mechanism should account for the business workflow where there is a separation of duty between a requestor, approver, and record-keeper.
  • The network should have high resilience;
  • Troubleshooting should be as automated as possible;
  • Maintainability should be high;
  • A proactive governance to develop right tools and processes for long-term effective operations.

Hyperledger Fabric is a platform that businesses can use to build their enterprise blockchains tho address these issues and meet their business requirements.

What is Hyperledger Fabric?

A hyperledger fabric logo

It‘s a platform used to build enterprise blockchains. It‘s one of the most important projects developed by the Hyperledger Consortium. The consortium intends to advance the development of enterprise blockchains.

Linux Foundation leads this foundation, which was launched in 2016 and counts several prestigious companies among its members. Some of the members are IBM, Intel, CISCO, SAP, Daimler, and American Express.

High-level objectives of the Hyperledger Consortium are the following:

  • Create an open-source enterprise-scale blockchain framework with code bases;
  • Foster an open, community-driven infrastructure with technical and business governance models overseeing it;
  • Organize technical communities for trials and use cases;
  • Educate communities about enterprise blockchains;
  • Promote an enterprise blockchain ecosystem.

Hyperledger Fabric, also called ’Fabric‘, is an open-source framework to implement permissioned blockchains. Digital Asset and IBM were the two companies that built the initial version of Fabric.

You can build your enterprise blockchain using Fabric, where you can benefit from the following features:

  • Plug-n-play ability to integrate components such as consensus algorithm and membership services;
  • Smart contracts called ’chaincodes‘, which are hosted using the container technology;
  • Channel technology for confidential transactions;
  • Ordering service that delivers the transaction to ’peers‘, i.e. a group of nodes responsible for committing the transactions in the ledger;
  • Endorsement policy for transaction validation;
  • Database services like CouchDB.

At the time of writing, the available release of Fabric is version 1.0.

Note: Hyperledger Fabric is an industry-agnostic framework. This is not suitable for cryptocurrency projects. You can develop a native digital token, but that will be a complex development project requiring significant time and effort.

Advantages of Hyperledger Fabric: 1. Modular architecture

An illustration of a hyperledger-fabric model

Building an enterprise blockchain can be challenging. Developers need to spend a lot of time in building the required components since the technology is still relatively new. There is not much in the way of off the shelf plugins etc. available.

Developers devote significant energy to automate things at the protocol level. It‘s not easy since there‘s no single administrator. You can read more about the challenges of building enterprise blockchains in this article “’WordPress of Blockchain’ Startup Seeks to Solve Enterprise Pain Points”.

Fabric offers a modular architecture where developers can create plug-in components. This is very helpful to developers. They can easily include components like custom identity management etc., thanks to this feature.

The need to include a custom identity management system is a particularly common requirement. Many companies want to build a permissioned blockchain but want to reuse their existing identity management system. The modular architecture allows this.

The 2nd advantage: you can use the Hyperledger Fabric to build permissioned blockchain

If you are building a blockchain for a business, you are likely building a permissioned one. Businesses such as banks operating under stringent regulatory requirements can‘t afford unknown users to view transaction data. Besides, information is an asset to these enterprises so unauthorized viewing is a risk to future financial profits.

Fabric is a permissioned framework. All participants have known identity which is validated against the organizations‘ identity management system. There are no anonymous or pseudonymous users.

Organizations using Fabric would typically use a ’Membership Service Provider‘ (MSP). This is for issuing and validating certificates, and for user authentication.

MSP is also called Certificate Authority (CA) in Fabric parlance. The platform provides tools for MSP certificate generation, for e.g. ’cryptogen‘. Read more about the MSP in Fabric in this article “Hyperledger Fabric in practice. Main components and running them locally”.

You can assign different roles to the nodes, as follows:

  1. ’Client‘: invokes transactions;
  2. ’Orderer‘: updates transaction data;
  3. ’Peer‘: receives updates from orderer and commits transactions in the ledger;
  4. ’Endorser‘: a kind of peer that validates transaction authenticity.

Given that the process of building a permissioned blockchain network is complex and challenging, it’s a good idea to think about hiring expert blockchain developers and ensure that it runs like clockwork.

 

The 3rd among the pros of Hyperledger Fabric: Performance and scalability

There is no POW algorithm and crypto mining in Fabric, and it delivers high scalability and fast transactions. Transaction validation mirrors how a transaction workflow operates in normal enterprise and works as follows:

  1. The transaction processing has 3 separate phases:
    1. Distributed logic processing and agreements involving chaincodes;
    2. Transaction ordering;
    3. Transaction validation and commit.
  2. This ensures fewer levels of trust and validation across different types of nodes, thus reducing overhead;
  3. A transaction lifecycle is as follows:
    1. A requester submits a transaction proposal to an endorser;
    2. The endorsement policy specifies the number and combination of endorsers required for this transaction;
    3. The endorser executes chaincodes to simulate the proposal to the peers through a ’read/write set‘;
    4. The endorser sends back the signed proposal responses, also called ’endorsements‘;
    5. The client submits a transaction to the orderer with digital signatures;
    6. The orderer creates a block of transactions and sends it to the peers;
    7. The peer checks whether the endorsement policy was met and checks for conflicting transactions. When both checks are successful the peer commits the block in the ledger.

Only signature read/write sets traverse the network, optimizing scalability and performance. Only endorsers and peers committing transactions actually see these transactions, hence confidentiality of data is optimally maintained.

The 4th advantage of Hyperledger Fabric: ’Channels‘ for partitioning data

Take the case of the financial services sector, where some investment instruments can take 10 or more years to deliver the desired returns. This means that the data concerning such instruments must remain confidential for a decade or more.

Banks and financial institutions aren‘t confident that data encryption technology used in blockchain or any other technology for that matter can protect their sensitive data for that long. They are aware that hackers are continuously upgrading their capabilities.

For e.g., in a decade from now, quantum computing, i.e. a technology that’s expected to increase computing power many times over, theoretically will be able to break today’s data encryption technology. Read “Quantum computers threaten data encryption” if you wish to know more.

Financial services companies are keen on physically separating their sensitive data to protect them. ’Channels‘ in Fabric provide a data-partitioning capability that achieves this physical separation of sensitive data.

Rich querying capability is the 5th among the pros of Hyperledger Fabric

A fabric example of query the ledger

With every update of the distributed ledger, a set of asset key-value pairs are also committed to the ledger. The file system of Fabric incorporates LevelDB, which is very suitable to query functions.

LevelDB has a key-value database and enables keyed queries. There can also be composite key queries and key range queries.

You can also optionally add CouchDB, which has a document database where content is stored as JSON. This makes the database very easy to query.

Using JSON eliminates the need for frequent changes to the application just to facilitate querying. CouchDB also supports data-rich queries.

Hardware-based protection of digital keys is the 6th advantage of Hyperledger Fabric

Fabric features a ’Hardware Security Model‘ (HSM) that helps in safeguarding and managing digital keys used for authentication. For use cases such as identity management, HSM increases the protection of keys and sensitive data.

The 7th advantage of Hyperledger Fabric is the rich community support

Earlier I listed a few member organizations involved in the Hyperledger consortium. There are many more, including Oracle, Deloitte, Huawei, JP Morgan, ABN-AMRO, ANZ, and Aetna. You can find the complete list of members in the “Members” section of their website.

This is one of the richest development communities going. Coming from such a diverse set of organizations, each of which have significant expertise both in blockchain technology as well as their primary ’Lines of Business‘ (LOBs). The combined might of the community is expected to pay a rich dividend to Fabrics‘ future development roadmap.

The disadvantages of Hyperledger Fabric:

Two obvious disadvantages of Fabric are both related to the framework being quite new. These are:

  1. Lack of proven use cases;
  2. An inadequate number of skilled programmers able to use it.

Considering that Fabrics 1.0 was released only in July 2017, the above disadvantages are expected. The project team is aware that addressing these challenges will take time. You can read about their viewpoint in the article “The pros and cons of Hyperledger Fabric”.

Perceived disadvantages of Fabric

There are those in the crypto community who consider Fabric to have fundamental disadvantages. However, this is debatable. These crypto community members insist on fully decentralized and completely open blockchain. Nothing less meets their standards.

Below are their concerns with Fabric, and the counterpoints from supporters of Fabric:

  1. Critiques argue that Fabric is permissioned, and therefore not a public blockchain. This doesn‘t allow complete transparency. Supporters of Fabric say that it will be used in business-to-business (B2B) and business-to-consumer (B2C) contexts that demand trusted participants only. This removes the possibility of using a permissionless blockchain.
  2. Critiques don‘t find the consensus algorithm in Fabric as secure as POW. However, supporters of Fabric argue that in a network where all participants have already been verified using an internal identity management system, a costly algorithm like POW isn‘t required.
  3. Critiques argue that without a crypto token, there will not be an incentive for nodes to keep the network as secure as miners do in the Bitcoin network. Supporters point out that there will be no anonymous transactions in the network, hence, POW and an expensive mining process isn‘t necessary.
  4. Critiques claim that there won‘t be real immutability without POW. Supporters agree that complete immutability isn‘t possible in Fabric since it doesn‘t employ POW. But they also point out that in a network with known participants, all bound by the governance and code of conduct of the business organization, a ’tamper-evident’ system is needed, and not a ’tamper-proof’ one. The cryptographic hash will be different if someone tampers with data. In Fabric, checking the hashes will reveal if tampering was done, and that will allow organizations to start the necessary corrective process.

You can read about these perceived disadvantages and the corresponding responses from the supporters of Fabric, in this article “Private Blockchains for Bitcoin Maximalists”.