What is Hyperledger Fabric?

Overview

Hyperledger is an open-source project hosted by the Linux Foundation. It is focused on developing tools, frameworks, and libraries to implement enterprise-grade blockchain.

Hyprledger Fabric is one of the projects under the umbrella of Hyperledger. It is a permissioned blockchain that overcomes the issues faced by a public blockchain like privacy, access control, performance, and modularity. Hyperledger Fabric is targeted toward enterprises, and for that, it contains modular components like assetsAnything defined to have a value during a transaction between two or more enterprises., shared ledger, smart contract,A piece of code written in GO language that is executing business logic on the blockchain. certificate authorityAuthority responsible for adding new nodes to the permissioned blockchain, the certificates also specify the access that the users have of the blockchain., and ordering serviceIt is responsible for arranging transactions in chronological order and adding them to ledger in a batch. These components can be added and personalized according to the needs of the enterprise.

From: hyperledger.org
From: hyperledger.org

Properties

The properties of HyperLedger Fabric are as follows:

  • Identity management: A certificate authority is used to provide access to the permissioned blockchain. Each organization has a root certificate with all the access. Furthermore, each organization has peers with certificates with different levels of blockchain access. This allows organizations to provide different employees with varying levels of access.
  • Processing power: Hyperledger Fabric does not need a computationally intensive consensus algorithm because it's a private blockchain. The consensus algorithms these blockchains use need less processing power. Therefore, it takes less time which ultimately increases the transactions per second of the whole network.
  • Privacy: All the network nodes are verified before being added to the network. However, competitor organizations can still see another company's data within the same blockchain network. To tackle this issue, Hyperledger Fabric uses channels to allow companies to perform transactions with other companies privately within the same blockchain network.
  • Chaincode functionality: It allows companies to implement their business logic to perform transactions. This business logic is written in smart contracts, mostly in GO. They are responsible for validating and verifying the transactions before executing them.
  • Modular design: This property allows organizations to personalize the blockchain network. It allows them to choose the components and their settings, ranging from choosing the consensus algorithm to giving access to different levels of access to nodes using the certificate authority.

Architecture

A Hyperledger Fabric contains many types of nodes that make up the blockchain network. Some of these nodes are responsible for hosting chaincode, ledger, and the state. Together, they perform transactions while maintaining privacy and authenticity.

The architecture of a Hyperledger Fabric network

Blockchain data structures

There are two data structures used in the Hyperledger Fabric:

  • Ledgers: Ledgers are linked blocks containing transactions in chronological order. They are constructed by the ordering service and are broadcasted to the peer nodes. They allow calculating the current state of the key blockchain by traversing the chain of blocks. There is a separate ledger for each channel that exists on the blockchain network to ensure privacy.
  • State: The state is a key value store that represents the latest state of the ledger. It is updated by the chaincode every time a transaction occurs in the network. A state exists for every ledger in the network which corresponds to their respective channels. This help ensures the privacy of transactions between different enterprises within the same blockchain network.

Types of nodes

There are three types of nodes in a Hyperledger Fabric network:

  • Client node: They represent the end-user in the network and can connect to any peer node to communicate with the blockchain.
  • Peer node: They contain the up-to-date ledger and the state database. In addition to that, they're responsible for hosting and executing the chaincode. Some peer nodes have the added responsibility of validating the newly added blocks called endorsers.
  • Ordering node: They provide a shared communication channel to the client and peer nodes. The client broadcasts transactions to all the peers to verify the endorsement of a transaction and then updates the ledger.

Types of transactions

There are two types of transactions in a Hyperledger Fabric network:

  • Deploy transactions: They take a program as an input parameter and deploy a new chaincode on the blockchain when the transaction is completed successfully.
  • Invoke transactions: They call a function already present on the chaincode deployed on the blockchain. These functions may modify the blockchain's internal state or return an output.

Note: To learn more about how transactions are executed in Hyperledger Fabric, click here.

Free Resources

Copyright ©2024 Educative, Inc. All rights reserved