Unit 5
Unit 5
Engineering, Yadrav-Ichalkaranji
NBA Accredited Programmes
An ‘A’ Grade Institute Accredited by NAAC
Blockchain Technology
Prepared by
Mr. U M Mulani
Assistant Professor
Computer Science & Engineering Department
1
[Unit 5] Blockchain Application
Development
Hyperledger Fabric
Hyperledger Fabric is a modular blockchain framework that acts as a
foundation for developing blockchain-based products, solutions, and
applications using plug-and-play components that are aimed for use within
private enterprises.
Hyperledger Fabric is a permissioned blockchain network that gets set by
the organizations that intend to set up a consortium.
Each member organization in the blockchain network is responsible to set
up their peers for participating in the network.
Hyperledger Fabric- Architecture
Hyperledger Fabric - Identity
The different actors in a blockchain network include peers, orderers,
client applications, administrators and more.
These identities really matter because they determine the exact
permissions over resources and access to information that actors have in a
blockchain network.
For an identity to be verifiable, it must come from a trusted authority.
A membership service provider (MSP) is that trusted authority in Fabric.
More specifically, an MSP is a component that defines the rules that
govern the valid identities for this organization.
Hyperledger Fabric- Identity Eg.
Imagine that you visit a supermarket to buy some groceries. At the
checkout you see a sign that says that only Visa, Mastercard and AMEX
cards are accepted. If you try to pay with a different card — let’s call it an
“ImagineCard” — it doesn’t matter whether the card is authentic and you
have sufficient funds in your account. It will be not be accepted.
Hyperledger Fabric- Policy
policy is a function which accepts as input a set of signed data and
evaluates successfully, or returns an error because some aspect of the
signed data did not satisfy the policy.
policies test whether the signer or signers of some data meet some
condition required for those signatures to be considered ‘valid’. This is
useful for determining that the correct parties have agreed to a
transaction, or change.
Signature Policy: This policy type is the most powerful, and specifies the
policy as a combination of evaluation rules for MSP Principals.
Nodes and Roles
Transaction Flow
Step 1/7- Propose Transaction
Step2/7- Execute Propose Transaction
Step 5/7- Deliver Transaction
Step 6/7- Validate Transaction
Step 7/7- Notify Transaction
Ordering Services
Channels
Channels
Channels
Channels
Writing smart contract using Hyperledger
Fabric
Writing smart contract using Hyperledger
Fabric
A smart contract in Hyperledger Fabric is a program, called
chaincode.
Chaincode can be written in Go, JavaScript (node.js), and
eventually other programming languages such as Java that
implement a prescribed interface.
Chaincode runs in a secured Docker container isolated from the
endorsing peer process.
Chaincode initializes and manages the ledger state through
transactions submitted by applications.
Writing smart contract using Hyperledger
Fabric
There are two different types of chaincode to consider:
• System chaincode
• Application chaincode
Syllabus is completed.