Thanks to visit codestin.com
Credit goes to www.scribd.com

100% found this document useful (1 vote)
246 views51 pages

Blockchain Architecture Design Unit 3 Easy Notes

Hyperledger Fabric is a permissioned blockchain platform designed for enterprise applications, emphasizing security, privacy, and efficiency. It features a modular architecture allowing customization, high transaction speed, and private data handling, making it suitable for industries like banking and healthcare. The consensus process in Hyperledger Fabric is decomposed into endorsement, ordering, and validation phases, ensuring that transactions are securely processed and recorded.

Uploaded by

Udit Shrivastava
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
100% found this document useful (1 vote)
246 views51 pages

Blockchain Architecture Design Unit 3 Easy Notes

Hyperledger Fabric is a permissioned blockchain platform designed for enterprise applications, emphasizing security, privacy, and efficiency. It features a modular architecture allowing customization, high transaction speed, and private data handling, making it suitable for industries like banking and healthcare. The consensus process in Hyperledger Fabric is decomposed into endorsement, ordering, and validation phases, ensuring that transactions are securely processed and recorded.

Uploaded by

Udit Shrivastava
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/ 51

Blockchain Design (BCS063)

Unit-3 Hyperledger Fabric (A) & (B)

Edushine Classes

Follow Us
Download Notes : https://rzp.io/rzp/N5yEnuX
https://telegram.me/rrsimtclasses/
Blockchain Design (BCS063)

📄 What is Hyperledger Fabric :


Hyperledger Fabric is a permissioned blockchain platform developed for use in
enterprise applications. It allows only selected members to participate, making it secure,
private, and efficient compared to public blockchains like Bitcoin.
👉 Imagine a private club 🏛️ where only selected people (with invitation) can come and
make decisions together.
 Hyperledger Fabric is like that private club for companies who want to use
blockchain,
but only allow trusted members (not the whole world) to participate.
✅ It’s a permissioned blockchain (not public like Bitcoin).
✅ It’s made for businesses who need privacy, speed, and security.

- - Download Notes : https://rzp.io/rzp/N5yEnuX


Blockchain Design (BCS063)

✨ Features of Hyperledger Fabric


1. Permissioned Membership:
Only authorized participants can join the network, ensuring security and trust.
2. Private Transactions:
Transactions can be kept private between specific members using private channels.
3. Modular Architecture:
Components like consensus, identity management, and smart contracts are designed in a
plug-and-play manner, allowing customization.
4. Pluggable Consensus:
Fabric allows different methods for achieving consensus based on business needs.
5. High Performance and Scalability:
Transactions are processed quickly because it does not require heavy proof-of-work like
public blockchains.
- - Download Notes : https://rzp.io/rzp/N5yEnuX
Blockchain Design (BCS063)

6. Smart Contracts (Chaincode):


Business logic is coded using chaincode, which runs inside containers and manages
interactions with the ledger.
7. Support for Multiple Programming Languages:
Chaincode can be written in Go, JavaScript, and Java.
✅ Advantages of Hyperledger Fabric
1. Enhanced Privacy and Security:
Only authorized users can view or participate in the network.
2. High Transaction Speed:
Due to its permissioned nature, transactions are faster compared to public blockchains.
3. Flexibility and Customization:
Businesses can customize the network according to their requirements.

- - Download Notes : https://rzp.io/rzp/N5yEnuX


Blockchain Design (BCS063)

4. Private Data Handling:


Organizations can create private channels to exchange confidential information.
5. Efficient Resource Utilization:
Fabric avoids unnecessary work like mining, saving time and resources.
6. Better suited for Enterprise Use Cases:
Fabric is ideal for industries like banking, supply chain, healthcare, and finance where
trust, security, and privacy are important.
In Short :
Hyperledger Fabric is a powerful, flexible, and efficient blockchain platform designed for
business use.
It ensures security, privacy, and high performance, making it one of the best choices for
enterprise blockchain solutions.

- Download Notes : https://rzp.io/rzp/N5yEnuX


Blockchain Design (BCS063)

📄 Hyperledger Fabric Architecture :


Hyperledger Fabric uses a special architecture called Execute-Order-Validate.
This is different from public blockchains like Bitcoin, which use "Order-Execute" (slow
and less flexible).
In Fabric:
👉 First, a transaction is executed (simulated).
👉 Then it is ordered (arranged properly).
👉 Then it is validated (checked carefully).
👉 Finally, it updates the ledger.

- - Download Notes : https://rzp.io/rzp/N5yEnuX


Blockchain Design (BCS063)

📄 Hyperledger Fabric Architecture :

- - Download Notes : https://rzp.io/rzp/N5yEnuX


Blockchain Design (BCS063)

1. Execute
• First, the client proposes a transaction.
• The transaction is simulated (not yet final) by endorsing peers.
• These peers endorse (approve) the transaction based on rules.
• A Read-Write set (RW-set) is created — meaning:
 Readset = what data was read.
 Writeset = what data will be changed.
• No changes happen yet, only simulation!
✅ Easy Example:
Imagine a student asking teachers, "If I submit this homework, will I pass?"
Teachers check it and say "Yes, you will pass."
But final marks are not yet given — only an approval!

- - Download Notes : https://rzp.io/rzp/N5yEnuX


Blockchain Design (BCS063)

2. Order
• After simulation, the transaction goes to the ordering service.
• It orders the transactions in a proper sequence.
• It uses consensus to make sure everyone agrees on the order.
• It is a stateless service, meaning it only orders, does not store data.
✅ Easy Example:
Think of a line in a cafeteria 🍴.
Even if students arrive at different times, they stand in a queue properly.
Ordering service arranges transactions like students standing in line!
3. Validate
• Now, each peer validates the transactions:
• Check if all endorsements (approvals) are correct.
• Check if the RW-sets match the current data.
• Invalid or conflicting transactions are rejected.
• RRSIMT CLASSES
Only correct WHATSAPP
transactions - 9795358008
are allowed Follow Us
to move forward.
Blockchain Design (BCS063)

✅ Easy Example:
Before giving final marks, the principal checks if teachers' approvals are correct.
If any mistake or cheating is found, that student's marks are canceled!
4. Update State
• After validation, the correct transactions are finally committed to the ledger.
• All peers update their copy of the blockchain (ledger).
• The blockchain state becomes final and synchronized.
✅ Easy Example:
Finally, the marks are officially written in the student's report card 📖.
Everyone (teachers, principal, parents) can now see the final marks!

RRSIMT CLASSES WHATSAPP - 9795358008 Follow Us


Blockchain Design (BCS063)

 Transaction Flow of Consensus in Hyperledger Fabric :


In Hyperledger Fabric, the consensus process is not just about "agreeing on order" — it
includes three big activities:
• Endorsement (approval)
• Ordering (arrangement)
• Validation (checking)
The transaction flows through these stages to reach final commitment.
 Steps of Transaction Flow :

Transaction Transaction Collecting Transaction


Proposal Simulation Endorsements Ordering

Transaction
RRSIMT CLASSES WHATSAPP - 9795358008 Follow
Ledger Update
Us Validation
Blockchain Design (BCS063)

1. Transaction Proposal
• A client application (user) wants to perform a transaction.
• It sends a proposal (a request) to specific endorsing peers.
• The proposal says: "If I make this change, is it okay?"
✅ Example:
Imagine a student asks a teacher: "If I add 5 marks to my assignment, will I pass?“
2. Transaction Simulation (Execution)
• The endorsing peers simulate the transaction.
• They do not change the actual ledger yet.
• They check the transaction rules and generate a Read-Write Set (RW-set).
• Then, they endorse (approve) the transaction if it's correct.
✅ Example:
The teacher checks the student's request without changing the final result, and says "Yes, if
you add 5 marks, you will pass."
Blockchain Design (BCS063)

3. Collecting Endorsements
• The client collects endorsements (approvals) from different peers.
• If enough endorsements are received (based on endorsement policy), the client
creates a transaction proposal package.
✅ Example:
The student collects approval from two teachers because school rules require at
least two approvals.
4. Transaction Ordering
• Now the client sends the endorsed transaction to the Ordering Service.
• The ordering service orders all transactions properly into blocks.
• It ensures the network has the same transaction order.
✅ Example:
Imagine many students giving their homework at the same time.
The principal arranges the homework submissions in the right sequence!
-
Blockchain Design (BCS063)

5. Transaction Validation
• Peers receive the block from the ordering service.
• Each peer validates each transaction:
• Were the endorsements correct?
• Was the data still the same (no tampering)?
• Invalid transactions are marked and not committed.
✅ Example:
The principal checks if the teachers' approvals were correct and if the student's
homework was not changed after approval.
6. Ledger Update (Commitment)
• Valid transactions are written (committed) into the ledger.
• Every peer updates its ledger to stay synchronized.
✅ Example:
Finally, the student's final marks are written officially into the school's record.
Blockchain Design (BCS063)

📜 Important Points:
• Endorsement = Checking rules and approving proposal
• Ordering = Arranging transactions in sequence
• Validation = Checking if transaction is correct and safe
• Commitment = Saving transaction permanently in the ledger.

Ques.1 : What is Identity in Blockchain Network?


In a blockchain network (like Hyperledger Fabric),
an Identity is the digital proof of a user or a participant.
It tells the network:
• Who you are (name, organization)
• What role you have (admin, user, peer)
• What permissions you have (can you read? write? approve?)
Identity = Your Digital ID card in the Blockchain Network ✅
Blockchain Design (BCS063)

📌 Example:
Imagine you are a student in school.
• You have an ID card that shows your name and class.
• It proves you belong to the school.
• Only students with valid ID cards can enter classrooms.
Similarly, in blockchain:
• A user gets a Digital Identity (in the form of a certificate).
• It proves that the user is a valid member of the blockchain network.
• Without Identity, you cannot interact with the blockchain.

- Download Notes : https://rzp.io/rzp/N5yEnuX


Blockchain Design (BCS063)

Ques.2. What is Membership Service Provider (MSP)?


The Membership Service Provider (MSP) is the part of blockchain that:
• Gives digital identities to users ✅
• Checks if the identity is valid ✅
• Allows or blocks users based on their identity ✅
MSP = Identity Manager and Security Guard of Blockchain Network ✅
📌 Example:
In a school:
• The Principal issues student ID cards.
• Principal checks if a student's ID is real before letting them attend class.
• If a student misbehaves, principal can cancel their ID card.
In blockchain:
• MSP gives digital certificates (ID cards) to users.
• MSP verifies these certificates when someone tries to perform a transaction.
• MSP controls who is allowed in the network.
Blockchain Design (BCS063)

📚 What is Policy in Hyperledger Fabric?


In Hyperledger Fabric,
a Policy means a set of rules that control who can do what in the blockchain network.
Policy = Rules that decide who is allowed to perform an action. ✅
It controls things like:
• Who can read data?
• Who can write (update) data?
• Who can approve a new block?
• Who can add a new member?

✨ Why Policy is Needed in Hyperledger Fabric?


Fabric is a permissioned blockchain.
(Not everyone can do anything freely ❌).
Blockchain Design (BCS063)

So, Policies are needed to:


• Protect the network by allowing only trusted people ✅
• Divide responsibilities properly (Admin, User, Endorser) ✅
• Make decisions (like updating chaincode or adding new peers) ✅
• Maintain trust and security inside the private network ✅
Without policies:
• Anyone could make changes 😱
• The blockchain would become unsafe and untrustworthy.
📌 Example :
Imagine your school:
• Only teachers can give marks ✅
• Only principal can add new teachers ✅
• Students can only attend classes, not make new rules ❌
These are policies.
Blockchain Design (BCS063)

Similarly in Hyperledger Fabric:


• Only admins can install or upgrade chaincode.
• Only endorsers can approve transactions.
• Only selected members can update the ledger.
✅ Policy ensures everyone follows correct rules based on their role.

- - Download Notes : https://rzp.io/rzp/N5yEnuX


Blockchain Design (BCS063)

 Decompose the Consensus Process? : (AKTU 2019-20)


Consensus means:
All important members of blockchain must agree before adding any new
transaction to the ledger. ✅
Consensus = Agreement between members before updating the blockchai
 Decomposing means breaking the big process of consensus into small, simple
steps.
Instead of doing everything in one heavy step,
Hyperledger Fabric divides the consensus into three small parts:
i. Endorsement
ii. Ordering
iii. Validation

- Download Notes : https://rzp.io/rzp/N5yEnuX


Blockchain Design (BCS063)

1. Endorsement Phase
• Client (user) creates a transaction proposal.
• Sends the proposal to endorsing peers.
• Peers check the proposal (is it correct?).
• If correct, they sign it (called endorsement).
✅ Example:
A student submits homework to teachers. Teachers check and sign if correct.
2. Ordering Phase
• After endorsement, the transaction goes to the Ordering Service.
• The ordering service collects all endorsed transactions.
• Arranges them in the right sequence (block formation).
✅ Example:
Teachers submit all signed homework to the class monitor.
Monitor arranges them according to roll numbers.
Blockchain Design (BCS063)

3. Validation Phase
• Each peer now validates:
• Was the transaction properly endorsed?
• Did it follow the policy rules?
• If yes, the transaction is written to the ledger.
✅ Example:
Principal checks the final arranged homework and updates the official records.
🌟 Why Decompose Consensus ?
• Faster Execution
• More Flexible
• Better Security

Ques : Discuss Hyperledger Fabric. How do we decompose the consensus


process.(AKTU- 2019-20)
Download Notes : https://rzp.io/rzp/N5yEnuX
Blockchain Design (BCS063)

 Hyperledger Fabric Components :


A Hyperledger Fabric network has following components :
1. Asset
Asset means anything valuable you can manage on blockchain (money, land,
certificate, etc.).
In Fabric, assets are stored as key-value pairs (like Name: Value).
✅ Example:
In school, the marksheet of a student is an asset.
(Student Name → Marks).
✅ In Blockchain:
"Car ID 123 → Owned by Arman."

Download Notes : https://rzp.io/rzp/N5yEnuX


Blockchain Design (BCS063)

2. Shared Ledger
A ledger is like a register where all transaction records are stored permanently.
Shared ledger means all trusted members have a copy of the same register.
✅ Example:
In school, the attendance register is shared with all teachers —
Everyone can see who was present or absent!
✅ In Blockchain:
Every peer keeps a copy of all transactions.
3. Smart Contract (Chaincode)
A smart contract is a program (code) that defines the rules for assets.
It automatically checks and applies rules when someone tries to change an asset.
✅ Example:
In school, a rule: "If attendance is less than 75%, you can't sit in exams."
This rule is automatic and applies to every student.
Blockchain Design (BCS063)

✅ In Blockchain:
Chaincode: "If car is sold, change owner in asset record.“
4. Peer Nodes
Peer is a computer (node) that:
• Stores the ledger 📚
• Runs the smart contract 🖥️
• Validates transactions ✅
✅ Example:
In a school:
• Teacher = Peer.
• Teacher keeps records, checks homework, and approves marks.
✅ In Blockchain:
Peers are workers who keep blockchain updated.
Download Notes : https://rzp.io/rzp/N5yEnuX
Blockchain Design (BCS063)

5. Ordering Service
Ordering service arranges all endorsed transactions into blocks and sends them to peers.
✅ Example:
In a school function:
• Students perform skits, songs, speeches.
• Host (ordering service) arranges who will come on stage first, second, third.
✅ In Blockchain:
Ordering service arranges transactions properly and creates blocks.
6. Channels
Channel is like a private room where only selected members can share data.
Inside a channel, data is private and not visible to everyone outside.
✅ Example:
In school:
• A separate classroom where only class 10 students can discuss their syllabus.
• Other classes don't know what's going on there.
Blockchain Design (BCS063)

✅ In Blockchain:
Companies can create private channels for private deals.
7. Hyperledger Fabric CA (Certificate Authority)
• CA (Certificate Authority) gives digital ID cards to members.
• This ID card (certificate) proves who you are in the network.
✅ Example:
In school:
• Every student and teacher gets a school ID card.
• Without ID card, you can't enter school!
✅ In Blockchain:
CA gives digital certificates to users to verify their identity before using the blockchain.

Download Notes : https://rzp.io/rzp/N5yEnuX


Blockchain Design (BCS063)

🛠 Parameters of Chaincode Design:


1. Composite Key
When we combine multiple fields to create one unique key to identify an asset.
✅ Easy Example:
In school:
To identify a student, you combine Class + Roll Number
👉 Example key: "10th-A_23"
✅ In Blockchain:
Suppose for a Car:
• Car Type = "Sedan"
• Car Number = "UP32AB1234"
Composite key = "Sedan_UP32AB1234"
Purpose:
• Helps in grouping and searching assets easily!
Blockchain Design (BCS063)

2. Range Queries
Getting a group of records between a start key and an end key.
✅ Easy Example:
In a library:
You want all books between ID 100 and 200.
✅ In Blockchain:
You can fetch all assets whose IDs fall between two numbers (example: "Car1" to
"Car10").
Purpose:
• Helps in searching multiple records at once!

Download Notes : https://rzp.io/rzp/N5yEnuX


Blockchain Design (BCS063)

3. State Queries
Asking the blockchain:
👉 "What is the current value of this asset?"
✅ Easy Example:
You ask:
👉 "Who owns Car Number UP32AB1234?"
✅ In Blockchain:
State Query gives you current owner, current color, etc.
Purpose:
To know the present data stored in the ledger!

Download Notes : https://rzp.io/rzp/N5yEnuX


Blockchain Design (BCS063)

4. Indexes
Special tables that make searching faster.
✅ Easy Example:
In a library:
There is an index page that shows where to find "Science" books quickly.
✅ In Blockchain:
Create an index on "Car Color" so you can easily find all "Red" cars.
Purpose:
Makes querying and searching super fast and efficient!

Download Notes : https://rzp.io/rzp/N5yEnuX


Blockchain Design (BCS063)

5. Readset and Writeset


They are like two lists that record what the transaction reads and
writes.
✅ Easy Example:
Suppose you are updating a student's marks:
• Readset: Old marks (Before change)
• Writeset: New marks (After change)
✅ In Blockchain:
• Readset: Data you checked before doing action.
• Writeset: Data you changed after the action.
Purpose:
Helps in checking if two users are trying to change the same data at
the same time (avoiding conflicts)!

Download Notes : https://rzp.io/rzp/N5yEnuX


Blockchain Design (BCS063)

6. Multiversion Concurrency Control (MVCC)


Handling multiple users working at the same time without fighting over data.
✅ Easy Example:
In school, two teachers want to update attendance:
• One teacher marks "Present"
• Another teacher marks "Absent"
👉 Blockchain uses MVCC to check who updated first and rejects second if data
changed.
✅ In Blockchain:
• If the record you read has changed before you write, your transaction will be
rejected.
Purpose:
Prevents mistakes when many people are updating the blockchain at the same time!

Download Notes : https://rzp.io/rzp/N5yEnuX


Blockchain Design (BCS063)

🛠Chaincode Implementation Steps :


1. Defining Chaincode Asset
First, we define what asset we are working with.
Asset means the object we want to save on the blockchain.
✅ Easy Example:
Suppose we want to save Car details like:
• CarID
• Brand type Car struct {
CarID string `json:"carID"`
• Model Brand string `json:"brand"`
• Color Model string `json:"model"`
• Owner Color string `json:"color"`
✅ Simple Code Example:
Owner string `json:"owner"`
}
✅ In Easy Words:
You are telling the blockchain:
👉 "Hey, a Car has these 5 things: CarID, Brand, Model, Color, Owner."
Blockchain Design (BCS063)

2. Coding Chaincode Functions


Now, we create functions to work with the asset — like create, read, update, or
delete.
✅ Main functions:
• CreateAsset()
• ReadAsset()
• UpdateAsset()
• DeleteAsset()
✅ In Easy Words:
👉 These are like small machines doing different jobs with the car record.

Download Notes : https://rzp.io/rzp/N5yEnuX


Blockchain Design (BCS063)

3. Creating an Asset
We save a new asset (new Car) into the blockchain.
✅ In Easy Words:
• You make a new car object.
• You save it inside blockchain memory using PutState.
✅ Simple Example:
👉 Creating car record: CarID = "CAR123", Brand = "Honda", Model = "City", Color = "Black",
Owner = "Arman“
4. Reading and Modifying an Asset
Reading = Get the asset from blockchain
Modifying = Update the asset information.

Download Notes : https://rzp.io/rzp/N5yEnuX


Blockchain Design (BCS063)

✅ In Easy Words:
👉 Search the car with carID and get all its details.
✅ Simple Code Example for Modifying:
You usually:
• Read the car record
• Change some fields (like Owner name)
• Save again using PutState.
✅ Simple Update:
Change the car owner from "Arman" to "Ali".
5. Main Function (Chaincode Start Point)
This is where the chaincode program starts running.
✅ In Easy Words:
👉 It’s like saying:
"Hey blockchain! I have created my smart contract, now start it and keep it ready to listen
for transactions."
Blockchain Design (BCS063)

Hyperledger Fabric (B) Part 2


📚 What are Hyperledger Fabric SDKs? :
• ✅ SDK Full Form:
👉 SDK = Software Development Kit
Hyperledger Fabric SDKs are like ready-made toolkits that help developers (like you and
me!) to connect with the blockchain easily.
• Instead of writing difficult blockchain code every time, you can just use these SDKs to talk
to the blockchain quickly — like sending a message or getting a message.
• Hyperledger Fabric SDKs are Software Development Kits that help developers easily
connect and interact with the Fabric blockchain network.
SDKs allow developers to submit transactions, query data, manage identity, and listen for
blockchain events.
SDKs are available for languages like Java, Node.js, Go, and Python.
They save time, make coding simple, and are very useful for building applications on top of
Fabric.
Blockchain Design (BCS063)

Using SDKs, you can:


• Connect to the blockchain network.
• Submit transactions (Create, Update, Delete).
• Query data from blockchain (Read).
• Listen for blockchain events (like alerts).
• Manage identity and certificates (authentication).
Blockchain Design (BCS063)

1. Hyperledger Fabric SDK for Node.js


✅ What is Node.js?
Node.js is a way to write JavaScript code to run on servers.
✅ What is Fabric SDK for Node.js?
It is a JavaScript toolkit that helps you connect your web or mobile apps with the Fabric
blockchain.
✅ Use Cases:
• Create web apps easily.
• Send transactions like create, update, delete.
• Read data from blockchain.
• Manage user certificates and identities.
✅ Simple Example:
Imagine you made a website (like Flipkart).
When a customer places an order, your website can use Node.js SDK to save the order details
in the blockchain!
Blockchain Design (BCS063)

✅ Why Node.js SDK?


• Very popular for web apps.
• Easy for front-end and back-end developers.
• Works fast with REST APIs and servers.
2. Hyperledger Fabric SDK for Java
✅ What is Java?
Java is a popular programming language used in companies for big, secure applications.
✅ What is Fabric SDK for Java?
It is a Java toolkit that helps Java developers build applications that can talk to the
Fabric blockchain.
✅ Use Cases:
• Used in enterprise (business) applications.
• Good for secure and large systems (like banking apps).
• You can create, read, update, delete blockchain records.
Blockchain Design (BCS063)

✅ Simple Example:
Imagine a banking app is made in Java.
When a customer transfers money, the app can use Java SDK to record the transaction
into the blockchain safely!
✅ Why Java SDK?
• Very stable and secure.
• Useful for big organizations (companies).
• Strong error handling and security features.

Download Notes : https://rzp.io/rzp/N5yEnuX


Blockchain Design (BCS063)

3. Hyperledger Fabric SDK for Go


✅ What is Go?
Go (also called Golang) is a programming language made by Google — it is very fast
and simple.
✅ What is Fabric SDK for Go?
It is a Go toolkit that lets Go developers connect to the Fabric blockchain easily.
✅ Use Cases:
• Good for system-level and fast apps.
• Often used inside Fabric components themselves (because Fabric is written in
Go).
• Create, read, update blockchain data.
• ✅ Simple Example:
Suppose you are building a supply chain system (tracking goods).
Using Go SDK, your system can update the blockchain very fast when goods
move from one place to another.
Blockchain Design (BCS063)

✅ Why Go SDK?
• Very fast performance.
• Light-weight and easy.
• Good if your app needs speed.
🌟 What is Fabric Frontend?
👉 Fabric Frontend means the part of the application (like a website or app screen) that
users interact with to work with the Hyperledger Fabric blockchain.
It connects normal users (non-technical people) to the blockchain in an easy, friendly
way.
➡️ Without a frontend, users would have to write complex blockchain code (which is
very hard!).
➡️ Frontend hides the complex blockchain part and shows only simple buttons, forms,
and pages.

Download Notes : https://rzp.io/rzp/N5yEnuX


Blockchain Design (BCS063)

🎯 Example:
Imagine you are building a Car Ownership Blockchain App.
Backend: Hyperledger Fabric stores car records securely.
Frontend: A web page where a user clicks a button:
➡️ “Register my new car”
➡️ “Transfer car ownership”
Behind the scenes, the frontend talks to Fabric, sends user commands, and shows
results nicely.
🛠 How Frontend connects to Fabric?
The frontend does not directly talk to the blockchain. It uses:
1.Fabric SDK (Software Development Kit):
It provides ready-made functions like submitTransaction(), queryTransaction() to
communicate safely.
2.Backend API (Server-side):
Sometimes a backend (like Node.js server) sits between frontend and Fabric for security.
Blockchain Design (BCS063)

🌟 What is Hyperledger Composer Tool?


👉 Hyperledger Composer is a developer tool (like a shortcut kit) that makes it very easy
and fast to build blockchain applications on Hyperledger Fabric.
• Normally, building apps on Fabric is very technical and complicated (lots of coding in
Chaincode, SDKs, backend APIs, etc.).
 Composer gives a simpler way to model your business process, build smart contracts
(called Chaincode), and create applications easily without worrying about very low-level
details.
🎯 What is the Use of Hyperledger Composer for Developers?
🛠️ Model your Business Fast: Just define assets, participants, and rules — no complex
backend coding needed.
️ Speed up Blockchain App Development: Build and test apps in days, not months!
️ Quick Prototyping: You can experiment and test ideas easily without setting up a full
production blockchain.
️ Organized Code: Download Notes :logic,
Keeps business https://rzp.io/rzp/N5yEnuX
data, and permissions cleanly separated.
Blockchain Design (BCS063)
 🛠️ Components of Hyperledger Composer:
Component Easy Meaning
Your whole blockchain system, including assets,
1. Business Network Definition (BND)
participants, transactions. Like the brain of your app.
You define the structure: What are assets (cars,
2. Model (.cto) files houses), participants (users), and transactions (sell,
transfer) using an easy format.
Write simple JavaScript code to define what happens
3. Transaction Processor Functions (.js files) when a transaction happens. (E.g., "Transfer car to
new owner.")
Rules for who can do what (e.g., Only the owner can
4. Access Control (.acl files)
transfer their car).
A browser tool where you can design, test, and
5. Composer Playground
deploy your blockchain app easily.
It auto-creates APIs so that frontend (React, Angular)
6. REST Server apps can talk to your blockchain without coding extra
Download Notes : https://rzp.io/rzp/N5yEnuX
backend.
Blockchain Design (BCS063)

🚀 Benefits of Adopting Hyperledger Composer:


✅ Easy to Learn:
• Even normal web developers (who know basic JavaScript) can use it easily.
• No need to be a hardcore blockchain expert.
✅ Saves Time:
• Writing Chaincode directly is slow.
• Composer generates it automatically for you based on your model.
✅ Visual Testing:
Use Composer Playground to test transactions visually without complex tools.
✅ Auto API Generation:
REST Server automatically generates APIs (no extra coding needed).

Download Notes : https://rzp.io/rzp/N5yEnuX


Blockchain Design (BCS063)

✅ Modular Development:
Assets, participants, transactions, permissions — all kept separately for easy changes.
✅ Prototype Quickly:
Quickly create demos for businesses or colleges without full deployment.
✅ Better Team Collaboration:
Business people and developers can work together easily because models are simple
and readable.

Download Notes : https://rzp.io/rzp/N5yEnuX


Blockchain Design (BCS063)

Thank You…

- Download Notes : https://rzp.io/rzp/ DtpXaWbv

You might also like