Chuong 04
Chuong 04
BLOCKCHAIN
Nguyen Trung Thong
[email protected]
Blockchain Basics
and Consensus
Class 4 Overview
• Review of Blockchain Design
• Conclusions
4
Review - Blockchain Technology
timestamped
auditable database network consensus protocol
append-only log
© Source unknown. All rights reserved. This content is excluded from our Creative Commons license. For more information, see
9
Image is in the public domain.
Merkle Tree – Binary Data Tree with Hashes
10
Image is in the public domain.
Asymmetric Cryptography & Digital Signatures
Guarding against Tampering & Impersonation
Shyam Nandan Kumar et al. Review on Network Security and Cryptography. © Science
11 and Education Publishing. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see https://ocw.mit.edu/help/faq-fair-use/
Asymmetric Cryptography & Digital Signatures
Guarding against Tampering & Impersonation
Digital Signature with Hash
13
© Source unknown. All rights reserved. This content is excluded from our Creative Commons license. For more information, see https://ocw.mit.edu/help/faq-fair-use/
Decentralized Networks
Permissionless Blockchains -
Byzantine Generals Problem
Unknown participants
Attack!
Attack! ? ?
Retreat ?
?
Retreat
Hash
© Source unknown. All rights reserved. This content is excluded from our Creative Commons license. For more information, see https://ocw.mit.edu/help/faq-fair-use/
© Cryptographics.info. All rights reserved. This content is excluded from our Creative Commons license. For more information, see https://ocw.mit.edu/help/faq-fair-use/
16
Blockchain – Proof of Work
17
Image by Anders Brownworth. Used with permission.
Blockchain – Proof of Work
18
19
• Defined by the # of leading zeros Hash output requires to solve proof of work
điu chnh khon 2016 khi - khong hai tun mt ln
21
22
24
Courtesy of Blockchain Luxembourg S.A.
Source: Blockchain.com – 9/18/18 (4 day avg.) Used with permission.
Native Currency
Economic Incentive System
‘Monetary Policies’ vary widely
• Bitcoin - BTC
• Created through Coinbase Transaction in each block
• ‘Monetary Policy’ preset in Bitcoin Core
• Creation originally 50 Bitcoin per block
• Reward halves (1/2s) every 210,000 blocks
• Currently 12.5 BTCs created per block – thus ‘inflation’ 4.1%
• Currently 17.3 million BTC; capping at 21 million BTC in 2040
• Market based transaction fee mechanism also provided for in Bitcoin Core
• Ethereum
• Currently 3 ETH per block – thus ‘inflation’ 7.4%
• Recent proposal to decline to 2 ETH per block in 11/18
• Fees paid in Gas (109 Gas per ETH) for computation are credited to miners
25
Network
nút lưu tr toàn b d liu ca block t khi nó đưc hình thành trong h thng blockchain
• Full Nodes – Store full Blockchain & able to Validate all Transactions
ta bt node là nhng giao dch sau thgian dài s đưc xoá đ gim bt b nh lưu tru
• Pruning Nodes – Prune transactions after validation and aging
không lưu tr toàn b mà ch lưu tr block header, phù hp vi các tài nguyên nh như đin thoi
• 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 có th là nhóm t chc qun lý các miners hp tác đào vi nhau,... chia phn thưng cho các miners khi đào đưc
• Mining Pool Operators
• Wallets – Store, View, Send and Receive Transactions & Create Key Pairs
vùng nh tm thi, chưa đưc xác nhn nhưng mng li đã kim tra cơ bn
• Mempool – Pool of unconfirmed (yet validated) Transactions 26
GIAO THC ĐNG THUN THAY THE