8
Min Read

What is Hyperledger Fabric?

Ray Chen
Product Manager
January 9, 2024
What is Hyperledger Fabric?
Update
Since this post was written, Hyperledger FireFly has reached 1.0. Learn more here!

Initially created by IBM and later contributed to the Linux Foundation in 2015, Hyperledger Fabric is an open-source, permissioned blockchain framework. Initially aimed at supply chain and finance, its modular design, privacy functions, and adaptability for bespoke business solutions have made it a go-to for enterprise-level applications.

Kaleido's team includes original Hyperledger Fabric developers, as well as long-standing contributors and maintainers.

In this article we’ll do a deep dive on Hyperledger Fabric, from benefits through use cases. We’ll also give a technical overview of the protocol.

The Benefits of Hyperledger Fabric

Hypereledger Fabric is a good choice for developers aiming to develop applications on secure, permissioned blockchain networks. Its adaptable architecture is particularly suited for large applications needing robust data protection.

Kaleido offers Hyperledger Fabric as one of its many supported protocols. Featuring a comprehensive range of ready-to-use services, versatile cloud hosting options, and potent APIs, Kaleido simplifies the process of operating a Fabric network across various environments.

Permissions and Oversight

This protocol enables you to safeguard specific transaction details, making it an ideal choice for sectors like banking, logistics, and insurance.

Open-Source Nature

As a component of the Linux Foundation's Hyperledger initiative, Hyperledger Fabric is open-source, allowing businesses to create bespoke applications while minimizing vendor dependency.

Configurable and Extendable

Hyperledger Fabric's modular design permits the integration of various components such as membership services and consensus algorithms, enabling you to customize the network to your specific requirements.

Transaction Handling

Fabric employs a unique transaction model of execute-order-commit, where a specific group of peers initially handles execution, followed by an ordering service that manages transaction packaging and distribution.

How Hyperledger Fabric works

When contrasted against other enterprise blockchain protocols, Fabric displays a number of inherently unique characteristics. These include transaction lifecycle and consensus, privacy techniques and channels, trust models, smart contracts, and programming paradigms.

Technical Overview

Hyperledger Fabric is an open source blockchain protocol custom designed for enterprise use cases in a permissioned blockchain network. As part of the Hyperledger project of the Linux Foundation, Fabric is the most widely used blockchain protocol in the umbrella project with the widest overall community participation.

Compared to other protocols in the enterprise blockchain space, Fabric has some unique designs. The burden of transaction processing computation and state management is split out into a separate type of node called "endorsers/committers", or simply "peers". The responsibilities to build consensus, order transactions and seal them into blocks are delegated to a different type of nodes called "orderers".

Channels are another unique design in Fabric. Operating like mini-blockchains, each channel contains their own permissioning policies and their own ledger to record the blocks and transactions. In essence, a single Fabric network can support many isolated blockchain instances.

Smart contracts for Fabric can be written in any language architecturally, as the smart contracts communicate with the hosting peer nodes via a well-defined HTTP interface. Currently 3 languages are supported for Chaincode (the term used for smart contracts in Fabric lingo) to be developed in: Golang, node.js/typescript and Java.

Trust Model

Fabric is custom designed for use in a permissioned network context, where an elaborate onboarding process exists to allow trust to be established among the participants. Specifically, this is achieved by requiring every node to present MSP (membership service provider) credentials that are either x.509 certificates signed by the organization's Certificate Authority that's already been registered in the channel configuration, or zero knowledge proofs that are verifiable for possession of signed attributes.

The trust among the members of a channel is established through a ceremony of declaring the governance policies and signing by the founding members. The root of the trust is captured inside the genesis block of the channel. Subsequent modification to the channel configuration, including adding or removing members, adding or removing peers and orderers, updating policies, must be conducted according to the current governance policy, which itself can be modified if the signature threshold of the modification policy is met.

Privacy

Fabric provides two levels of transaction privacy. With message isolation via channels, a member is completely unaware of the existence of a channel if they are not a member of it. With private data collections, a design very similar to the private transactions in Enterprise Ethereum, transaction inputs are shared in direct peer to peer communications with the parties authorized to see them. Only the hashes for the private transaction inputs are shared with the ordering service and included in the transaction to be recorded in the ledger.

Consensus

Fabric consensus is three parts:

  • The endorser (which is part of the peer nodes) provides endorsements by first executing the target business logic in the invoked Chaincode.
  • The orderer nodes enforce global ordering (within the channel) and assemble transactions into blocks.
  • Finally, the committer (which is also part of the peer nodes) validates the transactions as successful or failed and commits them into their ledger for the channel.

Programming Model

The Fabric design presents some unique aspects to application developers. Chaincode development is pretty straightforward, with full programming languages such as Golang, node.js/typescript, and Java, because there is no special DSL such as Solidity to learn. Interaction with the peer and orderer nodes are over a well defined, but very complex, gRPC interface with protobuf as the wire protocol. Using one of the SDKs (supported in Golang, node.js/typescript and Java) is a necessity.

The peer nodes have a built-in discovery service that makes it much easier to gather the necessary information about the network topology and determine the list of peers to call in order to fulfill the endorsement policy that is required for the transaction to succeed.

Smart Contracts

Fabric provides flexible smart contract development and deployment support. After being developed in any of the supported languages, they can be deployed either as long-running microservices, or as commands that get executed and exited when done.

Kaleido's Fabric support for Chaincode includes Golang binaries and node.js source projects.

Fabric Chaincode deployments are semantically defined as two parts:

  • The executable program, which must be individually installed on each peer designated as servicing that Chaincode's functionality.
  • The definition, which must go through an approve/commit lifecycle via on-chain transactions and is captured on the ledger of the channel.

Orderers do not need the Chaincode installed, as they are only concerned with processing the output of the endorsement executions. Not all peers within a membership need to install the Chaincodes. Only those designated as servicing the Chaincodes' functionalities need to have them installed.

What are Top Hyperledger Fabric Use Cases?

Hyperledger Fabric is a great protocol choice for tracking the provenance of goods along a supply chain, enhancing transparency and reducing fraud. It has also found broad adoption in financial services and healthcare, where its privacy capability and ability to securely share data helps streamline complex and sensitive operations.

With a modular architecture, Fabric enables plenty of customizations to make blockchain-based collaboration easier and more efficient for enterprise businesses.

Fabric is a great option if there are competitive or separate entities operating in one shared network as channels enable 1-to-1 interactions in dedicated, separate chains.

Frequently Asked Questions About Hyperledger Fabric

Is Hyperledger Fabric free?

Hyperledger Fabric is free to use. Developed by the Linux Foundation, it is open source and anyone can download it.

Is Hyperledger Fabric a private blockchain?

Yes. Hyperledger Fabric is designed for use in enterprise environments where multiple organizations need to collaborate and share data securely. Unlike public blockchains like Bitcoin or Ethereum, Hyperledger Fabric is permissioned, meaning that participants in the network are known and trusted entities.

In a Hyperledger Fabric network, organizations can maintain their own private channels for transacting and sharing data with specific parties, while also having the ability to interact with other channels when necessary. This allows for greater privacy, scalability, and flexibility in designing blockchain-based solutions for business use cases.

Furthermore, Hyperledger Fabric provides a modular architecture, enabling organizations to customize various aspects of the network, such as consensus mechanisms, membership services, and data storage, to fit their specific requirements.

Hyperledger Fabric vs Hyperledger Besu?

Hyperledger Fabric and Hyperledger Besu, both part of the Hyperledger Foundation, offer distinct features catering to different blockchain needs. Hyperledger Fabric boasts a modular consensus mechanism, providing flexibility with options like Kafka-based consensus, Raft, or PBFT. It supports various languages for smart contracts, ensuring adaptability and privacy through its robust permissioning system. Fabric excels in enterprise use cases by allowing fine-grained control over data privacy via channels, enabling applications in supply chain management, finance, and healthcare.

On the other hand, Hyperledger Besu is Ethereum-compatible and predominantly employs Ethash proof-of-work consensus. It supports Solidity for smart contracts, leveraging the Ethereum ecosystem, yet its permissioning features are not as advanced as Fabric. Besu benefits from the wider Ethereum community but might be less customizable for specific enterprise use cases compared to Fabric.

In essence, if precise control over privacy, customizable consensus, and diverse enterprise applications are crucial, Hyperledger Fabric stands out. For those seeking Ethereum compatibility and leveraging existing Ethereum tools or contracts, Hyperledger Besu might be a more suitable choice. Ultimately, the decision rests on the specific requirements of the project at hand.

How do I write and deploy smart contracts (chaincode) on Hyperledger Fabric?

To write and deploy smart contracts (chaincode) on Hyperledger Fabric, you need to choose a programming language such as Go, Java, or JavaScript and set up the development environment accordingly. Write the chaincode logic, defining functions and data structures, using the Fabric SDKs and APIs. Package the chaincode into a deployable format and install it on desired peer nodes within the network. Instantiate the chaincode on a specific channel to bind it to the network.

Finally, interact with the deployed chaincode using client applications, SDKs, or RESTful APIs by invoking its functions and passing relevant data as arguments. It's recommended to refer to the official Hyperledger Fabric documentation and language-specific resources for detailed instructions and best practices in writing and deploying chaincode on the platform.

In our library of webinars, you can watch a video tutorial about this process from Jim Zhang titled "Tech Tuesday: How to Write and Deploy Chaincode for Hyperledger Fabric."

How does Hyperledger Fabric differ from other blockchain platforms, such as Ethereum, in terms of architecture and use cases?

Hyperledger Fabric differs from other blockchain platforms like Ethereum primarily in its architecture and focus on enterprise use cases.

Unlike Ethereum, which is a public blockchain platform primarily designed for decentralized applications (dApps) and cryptocurrencies, Hyperledger Fabric is a permissioned blockchain framework tailored for enterprise environments.

Fabric's modular architecture allows for greater flexibility and customization, enabling enterprises to implement specific consensus mechanisms, identity management solutions, and privacy features to meet their business requirements.

Additionally, Hyperledger Fabric supports smart contracts written in general-purpose programming languages like Go and JavaScript, making it more accessible to enterprise developers with existing skill sets.

What are the key features and capabilities of Hyperledger Fabric that make it suitable for enterprise-grade blockchain applications, particularly in terms of scalability, privacy, and governance?

Hyperledger Fabric offers several key features and capabilities that make it well-suited for enterprise-grade blockchain applications. Its modular architecture allows for scalability and performance optimization through the use of channels, which enable the partitioning of network traffic and data privacy.

Fabric's support for permissioned networks and identity management ensures privacy and confidentiality, making it suitable for industries with strict data protection requirements.

Additionally, Fabric's robust governance model, which includes policies for membership, consensus, and endorsement, enables enterprises to establish clear rules and procedures for network operation and decision-making.

Overall, these features make Hyperledger Fabric a robust and reliable choice for building enterprise blockchain applications.

Getting Started with Hyperledger Fabric

You can launch a Hyperledger Fabric chain in minutes on the Kaleido platform using the free trial, enjoying a full suite of plug and play tools and services, or download the source code to build your own chain.

Interested in Blockchain?

Start learning blockchain and creating enterprise solutions today with a free Kaleido account!

Create Free Account
Don't forget to share this article!
Interested in Blockchain?

Start learning blockchain and creating enterprise solutions today with a free Kaleido account!

Create Free Account

The Ultimate Enterprise Blockchain Glossary

Your guide to everything from asset tokenization to zero knowledge proofs

Download Now

Swift Utilizes Kaleido in New CBDC Sandbox

Learn how Swift, the world’s leading provider of secure financial messaging services, utilizes Kaleido in its CBDC Sandbox project.

Download Now

Related Posts

Comparing Hyperledger Fabric and Hyperledger Besu: A Deep Dive

Powerhouse Enterprise Protocols: A Comparison of Hyperledger Fabric vs Hyperledger Besu

How to Use the ERC-1400 Standard for Compliant Blockchain Securities

How to Use the ERC-1400 Standard for Compliant Blockchain Securities

Marc Lewis
Managing Editor
How to Manage Digital Asset with Our Next-Gen Asset Manager Service

Asset Manager Service: A Next-Gen Engine for Managing Digital Asset & Tokenization Projects

Marc Lewis
Managing Editor

Blockchain made radically simple for the enterprise

No Credit Card Required
ISO27K & SOC2 Type 2 Compliant
Free Training & Support