0% found this document useful (0 votes)
12 views43 pages

Unit 1 Slides

Uploaded by

meetkakadiya005
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)
12 views43 pages

Unit 1 Slides

Uploaded by

meetkakadiya005
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/ 43

Unit I - Introduction to

Blockchain Technology
Text Book:
Mastering Blockchain
Unlocking the Power of Cryptocurrencies and Smart Contracts
Authors
Lorne Lantz & Daniel Cawrey
Electronic Systems and Trust
• Initially, in 1960, the internet was a simple, relatively small network
• It was primarily used as a tool for university researchers and the US
government to share information digitally
• With time TCP/IP model and other protocols came into existence such as
HTTP and SMTP
• Thus, electronic systems evolved
• However, using online services and products require use of Trusted Third
Parties – TTP (intermediaries)
• These TTPs act as trusted gatekeepers
• In general, electronics systems require two types of trust
• Intermediary Trust: A third party is relied on to make rational and fair decisions
• Issuance Trust: A third party is relied on to ensure the safety and security of any value.
Centralized – Decentralized – Distributed
• Internet today is mix of
centralized and distributed
applications
• Internetworks were designed as
distributed system initially with
the goal that
• if one part of the system were
attacked, remaining part would
still be able to operate
• In the recent times, companies
such as Google, Facebook, Apple,
and Amazon have dominated and
turned the internet into more
centralized system
Centralized System
No need for Easy monitoring, Established legal
multiple maintenance, and frameworks for
infrastructure controllability auditing and
High physical
facility compliance
security since
housed at
fixed locations Supports
closed
markets and
businesses

Anshuman Kalla
Issues with Centralized
Systems and Database
• Loss of ownership
• Single point-of-failure
Centralized in
• Not open and limited access
Nature
• Availability issue due to
down time

• Authoritative entities
Third Party • Processing delay
Invocation • Fee
• Privacy Issue
Centralized System – An Example
Decentralized System
• In a fully decentralized system, a given node does not
necessarily collaborate with every other node to achieve its
objective –> No collaborative decision
• In fact, every node makes its own decision and hence, has different
clocks that they run and follow
• The final behavior of the system is driven by the consensus
established among the majority of the nodes
• There is no single entity that receives and responds to the
request → No Single ownership
• Nodes are connected using Peer-to-Peer (P2P) architecture
• Nodes have different ownership and controllability
• Nodes are usually anonymous (i.e., do not know each other’s
identity)
Decentralized System – An Example

In a decentralized database, like Bitcoin’s


Blockchain,
• each node can maintain a replica of the
same data,
• each node may not know the identity of
other nodes (i.e. anonymous), and
• all nodes are controlled by different
entities which are anonymous
Decentralized System
Advantages
• High Availability – Always there are some nodes which are available/online for
work, leading to high availability
• Improved Fault Tolerance: Decentralized systems are designed to be fault
tolerant, meaning that if one or more nodes fail, the system can still continue
to function
• Increased Transparency: Decentralized systems often have a transparent and
open structure, which allows for greater accountability and trust
• Higher Autonomy and Control over Resources – As each node controls its own
behavior, it has better autonomy leading to more control over resources.
Distributed System
• In the field of computing, a distributed system is one where
computation is shared across a number of computing
resources
• The common goal is to use processing power to collectively
accomplish a task by distributing responsibility across many
computers
• These systems communicate with one another using some
form of messaging
• Synchronization issues: Data consistency and synchronization
across all nodes can be a challenge
• Distributed systems require a complex network infrastructure
to operate, which can be difficult to set up and maintain
Distributed System – An Example

In a distributed database, like multiple


databases hosted on Amazon Web Services
(AWS),
• each node can maintain a replicated
copy of the same data,
• each node knows the identity of other
nodes (thus not anonymous), and
• all nodes are controlled by one entity
Bitcoin Predecessors

12
DigiCash
• DigiCash was founded by David Chaum in 1989
• The motive of DigiCash was to enable anonymous online digital payments
• Chaum invented the blind signature technology, which allowed privacy-
protected (anonymous) payments.
• The DigiCash platform had its own currency, known as cyberbucks
• At the time of signup users would receive $100 in cyberbucks, which were often
referred to as tokens or coins
• The company pioneered secure microchipped smart cards, similar to the
system used in most credit cards today
• It was also an early innovator in terms of the concept of a digital wallet for
storing value—in this case, cyberbucks.
DigiCash
• Many privacy-conscious users did begin using cyberbucks
• However, it was never able to achieve traction due to lack of merchants,
though, and DigiCash ultimately filed for bankruptcy in 1998.
E-Gold
• E-gold was established in 1996, and the digital value was backed by real units
of precious metal.
• E-gold was operated by a company called Gold & Silver Reserve
• Everything on the E-gold platform was denominated in units of gold or other
precious metals.
• E-gold enabled instant transfers between its users on the internet.
• With denominations as small as one ten-thousandth of a gram of gold, the
platform was the first to introduce the concept of making micropayments, on
the internet.
• Innovative for the time, E-gold also offered developers an API that allowed
others to create additional services on top of the platform.
• Merchants accepted E-gold as a form of payment alongside credit cards in
online shopping carts.
E-Gold
• By 2006 there were over 3.5 million E-gold accounts. At that time, the
company was processing $5.9 million in daily volume.
• Issues:
• As a centralized system, E-gold had no mechanism to tie accounts to
anyone’s identity.
• The platform was being used for nefarious purposes, facilitating money
laundering, online scams, and other illegal activity.
• The US government shut down E-gold in 2008, seizing its assets and
establishing a system of redemption for account holders.
Hashcash
• Hashcash was invented by Adam Back in 1997
• It was designed to solve the problem of Email spam and Denial-of-Service
(DoS) attack
• Hashcash is a cryptographic hash-based proof-of-work algorithm that
requires sender to produce some kind of verifiable output know as stamp
• Before sending an email, hashcash stamp is added to the header of an email
to prove the sender has utilized a modest amount of resources, power and
CPU time calculating the stamp
• For receiver, it takes negligible amount of effort to verify the work (i.e. stamp)
of the sender
Hashcash
Summary
• In general, the spammers want to send large numbers of emails with very
little cost per email
• Now with hashcash if there is even a small cost for each spam they send then
they will cease to be profitable
• Receivers can verify whether a sender made such an investment and use the
results to help filter email.
• For hashing, Hashcash used SHA1 algorithm
B-Money
• B-Money was proposed by Wei Dai in 1998
• B-Money introduced the concept of using computer science to create money
outside the governmental systems.
• B-Money advanced the idea of broadcasting secure transactions to a
network.
• For example, if one party wanted to pay another, a message would be sent to the
network saying, “Person 1 will send $X to Person 2.”
• The system would be enforceable via a system of digital contracts.
• B-Money would use cryptography instead of a centralized system for both
payments and the enforcement of contractual issues,
• enabling users of the network to be anonymous; no identity would be required.
B-Money
• There are many concepts put forward by B-Money
• Idea of contracts to provide order to an anonymous and distributed system

• The concept of using proof-of-work to create money

• B-Money was mostly just a theoretical exercise by Wei; it was not


implemented
Bit Gold
• Bit gold was proposed in 2005 by computer scientist Nick Szabo
• Bit gold was never implemented, but has been called "a direct precursor" to the Bitcoin
architecture
• Nick’s idea came after the advent of E-gold, which used gold to back digital value.
• Szabo pointed out that materials such as gold have value and are “unforgeable,” or very
difficult to counterfeit due to their rarity and fixed costs such as mining and
transportation.
• In bit gold, a participant would dedicate computer power for solving cryptographic puzzles
• In a bit gold network, solved puzzles would be sent to the Byzantine fault-tolerant public
registry and assigned to the public key of the solver.
• Each solution would become part of the next challenge, creating a growing chain of new
property.
• This provided a way for the network to verify and time-stamp new coins, because unless a
majority of the parties agreed to accept new solutions, they couldn't start on the next
puzzle
Bitcoin Experiment

22
Bitcoin Experiment
• By 2008, the world was already relying on the internet for many services such as
Email, Skype, GPS, and WhatsApp
• In addition, e-commerce and m-commerce started in full swing
• Buying and selling of goods online and with e-payments

• Then, the 2008 financial crisis happened


• This recession period was big shock because financial system was still centralized and thus lacks
transparency

• On 18 August 2008 the domain bitcoin.org was registered


• Then, on 31 Oct 2008 the paper titled “Bitcoin: A Peer-to-Peer Electronic Cash System”
was published by pseudonym pseudonym Satoshi Nakamoto
• The aim was to create a digital currency that could operate without any connection to
a bank or central government
Bitcoin Experiment – Building by Taking Ideas From Predecessors
Bitcoin took number of ideas and techniques from its predecessors
• From DigiCash → Use of cryptography for secure and anonymous digital
transactions
• From E-gold → Ability to send small amounts of secured value (micropayments)
• From B-Money → The creation of money outside of governmental systems
• From Hashcash → Use of proof-of-work to verify validity of digital funds
Note:
• Most of the underlying technologies and techniques used in Bitcoin already
existed before,
• Satoshi Nakamoto (the inventor) only powerfully combined them together to
make Bitcoin most successful Bitcoin cryptocurrency.
Bitcoin – The Cryptocurrency

Bitcoin is first cryptocurrency (aka crypto)

It is digital virtual currency with no central control of government

Created by Satoshi Nakamoto in year 2008

First bitcoin transaction took place in 2009 when Hal Finney received 10
BTC from Satoshi

Its implementation is available as open source


Bitcoin – The First Commercial Transaction

• First retail transaction happened in


2010 when two pizzas were bought
for 10,000 BTC
• Bought by Laszlo and paid to
Jeremy who is reported to be 19
year old then
• This data is celebrated as Bitcoin
Pizza Day by the Bitcoin
community
• Source: Business Today News dated 17
June, 2022
https://www.businesstoday.in/crypto/s
tory/two-pizzas-for-rs-2260-crores-12-
years-of-the-bitcoin-pizza-day-334204-
2022-05-19
Bitcoin – The First Commercial Transaction

• Source: By John Edwards Updated


April 05, 2023, Reviewed by Julius
Mansa, Fact checked by Suzanne
Kvilhaug, at Investopedia
https://www.investopedia.com/ar
ticles/forex/121815/bitcoins-
price-history.asp

• Value as of today in INR is


23,71,554.99
What is Blockchain?

Data
Technology?
Structure?

?
Anshuman Kalla 28
What is Blockchain?

Set of Transactions Blockchain

Block Blocks connected using logical hash-based chain


Blockchain
Ledger (that holds all the transactions that occurred
Distributed Ledger Technology (DLT) in past) in secure and distributed way.
Blockchain
Ledger (that holds all the transactions that occurred
Distributed Ledger Technology (DLT) in past) in secure and distributed way.

Transactions bundled together into units called as


blocks
Data structure view-point Blocks are linked together (in the order of their
creation) using cryptographic chain of hashes
Blockchain
Ledger (that holds all the transactions that occurred
Distributed Ledger Technology (DLT) in past) in secure and distributed way.

Transactions bundled together into units called as


blocks
Data structure view-point Blocks are linked together (in the order of their
creation) using cryptographic chain of hashes

Powerful mix of technologies and concepts


Cryptography → PKI, Hashing, DS, MT, etc.
Technology view-point
P2P Networking
Consensus algorithms and economic models
Distributed Ledger
Technology (DLT)
• Definition by Financial Conduct Authority (FCA), UK:
“A set of technological solutions that enables a
single, sequenced, standardised and
cryptographically-secured record of activity to be
safely distributed to, and acted upon by, a network
of varied participants.”
• Digital ledger that is distributed across all the nodes in
a decentralized P2P network
• The ledger is
• Immutable
• Shared
• Synchronized
• Cryptographically sealed and secure

Source: Discussion Paper on Distributed Ledger Technology, 2017 https://www.fca.org.uk/publication/discussion/dp17-03.pdf


Storing Data In Chain of Blocks
• Bitcoin blockchain introduced the concept of tracking transactions using a chain of
cryptographic hashes
• A block containing set of valid transactions is created after every unit of time (or
time frame)
• A newly created block is logically connected with the most recent block using a
cryptographic hash-based chain
• Thus, as the blocks are created with time, they are organized in chronological order
• The blockchain ledger (or database) is distributed among all the nodes in the
blockchain network
• Thus, blockchain does not require any single entity to keep track of transactions
• Instead, the chain of blocks, or blockchain, uses cryptographic mathematical trust to
keep track of transactions in a decentralized digital system
New Concepts & Terminologies
Block Hash
• A block hash is computed by hashing the block header
• Thus, it is a unique identifier of each block
• Every block stores the block hash value of previous block
• Thus, in Bitcoin block does not contain its own block hash, but it does contain the hash of
the previous block it is building on
• Hence the name blockchain → blocks are chained with a hash-based cryptographic chain
• The block hash is generated from input data that provides a snapshot of the current state
of the blockchain within 256 bits of data.
New Concepts & Terminologies
Coinbase Transaction
• This is the first transaction of each new block mined on the network.
• It adds new bitcoin to the supply, which is given as a reward to the miner who adds
the block to the chain
Block Height Number
• This number identifies how many blocks there are between the current block and
the first block in the chain (also known as the Genesis block).
Nonce
• Nonce is number used once.
• It is a random number which is used in conjunction with the other fields in the
block header to compute the hash of block's header which matches the target
range.
New Concepts & Terminologies
Double Spending
• The risk that a unit of currency is spent more than once via falsified
duplication.
Interesting Questions
Question 1
• Since anyone can participate in Bitcoin blockchain and participate in mining
the system consists of multiple parties which are not knowing each other
• Then, How these multiple parties who do not know each other and do not
trust each other can collaborate
• In other words, how such an anonymous and decentralized system can work
fairly?
Question 2
• How can bitcoin blockchain ledger which is acted upon by multiple parties is
valid and accurate (remains in sync)?
Public/Private Key Cryptography
• Blockchain uses public/private key cryptography for its secure working
• Private key is used to digitally sign every transaction in blockchain
• It is the way a user proves the rightful ownership of an address to the
blockchain network
• It kept secret with the user and not shared
• Public Key used to generate a public address
• Public address is a compressed version of public key
• Thus, public address (or compressed public key) can be shared with
everyone
Generating Keys and Bitcoin Address
• A private key is usually 256-bit number and mostly shown in hexadecimal format
• Private key is chosen at random by using a function to generate a random number
• The corresponding public key can be generated by running the private key through
an Elliptic Curve Digital Signature Algorithm (ECDSA) secp256k1 function
• The double hash of public key is then generated by running the public key through
first SHA256 and then RIPEMD160 functions (output is 160 bits or 20 bytes)
• Prefix this hash with 00 and then run through Base58Check encoding
• The result is Base58Check Encoded Public Key Hash which is bitcoin address
Introduction to Transaction in Bitcoin
• Bitcoin transactions follow a unique type of accounting called UTXO, which stands
for unspent transaction output
• A transaction is basically a list of inputs and a list of outputs
• Each input has
• a Bitcoin address that is acting as the source of funds, plus
• an unspent transaction that address has received in the past and
• a digital signature which proves the ownership of the address
• Every output identifies
• the Bitcoin address receiving the funds and
• the amount that address will receive
Compelling Components of Bitcoin Blockchain
1. Open Source
• No single entity or group has proprietary right of the software
• Common users and developers have the source code of the Bitcoin

2. Value
• A unit of account, called bitcoin (often denoted as BTC), is used to record transactions on the
ledger

3. Decentralization and Distributed


• From system point-of-view blockchain is decentralized system
• From ledger point-of-view blockchain has distributed ledger

4. Consensus
• It is a mechanism to establish the agreement among the nodes participating in the blockchain
network about the current status of blockchain database (i.e., ledger).
Why and how it is difficult to alter a
block or a transaction in blockchain?

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