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.
Hyperledger Fabric uses a special consensus model to guarantee that all nodes are updated with the same value. The process is: Execute – Order – Validate.
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.
An orderer collects transactions into a block and then disseminates the block to all peers.
The peer nodes validate the transactions in a block before adding it to the local chain, which is a copy of the shared ledger.
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.
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.
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.
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.
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.
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.
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.
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.
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?