Professional Documents
Culture Documents
Hyperledger
Hyperledger
Hyperledger
Introduction To Hyperledger
Example:
Consider a situation when person X wants to buy medicine from person Y, who
was a doctor living in another country.
● As medicine requirement is one person’s private needs, they need to
maintain the data confidentially.
● But Dr. Y is selling medicine in the network to so many people, in the
case of the public blockchain, every transaction will get updated in the network to
all the peers.
● That’s where hyperledger finds its significance. In the hyperledger, the
parties are directly connected and the concerned people’s ledger will be updated.
● Hence providing privacy and confidentiality.
Why Do We Need Hyperledger?
Below are some of the reasons stating the need for a hyperledger project:
● To enhance the efficiency, performance, and transactions of various
business processes.
● It provides the necessary.
● It gets rid of the complex nature of contractual agreements, as the legal
issues are taken care of. infrastructure and standards for developing various
blockchain-based systems and applications for industrial us
● Hyperledger offers the physical separation of sensitive data.
● It decreases the need for verification and enhances trust, thus
optimizing network performance and scalability.
Hyperledger works in a way that a requirement for the contract can be initiated
through an application.
● The membership service involved in the network validates the
contract.
● The concerned two-peer has to produce a result and then sent it to the
consensus cloud.
● The generated result from both the peer has to be the same in order to
validate the contract.
● Once it is validated, then the transaction will happen between the
affiliated peers and their ledger will be updated.
● When a business requires confidentiality and a private network for its
transaction to happen without doing that in a single network, a hyperledger paves
the way.
This can be summarized as the peers who are directly affiliated with the deal are
connected and only their ledgers will get updated about the deal. The third parties
who help to carry out the transaction will only get to know the exact and required
amount of information with the help of regulations levied on the network.
Let’s understand the concept with the help of an example.
● Suppose Alice decides to send the product to Bob on a hyperledger-
based network.
● She looks at her app to locate the address of Bob on the network.
● The app in return queries the membership service and validates Bob’s
membership.
● The hyper ledger will connect both parties directly for the transaction
affiliated with the deal.
● Both parties will generate the result, which has to be the same for them
to get validated.
● The result will be sent to the consensus cloud to be ordered and
verified.
● Once the result is validated, Bob receives the product and the
transaction is committed to the ledger.[
Roles of Peers
In the hyperledger network, the peers are separated into three distinct roles at
two-run times. This distinct feature in this network makes notable changes as it
allows a high degree of personalization. The 3 peer roles are:
1. Committer: Appends validated transactions to their specific ledger.
They only add the transaction to the specific ledger once the transaction is
returned by the consenter.
2. Endorser: Endorser nodes are responsible for simulating transactions
specific to their network and preventing unreliable and non-deterministic
transactions. All endorsers act as committers on the other hand committer may or
may not be endorsers depending on network restrictions.
3. Consenter: Their role is to validate the transaction by verifying the
result produced by the affiliated peers who want to proceed with a transaction.
Their role is very specific and runs on separate run times, unlike committers and
endorsers who run on the same run time. Their role is to decide which ledger the
transaction be committed to.
Hyperledger Advantages
Hyperledger Disadvantages
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.
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.z
● 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.
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.
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.
2. Hyperledger Iroha
● Hyperledger Iroha is focusing on mobile application development and
Sumeragi, a revolutionary chain-based Byzantine Fault Tolerant consensus
mechanism. Soramitsu, Hitachi, NTT Data, and Colu are working on this project.
● Hyperledger Iroha is a corporate blockchain platform built for
distributed ledger infrastructure initiatives. The Iroha platform can be used to
create an identity management system, such as national ID cards.
3. Hyperledger Indy
● Hyperledger Indy is a distributed ledger designed specifically for
decentralized identification. Evernym contributed the indy code base that he
created to the Sovrin foundation.
● It offers tools, frameworks, and reusable components for developing
and deploying autonomous digital identities based on blockchains or other
distributed ledgers. Hyperledger Indy is a distributed ledger designed specifically
for decentralized identity.
4. Hyperledger Fabric
● Hyperledger Fabric is led by IBM. Hyperledger Fabric is a plug-and-
play blockchain technology implementation with a configurable degree of
permissions. The Linux Foundation manages this private and confidential
blockchain framework.
● Hyperledger Fabric is a scalable, flexible architecture-based platform
for distributed ledger applications. It is designed to allow for pluggable versions
of various aspects and to manage the financial ecosystem’s complexities and
intricacies.
5. Hyperledger Grid
● The Hyperledger Grid is an ecosystem of technologies, frameworks,
and libraries that collaborate to allow application developers to choose which
components are most suited to their industry or market model. Cargill is spending
resources on the project’s development.
● The Hyperledger Grid platform is used to create supply chain solutions
that integrate distributed ledger components. It offers an expanding range of tools
that help to expedite the development of supply chain smart contracts and client
interfaces. This is not a distributed ledger or a client application implementation.
6. Hyperledger Sawtooth
● Hyperledger Sawtooth is a flexible platform for developing,
implementing, and running distributed ledgers, and it features a revolutionary
consensus mechanism known as Proof of Elapsed Time. This consensus is
suitable for large distributed validator groups while consuming few resources.
● Intel is working on this project. Hyperledger Sawtooth is an open-
source industrial blockchain-as-a-service platform that can run customized smart
contracts without requiring knowledge of the core system’s underlying design.
Hyperledger Tools
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.
Hyperledger Libraries
Application of Hyperledger
1. 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.
2. Healthcare: Hyperledger can be utilized to cut expenses, improve
patient care, and increase data accessibility.
3. 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.
4. 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.
5. 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.
What is Consensus?
Proof of Stake
Here, validators,1.i.e.
Environment-friendly
1. Those “Validators”
miners are invited to and
create
energy efficient.
who have a greater
a new block based on the “stake” have greater
number of 2. Faster transaction
control over the chain.
cryptocurrencies theyspeed
put compared to
at “stake.”
PoW.
2. Those who put bigger
stakes receive bigger
3. Not vulnerable to
rewards.
51% attack
1. As it depends on
voting, those who get the
1. Scalable and Fast
maximum votes hold
Everyone is given the
transaction. most of the power.
opportunity to vote for a
Delegated Proof
limited
of amount of people
2. uses less energy
2. Due
thanto this there might
Stake who are responsible for
PoW and is morebe some problems
new block creation and
decentralized than
between them. People
validation.
normal PoS.tend to vote less so that
they could be selected as
a candidate.
ProofConsensus
of which is used1.inAnyone can
1. Finding the importance
NEM Blockchain. participate.
Considers both the number of an account becomes
of coins held as well2.asThose
the who actively
tough sometimes.
Importance
number of transactionsparticipate and
contributes gets
done by a single account 2. Prone to Sybil attacks
while creating a block. rewarded.
Proof of Elapsed
This is developed by Intel,
1. Energy efficient.
1. Requires trusted
hardware (mostly Intel’s
own hardware).
here the miners need to
prove that they have 2. Limited
Time 2. easily scalable.
waited a certain amount of decentralization.
time.
3. Prone to time
manipulation attacks.
Proof of Authority
The network approves
1. High transaction
1. It relies upon very few
some Block validatorsthroughput
who with low validators.
latency.
validate already created
2. Less censorship due to
blocks and can also create
2. Efficient, Scalable,
more centralized control.
new blocks.
uses less energy
1. Alternative of PoW
1. Destruction process
and PoS. can’t be reversed.
Miners burn coins
allocated to them by the
Proof of Burn 2. Due to burning, 2. Limited use
network to earn the rights
reduces the supply of
to mine blocks.
coins, the value of3.coins
Distribution of coins
increases might not be the same.
Byzantine Fault
Even if there are faulty
1. High fault tolerance.
1. Limited scalability.
Toleranceblocks, a consensus is
2. Fast
reached amongst others so and efficient
2. Communication
1. Network Layer
Every consensus requires smooth and reliable communication between each node
in the network to reach an agreement. Networking protocols are used to exchange
information and do transactions.
2. Data Layer
3. Cryptography Layer
Cryptography plays a crucial role in doing transactions and keeping the network
secure. Different techniques like Hash Function, Digital Signature, etc. are used
in various consensus mechanisms.
4. Smart Contract Layer
These are executed based on the condition of the network, consensus mechanisms
ensure the state of the network which ensures consistent execution of transactions
among each node.
5. Incentive Layer
6. Governance Layer
Some mechanisms of voting are used to select miners, validators, etc. This layer
controls all the governance-related things such as voting to select the miner,
upgrading the network protocols, etc.
7. Security Layer
The use of the Proper consensus mechanism plays a vital role in securing the
network.
This provides information about the current state of the network i.e. entire
Blockchain. The consensus mechanism makes sure that all the nodes are in a
stable state and that the transactions are happening smoothly.
Property of Consensus:
1. Liveness
Liveness means that all the participating nodes in the network will receive
complete information regarding the transaction that is happening so that they can
agree to that, and the transaction is moved to the next node.
2. Safety
Safety means that each participating node must receive the same sequence of
input and input details and the same sequential output. When a single node
receives some sequential input from another node, it changes its state, and all the
states of each node should be identical in the entire network. Which signifies that
the transaction has been done by an authorized party and is valid.
3. Finality
It ensures that after a transaction has been made and validated and stored in the
block, it can’t be reversed.
4. Decentralization
It means distributing the ownership and decision-making capability amongst the
participants of the network. So that no one can single-handedly manipulate the
network.
5. Scalability
It means that the consensus can handle the growing number of nodes in the
network without causing any problems.
6. Energy Efficiency
Being energy efficient is very important as the number of nodes is growing very
fast, miners need to keep in mind that the mining process doesn’t harm the
environment heavily.
1. Endorsement
Endorsement works on the principle that how many nodes vote for the transaction
to be valid, i.e., endorse it. It is like collecting signatures for a petition. The more
there are the stronger the support for the petition. This logic is used here, the
more endorsements by nodes, the sure you are that the transaction is valid.
2. Ordering
The ordering phase comes after the Endorsement phase, it agrees to the sequential
order of the execution of the Hyperledger decided earlier.
3. Validation
Validation, as the name suggests, is the validation of the data stored in any node.
It takes into account the nodes in which the transactions are occurring in the order
decided in the earlier stage. Checks the input and the result stored in the node and
gives validation.
Phases of Consensus:
NODE TYPES
Typically CA nodes form a tree-like topology with Root CA at the top. Root CA
is a self-signed instance. CAs that belong to other organizations are signed by
Root CA. All other nodes need to be signed by respective CAs to become part of
the blockchain network and each user needs a valid certificate to interact with the
network.
Hyperledger provides a reference implementation of CA, however, it may be
replaced by any CA that can generate ECDSA certificates. You can also connect
it with the LDAP repository or attach an HSM (Hardware Security Module) to it.
Read more in the documentation.
Note that the user information from CA is included in the certificates, and the
certificates are attached to every invoked transaction and therefore stored in
blockchain. Since blockchain is immutable, you cannot remove the certificates.
You cannot provide sensitive information to CA if you want your blockchain to
be GDPR-compliant.
Orderer
Besides, orderers play a significant role in managing access to the channels. They
keep a system channel that contains access control lists (ACLs) of organizations
that can create channels. They restrict who can configure, read, and write data to
particular channels.
Peer
Peers are fundamental nodes in the network since they host copies of ledgers and
smart contracts. The blockchain itself, i.e. an immutable log of transactions, as a
part of the ledger is stored on peers. Typically, an organization will have multiple
peers to have a redundancy of data and handle a high load.
A peer belongs to one organization, can belong to multiple channels, and can host
multiple ledgers and smart contracts.
Hyperledger Fabric network may contain other node types as well. Each CA
might use an embedded LevelDB database or a dedicated PostgreSQL node. Each
peer can use an embedded LevelDB database or an external CouchDB. Finally,
each chaincode for a peer forms an additional container in the network.
Then, you may want to add some monitoring to the network - Prometheus for
metrics exposed by the Hyperledger Fabric, Graylog or Kibana for collecting the
logs. Then, there are additional tools that might be useful like block browser,
benchmark tools, and others.