0% found this document useful (0 votes)
1 views22 pages

L11 12 13 Hyper Ledger Fabric overview

awd awd awd ad awd

Uploaded by

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

L11 12 13 Hyper Ledger Fabric overview

awd awd awd ad awd

Uploaded by

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

Hyperledger Fabric

Dr. Ishan Bhardwaj


Hyperledger Fabric
• Type: Distributed ledger software
• Hyperledger Fabric serves as the foundation for developing
applications or solutions with a modular architecture.
• It allows interchangeable components, including consensus and
membership services, enabling a plug-and-play environment.
• Hyperledger Fabric is designed to meet diverse industry needs.
Additionally, it offers a unique approach to consensus that facilitates
scalable performance while maintaining privacy.
Hyperledger Fabric
• Hyperledger Fabric: https://www.hyperledger.org/projects/fabric
• Hyperledger Fabric is intended as a foundation for developing applications
or solutions with a modular architecture.
• Hyperledger Fabric allows components, such as consensus and
membership services, to be plug-and-play. Its modular and versatile design
satisfies a broad range of industry use cases.
• It offers a unique approach to consensus that enables performance at scale
while preserving privacy.
• About LF Decentralized Trust :The Linux Foundation's flagship organization
for the development and deployment of decentralized systems and
technologies.
• https://youtu.be/1ORrdusUzeg
Hyperledger Fabric
What is Hyperledger Fabric?
• A permissioned blockchain platform for enterprise solutions.
• Developed under the Linux Foundation’s Hyperledger project.

• Key Features:
• Modular architecture
• Smart contract functionality
• Pluggable consensus mechanisms
Key Components of Hyperledger Fabric
• Peers – Nodes that maintain the ledger and execute smart contracts.
• Orderer – Ensures consensus and delivers transactions to peers.
• Channels – Private sub-networks for data segregation.
• Chaincode (Smart Contracts) – Business logic execution.
• Membership Service Provider (MSP) – Identity and access control.
• Ledger – Immutable transaction record.
Transaction Flow in Hyperledger Fabric

1.Client submits a transaction proposal to an endorsing peer.

2.Endorsing peers simulate and sign the proposal response.

3.Client collects endorsements and submits to the Orderer.

4.Orderer packages transactions into a block.

5.Block is distributed to committing peers.

6.Peers validate and commit the block to the ledger.


Source: https://hyperledger-fabric.readthedocs.io/en/release-
2.2/txflow.html
https://www.ibm.com/docs/en/blockchain-
platform/2.5.2?topic=reference-hyperledger-fabric
https://www.oreilly.com/library/view/blockchain-quick-
start/9781789807974/d521b6b6-7adc-4fb1-ba37-e2b67f4910ca.xhtml
Transaction Flow

The transactional mechanics that take place during a standard asset exchange. The scenario includes
two clients, A and B, who are buying and selling radishes. They each have a peer on the network
through which they send their transactions and interact with the ledger.
Assumptions
• This flow assumes that a channel is set up and running. The
application user has registered and enrolled with the organization’s
Certificate Authority (CA)
• The chaincode (containing a set of key value pairs representing the
initial state of the radish market) is installed on the peers and
deployed to the channel.
• The chaincode contains logic defining a set of transaction instructions
and the agreed upon price for a radish.
• An endorsement policy has also been set for this chaincode, stating
that both peerA and peerB must endorse any transaction.
1.Client A initiates a transaction to purchase radishes, targeting peerA and peerB.
2.A transaction proposal is constructed using a supported SDK, packaging the proposal
and adding a unique signature.
3.Endorsing peers verify the proposal, execute the chaincode, and produce transaction
results (response value, read set, and write set).
4.The application inspects proposal responses to verify signatures and compare
responses.
5.The client assembles endorsements into a transaction message (read/write sets,
endorsing peers' signatures, and Channel ID) and broadcasts it to the ordering
service.
6.The ordering service orders transactions chronologically by channel and creates
blocks of transactions per channel.
7.The blocks are delivered to all peers on the channel, and the transactions are
validated.
8.Each peer appends the block to the channel's chain, commits write sets to the
current state database for valid transactions, and notifies the client application of the
transaction's status.
Peer Roles in Hyperledger Fabric

•Endorsing Peer (Endorser) – Simulates transactions and signs approvals.

•Committing Peer – Validates transactions and updates the ledger.

•Ordering Service (Orderer) – Sequences transactions into blocks.

•Client Application – Interacts with peers and submits transaction requests.


Hyperledger Fabric Consensus Mechanism

• Ordering Service Consensus Methods:


• Solo (Development Only)
• Kafka (Crash Fault Tolerant)
• Raft (Leader-based Consensus)

• Endorsement Policy – Defines which peers must validate a


transaction
Hyperledger Fabric Ledger Structure

• World State Database – Stores current


states of assets (CouchDB/LevelDB).

• Transaction Log – Immutable sequence of


transaction records.

• Channel-Specific Ledger – Each channel


maintains its own ledger.
Chaincode (Smart Contracts )
• What is Chaincode?
• A program that defines business logic in Hyperledger Fabric.
• Languages Supported:
• Go, Node.js, Java
• Execution Lifecycle:
• Install chaincode
• Define endorsement policy
• Instantiate and invoke
Detailed Look at Chaincode

• Deployment Process:
• Developer writes the chaincode.
• Chaincode is packaged and installed on endorsing peers.
• A chaincode definition is approved and committed to the
channel.
• Chaincode is invoked to execute transactions.
• Endorsement Policies:
• Define which peers must approve a transaction before it is
committed.
• Example: "At least 2 out of 3 peers must endorse."
• State Management:
• Uses World State Database (CouchDB/LevelDB) to store asset
states.
• Transactions update state through key-value operations.
• Chaincode Interaction:
• Uses gRPC APIs for communication between applications and
peers.
• Implements CRUD operations on the blockchain ledger.
Security and Privacy in Hyperledger Fabric

• Permissioned Access: MSP for identity verification.

• Data Confidentiality: Private channels and collections.

• Endorsement Policies: Restrict transaction approval rules.

• Encryption: TLS & certificate-based authentication.


Use Cases of Hyperledger Fabric

• Financial Services: Trade settlements, cross-border payments.

• Supply Chain Management: Tracking goods from origin to destination.

• Healthcare: Secure patient record sharing.

• Government & Public Sector: Identity management and land


registries.
Advantages of Hyperledger Fabric

• Modular and flexible architecture.

• High scalability and performance.

• Granular access control and privacy.

• Open-source and widely supported by enterprises.


Challenges and Limitations
• Complexity in deployment and configuration.
• Architectural Complexity
• Deployment and Maintenance
• Integration Challenges:
• Existing Legacy System Integration
• High operational overhead.
• Governance and legal considerations.
• Skillset and Ecosystem:
• Skillset Shortage
• Ecosystem Maturity

You might also like