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

Block Chain - Document (1.0)

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

Block Chain - Document (1.0)

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

BLOCKCHAIN TECHNOLOGY

Technical Seminar Report submitted to


Jawaharlal Nehru Technological University Hyderabad in
partial fulfillment for the award of degree of

Bachelor of Technology in
Computer Science & Engineering
(ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING)
by

M TULASI
ROLL NO: 21X31A6637

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

(ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING)

SRI INDU INSTITUTE OF ENGINEERING &TECHNOLOGY

(Affiliated to JNTUH, Hyderabad, Approved by AICTE, New Delhi)


Sheriguda (V), Ibrahimpatnam (M), R.R.Dist., Telangana- 501510.

2024
SRIINDUINSTITUTEOFENGINEERINGANDTECHNOLOGY
(Affiliated to JNTUH, Kukatpally, Hyderabad)

Sheriguda (V), Ibrahimpatnam (M), R.R.Dist. 501510.

CERTIFICATE

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

(ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING)

This is to certify that the dissertation entitled “BLOCKCHAIN

TECHNOLOGY”, being submitted by M TULASI bearing Roll No:21X31A6637 to

Jawaharlal Nehru Technological University Hyderabad in partial fulfillment of the

requirements for the award of the degree of Bachelor of Technology in Computer Science &

Engineering (Artificial Intelligence and Machine Learning), is a record of bonafide work

carried out by him. The results of investigations enclosed in this report have been verified and

found satisfactory.

INTERNAL GUIDE HEAD OF THE DEPARTMENT


SRI INDU INSTITUTE OF ENGINEERING &TECHNOLOGY
(Affiliated to JNTUH, Hyderabad, Approved by AICTE, New Delhi) Sheriguda
(V), Ibrahimpatnam (M), R.R.Dist., Telangana- 501510.

DECLARATION
I, M TULASI bearing Roll No 21X31A6637, hereby certify that the dissertation

entitled “BLOCKCHAIN TECHNOLOGY”, is submitted to Jawaharlal Nehru

Technological University Hyderabad in partial fulfillment of the requirements for the

award of the degree of Bachelor of Technology in Computer Science & Engineering

(Artificial Intelligence and Machine Learning). This is a record of bonafide work

carried out by me and the results embodied in this dissertation have not been reproduced

or copied from any source. The results embodied in this dissertation have not been

submitted to any other University or Institute for the award of any other degree.

Date: M TULASI

Roll no. 21X31A6637


Department of CSE(AI&ML), SIIET
ACKNOWLEDGEMENT

With great pleasure I take this opportunity to express my heartfelt gratitude to


all the persons who helped me in making this Technical seminar a success.

First of all, I express my sincere thanks to Mr. R. VENKAT RAO,


Chairman, Sri Indu Group of Institutions, for his continuous encouragement.

I am highly indebted to Principal, Dr. I. SATYANARAYANA for giving me


the permission to carry out this Technical seminar.

I would like to thank Dr. B.RATNAKANTH Professor & Head of the


Department (CSE), for giving support through out the period of my study in SIIET. I
am grateful for his valuable suggestions and guidance during the execution of this
Technical seminar.

My sincere thanks to Technical seminar guide Mr T. RAVI CHARAN,


ASSISTANT PROFESSOR for potentially explaining the entire system and
clarifying the queries at every stage of the Technical seminar.

My whole hearted thanks to the staff of Computer Science And Engineering


(Artificial Intelligence and Machine Learning) who co-operated us for the
completion of the Technical seminar in time.

I also thank my parents and friends who aided me in completion of the


Technical seminar.

M TULASI
(21X31A6637)

i
ABSTRACT

Blockchain technology is a decentralized digital ledger that ensures transparency,


immutability, and security through cryptographic methods. Initially introduced in
2008 with the advent of Bitcoin, blockchain has evolved into a revolutionary
foundation with applications extending beyond cryptocurrencies to sectors like
supply chain management, smart contracts, and decentralized applications (DApps).
This document explores the principles of blockchain, including its peer-to-peer (P2P)
network, consensus mechanisms, timestamping, and data security features. It delves
into the distinction between permissionless and permissioned blockchains,
highlighting prominent platforms like Bitcoin and Ethereum. Additionally, the concept
of smart contracts is examined, showcasing their potential to automate and secure
agreements without intermediaries. The benefits of blockchain, such as enhanced
transparency, efficiency, and cost reduction, are contrasted with challenges like
scalability, security risks, and the nascent stage of the technology. The document also
outlines blockchain’s historical milestones and its emerging role in decentralized
applications, addressing synchronization issues and the Byzantine Generals Problem.
This comprehensive study offers insights into blockchain's transformative capabilities
and its trajectory in reshaping industries worldwide.

ii
CONTENTS
TITLE PAGE NO
ACKNOWLEGEMENT I
ABSTRACT ii
1. Introduction . . . . . . . . . . . ֫. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Cryptocurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Peer-to-Peer Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Types of Blockchain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.1 Bitcoin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.2 Etherеum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 Smart Contracts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3.1 How Smart Contracts Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3.2 Benefits and Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2. History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3. Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.1 Decentralized Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.1.1 Synchronisation Issue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.1.2 Decentralized Ledger. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Truffle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.2.1 Creating a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.2.2 Creating Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4. Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.1 Consensus Mechanisms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.2 Certificate Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5. Advantages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
6. Disadvantages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
7. Conclusion and Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
8. References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

iii
S No. List of figures Page No.
1.1 Block chain technology in smart city . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Peer to Peer Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Bitcoin Transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Timestamp of Bitcoin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.5 Disk Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.6 Payment Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.7 Etherium Transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.1 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.1 Example of DAAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3 Truffle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.1 Bitcoin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.2 Ethereum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.3 DPoS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.4 Certificate Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.1 Cryptocurrencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.2 Smart Contract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.3 Supply Chain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.4 Real Estate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.5 Healthcare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

iv
1. INTRODUCTION

Blockchain is a decentralized digital hood, the technological innovation is the


ledger that securely records transactions BlockChain, also called as distributed
across a network of computers. It ledger technology that is seen as
ensures transparency, immutability, and revolutionary foundational technology
security by using cryptographic having a tremendous potential across
techniques. Once data is added, it cannot different verticals.
be altered, making it a trusted system for
1.1 Cryptocurrency
applications like cryptocurrencies,
supply chains, and smart contracts. In the cashless fiat currency system,
transactions between parties involve
Cryptocurrency, the digital currency
third party financial institutions,
system that enables global monetary
typically one or more banks that take
transactions between two parties without
care of:
the need for a trusted third party
financial institution, has gained • Verifying availability of funds
tremendous momentum over the last few • Preventing double spends, that is
years. Bitcoin, the first cryptocurrency, ensuring the same funds are not spent
came into existence in January 2009. Its more than once, by updating ledgers. In
inventor, Satoshi Nakamoto (an the digital currency system, availability
anonymous person or a group) published or proof of possession of funds can be
a white paper prior to this in October, verified by using digital signatures.
2008. Since then, numerous However, the problem of double
cryptocurrencies have come into spending increases since a digital asset
existence. More recently, bitcoin has or a token can be replicated easily.
gained mainstream attention. Under the

1
node communicates with a set of neighbour
nodes, each of which communicates with their
neighbour nodes and so on. Any node can join
and leave the network at will. The transactions
and blocks are broadcast on the P2P network
and each receiving node forwards it to other
neighbour nodes. Nodes that store a copy of
Figure 1.1: Block chain technology in smart city complete Block Chain are full nodes.

1.1.1 Peer-to-Peer Network SPV (Simple Payment Verification) nodes


verify payment using only block headers.
Mining nodes generate blocks.

1.1.1.1 Timestamping

When the transactions are chronologically


ordered and a single history is agreed by
majority of nodes, the double spending
problem can be solved by always considering
the first transaction from the sender as valid
for the same funds. Timestamping is achieved
by collecting the pending transactions into a
block and calculating the block hash. It can be
Figure 1.2: Peer to Peer Network proved that the transaction. existed at the time
of the block creation since it is hashed into the
Block Chain uses Peer-to-Peer (P2P) network
block.. Granularity of this is time to generate a
overlay on the Internet. (Figure 1.2). Each
new block which is 10 minutes in Bitcoin.

2
1.1.1.2 Consensus permissioned. Permission- less Block Chain is
also a public Block Chain. Any node can join
New blocks are created broadcast by mining and leave at any point in time by merely
nodes, each not being identical and arrive in running the node software. Transactions can
different order at different nodes. It becomes a be sent by signing the transaction with the
necessity for all. the nodes to agree on a single private key that can be verified by peer nodes.
version of block, thereby a consensus that is Bitcoin and Ethereum Block Chains are
needed. A distributed consensus (in a trust-less examples of public permission-less Block
environment) must decide on which block out Chain.
of several variants generated by multiple
nodes would be added to the block chain. 1.2.1 Bitcoin

1.1.1.3 Data Security Integrity Commerce on the Internet has come to rely
almost exclusively on financial institutions
A malicious node cannot create fake serving as trusted third parties to process
transactions since private keys are used to sign electronic payments. While the system works
the transaction. However, it can generate its well enough for most transactions, it still
own double spend transactions, one paying to suffers from the inherent weaknesses of the
a vendor and another paying back itself. While trust based model. Completely non-reversible
transaction ordering takes care to include only transactions are not really possible, since
the first transaction, if the malicious node is financial institutions cannot avoid mediating
able to generate blocks easily and disputes. The cost of mediation increases
deterministically, it can create new block with transaction costs, limiting the minimum
the transaction paying back itself. When this practical transaction size and cutting off the
block is accepted by other nodes, the possibility for small casual transactions, and
malicious transaction gets through. there is a broader cost in the loss of ability to
make non-reversible payments for non
1.2 Types of Blockchain
reversible services. With the possibility of

Depending on how the nodes in the network reversal, the need for trust spreads. Merchants

join and the restrictions placed on the roles, a must be wary of their customers, hassling

Block Chain can be permission-less or them for more information than they would
other- wise need. A certain percentage of fraud

3
is accepted as unavoidable. These costs and 1.2.1.1 Transactions.
payment uncertainties can be avoided in
person by using physical currency, but no The problem of course is the payee can't

mechanism exists to make payments over a verify that one of the owners did not double-

communications channel without a trusted spend the coin. A common solution is to

party. What is needed is an electronic payment introduce a trusted central authority, or mint,

system based on cryptographic proof instead that checks every transaction for double

of trust, allowing any two willing parties to spending. After each transaction, the coin

transact directly with each other without the must be returned to the mint to issue a new

need for a trusted third party. Transactions that coin, and only coins issued directly from the

are computationally impractical to reverse mint are trusted not to be double-spent. The

would protect sellers from fraud, and routine problem with this solution is that the fate of

escrow mechanisms could easily be the entire money system depends on the

implemented to protect buyers. Timestamp company running the mint, with every

server to generate computational proof of the transaction having to go through them, just

chronological order of transactions. The like a bank. The payee should know that the

system is secure as long as honest nodes previous owners did not sign any earlier

collectively control more CPU power than any transactions. For our purposes, the earliest

cooperating group of attacker nodes transaction is the one that counts, so we don't
care about later attempts to double-spend. The
only way to confirm the absence of a
transaction is to be aware of all transactions.
In the mint based model, the mint was aware
of all transactions and decided which arrived
first. To accomplish this without a trusted
party, transactions must be publicly
announced and there must be a system for
participants to agree on a single history of the
order in which they were received. The payee
Figure 1.3: Bitcoin Transaction
needs proof that at the time of each

4
transaction, the majority of nodes agreed it
was the first received.

1.2.1.3 Network
1.2.1.2 Timestamp Server
The steps to run the network are as follows:
The solution we propose begins with a
timestamp server. A timestamp server works • New transactions are broadcast to all nodes.

by taking a hash of a block of items to be


• Each node collects new transactions into a
timestamped and widely publishing the hash,
block.
such as in a newspaper or Usenet post. The
timestamp proves that the data must have • Each node works on finding a difficult
existed at the time, obviously, in order to get proof-of-work for its block.
into the hash. Each timestamp includes the
previous timestamp in its hash, forming a • When a node finds a proof-of-work, it

chain, with each additional timestamp broadcasts the block to all nodes.

reinforcing the ones before it.


• Nodes accept the block only if all
transactions in it are valid and not already
spent.

• Nodes express their acceptance of the block


by working on creating the next block in the
chain, using the hash of the accepted block as
the previous hash. Nodes always consider the
longest chain to be the correct one and will
keep working on extending it. If two nodes
broadcast different versions of the next block
simultaneously, some nodes may receive one
Figure 1.4: Timestamp of Bitcoin or the other first. In that case, they work on
the first one they received, but save the other
branch in case it becomes longer. The tie will

5
be broken when the next proof of work is Figure 1.5: Disk Space
found and one branch becomes longer, the
1.2.1.5 Simplified Payment Verification
nodes that were working on the other branch
will then switch to the longer one.

1.2.1.4 Reclaiming Disk Space

Once the latest transaction in a coin is buried


under enough blocks, the spent transactions
before it can be discarded to save disk space.
To facilitate this without breaking the block's
hash, transactions are hashed in a Merkle
Tree, with only the root included in the block's
hash. Old blocks can then be compacted by
stubbing off branches of the tree. The interior
hashes do not need to be stored. A block
header with no transactions would be about 80
bytes. If we suppose blocks are generated
every 10 minutes, 80 bytes 6 24 *365 4.2MB
per year. With computer systems typically
selling with 2GB of RAM as of 2008, and
Moore's Law predicting current growth of
1.2GB per year, storage should not be a
problem even if the block headers must be
kept in memory.

6
It is possible to verify payments without
running a full network node. A user only
needs to keep a copy of the block headers of
the longest proof of work chain, which he can
get by querying network nodes until he's
convinced he has the longest chain, and obtain
the Merkle branch linking the transaction to
Figure 1.6: Payment Verification
the block it's timestamped in. He can't check
the transaction for himself, but by linking it to
1.2.2 Ethereum
a place in the chain, he can see that a network
node has accepted it, and blocks added after it If we will be writing raw requests to the
further confirm the network has accepted it. Ethereum network ourself in order to interact
As such, the verification is reliable as long as with our contracts, we do soon realize that
honest nodes control the network, but is more writing these requests is clunky and
vulnerable if the network is overpowered by cumbersome. As well, we might find that
an attacker. While network nodes can verify managing the state for each request we have
transactions for themselves, the simplified made is complicated. Fortunately, Truffle
method can be fooled by an attacker's takes care of this complexity for us, to make
fabricated transactions for as long as the interacting with our contracts a breeze. The
attacker can continue to overpower the Ethereum network makes a distinction
network. One strategy to protect against this between writing data to the network and
would be to accept alerts from network nodes reading data from it, and this distinction plays
when they detect an invalid block, prompting a significant part in how we write your
the user's software to download the full block application. In general, writing data is called a
and alerted transactions to confirm the transaction whereas reading data is called a
inconsistency. Businesses that receive call. Transactions and calls are treated very
frequent payments will probably still want to differently, and have the following
run their own nodes for more independent characteristics.
security and quicker verification.
BITCOIN  SHA256

ETHEREUM  ETHASH

7
1.2.2.1 Transaction

Transactions fundamentally change the state


of the network. A transaction can be as simple
as sending Ether to another account, or as
complicated. as executing a contract function
or adding a new contract to the network. The
defining characteristic of a transaction is that Figure 1.9: Ethereum Transaction
it writes (or changes) data. Transactions cost
Ether to run, known as 'gas', and transactions 1.3 Smart Contracts
take time to process. When we execute a
A contract is an agreement with obligations
contract's function via a transaction, you
which are enforced by law. It is the basic
cannot receive that function's return value
building block of a free market economy. It is
because the transaction isn't processed
used in busi- ness, marriage, politics, ete. The
immediately. In general, functions meant to be
digital revolution has brought new ways to
executed via a transaction will not return a
formalize the relationships and contracts. The
value, they will return a transaction id instead.
Block Chain has been introduced in 2008 as a
So in summary, transactions:
digital technology that supports the
• Cost gas (Ether) verification, execution and recording of
transactions between different parties. It is a
• Change the state of the network novel solution to the age old human problem
of trust. A Block Chain comprises a digital
• Are not processed immediately
network and distributed ledger that track
• Would not expose a return value (only a monetary transactions. It is a distributed
transactionid). database that records transactions in the
network. It is regarded as a breakthrough
technology that can benefit many sectors. Us-
ing Block Chain technology for smart
contracts makes them tamper-proof, secure,
transparent. A smart contract is a software
program that add lay- ers of information onto
8
the transactions being executed on a Block nature, (2) software implementation, (3)
Chain. Of all the five cryptocurrencies, the increased certainty, (4) conditional nature, (5)
Ethereum is by far the most successful Block self-performance, (6) self-sufficiency. The
Chain with smart contracts in mind. Although smart contract system is illustrated To deploy
smart contracts can be encoded on any Clock a smart contract in Ethereum, a special
Chain. Ethereum is mostly used. The term creation transaction is executed. This
Smart Contracts was coined in 1994 by introduces a contract to the Block Chain.
American computer scientist Nick Szabo, who During this procedure, the contract is assigned
realized that the decentralized ledger could be a unique ad- dress and its code is uploaded to
used for smart contracts. Smart contracts are the Block Chain. Once successfully created, a
programmable contracts that are capable of smart contract is identified by a contract
automatically enforcing themselves when pre- address. The Ethereum address identity is
defined conditions are met. A smart contract is assigned to every individual participating in
an agreement between parties involved in a the transaction. Each contract holds some
transaction that holds each party responsible. amount of virtual coins and is associated with
Smart contracts help in exchanging money, its pre- defined executable code.
property, or any valuable thing in a Cryptography plays a crucial role in this in
transparent, conflict-free manner while that it is used for enforcement. The initiator of
avoiding the services of a middleman such a a transaction pays a fee (gas) for its execution,
bank, a lawyer or a notary. often measured in units of gas. Smart
contracts automatically per- form the contract
1.3.1 How Smart Contracts Work terms according to the received information.
The parties reach an agreement on the
A smart contract is a user-defined program
contents of the contract and perform the con-
running on top of a Clock Chain. Smart
tracts according to the behaviours written in
contracts allow the execution of credible
certain computer algorithms.
transactions between mutually distrusting
agents, without third parties. The major Smart contracts are self-executable and self-
objective of smart contracts is to provide verifying agents that cannot be changed once
security that is superior to traditional contract deployed in the Block Chain. Smart contract
law while reducing transaction cost. Smart checks to see if participants in a transaction
contracts have features: (1) solely electronic

9
comply with the rules predefined in the smart enough to attract adversaries. Their correct
contract. execution is crucial against attackers who may
want to steal the as- sets.
1.3.2 Benefits and Challenges

The key characteristic of a smart contract is


Chapter 2
that its contents cannot be manipulated, and its
History
execution cannot be prevented. A smart
contract cuts out discrepancies that typically  1990  The concept of distributed
occur with tradition contract processing which computing has been around since
may lead to costly lawsuits. Block Chain is 1990’s.
not just about eliminating the middleman.  2009  Nakamoto Developed bitcoin
Block Chain could disrupt markets and drives & introduced the notion of blockchain
cost savings by reducing labor-intensive to use decentralized and distributed
processes and eliminating duplicate effort. Its ledger.
transparency, security, and efficiency make it  2011 – 2012  The deployment of
a particularly good choice for re- shaping cryptocurrency in practical
businesses. Smart contracts are dis- applications related to cash.
intermediated and anonymous transaction.  2012 – 2013  Currency and digital
They offer the promise of increased payments.
commercial efficiency, lower transaction and  2017 – 2018  Blockchain has
legal costs. They may eliminate human bias emerged in various applications with
and reduce the need for lawyers. Smart further development.
contracts are not immune from errors,
omissions, or fault. The technology has yet to
be fully developed, meaning that the spectrum
of possible applications has not been fully
explored. Ethereum (launched officially in
June 2015) and the security of its smart
contracts are in their infancy stage. Smart
contracts can handle hold millions of dollars,
easily making financial incentives high Figure 2 : Anatomy of Blockchain Technology

10
distributed manner suffer from the data
synchronization issue, which is well
summarized as the Byzantine Generals
Problem. In other words, the participants in
Chapter 3
the decentralized ledger system need to

Related Work achieve consensus, an agreement upon every


message being broadcast to each other.
3.1 Decentralized Application
A common Byzantine fault tolerance can be
Block Chain technology has attracted achieved if the Loyal Gener- als, the honest
tremendous attention in both academia and peers in our context, have a majority
capital market. However, overwhelming agreement on their decisions. Nevertheless,
speculations on thousands of available intruders may perform Sybil attack to control
cryptocurrencies and numerous initial coin a substantial fraction of the public system by
offering (ICO) scams have also brought representing multiple identities, which may
notorious debates on this emerging lead to a critical Double Spending issue in the
technology. This re- port traces the Block Chain empowered decentralized ledger.
development of Block Chain systems to reveal
the importance of decentralized applications
(Daaps) and the future value of Block Chain.
We survey the state-of-the-art Daaps and
discuss the direction of Block Chain
development to full fill the desirable
Figure 3.1: Example of DAAP
characteristics of Daps. The readers will gain
an overview of Daap research and get familiar 3.1.2 Decentralized Ledger
with recent developments in the Block Chain. Bitcoin is representative of the classic Block

3.1.1 Synchronisation Issue Chain system. As the first decentralized


ledger, it has attracted more than ten thousand
Centralized systems are criticized for their
nodes to establish the largest market
vulnerability, due to the single- point-of-
capitalization among all cryptocurrencies.
failure (SPOF) issue. By contrast,
Ideally, a deployed Dapp will need no
decentralized systems implemented in a

11
maintenance and governance from the original • No Central Point of Failure, A fully
developers. In other words, an ideal Block decentralized system should have no central
Chain application or service should be point of failure since all components of the
operable without any human intervention, applications will be hosted and executed in the
which forms a Decentralized Autonomous Block Chain.
Organization (DAO) A DAO is an
organization that is run through rules encoded
as smart contracts running on the Block 3.2 Truffle
Chain. Due to its autonomous and automatic
A world class development environment,
nature, a DAO's cost and profit are shared by
testing framework and asset pipeline for Block
all participants by simply recording all
Chains using the Ethereum Virtual Machine
activities into the blocks. In fact, Bitcoin, the
(EVM), aiming to make life as a developer
most classic Block Chain system, is an
easier. With Truffle, you get:
example of a DAO. According to the
definition of Daaps in Daaps are characterized • Built-in smart contract compilation, linking,

by four properties as follow: deployment and binary management.

• Open Source, due to the trusted nature of • Automated contract testing for rapid

Block Chain, Dapps need to make their codes development.

open source, so that audits from third parties • Scriptable, extensible deployment migrations
become possible. framework.

• Internal Cryptocurrency Support, internal • Network management for deploying to any


currency is the vehicle that runs the ecosystem number of public private networks.
for a particular Daap. With tokens, it is
• Package management with EthPM NPM,
feasible for a Daap to quantify all credits and
using the ERC190 standard.
transactions among participants of the system,
including content providers and consumers. • Interactive console for direct contract
commmication.
• Decentralized Consensus, the consensus
among decentralized nodes is the foundation • Configurable build pipeline with support for
of transparency. tight integration

12
• External script runner that executes scripts  To create a bare Truffle project with
within a Truffle environment. no smart contracts included, use
truffle init.
 We can use an optional force to
initialize the project in the current
directory regardless of its state (e.g.
even if it contains other files or
directories). This applies to both the
init and unbox commands. Be careful,
this will potentially overwrite files
that exist in the directory.
 Once this operation is completed, we
Figure 3.3: Truffle
will now have a project structure with
3.2.1 Creating a Project the following items:
 contracts/: Directory for Solidity
To use most Truffle commands, we need to
contracts
run them against an existing Truffle project.
 migrations/: Directory for scriptable
So the first step is to create a Truffle project.
deployment files
You can use Truffle Boxes, which are example
 test: Directory for test files for testing
applications and project templates. We can use
your application and contracts
the MetaCoin box, which creates a token that
 truffle-config.js: Truffle configuration
can be transferred between accounts:
file
Create a new directory for your Truffle
project:

 Mkdir Metacoin 3.2.1.1 Testing Your Contract


 Ed Metacoin
 Download (unbox) the MetaCoin box: Truffle comes standard with an automated
 truffle unbox metacoin testing framework to make testing our
 We can use the truffle unbox ¡box- contracts a breeze. This framework let us
namez command to download any of write simple and manageable tests in two
the other Truffle Boxes. different ways. In Javascript and TypeScript,

13
for exercising our contracts from the outside later recall. To accomplish this, click the
world, just like our application. In Solidity, for SAVE button near the upper right of the
ex- ercising our contracts in advanced, bare- screen when in the Quickstart workspace. You
to-the-metal scenarios. Both styles of tests will be taken to the options screen to
have their advantages and drawbacks. Truffle configure your workspace.
test Alternatively, you can specify a path to a
specific file we want to run. Truffle provides a Chapter 4
clean room environment when running our
test files. When running our tests against
Ganache or Truffle Develop, Truffle will use Key Features
advanced snap- shotting features to ensure  Decentralization
your test files don't share state with each other.  Transparency
When running against other Ethereum clients  Immutability
like go-ethereum. Truffle will re-deploy all of  Security
our migrations at the beginning of every test  Consensus Mechanism
file to ensure that we have a fresh set of
4.1 Consensus Mechanism
contracts to test against. Both Ganache and
Truffle Develop are significantly faster than Blockchain network rely on consensus
other clients when running automated tests. algorithms to validate transactions and ensure
Moreover, they contain special features which data integrity.
Truffle takes advantage of to speed up test Most Common:
runtime by almost 90.
 Proof of Work (PoW) : Requires
miners to solve complex mathematical
3.2.2 Creating Workspace
problems, which ensures security but
consumes significant computational
As mentioned above, the Quickstart
power.
workspace resets the Block Chain on every
restart. Perhaps we found ourselves
prototyping in the Quickstart workspace to try
out a couple of things, but then we want to
save the Block Chain as a new workspace for
14
Figure 4.1: BITCOIN

 Proof of Stake (PoS) : Participants Figure 4.1 : DPoS


lock a certain amount of
cryptocurrency as a stake and are
randomly chosen to validate new 4.2 Certificate Verification

KEY USES :
 Immutable Records : Certificate
stored on a blockchain are immutable ,
meaning that cannot be altered or
tampered with once recorded.
 Verification: All transactions and
changes made to the certificates can be
transactions.
tracked and audited. This allows
employers and institutions to verify the
Figure 4.1 : ETHEREUM
authenticity of certificates easily.
 No Central Authority: Blockchain
 Delegated Proof of Stake (DPoS) :
operates on a decentralized network.
Similar to PoS but allows token
This reduces the reliance on a central
holders to vote on a small group of
authority, minimizing the risk of fraud
validators to secure the network on
or errors.
their behalf .

15
 Cost-Effectiveness: By automating
verification processes and eliminating
the need for intermediaries,  Security: Blockchain uses hashing

organizations can save time and techniques to store each transaction on

money. a block that tis connected to each other

 Data Protection: Blockchain so it has tighter security.

technology uses cryptography to


secure data from hacking.  Permanent: Records or information
which is stored using t is permanent
means one needs not worry about
losing the records.

 Efficiency: It removes any third-party


intervention between transactions and
removes mistake making system
efficient and faster.
Figure 4.2 : Certificate Verification

 Cost Reduction: It needs no third man

Chapter 5 so it reduces cost for business.

Advantages : 5.1 Applications


 Open: It is accessible to all means
 Cryptocurrencies :
anyone can become a participant in
contribution of blockchain technology.

 Verifiable: It stores information in


decentralized manner so everyone can
verify the correctness of information
by using zero-knowledge.

16
agreement directly written into code.
They are stored and executed on
blockchain networks, enabling
automatic, transparent, and secure
transactions without intermediaries.
Smart contracts are a cornerstone of
blockchain technology, particularly in
platforms like Ethereum.
Cryptocurrency is a type of digital or
virtual currency that uses
 Supply Chain :
cryptographic techniques for security
and operates on decentralized
networks, typically blockchain
technology. Unlike traditional
currencies issued by governments (like
USD or INR), cryptocurrencies are
generally decentralized, meaning they
Supply chain management (SCM)
are not controlled by any central
refers to the process of managing the
authority.
flow of goods, information, and
finances as they move from suppliers
 Smart Contract :
to manufacturers, wholesalers,
retailers, and finally, consumers. A
well-optimized supply chain ensures
efficiency, cost-effectiveness, and
timely delivery of products or services.

 Real Estate :

Smart contracts are self-executing


contracts with the terms of the

17
Real estate in blockchain technology is
transforming the industry by
introducing transparency, efficiency,
and security in transactions.
 Healthcare :
Chapter 6

Disadvantages
 Scalability: It cannot be scaled due to
the fixed size of the block for storing
information.

 Energy Consumption: For verifying


any transaction a lot of energy is used.

Ensures the secure and efficient  Regulatory Issues: To add next block

management of patient data and the chain miners need to compute

medical records. nonce values many times.

 Legal-Formalities: In some countries,


the use of blockchain technology

18
applications is banned like bitcoin due world has found applications of blockchain
to some environmental issues. technology in several industries, where the
trust without the involvement of a centralized
 Storage: It stores all nodes of network authority is desired. So welcome to the world
creates an issue with storage and of Blockchain. Blockchain technology is only
increasing transactions will requires going to grow in the fields of business,
more storage. finance, law, medicine, and real estate.
Whether you're an experienced Blockchain
developer, or you're aspiring to break into this
exciting industry, enrolling in our Blockchain
Certification Training program will help
individuals with all levels of experience to

Chapter 7 learn Blockchain developer techniques and


strategies.

Conclusion and Future Work


Chapter 8
In this report, I have learned about Block
Chain Technology in detail, And working, References
development of Smart Contracts. It may be
regarded as a computer program that regulates [1] V. Shermin. "Disrupting governance with
and automates the relationship between two or blockchains and smart con- tracts," Strategic
more non trusted parties. I have also learned Change, vol. 26, no. 5, 2017, pp. 499-509.
about current working scenario of Block
Chain development, including payment [2] K. Delmolino et al., "Step by step towards
channels and non public Block Chain. In creating a safe smart contract: Lessons and
future i want to develop a working project on insights from a cryptocurrency lab,"
the concept of Smart Contract and Proceedings of the International Conference
Decentralized Application. on Financial Cryptography and Data Security,
The Bitcoin is the first successful Springer 2016, pp. 79-94.
implementation of blockchain. Today, the

19
[3] M. Nofer, P. Gomber, O. Hinz, and D.
Schiereck, "Blockchain," Business
Information Systems Engineering, vol. 59, pp.
183-187, Jun 2017.

[4] A. L. Beberg, D. L. Ensign, G.


Jayachandran, S. Khaliq, and V. S. Pande,
"Folding@home: Lessons from eight years of
volunteer dis- tributed computing." in 2009
IEEE International Symposium on Parallel
Distributed Processing, pp. 1-8, May 2009.

20

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy