Blockchains: Architecture, Design and Use Cases
Blockchains: Architecture, Design and Use Cases
1
Image Source: https://nem.io/enterprise/
Permissioned Blockchain - II
Consensus Algorithms
2
Why Distributed Consensus
One Decision No
Maker Consensus
Why Distributed Consensus
Multiple Consensus
Decision Maker Required
Why Distributed Consensus
• Reaching agreement in distributed computing
• Replication of common state so that all processes have same view
• Applications:
– Flight control system: E.g. Boeing 777 and 787
– Fund transferring system: Bitcoin and cryptocurrencies
– Leader election/Mutual Exclusion
Why Distributed Consensus
• So, no need of consensus in a single node process.
• What about when there are two nodes?
• Network or partitioned fault, consensus cannot be reached
Faults in Distributed Consensus
• Crash Fault
• Network or Partitioned Faults
• Byzantine Faults
– malicious behaviour in nodes
– hardware fault
– software error
Consensus for three processes
• Termination:
– Eventually each correct process sets its decision variable
• Agreement:
– The decision value of all correct processes is the same
• Integrity:
– If the correct processes all proposed the same value, then any
correct process in the decided state has chosen that value
Different Algorithms
• Crash or Network Faults:
• PAXOS
• RAFT
• accept/decline: whether
prepare accepted or not
• proposal number: biggest
number the acceptor has
seen
• accepted values: already
accepted values from other
proposer
Accepting a Value: Proposer’s Decision Making
• Proposer receive a
response from majority
of acceptors before
proceeding
Accepting a Value: Accept Message
• proposal number:
same as prepare phase
value
• value: single value
proposed by proposer
Accepting a Value: Notifying Learner