0% found this document useful (0 votes)
26 views13 pages

Hyperledger Fabric

Hyperledger Fabric is an enterprise-level blockchain platform characterized by its modular architecture, permissioned network, and smart contract functionality. It supports secure and scalable custom blockchain solutions across various industries, with a workflow involving transaction proposals, endorsements, and ledger updates. Key components include peer nodes, orderers, chaincode, and membership service providers, all contributing to the integrity and privacy of transactions within the network.

Uploaded by

mabhijeet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views13 pages

Hyperledger Fabric

Hyperledger Fabric is an enterprise-level blockchain platform characterized by its modular architecture, permissioned network, and smart contract functionality. It supports secure and scalable custom blockchain solutions across various industries, with a workflow involving transaction proposals, endorsements, and ledger updates. Key components include peer nodes, orderers, chaincode, and membership service providers, all contributing to the integrity and privacy of transactions within the network.

Uploaded by

mabhijeet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Hyperledger Fabric is designed for use in enterprise-level applications, and it is characterized by

its modular architecture, permissioned network, and smart contract functionality, known as
“chaincode”.
● The platform provides a high degree of security, privacy, and scalability, and it supports
the development of custom blockchain solutions for various use cases across industries
such as finance, supply chain, and healthcare.
● Hyperledger Fabric operates as a network of nodes, where each node performs a
specific function, such as validating transactions, maintaining the ledger, and executing
chaincode.
● Transactions are validated and ordered by a consensus mechanism, which ensures the
integrity and consistency of the ledger.

Components:
Hyperledger fabric is an enterprise-level permission blockchain network. It is made up of various
unique organizations or members that interact with each other to serve a specific purpose. For
example, these organizations can be a bank, financial institution, or a supply chain network.
Each organization is identified and they have a fabric certificate authority. These organizations
are called members.
Each member of the fabric can set up one or more authorized peers to participate in the network
using the fabric certificate authority. All of these peers must be authorized properly.
There is a client-side application connected to the network written with the software
development kit (SDK) of any particular programming language.

Workflow
For each and every transaction in the fabric, the following steps are followed-

Creation of the proposal: Imagine a deal between a smartphone manufacturer


company and a smartphone dealership. The transaction begins when a member
organization proposes or invokes a transaction request with the help of the client
application or portal. Then the client application sends the proposal to peers in each
organization for endorsement.

Endorsement of the transaction: After the proposal reaches the endorser peers
(peers in each organization for endorsement of a proposal) the peer checks the fabric
certificate authority of the requesting member and other details that are needed to
authenticate the transaction. Then it executes the chain code (a piece of code that is
written in one of the supported languages such as Go or Java) and returns a response.
This response indicates the approval or rejection of the following transaction. The
response is carried out to the client.
Submission to ordering service: After receiving the endorsement output, the
approved transactions are sent to the ordering service by the client-side application.
The peer responsible for the ordering service includes the transaction into a specific
block and sends it to the peer nodes of different members of the network.
Updating the ledger: After receiving this block the peer nodes of such organizations
update their local ledger with this block. Hence the new transactions are now
committed.

Hyperledger fabric architecture


Hyperledger Fabric features a modular and flexible architecture designed to meet the
diverse needs of enterprise blockchain applications. Here is an overview of Hyperledger
Fabric Architecture:

1. Peer Node
This is the main component of Hyperledger Fabric. It is responsible for managing the
ledger, executing smart contracts, and participating in the consensus process. A peer
node in Hyperledger Fabric is a server that runs the Hyperledger Fabric software and is
part of a network of peer nodes that make up a Hyperledger Fabric blockchain. Each
peer node stores a copy of the ledger and participates in the consensus process to
validate and endorse transactions, as well as maintain the state of the ledger. Peer
nodes can also run smart contracts, known as chaincode in Hyperledger Fabric, which
define the business logic of the blockchain network.

Endorser Peers: Responsible for endorsing transactions. They execute chaincode and
simulate transactions to verify if they meet the endorsement policy before a transaction
is submitted for ordering.
Committing Peers: Maintain a copy of the ledger and state database. They commit
transactions and blocks to the ledger after they are validated and ordered.

2. Orderer
In Hyperledger Fabric, an orderer is a component that is responsible for ensuring the delivery of
transactions to the appropriate peer nodes for validation and endorsement. The orderer
maintains an ordered log of all transactions that have occurred on the network and provides a
communication channel for the peer nodes to reach a consensus on the order in which
transactions should be processed. The orderer does not validate or endorse transactions but
rather acts as a mediator to facilitate communication between the different peer nodes. There
are 5 types of Orderer:
● Solo Orderer: A solo orderer is a single node that is responsible for maintaining the
ledger and ordering transactions in the network. This type of orderer is typically used in
small or test networks.
● Kafka Orderer: A Kafka orderer is a cluster of orderer nodes that use the Apache Kafka
distributed messaging system to order transactions and maintain the ledger. This type of
orderer is typically used in large or complex networks.
● Raft Orderer: A Raft orderer is a cluster of orderer nodes that use the Raft consensus
algorithm to order transactions and maintain the ledger. This type of orderer is typically
used in networks that require high performance and low latency.
● SNS Orderer: An SNS orderer is a cluster of orderer nodes that use the Amazon Simple
Notification Service (SNS) to order transactions and maintain the ledger. This type of
orderer is typically used in networks that are hosted on Amazon Web Services (AWS).
● CouchDB Orderer: A CouchDB orderer is a cluster of orderer nodes that use the Apache
CouchDB database to store and order transactions in the network. This type of orderer is
typically used in networks that require high availability and scalability

3. Ledger
In Hyperledger Fabric, the ledger is a distributed database that records all of the
transactions that occur on the network. Each peer node maintains a copy of the ledger,
and the ledger is updated whenever a new transaction is endorsed and committed to
the network. The ledger is composed of two parts: the world state, which stores the
current state of all assets on the network, and the transaction log, which stores a record
of all transactions that have occurred on the network.

Blockchain: The core data structure that records all transactions in a sequence of
blocks. Each block contains a batch of transactions, and blocks are linked together to
form a chain.
State Database: An off-chain database that stores the current state of the ledger. It is
used to quickly query and retrieve the current values of assets and other data.
4. Chaincode
In Hyperledger Fabric, chaincode is the term used to refer to smart contracts.
Chaincode is written in Go and defines the business logic of a Hyperledger Fabric
network. It specifies the rules for updating the ledger and determines which transactions
are valid. When a transaction is submitted to the network, it is sent to the appropriate
peer nodes for endorsement. The chaincode is then executed on the endorsing peer
nodes, and the endorsed transaction is sent back to the client for ordering and finally
committed to the ledger. Chaincode is an important part of the Hyperledger Fabric
architecture, as it allows users to define the specific rules and functionality of their
blockchain network. There are two types of chaincode in Hyperledger Fabric:
System Chaincode: This type of chaincode is deployed and managed by the network
administrator and is used to manage the operations of the blockchain network, such as
adding new members or modifying the network configuration.
User Chaincode: This type of chaincode is deployed and managed by the users of the
network and is used to implement the business logic of the applications that run on the
network.

5. Consensus Algorithm
In Hyperledger Fabric, the consensus algorithm is the mechanism by which the peer-
ordering service nodes in a network reach an agreement on the order and validity of
transactions. The consensus algorithm is an important part of the overall architecture of
a Hyperledger Fabric network, as it ensures the integrity and consistency of the ledger
by ensuring that all peer nodes have a consistent view of the state of the network.
Ordering Service is responsible for creating a consensus on the order of transactions.
Fabric supports various consensus protocols, with Raft being the default. The ordering
service organizes transactions into blocks and disseminates them to peers.

6. Channels
In Hyperledger Fabric, a channel is a private “subnet” within a Hyperledger Fabric
network that allows a group of participants to execute transactions and confidentially
share data. Each channel has its separate ledger, and the participants on a channel can
only see the transactions that are submitted to that channel. This allows different groups
of participants within a Hyperledger Fabric network to have their own private,
confidential interactions without revealing sensitive information to the other participants
on the network. Channels provide an additional layer of security and privacy within a
Hyperledger Fabric network. In Hyperledger Fabric, there are three types of channels:
Application Channels: These channels are created by the organizations that are part of
a consortium on the network. They are used for conducting transactions and sharing
data among the members of the consortium.
System Channels: These channels are created by the network administrator and are
used for deploying and updating the network’s shared ledger and other system-level
components.
Private Channels: These channels are created by members of the consortium and are
used for conducting private transactions between two or more specific organizations.
Private channels allow organizations to maintain the confidentiality of their transactions
while still being able to take advantage of the security and immutability of the shared
ledger.
7. Membership Service Provider (MSP)
In Hyperledger Fabric, a Membership Service Provider (MSP) is a component that
defines the rules for identity management and authentication within a Hyperledger
Fabric network. MSPs are used to verify the identity of participants in the network, such
as users, applications, and peer nodes. They do this by managing the certificates and
cryptographic materials that are used to identify and authenticate entities on the
network. MSPs play a crucial role in ensuring the security and integrity of the
Hyperledger Fabric network by ensuring that only authorized entities can access the
network and participate in transactions. There are several types of membership service
providers (MSPs) in Hyperledger, including:

Local MSP: This type of MSP is designed for development and testing purposes and is
used to manage the identities of local users and applications.
File-based MSP: This type of MSP uses a file system to store the identity information of
users and applications.
Certificate Authority-based MSP: This type of MSP uses a certificate authority (CA) to
issue and manage the digital certificates that are used to identify users and applications.
Database-based MSP: This type of MSP uses a database to store the identity
information of users and applications.
External Identity Provider-based MSP: This type of MSP uses an external identity
provider, such as a corporate LDAP server or an external CA, to manage the identities
of users and applications.

8.. Certificate Authorities (CAs)


CAs provide identity management and ensure that participants are authenticated and
authorized to interact with the network. They issue and manage digital certificates for
network participants.

Hyperledger Architecture

1. Consensus Layer:
Creates an agreement on the ordering and confirms the accuracy of the transaction
database that comprises a block.
The communication layer is used by the consensus layer to communicate with the client
and other network peers.
Confirms that all transactions in a proposed block are correct according to approval and
consensus policies.
Interfaces with the smart-contract layer and relies on it to validate the accuracy of an
ordered transaction database in a block.
They’re also widely utilized to synchronize data across a decentralized network and
assure transaction consistency and transparency.

Fig - architecture of hyperledger

2. Smart Contract Layer:

The smart contract layer verifies each transaction by guaranteeing that it adheres to the
transaction’s policy and contract and invalid transactions are denied and may be
removed from consideration for inclusion in a block.
Smart contracts are classified into two types:
installed smart contracts- Before the network is launched, installed smart contracts
implement business logic on the validators.
On-chain smart contracts– On-chain smart contracts implement business rules in the
form of a transaction that is committed to the blockchain and then invoked by
subsequent transactions. The code that describes the business logic forms part of the
ledger with on-chain smart contracts.
Responsible for executing transaction requests and determining transaction validity
through the use of business logic.
In Hyperledger Fabric, a smart contract is a program known as chaincode. Chaincode
can be developed in Go, JavaScript (node. js), and, in the future, additional
programming languages such as Java that define a predefined interface. Chaincode is
run in a secure Docker container that is separate from the endorsing peer process.
3. Communication Layer:

Communication Layer is in charge of peer-to-peer message transfer between nodes in a


shared ledger instance.
The communication layer is used by the consensus layer to communicate with the client
and other network peers.
The algorithm must function exactly like a single node system, executing each
transaction atomically one at a time.
If communication does not fail, then each non-faulty node will finally get every submitted
transaction.
TLS is used for secure communication among nodes in the Fabric. TLS communication
can employ both one-way (server only) and 2 different (server and client) authentication.
4. Data Store Abstraction:

Allows other modules to use alternative data stores.


the actual private data is kept in a private database on authorized organizations’ peer
nodes and accessed via chaincode on these authorized peers; and a hash of the secret
data, which has been endorsed, sorted, and recorded to the ledgers of every peer on
the channel.
As state databases, the Hyperledger fabric supports LevelDB and CouchDB. LevelDB is
the default state database integrated into the peer activity and stores chaincode data as
key-value pairs.
CouchDB is an optional external state database that adds query capability when your
chaincode data is modeled as JSON, allowing for rich queries of the JSON content.
When a deploy transaction succeeds, the chaincode is installed “on” the blockchain.

5. Crypto Abstraction:

Allows for the substitution of alternative crypto techniques or modules without disrupting
other modules.
Because Fabtoken, a new functionality in Hyperledger Fabric version 2.0 (alpha), allows
you to generate native cryptocurrencies or coins.
Besu Hyperledger is a public Ethereum codebase that is open source and may run on
individual permissionless platforms or the Ethereum public network. The Ethereum
Virtual Machines (EVM), consensus mechanisms, user-facing APIs, and monitoring are
all included.
CPU and GPU mining is supported by Hyperledger Besu and can be enabled using
command-line arguments. Ethminer with both the stratum+tcp and getwork schemes
was utilized for GPU mining support testing.
It does not support cryptocurrencies such as bitcoin, but it functions by providing the
infrastructure and standards required for the development of various blockchain-based
applications and systems for industrial usage.
6. Identity Service:

Allows for the formation of a trusted root during the configuration of a blockchain
instance, the enrolment and registration of identities or systems entities during network
operation, and the administration of changes such as drops, additions, and revocations.
It also offers authentication and permission.
The smart contract layer employs the identity services layer to authenticate and approve
the entity requesting to execute the smart contract while processing the transaction.
Hyperledger Fabric provides a personal identity service that handles user IDs and
authenticates all network participants to enable permissioned networks. Access control
lists can be utilized to add layers of permission by authorizing certain network actions.
Certification Authorities are in charge of managing certificates (or CA). Fabric CA is
Hyperledger’s Certification Authority

7. Policy Service:

Policy Services is in charge of policy management for the system’s numerous policies,
including the endorsement policy, consensus policy, and group management policy. It
communicates with and is dependent on another module to enforce the different
policies.
Fabric policies reflect the process through which members agree to approve or reject
changes to the network, a route, or a smart contract. Policies are agreed upon by
channel members when the channel is first set up, but they can also be changed as the
channel evolves.
Policies are one of the features that distinguish Hyperledger Fabric from other
blockchains such as Ethereum or Bitcoin. Transactions in those systems can be
generated and confirmed by any node in the network.
8. API: It enables clients and applications to interface with blockchains. there are three
types of API used in hyperledger they are:

Admin API: This class establishes a management link to a Hyperledger Composer


runtime. The link can then be used to Install BusinessNetworkDefinitions and deactivate
Business network definitions Refresh BusinessNetworkDefinitions and Ping the runtime
to confirm it is up and running and properly configured In the connection profile storage,
save a connection profile document.
Common API: The Common API comprises the APIs that are used to access
information about the Business Network to which you are connected as well as to
establish new assets, participants, transactions, and events. It also offers APIs for
obtaining information about these resources.
Runtime API: All transaction functions have access to the Runtime API. It provides API
access to build and issue queries, emit events, retrieve all forms of registries, get the
current participant, and get the serializer to produce resources from JavaScript objects.
– execute HTTP REST calls.
9. Interoperation:

Allows separate blockchain instances to communicate with one another.


Interoperability, supported by comprehensive data and transaction standards, is
required to capitalize on this powerful technology. The food industry, for example, has
made tremendous progress in leveraging data standards to promote food safety and
product visibility use cases.
Interoperability and integration are currently top-of-mind challenges in the blockchain
sector.

Hyperledger Tools
Below are some of the hyperledger tools

1. Hyperledger Composer

Hyperledger composer is a collaborative tool for creating blockchain business networks,


facilitating smart contract development and implementation across a distributed ledger.
Composer is a software development framework that makes it easier and faster to
create Hyperledger fabric blockchain apps. A business person with little technical
understanding can collaborate with a developer to build particular aspects using
Hyperledger Composer.
2. Hyperledger Cello

The goal of Hyperledger Cello is to apply the on-demand as-a-service methodology to


the blockchain in order to simplify the effort required for building, managing, and ending
blockchains. IBM, Soramitsu, Huawei, and Intel were the first to contribute to this
project.
Hyperledger Cello is a blockchain provisioning and operation technology that aids in the
effective management of blockchain networks. Cello is a blockchain module toolbox and
one of The Linux Foundation’s Hyperledger initiatives.
3. Hyperledger Explorer
Hyperledger Explorer generates a user-friendly Web application that allows you to view,
launch, deploy, and query blocks as well as any other relevant stored data on the
ledger. IBM, Intel, and DTCC initially contributed to this initiative.
Hyperledger Explorer is an open-source blockchain utility module that allows users to
query various blockchain artifacts and advancements. It is intended to be used
particularly on Hyperledger-based blockchain implementations.
4. Hyperledger Caliper

Hyperledger Caliper is a blockchain benchmarking tool that enables users to assess the
performance of a blockchain implementation against a set of predefined use cases.
Huawei, Hyperchain, and Oracle have contributed to the Hyperledger Caliper
performance benchmark tool for the Hyperledger project.
By boosting the transparency and traceability of network transactions, Hyperledger
Fabric networks can enhance supply chain processes. Companies with access to the
ledger on a Fabric network can see the same immutable data.
5. Hyperledger Ursa

Hyperledger Ursa is a distributed cryptography framework that allows people and


projects to avoid duplicating cryptographic work. This project is being worked on
collaboratively by fabric, Indy, and sawtooth developers.
Within Project Ursa, developers have access to a complete library of modular
signatures and symmetric-key primitives, allowing them to swap in and out different
cryptographic methods through the setup and without having to rewrite their code.

Benefits of Hyperledger Architecture


Productivity Enhancement: To accelerate project development, Hyperledger employs
the division of labor technique. It determines everyone’s strong suits and, based on that,
places them in specialized fields.
Handling Of Intellectual Property: Hyperledger functions as a blockchain greenhouse by
bringing vendors, developers, and consumers from all around the world together on a
single platform.
Data On A Need-To-Know Basis: Data partitioning on the blockchain allows for the
privacy of data pieces. It provides physical isolation of sensitive data. Hyperledger-
supported channels allow data to be distributed exclusively to people that need to know.
Rich Querying Capability: It is made up of a key-value database. CouchDB is also an
option. It is a document database that stores content in JSON format. This allows for
simple database queries. Its data model works with the current key/value programming
approach.
Anonymity: The network only allows signature read-write sets to pass through. This
helps to ensure anonymity because only the users and peers committing the
transactions can see the transactions.

Limitations of Hyperledger Architecture


Lack of Developers: It lacks highly qualified programmers due to its origin, whereas
Ethereum has a greater number of developers because of its popularity.
Lack of use-cases: It has shown a lack of use cases such that more a lack of
awareness of technology and its possibilities, a scarcity of personnel and skill sets in IT
and business.
Complex architecture: It has a sophisticated design, while Hyperledger, which is backed
by IT titans, is only focused on enterprise transaction-based applications.apk
Minimum APK: API allows client apps to communicate with Hyperledger Fabric
blockchain network smart contracts, but with fewer APIs.
Less fault tolerance: The job of Byzantine fault tolerance is to ensure that each peer has
the same list of transactions on its ledger, however, it is not suited for network use.

Application of Hyperledger
Finance: Hyperledger can be used to streamline the settlement of transactions,
improved liquidity, and provide increased transparency by eliminating the need for
accounts on particular payment systems at a low cost.
Healthcare: Hyperledger can be utilized to cut expenses, improve patient care, and
increase data accessibility.
Supply Chain: Using Hyperledger, organizations may create initiatives that aim to limit
the prevalence of counterfeit goods while also tracing the provenance of components
and services.
Insurance: The Insurance firm can refer to the transaction data recorded in the ledger
using Hyperledger. Hyperledger Fabric may also use chain code to speed up claim
processing and automate payment.
Digital payment: Interledger and other Hyperledger applications have the potential to set
new standards in the finance sector. More importantly, it has the potential to
revolutionize two-party cross-border payments.
Benefits Of Hyperledger Fabric
1. Open Source: Hyperledger fabric is an open-source blockchain framework hosted by
the Linux foundation. It has an active community of developers The code is designed to
be publicly accessible. Anyone in the community can see, modify, and distribute the
code as they see fit. People across the world can come and help to develop the source
code.

2. Private and Confidential: In a public blockchain network each and every node in the
network is receiving a copy of the whole ledger. Thus keeping privacy becomes a much
bigger concern as everything is open to everyone. In addition to this one, the identities
of all the participating members are not known and authenticated. Anyone can
participate as it is a public blockchain. But in the case of Hyperledger fabric, the
identities of all participating members are authenticated. And the ledger is only exposed
to the authenticated members. This benefit is the most useful in industry-level cases,
like banking, insurance, etc where customer data should be kept private.

3. Access Control: In the Hyperledger fabric, there is a virtual blockchain network on


top of the physical blockchain network. It has its own access rules. It employs its own
mechanism for transaction ordering and provides an additional layer of access control. It
is especially useful when members want to limit the exposure of data and make it
private. Such that it can be viewed by the related parties only. As an example when two
competitors are on the same network. The fabric also offers private data collection and
accessibility, where one competitor can control the access to its own data such that the
data do not get exposed to the other competitor.

4. Chaincode Functionality: It includes a container technology to host smart contracts


called chain code that defines the business rules of the system. And it’s designed to
support various pluggable components and to accommodate the complexity that exists
across the entire economy. This is useful for some of the specific types of transactions
like asset ownership change.

5. Performance: As the Hyperledger fabric is a private blockchain network, There is no


need to validate the transactions on this network so the transaction speed is faster,
resulting in a better performance.

Limitation of Hyperledger Fabric


Hyperledger Fabric is a robust and flexible platform for developing blockchain
applications, but like any technology, it has certain limitations:
Scalability: Hyperledger Fabric is designed for permissioned networks, where the
participants are known and trusted, which can limit its scalability for large-scale public
networks.
Performance: The performance of Hyperledger Fabric can be impacted by factors such
as network size, network configuration, and the complexity of chaincode, which can limit
its ability to handle high volumes of transactions.
Complexity: Setting up and configuring a Hyperledger Fabric network can be complex,
requiring a deep understanding of the technology and its components.
Compatibility: Hyperledger Fabric is designed to be used with specific programming
languages, such as Go and JavaScript, which can limit its compatibility with other
technologies and programming languages.
Cost: Running a Hyperledger Fabric network requires infrastructure and resources,
which can add costs to the deployment and operation of blockchain applications.
Interoperability: Hyperledger Fabric is designed to be used within a single network, and
its interoperability with other blockchain platforms is limited.

You might also like