blockchain 101 · 2018. 4. 1. · bitcoin • introduced in 2008 by satoshi nakamoto • bitcoin: a...

29
Blockchain 101

Upload: others

Post on 07-Sep-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Blockchain 101

Page 2: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Contents• Introduction

• Blockchain Overview

• Hash and Cryptography

• Blockchain Consensus Algorithm

• Challenges

• Next Generation Blockchains

Page 3: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Introduction• Transaction

• An instance of buying or selling something

• Based on mediation from a trusted arbiter

• Fiat money

• Bank or credit

• What happens if the trusted arbiter fails?

Page 4: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Bitcoin• Introduced in 2008 by Satoshi Nakamoto

• Bitcoin: A Peer-to-Peer Electronic Cash System

• No financial institution

• Open source

• Blockchain is a technology implementing Bitcoin protocol

Page 5: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Blockchain AbstractCase study: Bob buys a house from Alice

Page 6: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Transaction• Alice sends 1 house to Bob

• Contract is verified with signature

• Validation

• Conventional system

• Notary, lawyers, government, etc.

• Blockchain

• Every participant in the network

• Gets the copy of contract

Page 7: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Decentralised Ledger• Validation of transaction

• Fault-tolerant

• Exists backup copy of the ledger

• Security

• Difficult manipulate the transaction record

• Information sharing

• Distribution of power

Page 8: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Packaging Transactions• Block

• Packaging transactions in fixed interval

• E.g. 10 minutes for Bitcoin

• Blockchain

• Pile of blocks in chronological order

• Solves the problem of double spending

Page 9: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Preliminary

Page 10: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Hashing• A function generating a fixed size output

• Examples

• Modulo 7

• MOD7(10) = 10%7=3

• SHA-256(Secure Hash Algorithm)

• SHA-256(10) = 4A44DC15364204A80FE80E9039455CC1608281820FE2B24F1E5233ADE6AF1DD5

• Collision: MOD7(17)

• One-way

Page 11: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Public Key Cryptography• Provides secure communication channel

• Pair of keys

• Public key

• Encrypts the content

• Shared with the public

• Private key or secret key

• Decrypts the content

• Secret

• Digital signature

Page 12: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source
Page 13: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Public Key Cryptography• Signing

• Who is sending the data?

• Confidentiality

• Nobody knows what is in the transit

• Tamper-proofing

• No one can manipulate the data in transit

Page 14: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Public Key Cryptography• Sender(S) wants send data(D) to

receiver(R)

• Sender generates digital signature

• SHA-256(D) = D_HASH

• Enc(S.sk, D_HASH) = S.DS

• Sender encrypts data and signature with receiver’s public key

• Enc(R.pk, D + S.DS) = D_ENC(confidentiality)

• Sender sends D_ENC to receiver

• Receiver receives D_ENC

• Receiver decrypts received data with private key

• Dec(R.sk, D_ENC) = D + S.DS

• Receiver checks sender’s signature

• Dec(S.pk, S.DS) = D_HASH

• Receiver generates SHA-256 of received data and compare it with received hash

• SHA-256(D) == D_HASH(signing, tamper-proofing)

Page 15: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Blockchain Consensus Algorithm

Proof-of-Work

Page 16: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Transaction• Verification with digital signature

• A complete history of transaction or Ledger

• Cryptocurrency

Page 17: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Decentralised Ledger• Transactions are announced in the network

• Transactions are packaged into a block

• New block is chained with the previous block

• Question

• Who is making a new block?

• Where is the most recent valid ledger?

Page 18: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Mining• Act of gathering transaction and producing a

block

• Anyone can generate a block as long as it meets the requirement

• Number of leading zero bits in the block header

• Reward 12.5BTC = 119,150,000KRW

Page 19: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Proof-of-Work• The most recent valid ledger is the one with the

longest chain

• Longest chain means majority of resources(work)

Page 20: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Block

Page 21: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Merkle Tree

Page 22: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Nonce and Difficulty

Page 23: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Next Generation Blockchains

Page 24: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Average Number of Transactions Per Block

Page 25: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Mining Factory

Page 26: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Mining Pool

Page 27: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Challenges• Small block size and long interval

• Bitcoin blockchain handles 2 transactions where VISA system at peak Handels 4,700 transactions per sec

• Increase block size >1MB

• Decrease block production interval <10minutes

• Proof-of-Work

• Waste of resources

• Exchanges

Page 28: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

Next Generation• Smart contract

• DAO (Decentralized Autonomous Organization)

• Sharding

• Divide packaging workload

• Lightning network or Raiden

• Delayed packaging

• Delegated proof-of-stake

• Limiting number of block producers

Page 29: Blockchain 101 · 2018. 4. 1. · Bitcoin • Introduced in 2008 by Satoshi Nakamoto • Bitcoin: A Peer-to-Peer Electronic Cash System • No financial institution • Open source

End