Hyperledger Fabric is an open source, permissioned blockchain framework, started in 2015 by The Linux Foundation. It has modular or component-based architecture that can accommodate wide range of use cases, such as track-and-trace of supply chains, trade finance, loyalty and rewards, as well as clearing and settlement of financial assets.
As per definition Blockchain is an immutable distributed ledger that records the transaction in Decentralized environment. Blockchain technology consist of three main components: distributed ledger, consensus algorithm and smart contracts
There are 3 types of Blockchain:
- Public Blockchain
- Private Blockchain
- Consortium Blockchain
Open Source: Hyperledger Fabric platform is an open source blockchain framework hosted by The Linux Foundation. It has an active and growing community of developers.
Permissioned network: It establishes decentralized trust in a network of known participants rather than an open network of anonymous participants. It means all participating member’s identities are known and authenticated.
Pluggable architecture: It has pluggable architecture that helps industry adoption and develop various use cases. You can easily customize any component of fabric
Developer Friendly: Developer can write smart contract on any language like: GoLang, Node.js, TypeScript so Developers don’t have learn new language to write smart contract
Assets: An asset is anything that has value. An asset has state and ownership. Assets are represented in Hyperledger Fabric as a collection of key-value pairs.
Peers: Peers are a fundamental element of the network because they host ledgers and smart contracts. A peer executes chaincode, accesses ledger data, endorses transactions, and interfaces with applications.
Committing peers: It commits transactions and maintains the ledger & state.
Endorsing peers: It receives transactions for endorsement, and it verifies whether the transaction fulfils all the necessary and sufficient conditions. Thereby the Endorsing peer responds by granting or denying the endorsement.
Ordering service or Orderers: It approves the inclusion of blocks into the ledger. It communicates with peers and endorsing peers. It provides a shared communication channel to clients and peers over which the transaction can be broadcasted.
Channels: Channels are a logical structure formed by a collection of peers. This capability allows a group of peers to create a separate ledger of transactions. It is used to restrict access to the transaction with involved parties. It means clients only can see the messages and their associated transactions of the channels they are connected to and are unaware of other channels.
Organizations: Organizations is the container for the peers and respective certificate authorities (CA). Each organization has its own CA and a list of peers. Usually, organizations are used for physical separation of the blockchain network where each organization can set up their own physical machines and join the network.
Membership Services Provider (MSP): The MSP is implemented as a Certificate Authority to manage certificates that used to authenticate member identity and roles. It is used for verifying ownership in the network. Each certificate authority is tied to an organization.
Smart contract: Hyperledger Fabric smart contracts are called chaincode. Chaincode is program that defines assets and related transactions; it contains the business logic of the system. Chaincode can be invoked whenever an application needs to interact with the ledger, Chaincode can be written in Golang or Node.js.
1. Creating of Transaction Proposal: Imagine a trade, such as a deal between an two parties. The life of this transaction begins with its inception by a peer node. The client connects to a Hyperledger Fabric network using the Node.js or Java SDK. Using the SDK API, the client creates a transaction proposal and sends it to the endorsing peer for verification
2. Endorsement of transaction: Each endorsing peer executes the proposal (a function defined within the chaincode) and returns the negative or positive response. The responses and results from the chaincode are returned to the client.
3. Submission to orderer peers: If the transaction is endorsed, the client submits the transaction to the ordering service (group of ordering peers/nodes), which uses consensus to order the transaction into a block within the ledger. Otherwise, the transaction is cancelled.
4. Commitment of transaction: Once ordered, the stored transaction block is sent to all of the peers as part of the channel. This serves as a final validation step before changes are actually made to the ledger. There may be more than one transaction stored within one of these blocks.
5. Submission to ledger: Once the transaction(s) within the block sent back to the peers is ratified and finalized, the block is written into the ledger.
I tried to cover high level overview of Hyperledger fabric. In next articles, will cover technical architecture and chaincode request flow. Hyperledger Fabric can be used for Private or Consortium based Blockchain solutions that gives the flexibility to develop good enterprise grade solutions around Blockchain Technology.
If you liked the overview, please hit the Clap button or comment if you have any suggestion or feedback.