Introduction to Hyperledger Fabric

Hyperledger Fabric is a Blockchain framework that was initiated and maintained by IBM that is now being hosted under Linux Foundation’s Hyperledger umbrella. Hyperledger Fabric offers a modular architecture with a wide range of flexible consensus algorithms. Like Bitcoin or Ethereum, a Fabric Blockchain infrastructure has a shared ledger and a bundle of smart contracts. But unlike a Bitcoin or Ethereum Blockchain, Fabric is a permissioned Blockchain framework specialized for private businesses and organizations. It means that Bitcoin and Ethereum are for public use while Fabric users will need permissions to both join the Blockchain network as well as conduct transactions. Moreover, every transaction needs to be signed and verified, thus the transaction authorization must be achieved and maintained in a Fabric system.

Models

Consensus Model     

Hyperledger Fabric uses a special consensus model to guarantee that all nodes are updated with the same value. The process is: Execute – Order – Validate.

Execute
An endorsing peer—a dedicated, predefined party in the network—simulates a transaction (without any modification to ledger at this stage) and then signs a returning proposal, which indicates a sequence of read/write operations on the transaction.

Order
An orderer collects transactions into a block and then disseminates the block to all peers.

Validate
The peer nodes validate the transactions in a block before adding it to the local chain, which is a copy of the shared ledger.

Channel Model

Hyperledger Fabric offers a model for creating channels in which a group of participants can privately communicate and share data. This model is important because the participants in a Blockchain network may be competitors from different organizations, and so their confidentiality must be maintained.

Modular Architecture

Hyperledger also provides a modular architecture in which the administrators can switch between options of ledger data formats, select different consensus models, and choose various types of membership service providers.

Ethereum and Bitcoin have existing networks and test-networks with a predefined architecture and fix components whilst a Fabric Blockchain needs to be built with a set of business-oriented components and models.

Components

As the most basic form of a Blockchain network, a Fabric infrastructure has a bundle of nodes maintaining a shared ledger. As a private and permissioned Blockchain network for business, Fabric needs several additional components for further operations that never occur in a public use Blockchain network.

Membership Service Provider (MSP)

Because Hyperledger Fabric is a permissioned Blockchain framework, managing identities is a key component for all its operations. MSP issues a X.509 PKI certificate for each user, and all participants on the network will use their own certificates to interact with the network. For each organization, the Fabric network can be configured with a dedicated Certificate of Authority (CA) or a hierarchy CA structure including a Root CA and several Intermediate authorities.

Figure 1 – A visual demonstration of how the MSP works in the Hyperledger Fabric

Peers

Peers are the basic components needed to form a Blockchain peer-to-peer network. Each of the peers keeps a copy of the shared ledger while only a few of them are responsible to host and execute smart contracts. There are 2 types of peers on the network:

Endorsing peers: peers with the smart contract installed and used for endorsement.

Normal peers: peers with a ledger copy only.

Orderers

In the current release version of Fabric (release 1.4), an orderer is responsible for ordering endorsed transactions into blocks, and then disseminating the blocks to all peers for validation. Even though its functionality is simple, it is one of the most important components in the network. Currently there are 2 types of ordering services:

SOLO: a single node ordering service that is only used in the development stage due to its risky nature and potential to cause various types of fault tolerances.

Kafka: an ordering service consisting of a group of orderers who communicate by passing messages through a Kafka broker.

Channels

A business Blockchain is an industry scaled network in which all clients, alliances, and competitors participate and exchange information, quotes, or contracts. To guarantee data privacy, Fabric allows participants to create their own private channels that encapsulate and protect the members’ transactions.

Smart Contracts

To be able to cooperate with each other, all participants on the same channel must share a common set of rules, conditions, and processes. A smart contract consists of a business model and the corresponding rules manipulating said model. In Hyperledger Fabric, smart contracts can be developed in different programming languages such as Golang, Nodejs, and Java to name a few.

Applications

A client application is an assembly of some UIs, backends, and smart contracts. While essential business rules are implemented in the contracts, the backends and UIs can be customized for each participant. Fabric SDK is provided to bridge the gap between the contracts and different backends and UIs.

Summary

Hyperledger Fabric is designed to be a flexible Blockchain for businesses and aims to solve various types of complex business models that require engagement between multiple parties. One of the typical scenarios is the international exchange business, which requires the participation of many importers, exporters, banks, carriers, and government organizations. Another could be a logistic business that involves many manufactures, carriers, customs and borders, post offices, and many more individuals. A business scenario of the sort would create tons of paperwork for its users; that, or the users must put their trust in dozens of online services across numerous countries and languages. Instead, why not explore how flexible and effective Fabric is and use it to solve your own problems?

Thong Nguyen
Thong Nguyen joined LogiGear in 2009 as a software developer and has been leading LogiGear’s researching as a senior technology manager. He was responsible for setting up the innovation of TestArchitect, a leading tool in test automation. Adapting to Blockchain technology since 2018, Thong started leading a MOWEDE development team to deliver Blockchain projects. Thong also teaches testing domain and cryptography at the University of Sciences and is actively involved in LogiGear's internal technical seminars.
Thong Nguyen
Thong Nguyen joined LogiGear in 2009 as a software developer and has been leading LogiGear’s researching as a senior technology manager. He was responsible for setting up the innovation of TestArchitect, a leading tool in test automation. Adapting to Blockchain technology since 2018, Thong started leading a MOWEDE development team to deliver Blockchain projects. Thong also teaches testing domain and cryptography at the University of Sciences and is actively involved in LogiGear's internal technical seminars.