Lec3-Consensus Protocol
Lec3-Consensus Protocol
Chapter 3
CONSENSUS PROTOCOL
AND
MINING
TP. HCM 2022
OVERVIEW
2
THE BYZANTINE GENERALS PROBLEM
4
SOLUTION I: ORAL MESSAGES
5
L. Lamport, R. Shostak, and M. Pease, “The Byzantine generals problem,” ACM TOPLAS, vol. 4, pp. 382–401, July 1982.
SOLUTION I: ORAL MESSAGES
COMMANDER
v v
v
v x
LEUTENANT 1 LEUTENANT 2 LEUTENANT 3
v v
traitor
x z
y
x z
LEUTENANT 1 LEUTENANT 2 LEUTENANT 3
y y
7
L. Lamport, R. Shostak, and M. Pease, “The Byzantine generals problem,” ACM TOPLAS, vol. 4, pp. 382–401, July 1982.
SOLUTION II: SIGNED MESSAGES
COMMANDER
COMMANDER
traitor
1{0} 1{0}
1{0} 0{0}
0{0,2}
traitor 0{0,2}
discard
9
SOLUTION II: SIGNED MESSAGES
SIGNATURE PATH
v{0}
1
4
0 v{0,1}
v{0,1,5,4}
v{0,1,5}
5
6
v{0,1,5,4,6}
2 v{0,1,5,4,6,3}
10
BLOCKHAIN CONSENSUS – PROOF OF WORK
difficulty
11
BLOCKHAIN CONSENSUS – PROOF OF WORK
difficulty
12
BLOCKHAIN CONSENSUS – PROOF OF WORK
Pros Cons
Better ability to be Slower transaction
decentralized speeds
Higher costs to
Better security
validate transactions
Higher energy
consumption
13
BLOCKHAIN CONSENSUS – PROOF OF STAKE
14
BLOCKHAIN CONSENSUS – PROOF OF STAKE
15
BLOCKHAIN CONSENSUS – PROOF OF STAKE
Pros Cons
Less energy Harder to truly
consumption decentralize the
network
Less security than
Financial opportunities
PoW
Faster transaction
speeds
16
BLOCKHAIN CONSENSUS
17
BLOCKHAIN CONSENSUS
18
BITCOIN PROOF OF WORK DIFFICULTY
19
https://www.blockchain.com/
BITCOIN PROOF OF WORK DIFFICULTY
20
https://btc.com/stats/diff
EVOLUTION OF BITCOIN MINING
GPU ASIC
2009 2010 2010 2013 2014
CPU Mining pools Mining farms
21
BITCOIN MINING
22
BITCOIN MINING
23
BITCOIN MINING REWARDS
§ Full Nodes – Store full Blockchain & able to Validate all Transactions
§ Pruning Nodes – Prune transactions after validation and aging
§ Lightweight Nodes - Simplified Payment Verification (SPV) nodes –
Store Blockchain Headers only
§ Miners – Performs Proof of Work & Create new Blocks - Do not need
to be a Full Node Mining Pool Operators
§ Wallets – Store, View, Send and Receive Transactions & Create Key
Pairs
§ Mempool – Pool of unconfirmed (yet validated) Transactions
25
READINGS
26
DISCUSSION
27