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

Introduction To Blockchains

The document discusses blockchain technologies, including defining blockchain as a distributed ledger forged by consensus to build applications establishing trust, accountability, and transparency. It covers characteristics of blockchain like immutability, roles of participants like users and miners, and different types of blockchains based on their applications like cryptocurrency or business logic. Blockchain is described as a subset of distributed ledger technologies that uses blocks, transactions, and a peer-to-peer network to maintain a decentralized and incorruptible record of transactions.

Uploaded by

Adri Jovin
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views

Introduction To Blockchains

The document discusses blockchain technologies, including defining blockchain as a distributed ledger forged by consensus to build applications establishing trust, accountability, and transparency. It covers characteristics of blockchain like immutability, roles of participants like users and miners, and different types of blockchains based on their applications like cryptocurrency or business logic. Blockchain is described as a subset of distributed ledger technologies that uses blocks, transactions, and a peer-to-peer network to maintain a decentralized and incorruptible record of transactions.

Uploaded by

Adri Jovin
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 45

Blockchain Technologies

Adri Jovin J J, M.Tech., Ph.D., B.G.L.,


Assistant Professor (Sl. Gr.), Department of Information Technology
Sri Ramakrishna Institute of Technology
This presentation is intended…

• For beginners

• To understand the characteristics and uses of blockchain

• To discuss about the roles and users in a blockchain

• To discuss about public and private blockchains

• To get enlightened about consensus and the need for consensus in a blockchain

26-05-2021 Blockchain Technologies 2


Agent-based Intelligent Systems

• Code Mobility using Mobile Agents

• Decentralization, Distribution of authority

• Comprises of 3 components

• Code

• State

• Data

26-05-2021 Blockchain Technologies 3


Distributed Ledger Technologies (DLT)

“The arc of the internet is now bending towards decentralization.”

— Naval Ravikant

• Decentralization – a major transformation

• Giving the rights to the user

• Crypto-economy

• Computer security engineer, applied cryptographer, and distributed systems engineer

26-05-2021 Blockchain Technologies 4


DLT (Contd…)

Distributed Ledger – a type of data structure

Includes blockchains and smart contracts

3 basic components

• Data Model – maintains the current state of the ledger

• Language of transactions – changes the state of the ledger

• Protocol – used to build consensus among participants

26-05-2021 Blockchain Technologies 5


What is blockchain?

Peer-to-peer distributed ledger

Forged by consensus

Combined with a system

Used to build transactional applications that establish

• Trust

• Accountability

• Transparency

26-05-2021 Blockchain Technologies 6


Application Domains

• Goods Transfer (e.g. Supply Chain)

• Digital Media Transfer (e.g. Sale of Art)

• Remote Services Delivery (e.g. Travel and Tourism)

• Decentralized Business Logic (e.g. Moving Computing to Data Sources)

• Distributed Intelligence (e.g. Education Credentialing)

• Distributed Resources (e.g. Power Generation and Distribution)

• Crowd Funding (e.g. Startup Fund Raising)

• Crowd Operations (e.g. Electronic Voting)

• Identity Management (e.g. One ID for all life functions)

• Government Public Records (e.g. Open Governing)

26-05-2021 Blockchain Technologies 7


Definition of blockchain

According to Hyperledger

A blockchain is a peer-to-peer distributed ledger forged by consensus, combined with a


system for "smart contracts" and other assistive technologies.

Smart contracts are computer programs that execute predefined actions when certain
conditions within the system are met.

Consensus refers to a system of ensuring that parties agree to a certain state of the
system as the true state.

26-05-2021 Blockchain Technologies 8


Bitcoin vs Blockchain

• Bitcoin made blockchain popular

• Bitcoin - Major innovation of blockchain

• Bitcoin is a use case for blockchain

• Transacted over an open, public, anonymous blockchain network

• Continuously working digital currency

26-05-2021 Blockchain Technologies 9


Blockchain – a little deeper perspective

Subset of DLT

Block - set of transactions that are bundled together and added to the chain at the same time

Block contains 4 pieces of metadata

• Reference of the previous block

• Proof of work, also known as nonce

• Timestamp

• Merkle tree root for the transactions included in this block

26-05-2021 Blockchain Technologies 10


Blockchain is Immutable

• If the data is tampered with anywhere in the chain, the links will break

• This provides immutability and security.

26-05-2021 Blockchain Technologies 11


Transactions

• Record of an event, cryptographically secured with a digital signature, that is verified, ordered,
and bundled together into blocks

• Cryptography has a key role to play both in the security, as well as in the immutability of the
transactions recorded on blockchains.

26-05-2021 Blockchain Technologies 12


Databases vs Blockchains

Blockchains Databases

Write-only data Data can be easily


structure modified and deleted
Decentralized Centralized
applications applications

26-05-2021 Blockchain Technologies 13


Structure of Blockchain

Consensus
and Verify

Transactions Blocks Blockchain

26-05-2021 Blockchain Technologies 14


Components of Blockchain

Ledger: A distributed, immutable historical record

Peer Network: Stores, updates, and maintains the ledger

Membership Services: User authentication, authorization, and identity management

Smart Contract: Program that runs on the blockchain

Wallet: Stores users' credentials

Events: Notifications of updates and actions on the blockchain

Systems Management: Component creation, modification, and monitoring

Systems Integration: Integration of blockchain with external systems.

26-05-2021 Blockchain Technologies 15


Bitcoin- Basic block

Unspent Transaction Output (UTXO)

Reference Number
Input Output
UTXO1 UTXO1
UTXO2 UTXO2
UTXO3 UTXO3
UTXOn UTXOm

26-05-2021 Blockchain Technologies 16


UTXO

• Unique identifier of the transaction that created the UTXO

• Index of the UTXO in the transaction’s output list

• Value

• Optional: Conditions under which output can be spent

26-05-2021 Blockchain Technologies 17


Transaction

• Reference number of the current transaction

• References to one or more input UTXOs

• References to one or more output UTXOs newly generated by the current transaction

• Total input and output amount

26-05-2021 Blockchain Technologies 18


Sample Transaction

Input UTXO

Output UTXO
Total amount spent

26-05-2021 Blockchain Technologies 19


Sample Transaction (Contd…)

26-05-2021 Blockchain Technologies 20


Sample Transaction (Contd…)

26-05-2021 Blockchain Technologies 21


Sample Block

26-05-2021 Blockchain Technologies 22


Sample Block (Contd…)

26-05-2021 Blockchain Technologies 23


Roles of Participants

USER MINER

• Transfer of values by
creating transactions • Verify transactions
• Broadcast transactions
• Compete to create a block
• Reach consensus by validating block
• Broadcasting new block
• Confirm transactions

26-05-2021 Blockchain Technologies 24


Creating a block

Select set of Miners


Pool of
Valid Transactions compete by
Unconfirmed
Transaction to create solving
Transaction
block puzzle

Transaction
added Verify new Solved block
block broadcast

Rejected
Transaction New block
added to
chain and
confirmed

26-05-2021 Blockchain Technologies 25


Types of blockchains (Application based)

Blockchains (based
on application)

Type 1: Only Type 2: Currency + Type 3: Only


Cryptocurrency Business Logic Business Logic

26-05-2021 Blockchain Technologies 26


Types of blockchains (Access based)

Blockchains

Public Private Permissioned

26-05-2021 Blockchain Technologies 27


Bitcoin vs Ethereum

Wallet/ Exchange Applications Verticals: End User Applications

Bitcoin Blockchain Protocol/ Operations Application Frameworks: Smart Contracts

Ethereum Blockchain and Ethereum Virtual


Peer to peer Network and Operating Systems
Machine

Hardware Peer-to-peer Network and Operating Systems

Hardware

26-05-2021 Blockchain Technologies 28


Smart Contracts

• Data

• Functions or Methods with modifiers

• Get/ Set functions

Solidity is a programming language specifically designed to execute Smart Contracts

26-05-2021 Blockchain Technologies 29


Security in Ethereum and Bitcoin

 • Both the blockchains use Elliptic-Curve Cryptography rather than using RSA

• 256 bits ECC key pair 3072 bits RSA key pair

• Hashing for integrity (SHA-3, SHA-256, Keccak)

• Hashing is used to generate

 Account Addresses
 Digital Signature
 Transaction Hash
 Receipt Hash
 Block Header Hash

26-05-2021 Blockchain Technologies 30


Address of accounts

1. 256 – bit random number = private key

2. ECC algorithm is applied to private key to generate public key

3. Hashing applied to public key = account address (20 bytes)

Transaction for transferring assets should be

• Authorized

• Non-repudiable

• Unmodifiable

26-05-2021 Blockchain Technologies 31


Complete transaction Verification

• Timestamp

• Nonce

• Account Balances

• Sufficiency of Fees

26-05-2021 Blockchain Technologies 32


Integrity of a block

• Block header contents are not tampered

• Transactions are not tampered

• State Transitions are computed, hashed and verified

26-05-2021 Blockchain Technologies 33


Merkle Tree

60

41 19

10 31

10 21

4 6

26-05-2021 Blockchain Technologies 34


Establishing Trust in a Blockchain

• Secure chain using protocols

• Validate blocks and transactions

• Verifying the availability of resources

• Executing and confirming transactions

26-05-2021 Blockchain Technologies 35


Consensus Algorithm

• Ensures that the data on the ledger is the same for all the nodes in the network

• Prevents malicious actors from manipulating the data

• Varies with different implementations

26-05-2021 Blockchain Technologies 36


Types

• Proof of Work

• Proof of Stake

• Proof of Elapsed Time

• Proof of Authority

26-05-2021 Blockchain Technologies 37


Proof of Work

• Involves solving a computational challenging puzzle in order to create new blocks

• Requires a huge amount of energy to be expended, given the computationally heavy algorithm

• Has a high latency of transaction validation

• Concentration of mining power is located in countries where electricity is cheap

Proof-of-work (PoW) is the outcome of a successful mining process and, although the proof is hard to create, [it] is easy to
verify.

- 2016 Kudelski Security report

26-05-2021 Blockchain Technologies 38


PoW in Bitcoin and Ethereum

Block Header
Element Nonce
(BHash)

Change
H=Hash(Bhash, Nonce) Variable
Nonce

Solved winner
adds block to the
H<F(Difficulty)
blockchain
Broadcasts Block

26-05-2021 Blockchain Technologies 39


Proof of Stake (PoS)

• Generalization of the Proof of Work

• Nodes are known as the 'validators‘ that validate the transactions to earn a transaction fee

• Nodes are randomly selected to validate blocks

• PoS algorithm saves expensive computational resources that are spent in mining under a
PoW consensus

26-05-2021 Blockchain Technologies 40


Proof of Elapsed Time (PoET)

• Developed by Intel

• Hybrid of a random lottery and first-come-first-serve basis

• Each validator is given a random wait time

• The validator with the shortest wait time for a particular transaction block is elected the
leader.

• This "leader" gets to create the next block on the chain

26-05-2021 Blockchain Technologies 41


Proof of Authority

• Used for permissioned ledgers

• Uses a set of 'authorities', which are designated nodes that are allowed to create new blocks
and secure the ledger

• Require sign-off by a majority of authorities in order for a block to be created

26-05-2021 Blockchain Technologies 42


Key takeaways

Decentralization

Distributed Immutable Ledger

UTXO

Smart Contract

EVM

Merkle Tree

Proof of Work

26-05-2021 Blockchain Technologies 43


References

http://hyperledger.org/about

https://github.com/hyperledger-archives/education/tree/master/LFS171x

https://hbr.org/2017/02/a-brief-history-of-blockchain

https://www.investopedia.com/terms/m/merkle-root-cryptocurrency.asp

http://chimera.labs.oreilly.com/books/1234000001802/ch07.html
#_structure_of_a_block

26-05-2021 Blockchain Technologies 44


Thank you!

26-05-2021 Blockchain Technologies 45

You might also like