How Hyperledger Fabric Blockchain Works. Explained

Prachi Gopalani
Geek Culture
Published in
4 min readApr 9, 2021

--

The goal of this blog post is to describe key concepts of how Hyperledger Fabric blockchain works so that you can get a basic understanding of how to use.

Image Source

Contents.

  • Introduction to Hyperledger.
  • Hyperledger Fabric Details.
  • Hyperledger Fabric Workflow.
  • Hyperledger vs Ethereum vs Bitcoin.

What is Hyperledger?

Hyperledger is the umbrella open source project that the Linux Foundation has created and hosted since 2015.

  • Hyperledger is the umbrella open source project that The Linux Foundation has created and hosted since 2015.
  • It aims at advancing and promoting cross-industry blockchain technologies to ensure accountability, transparency, and trust among business partners.
  • Hyperledger makes business network and transactions more efficient.
Credit: https://www.hyperledger.org/
  • Hyperledger blockchains are generally permissioned blockchains, which means each party is clearly identified and every transaction is authenticated, authorized, validated and tracked. You can run Fabric networks on-premise or use Blockchain as a Service platforms to maintain the ledger infrastructure for you.
  • Hyperledger’s main goal is to create enterprise-grade, open source, distributed ledger frameworks and code bases to support business use cases.

Hyperledger Fabric.

Hyperledger Fabric was the first proposal for a codebase, combining previous work done by Digital Asset Holdings, Blockstream’s libconsensus, and IBM’s OpenBlockchain.

Roles within Hyperledger Fabric Network:

  • Clients
    Clients are applications that act on behalf of a person to propose transactions on the network. A client can be any specific application/portal serving specific organization/business activities. Client application uses Hyperledger Fabric SDK or REST web service to interact with the Hyperledger Fabric network.
  • Peers
    Peers in the member organization receives transaction invocation requests from the clients inside the organization. Peers maintain the state of the network and a copy of the ledger.Hence Distributed Ledger Technology (DLT).
  • Ordering Service
    The ordering service accepts endorsed transactions, orders them into a block, and delivers the blocks to the committing peers.

So not all peer nodes are same. There are different types of peer nodes with different roles in the network:

  • Endorser peer
  • Anchor peer
  • Orderer peer

Endorser peer

This peer works on upon receiving the “transaction invocation request” from the Client application the Endorser peer

  • Validates the transaction. ie Check certificate details and roles of the requester.
  • Executes the Chaincode(ie Smart Contract) and simulates the outcome of the transaction. But it does not update the ledger.

Hyperledger Fabric Workflow

Hyperledger Fabric Workflow

Following steps is the explaination:

  1. First, Client broadcasts the transaction invocation request to the Endorser peer.
  2. Endorser peer checks the Certificate details and others to validate the transaction. If the verification check passes, Endorsing Peer simulates the transaction, generates a response together with a read-write set, and endorses the generated response using its certificate otherwise rejection as part of the endorsement response.
  3. Client receives the endorsed proposal responses from Endorsing Peers.
  4. Client now sends the approved transaction to the Orderer peer for this to be properly ordered and be included in a block.
  5. Orderer node includes the transaction into a block and forward the block to the Anchor nodes of different member Organizations of the Hyperledger Fabric network.
  6. Orderer broadcasts the generated block to all Peers (to both Endorsing Peers and Committing Peers) on the relevant channel. Then, each Peer ensures that each transaction in the received block was signed by the appropriate Endorsing Peers. These individual peers then update their local ledger with the latest block. Thus all the network gets the ledger synced.
  7. Client receives any subscribed events from EventHub service.

Hyperledger vs Ethereum vs Bitcoin

The following table contains summarize the comparison of Bitcoin, Ethereum, and Hyperledger.

To find out what this means in detail for each blockchain platform, in the following posts. At the end, you can gain a good understanding of the most important topics in the blockchain space.

Let’s start with Bitcoin: How does Proof-of-Work work in Bitcoin? To find out, see here.

Thanks for Reading!

Cheers!

--

--