0% found this document useful (0 votes)
77 views

Lab Manual Blockchain

This document contains information related to a Blockchain lab course at Rizvi College of Engineering, including the lab objectives, outcomes, rubrics for assessment, and documentation of general course information like name, semester, and instructor details. The lab aims to explore Blockchain concepts, implement public and private Blockchains, and create applications using Blockchain. Students will learn to create cryptographic hashes, design smart contracts, and implement Ethereum Blockchain.

Uploaded by

Arshad Khan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views

Lab Manual Blockchain

This document contains information related to a Blockchain lab course at Rizvi College of Engineering, including the lab objectives, outcomes, rubrics for assessment, and documentation of general course information like name, semester, and instructor details. The lab aims to explore Blockchain concepts, implement public and private Blockchains, and create applications using Blockchain. Students will learn to create cryptographic hashes, design smart contracts, and implement Ethereum Blockchain.

Uploaded by

Arshad Khan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

CSDL7022

RIZVI EDUCATION SOCIETY’S

Rizvi College of Engineering


Department of Computer Engineering

Blockchain Lab Journal

NAME:

CLASS:

ROLL NO. / UIN:


Rizvi College of Engineering CSDL7022 (Blockchain Lab)

RIZVI EDUCATION SOCIETY’S

Rizvi College of Engineering


Department of Computer Engineering

Lab File

Class & Semester: BE (Sem VII)


Subject: Blockchain Lab

Name: ………………………………………….

Roll No. : ……………….

UIN: …………………………….

Document Revised on: 23 / 07 / 2023

Page | 1
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

RIZVI EDUCATION SOCIETY’S

Rizvi College of Engineering


Department of Computer Engineering

Certificate

This is to certify that ………………………………………………………... of Final year


Computer Engineering Department has performed all the experiments of Blockchain with satisfactory
results.

………………………………..

Subject In-charge

Page | 2
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

INSTITUTE MISSION
INSTITUTE VISION
IM1. Impart Core Fundamental Principles: To impart core
fundamental principles of engineering and science that will enable
To become a leading entity in transforming the the learner to develop solutions to complex engineering problems,
diverse class of learners into innovators, analyzers through conventional and innovative teaching learning methods and
and entrepreneurs competent to develop eco-friendly mentoring.
sustainable solutions and work in multi-disciplinary IM2. Bridge the Technical Skill Gap: To bridge the technical
skill gap through curriculum enrichment activities for industry
environment to meet the global challenges and
readiness.
contribute towards nation building. IM3. Inculcate Professional Etiquettes and Ethics: To groom
the learner through dedicated training, placement and extension
activities and to inculcate professional etiquettes and ethics aimed
DEPARTMENT VISION at holistic development of the learners enabling them to acquire
distinguished positions in the leading industries or be eligible for
higher studies in globally recognized universities.
To become a center of excellence in the field of IM4. Research and Development: To provide modern
Computer Engineering to transform diverse class of infrastructure and the necessary resources, for planning and
learners into skilled professionals with ethical values implementing innovative ideas, leading to meaningful research and
capable of contributing towards nation building. development and entrepreneurship.

PROGRAM OUTCOMES DEPARTMENT MISSION

DM1. Quality Technical Education: To provide quality technical


PO1. Engineering knowledge education with the help of modern resources for finding solutions to
PO2. Problem analysis complex problems of computer engineering.
PO3. Design/development of solutions DM2. Leadership & Entrepreneurial skills: To inculcate moral
PO4. Conduct investigations of complex and ethical values while acquiring leadership, entrepreneurial skills
problems and overall personality development.
PO5. Modern tool usage DM3. Professional Skills and Lifelong Learning: To inculcate
professional skills and lifelong learning for further education as well
PO6. The engineer and society
as acquiring distinguished positions in leading software industries.
PO7. Environment and sustainability DM4. Research and Development: To encourage creative
PO8. Ethics thinking for planning and implementing innovative ideas leading to
PO9. Individual and team work meaningful research and development considering economical,
PO10. Communication societal and environmental factors.
PO11. Project management and finance
PO12. Life-long learning
PROGRAM EDUCATIONAL OBJECTIEVES

PROGRAM SPECIFIC OUTCOMES


PEO1. Successful Career: To build a successful career in leading
industries related to the field of Computer Engineering wherein the
engineer will be able to provide the necessary solutions to the
PSO1. Open Source Tools: To encourage the challenges witnessed in existing and new business models.
students to work using open-source PEO2. Leadership Qualities: To exhibit the qualities of team
software’s & tools in diversified areas of spirit, leadership, and problem-solving skills to achieve top positions
computer science. in the organization or to enhance entrepreneurial skills.
PSO2. Industry Readiness: To enable the students PEO3. Adaptability to New Technology: To be able to adapt to
to acquire the necessary skill set required to new technologies and platforms and share their knowledge with their
develop, test, install, deploy, and maintain a peers in the allied fields.
complete software system for business and PEO4. Research & Higher Studies: To develop proficiency in
computer engineering and related fields to be able to work in multi-
other applications, that makes them industry
disciplinary areas with a strong focus on innovation and research.
ready.

Page | 3
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Lab Objectives
1. To explore Blockchain concepts.
2. To implement Public and Private Blockchain.
3. To create applications using Blockchain.

Lab Outcomes
The students will be able to

1. Creating Cryptographic hash using Merkle tree.


2. Design Smart Contract using Solidity.
3. Implementing Ethereum blockchain using Geth.
4. Demonstrate the concept of blockchain in real world application.

Page | 4
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Rubrics
Following rubrics will be used to assess the work submitted by the students.

1. For Experiment 1 to 8

Criteria 1 : In time Submission


Submission of the experiment in specified duration
5 4 3 1
Excellent Good Average Poor
Submitted on or before Submitted within one- Submitted within two Submitted after two
time week past due date weeks past due date weeks past due date
Criteria 2 : Screenshots
Proper screenshots attached
5 4 3 1
Excellent Good Average Poor
Screenshots taken are Screenshots taken are Screenshots are not Incorrect Screenshots
of your own code without any clear and have errors
without discrepancy discrepancy
Criteria 3 : Concept Understanding
Concept understanding are checked
5 4 3 1
Excellent Good Average Poor
All questions asked are Some answers given are Some answers given are Not able to answer any
correct and concepts are correct, but the correct and the concepts question without
clear concepts are clear are also not clear understanding of the
concept

2. For Assignments 1 and 2

Criteria 1 : In time Submission


Submission of the experiment in specified duration
5 4 3 1
Excellent Good Average Poor
Submitted on or before Submitted within one- Submitted within two Submitted after two
time week past due date weeks past due date weeks past due date
Criteria 2 : Content Presentation
How well the content is presented
5 4 3 1
Excellent Good Average Poor
Content presentation Content Presentation Content presentation is Content presentation is
with proper figures, with few missing missing figures etc not at all proper.
tables etc. figures, tables etc.

Page | 5
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

3. For Mini Project

Criteria 1 : Innovative Techniques used


How well students have contributed to implementing an innovative approach to the project?
5 4 3 1
Excellent Good Average Poor
The student has made The Average Contribution: The
exceptional student has made a The student has made student's contribution to
contributions to solid contribution to Adequate contribution implementing the
implementing the implementing the to implementing the innovative approach
innovative approach. innovative approach. innovative approach. was minimal or
negligible.
Criteria 2 : Delivery
How well the student is able to deliver and present the problem statement.
5 4 3 1
Excellent Good Average Poor
The student The student displays The student's delivery The student's delivery
demonstrates good delivery and and presentation skills and presentation skills
exceptional delivery presentation skills. are satisfactory. They are inadequate. They
and presentation skills. They communicate the communicate the struggle to
They effectively problem statement problem statement communicate the
communicate the clearly and confidently, adequately, but may problem statement
problem statement with using appropriate lack some clarity or clearly and confidently,
clarity, confidence, and techniques to engage confidence in their resulting in a lack of
engaging delivery the audience. delivery. audience engagement.
techniques.
Criteria 3 : Execution and Accuracy
How well the student has implemented the project.
5 4 3 1
Excellent Good Average Poor
Implements the project Executes the project Some parts of the Implementation is
accurately with with minor errors or implementation are completely incorrect.
excellent attention to oversights. accurate, but significant
detail. errors are present.

Page | 6
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Lab Guidelines

1. Students are not permitted in any computer lab unless directly supervised by a staff member.
2. Never share your password, even with your best friend.
3. No gum, food or drinks in the lab, electronic equipment doesn’t like to get wet or sticky.
4. Only use the Internet as instructed. You may not use school computers to write or receive e-mail
messages, use chat rooms, update or respond to non-school related blogs or surf the Internet. Do
not click on links that seem suspicious or are offers of “free” anything.
5. Do not use the mouse or keyboard as a toy. This means do not randomly click on the mouse or hit
the keys on the keyboard without a purpose.
6. Do not change computer preference settings or endeavor to “hack” into unauthorized areas.
7. Always use print preview before you print. Make sure that your heading is on all documents, pick
up your work at the printer and turn in to the hand-in-box. Plan your time. All students cannot
print at the same time.
8. Ask for permission before printing.

Page | 7
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

INDEX
Sr. Title Page Performed Sign & Rubrics
No. No. On Date Points

1 Implementation of Blockchain using Python


programming

2 Implementation of Merkle tree using Python


programming

3 Implementation of Banking transactions using


Metamask, Solidity, Remix IDE

4 Implementation of decentralized lottery


application using Solidity programming

5 Implementation of Smart Contract for


Crowdfunding using Solidity programming

6 Implementation of Smart Contract for Event


Organization using Solidity

7 Implementation of Blockchain platform using


Truffle and Ganache

8 Case Study on Geth: A Decentralized


Ethereum Client

9 Mini Project

10 Assignment 1

11 Assignment 2

TOTAL

Page | 8
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

EXPERIMENTS

Page | 9
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Expt. No. 1

Title: Implementation of Blockchain using Python


programming.

Rubric Score (0 to 5)
In time Submission
Screenshots

Concept Understanding

Total

Performed On: ___________

Sign:__________

Page | 10
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Experiment No. 1
Aim : Implementation of Blockchain using Python programming

Software : Google Colab

Theory :

Introduction to Blockchain:

Blockchain is a peer-to-peer, distributed ledger that is cryptographically secure,

append-only, immutable (extremely hard to change), and updateable only via consensus or agreement

among peers. As a database, a blockchain stores information electronically in digital format. Blockchains

are best known for their crucial role in cryptocurrency systems, such as Bitcoin, for maintaining a secure

and decentralized record of transactions. A block is a place in a blockchain where information is stored and

encrypted. Blocks are identified by long numbers that include encrypted transaction information from

previous blocks and new transaction information. Blocks and the information within them must be verified

by a network before new blocks can be created. Blocks and blockchains are not used solely by

cryptocurrencies. They also have many other uses. Each block contains its data, hash as well as hash of the

previous block. Hence this storing the hash of previous blocks creates a chain called as Blockchain.

Page | 11
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Program:

Page | 12
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Output:

Conclusion:
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..

CO’s Covered:
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..

Page | 13
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Expt. No. 2

Title: Implementation of Merkle Tree using Python


programming.

Rubric Score (0 to 5)
In time Submission
Screenshots

Concept Understanding

Total

Performed On: ___________

Sign:__________

Page | 14
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Experiment No. 2
Aim : Implementation of Merkle Tree using Python programming

Software : Google Colab

Theory :

Merkle Root Tree Hash:

A Merkle root is the hash of all the hashes of all the transactions that are part of a block in

a blockchain network. A blockchain is comprised of various blocks that are linked with one

another (hence the name blockchain). A hash tree, or the Merkle tree, encodes the blockchain data

in an efficient and secure manner. It enables the quick verification of blockchain data, as well as

quick movement of large amounts of data from one computer node to the other on the peer-to-peer

blockchain network.

Merkle tree is a fundamental part of blockchain technology. It is a mathematical data

structure composed of hashes of different blocks of data, and which serves as a summary of all the

transactions in a block. A Merkle tree stores all the transactions in a block by producing a digital

fingerprint of the entire set of transactions. It allows the user to verify whether a transaction can

be included in a block or not. Merkle trees are created by repeatedly calculating hashing pairs of nodes

Page | 15
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

until there is only one hash left. This hash is called the Merkle Root, or the Root Hash. The Merkle

Trees are constructed in a bottom-up approach. Every leaf node is a hash of transactional data,

and the non-leaf node is a hash of its previous hashes. Merkle trees are in a binary tree, so it

requires an even number of leaf nodes. If there is an odd number of transactions, the last hash

will be duplicated once to create an even number of leaf nodes.

The Merkle Tree maintains the integrity of the data. If any single detail of transactions or order of

the transaction's changes, then these changes reflected in the hash of that transaction. This change

would cascade up the Merkle Tree to the Merkle Root, changing the value of the Merkle root and

thus invalidating the block. So everyone can see that Merkle tree allows for a quick and simple

test of whether a specific transaction is included in the set or not.

Program:

Page | 16
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Page | 17
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Output:

Conclusion:
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..

CO’s Covered:
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..

Page | 18
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Expt. No. 3

Title: Implementation of banking Transactions using


Metamask, Solidity, Remix IDE.

Rubric Score (0 to 5)
In time Submission
Screenshots

Concept Understanding

Total

Performed On: ___________

Sign:__________

Page | 19
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Experiment No. 3
Aim : Implementation of Banking Transactions using Metamask, Solidity, Remix IDE.

Software : Remix IDE

Theory :

MetaMask

MetaMask is a cryptocurrency wallet and browser extension developed to interact with the Ethereum

blockchain. It serves as a bridge between users' web browsers and the decentralized world of Ethereum.

With MetaMask, users can securely manage their Ethereum-based assets, including Ether and ERC-20

tokens, by generating and safeguarding their public and private keys. The extension allows users to access

and interact with decentralized applications (DApps) seamlessly directly from their web browsers. It utilizes

the Web3.js library and follows the Ethereum Improvement Proposal (EIP) 1102, prioritizing user privacy

and security.

When performing transactions, MetaMask prompts users to review and sign them with their

private keys, ensuring only authorized actions are executed. Additionally, MetaMask provides a seed phrase

during setup, acting as a backup to restore access in case of device loss. As a widely-used and essential tool

for Ethereum enthusiasts, MetaMask simplifies the complex processes of blockchain interactions, making

the decentralized ecosystem more accessible and user-friendly.

Solidity

Solidity is a high-level programming language used for developing smart contracts on the Ethereum

blockchain. It enables developers to create self-executing contracts with specific rules and conditions,

which automatically execute actions when predefined conditions are met. These smart contracts are stored

on the Ethereum blockchain, making them immutable and transparent.

Solidity is designed to be similar to JavaScript, making it accessible to developers with web development

backgrounds. It supports various data types, control structures, and object-oriented programming concepts,

allowing for flexible and expressive contract development.

Page | 20
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

One of the key features of Solidity is its ability to handle Ether (the native cryptocurrency of Ethereum)

and interact with other Ethereum-based tokens. It facilitates secure and transparent transactions without the

need for intermediaries, making processes more efficient and cost-effective.

However, Solidity is not without challenges. Since smart contracts are immutable, bugs or vulnerabilities

in the code can lead to irreversible consequences. Therefore, it's crucial for developers to follow best

practices and conduct thorough testing to ensure the security and reliability of their smart contracts.

Remix IDE

Remix IDE is a web-based Integrated Development Environment (IDE) tailored for Ethereum smart

contract development using Solidity. It offers a user-friendly code editor with syntax highlighting and auto-

completion, simplifying contract writing. Developers can compile, deploy, and interact with smart contracts

directly from the IDE, streamlining the development process. Remix supports debugging and unit testing,

helping identify and fix issues during development. It also provides a gas and EVM simulation feature for

estimating contract execution costs. Additionally, security analysis tools assist in identifying potential

vulnerabilities in smart contracts, promoting more secure coding practices. With its accessibility and

powerful features, Remix IDE is a valuable tool for Ethereum developers, facilitating the creation of

decentralized applications and smart contracts on the Ethereum blockchain.

Page | 21
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Program and Screenshots:

Page | 22
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Page | 23
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Conclusion:
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..

CO’s Covered:
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..

Page | 24
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Expt. No. 4

Title: Implementation of decentralized lottery application


using Solidity programming.

Rubric Score (0 to 5)
In time Submission
Screenshots

Concept Understanding

Total

Performed On: ___________

Sign:__________

Page | 25
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Experiment No. 4
Aim : Implementation of decentralized lottery application using solidity programming

Software :

Theory :

Lottery Application:

It is a blockchain based lottery system. Where a manager manages the entire lottery process.

There are n players who participate in the lottery process by buying a lottery ticket (spending fixed

amount 1 ether to be eligible candidate for lottery winner).

There must be at least 3 participants participating in the lottery process. Manager deploys a lottery

contract. Others transact 1 ether in the lottery to secure their participation.

Manager then calls the pickup function where a winner is selected randomly from the participated

members.

The winner then receives the all the lottery amount.

Page | 26
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Program:

Page | 27
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Output:

Page | 28
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Conclusion:
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..

CO’s Covered:
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..

Page | 29
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Expt. No. 5

Title: Implementation of Smart contract for Crowdfunding


using Solidity programming.

Rubric Score (0 to 5)
In time Submission
Screenshots

Concept Understanding

Total

Performed On: ___________

Sign:__________

Page | 30
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Experiment No. 5
Aim : Implementation of smart contract for Crowdfunding using Solidity Programming.

Software :

Theory :

Crowdfunding

It is a crowdfunding is the use of small amounts of capital from a large number of individuals to

finance a new business venture. Crowdfunding has created the opportunity for entrepreneurs to raise

hundreds of thousands or millions of dollars from anyone with money to invest.

Crowdfunding provides a forum to anyone with an idea to pitch it in front of waiting investors.

A crowdfunding smart contract is a type of decentralized application (DApp) built on the Ethereum

blockchain that facilitates the collection and distribution of funds for a specific project or cause. It allows

individuals to contribute their funds (usually in the form of cryptocurrency) towards a fundraising goal, and

once the goal is met or a predefined deadline is reached, the funds are automatically released to the project

creator.

Page | 31
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Program:

Page | 32
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Page | 33
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Output:

Page | 34
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Conclusion:
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..

CO’s Covered:
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..

Page | 35
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Expt. No. 6

Title: Implementation of Smart Contract for Event


Organization using Solidity.

Rubric Score (0 to 5)
In time Submission
Screenshots

Concept Understanding

Total

Performed On: ___________

Sign:__________

Page | 36
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Experiment No. 6
Aim : Implementation of smart contract for Event Organization using Solidity

Software :

Theory :

Event Organization Application:

This is an event management and ticketing platform that facilitates event organization and enables attendees

to purchase and transfer tickets. The platform allows managers to create events and provide event details.

Users, whether event organizers or attendees, can create an unlimited number of events. Attendees have the

flexibility to buy any number of tickets for the events they are interested in attending. Additionally,

attendees can transfer these purchased tickets to other users by specifying their addresses. This ticket

transfer feature allows users to share event access with others, enhancing flexibility and convenience for

event attendees. The platform aims to streamline event planning, ticketing, and ticket sharing, making it

easier for both managers and attendees to participate in various events.

Page | 37
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Program:

Page | 38
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Output:

Page | 39
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Conclusion:
………………………………………………………………………………………………..........................
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..
………………………………………………………………………………………………………………..

CO’s Covered:
………………………………………………………………………………………………..........................
……………………………………………………………………………………………………………….
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..

Page | 40
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Expt. No. 7

Title: Implementation of blockchain platform using Truffle


and Ganache.

Rubric Score (0 to 5)
In time Submission
Screenshots

Concept Understanding

Total

Performed On: ___________

Sign:__________

Page | 41
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Experiment No. 7
Aim: Implementation of blockchain platform using Truffle and Ganache

Software :

Theory :

Solidity:

Solidity is a brand-new programming language created by the Ethereum which is the second-

largest market of cryptocurrency by capitalization, released in the year 2015 led by Christian

Reitwiessner.

• Solidity is a high-level programming language designed for implementing smart contracts.

• It is statically-typed object-oriented(contract-oriented) language.

• Solidity supports complex user-defined programming, libraries and inheritance.

• Solidity is primary language for blockchains running platforms.

Ganache

Ganache is a personal blockchain for rapid Ethereum and Corda distributed application

development. You can use Ganache across the entire development cycle; enabling you to

develop, deploy, and test your DApps in a safe and deterministic environment.

Ganache comes in two flavours: a UI and CLI. Ganache UI is a desktop application supporting

both Ethereum and Corda technology. Our more robust command-line tool, ganache, is

available for Ethereum development.

Truffle

With Truffle, you get:

• Built-in smart contract compilation, linking, deployment and binary management.

• Advanced debugging with breakpoints, variable analysis, and step functionality.

Page | 42
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

• Deployments and transactions through MetaMask to protect your mnemonic.

• External script runner that executes scripts within a Truffle environment.

• Interactive console for direct contract communication.

• Automated contract testing for rapid development.

• Scriptable, extensible deployment & migrations framework.

• Network management for deploying to any number of public & private networks.

• Package management with NPM, using the ERC190 standard.

• Configurable build pipeline with support for tight integration.

Program and Screenshots:

Page | 43
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Page | 44
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Page | 45
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Conclusion:
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..

CO’s Covered:
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..

Page | 46
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Expt. No. 8

Title: Case Study on Geth: A Decentralized Ethereum Client

Rubric Score (0 to 5)
In time Submission
Screenshots

Concept Understanding

Total

Performed On: ___________

Sign:__________

Page | 47
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Experiment No. 8
Aim: Case Study on Geth: A Decentralized Ethereum Client

Theory :

Introduction:

Geth, short for Go-Ethereum, is one of the most widely used and prominent Ethereum clients. Developed
in the Go programming language, Geth is an essential component of the Ethereum network that enables
nodes to interact with the blockchain. In this case study, we will explore the features, use cases, and
significance of Geth in the context of the decentralized ecosystem.

Background:

Ethereum is a decentralized blockchain platform that supports smart contracts and decentralized
applications (DApps). To be part of the Ethereum network, nodes need to connect to the blockchain and
communicate with each other. Geth is one of the core clients that allows nodes to perform these functions.

Features and Functionality:

Node Operations: Geth serves as a node implementation, meaning it enables computers to participate in
the Ethereum network as either a full node or a light node. A full node stores the entire Ethereum
blockchain, while a light node synchronizes only a subset of the blockchain data, reducing storage
requirements.

Mining: Geth includes functionalities for mining, which involves solving complex cryptographic puzzles
to validate transactions and create new blocks. Miners are rewarded with Ether for their efforts.

Smart Contracts: Geth facilitates the deployment and execution of smart contracts. Developers can use
Geth to interact with smart contracts by sending transactions to them, modifying their state, or retrieving
data from them.

Ethereum API: Geth provides an extensive API for developers to interact with the Ethereum blockchain
programmatically. This API allows applications to access blockchain data, execute transactions, and
integrate with smart contracts.

Page | 48
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Use Cases:

1. Running a Full Node: Individuals or organizations wishing to support the Ethereum network's
decentralization can run Geth as a full node. These nodes contribute to the security and stability of
the network by validating and propagating transactions and blocks.
2. DApp Development: Geth is an invaluable tool for developers building decentralized applications
on the Ethereum blockchain. It enables them to interact with smart contracts and access
blockchain data, facilitating the seamless integration of their dApps with the network.
3. Mining: Geth can be utilized by miners to participate in the consensus mechanism and earn Ether
as a reward for contributing their computational power to the network.
4. Blockchain Research: Researchers and analysts can use Geth to explore and study the Ethereum
blockchain. They can access historical data, analyze network behavior, and conduct experiments
to improve the blockchain's performance.

Significance:

Geth plays a critical role in the Ethereum ecosystem. As one of the main clients running on the Ethereum
network, it helps maintain the blockchain's security, decentralization, and overall health. It empowers
developers to create innovative DApps and smart contracts, contributing to the growth and adoption of
Ethereum as a leading blockchain platform.

Conclusion:

Geth, the Go-Ethereum client, is a fundamental component of the Ethereum blockchain network. It
provides essential features for nodes, developers, and miners, making it an indispensable tool for various
stakeholders in the Ethereum ecosystem. As the Ethereum network continues to evolve, Geth's role as a
reliable and efficient client will remain crucial in supporting the decentralized future of blockchain
technology.

CO’s Covered:
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..
………………………………………………………………………………………………..........................
………………………………………………………………………………………………………………..

Page | 49
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Mini Project

Rubric Score (0 to 5)
Innovative Techniques used
Delivery

Execution and Accuracy

Total

Performed On: ___________

Sign:__________

Page | 50
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

ASSIGNMENTS

Page | 51
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Assignment No. 1

Rubric Score (0 to 5)
In time Submission
Content Presentation

Total

Performed On: ___________

Sign:__________

Page | 52
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Assignment No. 2

Rubric Score (0 to 5)
In time Submission
Content Presentation

Total

Performed On: ___________

Sign:__________

Page | 53
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Page | 54
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Page | 55
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Page | 56
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Page | 57
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Page | 58
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Page | 59
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Page | 60
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Page | 61
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Page | 62
Rizvi College of Engineering CSDL7022 (Blockchain Lab)

Page | 63

You might also like