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

Blockchain Consensus

Blockchains can be public, private, or semi-private and use different consensus mechanisms like proof of work. Distributed consensus is needed to agree on the state of the blockchain in a decentralized network. Proof of work is the consensus mechanism used in Bitcoin where miners compete to solve a cryptographic puzzle first in order to validate a block of transactions and earn a reward.

Uploaded by

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

Blockchain Consensus

Blockchains can be public, private, or semi-private and use different consensus mechanisms like proof of work. Distributed consensus is needed to agree on the state of the blockchain in a decentralized network. Proof of work is the consensus mechanism used in Bitcoin where miners compete to solve a cryptographic puzzle first in order to validate a block of transactions and earn a reward.

Uploaded by

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

Introduction to Blockchaining

Public

Types of Private
Blockchain

Semi private
Permissioned ledger

Shared ledger
Types of
Blockchain
Distributed ledger

Sidechains
Fully private and
proprietary blockchain
Types of Tokenized blockchain
Blockchain
Tokenless blockchain
Consensus Distributed or decentralized
system
Mechanism

Procedure to reach a common


agreement

Message passing system


Reliability

Why Fault tolenrance


Consensus

Correct operations even with


fault nodes
Difficult Scenarios

ay Mo
nd nday
Mo

ay Mo
Mond nday

Mon nd ay
day Mo

Mon sd ay
day Tu e
EASY AND TRIVIAL TO REACH BROADCAST THE PERSONAL
IN A CONSENSUS, if no CHOICE

Distributed FAILURE

consensus

APPLY A CHOICE FUNCTION


Consensus Example

100
10
0
10
50
0
10
10
10 50
50
Crash Fault

Distributed
Consensus Network/ Partitioned fault

Faults

Byzantine fault
Faults in
Distributed
Consensus
•Crash
•Partition
•Byzantine
Termination

Validity
Distributed
consensus
properties Integrity

Agreement
Termination: Every correct individual decides some
value at the end of the consensus protocol
Validity: If all the individuals proposes the same
value, then all correct individuals decide on that
value

Distributed Integrity: Every correct individual decides at most


one value, and the decided value must be proposed
Consensus - by some individuals
Properties Agreement: Every correct individual must agree on
the same value
Message passing system

SYNCHRONOUS ASYNCHRONOUS
Correctness of Distributed Consensus Algorithm

Safety Liveliness
Correctness Safety: Correct
individuals must not Nothing bad

of agree on an incorrect
value
happened

Distributed
Consensus Liveliness (or Liveness):
Every correct value
Something
good
eventually
must be accepted
Algorithm eventually
happens
Open network

Consensus in
Bitcoin Malicious nodes

Network

Malicious transactions
Consensus in Bitcoin
Consensus in Bitcoin

Which block should be added in the blockchain?


Consensus in Bitcoin

Broadcast the block to be added in the blockchain


But, time limit?
Consensus in Bitcoin

Step 1:
Any valid block is accepted (Even proposed by one
user)
Consensus in Bitcoin

Step 2:
Broadcast the accepted block and collect next set
of transactions
Consensus in Bitcoin

Solution:
Everyone individually solve a problem;
Accept the one by the miner who is able to prove
first that problem is solved
Consensus in Bitcoin
Consensus in Bitcoin
Proof of •To prevent service abuses
•Required the requester to
Work do some work
•Dwork and Naor in 1992
(PoW) for preventing junk mails
Proof of Work (PoW)

Assymetric

Moderately hard

Feasible for requester

Easy to check by receiver

Requestor have to put some effort to forge

Easy to validate the request


Given X and Y find k
such that
Puzzzle in Difficult to find k but
not infeasible
Bitcoin Y = H(X || k)
Network Once found, the result
can be verified easily
Add hashcash stamp in header

Hashcash
PoW – to Brute force method to find
hashcash
prevent Email
attacks

Receiver can verify it easily


Sample Hashcash

1:10:2008051225:[email protected]:data:de40a9b55b75b09c:a5

Hashcash
PoW Components

Version: Number of 0's: Time stamp: Resource: Optional data: Random


String : Counter

Demo for hash cash generation


Date less than 2 days

E mail address
Hashcash
PoW -
Receiver Random String

Compute Hash
PoW in Blockchain
PoW in Bitcoin

You might also like