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

Blockchain I

The document discusses blockchain technology and its components. It explains that blockchain is a distributed, replicated ledger of transactions or digital events that is maintained across a peer-to-peer network. Key components include nodes that maintain copies of the ledger, a distributed public ledger, digital wallets for managing cryptocurrency, and cryptographic tools like hashing and nonces that ensure security and uniqueness of transactions. A variety of industries could benefit from applications of blockchain technology.

Uploaded by

pumpkin.baba123
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Blockchain I

The document discusses blockchain technology and its components. It explains that blockchain is a distributed, replicated ledger of transactions or digital events that is maintained across a peer-to-peer network. Key components include nodes that maintain copies of the ledger, a distributed public ledger, digital wallets for managing cryptocurrency, and cryptographic tools like hashing and nonces that ensure security and uniqueness of transactions. A variety of industries could benefit from applications of blockchain technology.

Uploaded by

pumpkin.baba123
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Blockchain - I

Dr. Maumita Chakraborty


University of Engineering and Management Kolkata

Dr. Maumita Chakraborty, UEM Kolkata


Introduction

Dr. Maumita Chakraborty, UEM Kolkata


Blockchain
• Most sought-after technologies of today.
• Redefines how we store, update, and move data.
• Has the potential to revolutionize any business that stores structured
data.
• Some of the application areas of Blockchain:
• Banking and Finance
• Education
• Energy Sectors
• Healthcare
• Real Estates
• Supply Chain and many more
Dr. Maumita Chakraborty, UEM Kolkata
What is Blockchain?
• A Linked List
– Replicated
– Distributed
– Consistency maintained by Consensus
– Cryptographically linked
– Cryptographically assured integrity of data

Dr. Maumita Chakraborty, UEM Kolkata


What is Blockchain?

• Used as
– Immutable ledger of events, transactions or time stamped data
– Tamper resistant log
– Platform to create and transact in Cryptocurrency

Dr. Maumita Chakraborty, UEM Kolkata


Banking

Dr. Maumita Chakraborty, UEM Kolkata


How do we transact?
• We write a cheque or do internet transaction to pay a payee.
• Bank checks whether we have balance>transaction amount.
– If yes, it debits our account by balance-> balance -transaction_amount
• Credits Payee’s account by payee balance-> payee_balance + transaction_amount
– If no, the transaction is invalid and rejected.
• We can check our transaction list online, or check the monthly statement.
• Who maintains the ledger?
– Bank does
– What if Bank allows an invalid transaction
• Invalid-> We did not authenticate the transaction
• Invalid-> Our balance was not sufficient but transaction was made

Dr. Maumita Chakraborty, UEM Kolkata


Bank Frauds
• We find a cheque was used to pay someone but we never wrote it.
– Someone forged your cheque and/or signature.
• We did sign a cheque for x amount, but the amount field was modified.
– How do we prove to the bank that an extra 0 were not there during your signing time?
• The monthly statement says that we did a transaction but we did not recall or
the amount of a transaction is different from what we had done.
– Someone got your password, and possibly redirected OTP to another SIM (SIM Fraud)
– Bank employees themselves might have done something.
• How do we argue to the bank? (Non-repudiation)
• How do we argue that the amount was modified? (Integrity)
• Finally, do we tally our transactions when we receive our monthly statement?
– Most people do not.

Dr. Maumita Chakraborty, UEM Kolkata


Blockchain

• Blockchain is defined as a distributed, replicated peer-to-peer


network of databases that allows multiple non-trusting parties to
transact without a trusted intermediary and maintains an
evergrowing, append-only, tamper-resistant list of time-sequenced
records.

Dr. Maumita Chakraborty, UEM Kolkata


Evolution of Blockchain
• 1st Generation (2008-2013): Origin of Bitcoin
• Bitcoin became first application of Blockchain Technology
• Satoshi Nakamoto formed the Bitcoin Genesis block in 2009
• Bitcoin recognized as a digital currency (electronic equivalent of cash in a banking system)
• Problems in scalability, interoperability, and speed
• Bitcoin: one of the slowest cryptocurrency, taking about 10 mins to confirm a
transaction
• 2nd Generation (2013-2015): Transactions with Smart Contracts
• Vitalik Buterin releases Ethereum white paper in 2013
• Genesis block in Ethereum created in 2015
• Ethereum required lesser energy to maintain and had less than optimal speed

Dr. Maumita Chakraborty, UEM Kolkata


Evolution of Blockchain (contd.)
• 3rd Generation (2015-2018): Distributed Applications
• Arrival of Hyperledger from the Linux Foundation and Decentralized
Applications (Dapps) of Ethereum
• Focus was to bring greater interoperability and boost network speeds
• 4th Generation (2018-Future): The Future
• A scaled Blockchain is expected to accelerate processing speeds, without
sacrificing security
• Business-oriented hybrid Blockchain projects
• Integration with IoT, AI and Big Data

Dr. Maumita Chakraborty, UEM Kolkata


Blockchain Solution
• “A purely peer-to-peer version of electronic cash would allow online
payments to be sent directly from one party to another without going
through a financial institution. Digital signatures provide part of the
solution, but the main benefits are lost if a trusted third party is still
required to prevent double spending. We propose a solution to the
double-spending problem using a peer-to-peer network.”
- Part of the abstract from the paper “A Peer-to-Peer Electronic Cash
System."

Dr. Maumita Chakraborty, UEM Kolkata


Traditional vs. Blockchain Transactions
• Scenario 1: Simple transaction
• Joe hands a physical $50 note to Ann.
• Ann, in turn, hand over an item to Joe.
• Scenario 2: Traditional online transaction where
bank acts as central authority or intermediary
• Bank debits Joe’s account by $50 and adds $50 to Ann’s
account.
• Ann verifies credit in her account, sends Joe the item.
• No real money exchange.
• A credit and debit entry passed in bank’s centralized
database or ledger.
• Bank->trusted 3rd party for which it may collect a
transaction fee.
• Scenario 3: Blockchain Transaction
• Joe and Ann-> members of Blockchain network using
cryptocurrency, say Bitcoin.
• Joe initiates $50 transaction of Bitcoin.
• Ann receives $50 equivalent in crypto.
• Whole transaction done without any intermediary.

Dr. Maumita Chakraborty, UEM Kolkata


Traditional vs. Blockchain Transactions
• Inherent trust in peer-to-peer network makes Blockchain the
disruptive technology of today.
• Blockchain data is not limited to money, but can be used for anything
like proof of property, a loan certificate etc.
• Blockchain calls for potential elimination of 3rd parties like banks,
lawyers, brokers and others.

Dr. Maumita Chakraborty, UEM Kolkata


Terms used in Blockchain
• Distributed: Network configuration where every
participant can communicate with one another
without going through a centralized point.
• Replicated: Involves sharing information so as to
ensure consistency between redundant resources,
such as software and hardware components.
• Peer-to-peer network: Interconnected nodes or
peers share resources amongst each other without
any centralized administrative system (as exists in
Client-Server Network).
• Cryptocurrency: Evolved from words ‘crypto’
meaning concealed or secret and ‘currency’
indicating a system of money.
• Blockchain is the underpinning technology and the Bitcoin
was built on it.
• Bitcoin is a cryptocurrency, while Blockchain is a database
of information. Dr. Maumita Chakraborty, UEM Kolkata
Components of Blockchain
• Node: An electronic device (computers, mobile devices, servers etc.) connected to
Internet. All nodes in the network have a copy of the Blockchain ledger and are
interconnected.
• A Full Node: Node maintains a full copy of the transaction history of the Blockchain. They help to:
• Synchronize the Blockchain
• Process and accept transactions/blocks, validate and broadcast them to network
• A Partial/Lightweight/Light Node: Nodes (early users or those who do not have sufficient disk
space for the full Blockchain) maintain a partial copy of the ledger.
• Download only the block headers to validate authenticy of transactions.
• Rely on full nodes for latest headers, account balance and any transaction that affects their wallet.
• A Blockchain network needs to have more full nodes operating to make it truly trustless and
decentralized.
• Ledger
• Public: Anyone in Blockchain has access to it and can read or verify the transactions therein.
• Distributed: All nodes must have a copy of the Blockchain ledger. Follows principle of replication in
every node.
• Decentralized: No central control, no single point of failure. Traditional database works on central
principle integrity, the Blockchain works on the principle that anybody can validate the records.

Dr. Maumita Chakraborty, UEM Kolkata


Components of Blockchain
• Wallet: A digital wallet that allows users to manage cryptocurrency like bitcoin, ether etc.
• Privacy maintained: Whenever user creates a wallet, public and private keys generated. (Public key: Email ID,
Private key: Password)
• Secure Transactions: Private keys (used to send funds and to open encrypted messages) keep transactions
secure.
• Ease of Usage: Wallets installed and accessed from web, desktop or any mobile device. Transfer of funds
instantaneous without any geographical constraints or intermediaries like banks.
• Nonce: Number generated randomly that can be used just once in cryptographic communication.
Makes a transaction unique, to avoid duplicate transactions.
• Hash: Hash function can take data of any size, perform an operation on it, and return a ‘hash’ i.e.
a data of a fixed size.
• Creates an almost unique identifier. Used as identifiers for blocks, transactions and addresses.
• One directional: Hash function can take input of any length to create a fixed length output. But we cannot
take the output and recreate the input.
• Keeps database small: Storing hash of file, instead of the original file, reduces size of the database.
• In Bitcoin, Blockchain hashes are 256 bits.
• Hashing algorithm used in Blockchain is SHA-256. SHA stands for Secure Hash Algorithm generating a 256-bit
hash.

Dr. Maumita Chakraborty, UEM Kolkata


Components of Blockchain
• Mining: Mechanism by which
transactions are validated and
added to the Blockchain ledger.
• Done by nodes called “miners” in
Bitcoin world or “forgers” in
Ethereum world.
• Miners/forgers compete to solve a
complex mathematical problem
based on cryptographic hash
algorithm.
• Consensus Protocol: Set of rules to
validate all transactions before
being added to the Blockchain.
• Agreement between the nodes on
the network on the state of
Blockchain.
• PoW, PoS, PoA, PoET are some of
the consensus algorithms used in
Blockchain.

Dr. Maumita Chakraborty, UEM Kolkata


Characteristics of Blockchain

Dr. Maumita Chakraborty, UEM Kolkata


Blockchain as a Digital Ledger……..
• Distributed: Every participating node has a digital copy of the
Blockchain database, whereby all can contribute.
• Maintained by Consensus: Governance mechanisms to guarantee
that the data/records are legitimate and not tampered with.
Transactions are entered only with validation of data.
• Immutable: Records cannot be changed or deleted, once consensus is
reached. Subsequent changes recorded in a new transaction block.
• Auditable: Provenance of the asset by examination.

Dr. Maumita Chakraborty, UEM Kolkata


Blockchain is Trustless………..
• Decentralization: Data can be shared across a network of
computers/servers without the need for a central authority.
• Transparency: Data is open to everyone in the P2P network, i.e.
anyone can view the transactions.
• Privacy: User ID is kept private.
• Security: Transactions are secured using hash algorithms.

Dr. Maumita Chakraborty, UEM Kolkata


Block in Blockchain
• A record that contains the transaction data details. It comprises of the following details:
1. Hash of the block: Alphanumeric number to identify the block
2. Hash of the previous block
3. Timestamp
4. Nonce: Random number used to vary the value of the hash
5. Merkle Root: Hash of all the hashes of all the transactions in the block
6. Transaction data: Contains details of several transactions

Dr. Maumita Chakraborty, UEM Kolkata


Blockchain Transaction
Step-by-step representation of a Blockchain Transaction:

1. A node in the Blockchain network requests a transaction (via a wallet).


2. Transaction is broadcasted to all nodes in the network.
Features of Blockchain: 3. Transaction is validated/verified by the network using consensus algorithms (rules
• Blockchain is a digital ledger or set by specific Blockchain).
digital database. 4. Transaction is either accepted or rejected.
1. If accepted, transaction is added in chronological order along with other
• Blockchain ledger is distributed to all
the nodes in the network. transactions to create a new block of data.
5. Transaction is now a part of the Blockchain and is permanent and immutable.
• Blockchain is decentralized. All
nodes in the network can participate
in the processing and creation of a
block.
• A unique cryptographic key secures
every record on the Blockchain.
• Blockchain Demo
(demoblockchain.org)

Dr. Maumita Chakraborty, UEM Kolkata


A
Demo
Blockchain

Dr. Maumita Chakraborty, UEM Kolkata


A
Demo
Blockchain

Dr. Maumita Chakraborty, UEM Kolkata


Double Spending
• Double-spending is spending the money more than once (Duplicate crypto-coin or token and reuse it).
• Double-spending occurs when someone alters a blockchain network and inserts a special one that allows them to
reacquire a cryptocurrency.
• Double-spending can happen, but it is more likely that a cryptocurrency is stolen from a wallet that wasn't adequately
protected and secured.
• Many variations of attacks could be used for double-spending—51% is one of the most commonly cited attacks, while the
unconfirmed transaction attack is most commonly seen.
• Double spending remains a risk; however, it is minimized by the blockchain. The likelihood of a secret block being
inserted into the blockchain is very slim because it has to be accepted and verified by the network of miners.
• The only chance a miner with illicit intentions has of inserting an altered block is to attempt to get another user to
accept a transaction using their secret block and cryptocurrency. Even then, the likelihood that the modified block will
be accepted is very slim.
• The blockchain and consensus mechanism move so quickly that the modified block would be outdated before it was
accepted. Even if it was accepted, the network would still have passed up the information in the block and would reject
it.
• Cryptocurrency transactions take some time to verify because the process involves randomly selecting numbers to
solve the complex hash—this also takes up a great deal of computational power.
• It is, thus, exceedingly difficult to duplicate or falsify the blockchain because of the immense amount of computing
power needed to stay ahead of all of the other miners on the network.

Dr. Maumita Chakraborty, UEM Kolkata


Blockchain Layers

Dr. Maumita Chakraborty, UEM Kolkata


Blockchain Layers
• Presentation Layer:
• Door to users that give access to the whole network and Blockchain applications.
• The UI (User Interface) and UX (User Experience) of the Blockchain app come into play.
• A good UX design enhances customer satisfaction and loyalty, by improving product usability
and interaction between user and rest of Blockchain ecosystem. Can relate to faster speed,
relevant information, etc.
• A good UI design produces Blockchain visuals or graphical representations. Enhances user’s
experience with aesthetics, visual hints and icons leading to an intuitive interface.
• Application Layer:
• Combines business logic with user interactions.
• Consists of Decentralized Application, better known as Dapps running on a P2P network.
Dapps connects to the Blockchain via Smart Contracts (program containing set of rules and
criteria that automatically execute if/when the predefined conditions are met).

Dr. Maumita Chakraborty, UEM Kolkata


Blockchain Layers
• Blockchain Layer:
• Core of Blockchain.
• Consists of consensus algorithms (PoW, PoS, pBFT etc.), the medium, and
interface for the P2P network that decide how data is packed and transmitted
between peers.
• Controls mining layer, protocols that decide the consensus methods and
participation, nodes that execute protocols, and distributed ledger.
• Internet Layer:
• Blockchain works over Internet.
• Ties all the networks together, i.e. the computers, IoT devices, smartphones
etc.

Dr. Maumita Chakraborty, UEM Kolkata


Pros and Cons of Blockchain
• Decentralized and Distributed
• Blockchain technology works on the principle of ledger data distributed to all nodes that are non-hierarchical with no
single central control.

• Pros
- Removes any single point of failure by replicating the ledger on every node in the network.
- Better communication between nodes bring up transparency and faster consensus and synching of data.
- It allows for more engagement as everyone is involved in the decision-making process and keeping the network honest.

• Cons
- Sometimes, traditional database may be more suited and do the work a lot faster and cheaper.
- Specific and trusted third parties exist in some domains that may guarantee more efficient and specialized services using
other technologies.
- If a time-tested and fully functional database and the operational network is already in place, the benefits of replacing or
introducing Blockchain may not produce the required return-on-investment.
- Stronger players (nodes with higher computing power or with pooling) can take control of the network, impacting
decentralization.

Dr. Maumita Chakraborty, UEM Kolkata


Pros and Cons of Blockchain
• Trustlessness
• In Blockchain, cryptography completely replaces the need for third parties to ensure trust. Also, the complex consensus
protocols that are run within the Blockchain network to unanimously and securely agree on what should be added and
should not be added to the ledger secures it further, thus ensuring its integrity at all times.

• Pros
• Allows for multiple entities or key players who do not trust each other (i.e., unknown to each other or across borders) to
transact directly with one another
• Ensures valid and accurate data
• Disintermediation (removal of the middleman) reduces the overall cost of transacting.

• Cons
• The integrity of data is obtained at the expense of time. Every node needs to run the Blockchain to verify transactions
and maintain consensus. Currently, Blockchain can, on an average, process only 5 transactions/sec.
• Significant computing power is expended by miners leading to substantial energy consumption and wastage. Hence it is
not suitable for organizations that require instant transaction results within milliseconds.
• Nodes may prioritize transactions with higher rewards.
Dr. Maumita Chakraborty, UEM Kolkata
Pros and Cons of Blockchain
• Immutability
• In Blockchain technology, one cannot modify data or transactions once they are recorded in the Blockchain database. It
becomes a permanent record that is close-to-impossible to undo. Any change required can be addressed only by adding a
new block of data to the existing chain of blocks in chronological order ensuring that the database is complete and
consistent.

• Pros
• Contains a verifiable record of all transactions made that is auditable
• Consensus algorithms and block propagation mitigate the risk of double-spending, fraud, and manipulation of data.
• There is provenance, i.e., ability to track transaction or product movement across accounts.

• Cons
• Not every node has the capacity to maintain and run a full copy of the Blockchain. This can potentially affect consensus
and immutability.
• In smaller Blockchains, there is a risk of a 51% attack. If one or a group of malicious nodes can get 51% of the mining hash
rate, they can manipulate the transactions.
• Quantum computing can potentially break the cryptographic algorithm to reverse engineer public keys of Blockchain
networks to obtain the private keys.
Dr. Maumita Chakraborty, UEM Kolkata
Thank You

Dr. Maumita Chakraborty, UEM Kolkata

You might also like