0% found this document useful (0 votes)
25 views4 pages

Blockchain

The document outlines an experiment focused on understanding and deploying Hyperledger Fabric, detailing the differences between permissionless and permissioned blockchain technologies. It explains Quorum as an enterprise-grade solution built on Hyperledger Fabric, highlighting its features such as enhanced privacy and faster transactions. Additionally, it discusses the components, challenges, and benefits of Hyperledger Fabric, and provides an example of a chaincode program in Go.
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)
25 views4 pages

Blockchain

The document outlines an experiment focused on understanding and deploying Hyperledger Fabric, detailing the differences between permissionless and permissioned blockchain technologies. It explains Quorum as an enterprise-grade solution built on Hyperledger Fabric, highlighting its features such as enhanced privacy and faster transactions. Additionally, it discusses the components, challenges, and benefits of Hyperledger Fabric, and provides an example of a chaincode program in Go.
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

EXPERIMENT NO: 05

Name of the Student –

Roll No: Subject: Blockchain & DLT Lab

Date of Practical Performed :- Staff Signature with Date& Marks:

Title : Understand and Deploying Hyper-ledger fabric.

Aim:- To Understand and Deploying Hyper-ledger fabric.

Theory:

1) Difference between permissionless & permissioned blockchain technology.


Blockchain technology is a distributed ledger technology that enables secure and transparent transactions
between parties without the need for intermediaries. There are two main types of blockchain technology:
permissionless and permissioned.

1) Permissionless Blockchain:
A permissionless blockchain is a decentralized network where anyone can participate without requiring
permission from any central authority. These types of blockchain networks allow anyone to read, write, and
validate transactions. Bitcoin and Ethereum are examples of permissionless blockchain networks. These
networks are typically used for public applications such as cryptocurrencies, where anonymity and open
access are important.

2) Permissioned Blockchain:
A permissioned blockchain is a decentralized network where access to the network is restricted to certain
participants. In these types of blockchain networks, participants must be granted permission to read, write,
and validate transactions. Permissioned blockchains are typically used in private applications, such as supply
chain management or financial services, where privacy and security are important.

Permissioned blockchains have some advantages over permissionless blockchains, such as improved
scalability, faster transaction processing, and better privacy and security. However, permissionless
blockchains offer greater decentralization and transparency, which can be important in certain applications.
Ultimately, the choice between permissionless and permissioned blockchain technology depends on the
specific use case and the desired level of security, privacy, and decentralization.
2) Explain QUORUM hyper-ledger blockchain fabric.
Quorum is an open-source blockchain platform based on the Ethereum codebase, but with modifications to
support enterprise use cases. It is designed to provide high performance, privacy, and security for business
applications.

Hyperledger Fabric is another open-source blockchain platform that is specifically designed for enterprise use
cases. It provides a modular architecture that allows users to customize the platform to suit their specific
needs.

Quorum uses a modified version of Hyperledger Fabric as its core consensus engine, but adds additional
features and functionality to meet the requirements of enterprise users. Some of the key features of Quorum
include:

1) Enhanced privacy: Quorum supports private transactions and private contracts, which allow businesses to
keep sensitive information confidential.

2) Permissioned network: Quorum uses a permissioned network, which means that onlyauthorized parties can
participate in the network.

3) Faster transactions: Quorum uses a faster consensus mechanism called "QuorumChain" which allows for
faster transaction processing.

4) Ethereum compatibility: Quorum is based on the Ethereum codebase, which means that it can support
Ethereum-based smart contracts and decentralized applications (dApps).

5) Governance: Quorum provides advanced governance features that allow for flexible decision-making and
management of the network.

Overall, Quorum is designed to provide an enterprise-grade blockchain solution that combines the best
features of Hyperledger Fabric and Ethereum. It offers enhanced privacy, faster transactions, and greater
flexibility for businesses that need to build and deploy blockchain-based applications.
3 ) What are the components of hyper-ledger fabric & challenges & benefits of hyper-ledger fabric?
Hyperledger Fabric is an open-source, modular blockchain platform that is designed for enterprise use cases. It
consists of several key components that work together to provide a scalable, secure, and flexible blockchain
solution.

1) Peer Nodes: Peer nodes are responsible for validating transactions, maintaining the ledger, and
communicating with other nodes on the network.

2) Orderer Nodes: Orderer nodes manage the order in which transactions are processed and added to the ledger.

3) Channels: Channels are private sub-networks within a blockchain network that allow for confidential
communication and transaction processing between specific parties.

4) Chaincode: Chaincode is the smart contract code that runs on the network and executes business logic.

Membership Service Provider (MSP): The MSP is responsible for managing the identities of network participants
and ensuring that only authorized parties can access the network.

Challenges:
1) Complexity: Hyperledger Fabric is a complex platform with a steep learning curve, which can make it
challenging for new users to get started.
2) Scalability: Like many blockchain platforms, Hyperledger Fabric faces scalability challenges due to
limitations in transaction processing speeds and network capacity.
3) Interoperability: Integrating Hyperledger Fabric with existing enterprise systems can be challenging, as it
requires a deep understanding of blockchain technologyand network architecture.

Benefits:
1) Privacy and Security: Hyperledger Fabric provides advanced privacy and security features, including
permissioned access controls and support for private transactions and channels.
2) Flexibility: Hyperledger Fabric is a modular platform that can be customized to suit a wide range of enterprise
use cases.
3) Interoperability: Hyperledger Fabric is designed to integrate with existing enterprise systems, allowing
businesses to leverage the benefits of blockchain technology without disrupting their existing workflows.
2) 4) Write down a chain code program using java / java-script / go for buildingchain code on
Ethereum test network.
package main

import (
"fmt" "github.com/hyperledger/fabric/core/chaincode/shim"pb "github.com/hyperledger/fabric/protos/peer"
)

type MyChaincode struct {}

func (t *MyChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response {return shim.Success(nil)


}

func (t *MyChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response { function, args :=


stub.GetFunctionAndParameters()

if function == "helloWorld" {
return t.helloWorld(stub, args)
}

return shim.Error("Invalid function name.")


}

func (t *MyChaincode) helloWorld(stub shim.ChaincodeStubInterface, args []string) pb.Response {


return shim.Success([]byte("Hello World!"))
}

func main() {
err := shim.Start(new(MyChaincode)) if err != nil {
fmt.Printf("Error starting chaincode: %s", err)
}
}

Conclusion: we have covered several topics related to blockchain technology, including the difference
between permissionless and permissioned blockchains, an explanation of Quorum and Hyperledger Fabric,
the components and benefits/challenges of Hyperledger Fabric, and an example of a chaincode program for
Hyperledger Fabric written in Go.

It's important to note that blockchain technology is a rapidly evolving field, and new advancements and
innovations are being made all the time. As such, it's important to stay up-to- date on the latest developments
and continue learning in order to stay ahead of the curve in this exciting and promising field.

You might also like