Introduction to Bitcoin and Distributed Systems Prof. Tom Austin - - PowerPoint PPT Presentation

introduction to bitcoin and distributed systems
SMART_READER_LITE
LIVE PREVIEW

Introduction to Bitcoin and Distributed Systems Prof. Tom Austin - - PowerPoint PPT Presentation

Cryptocurrencies & Security on the Blockchain Introduction to Bitcoin and Distributed Systems Prof. Tom Austin San Jos State University Review Lab HW1: DigiCash Lite (DCL) So why did DigiCash fail? Poor business decisions?


slide-1
SLIDE 1

Cryptocurrencies & Security on the Blockchain

  • Prof. Tom Austin

San José State University

Introduction to Bitcoin and Distributed Systems

slide-2
SLIDE 2

Review Lab

slide-3
SLIDE 3

HW1: DigiCash Lite (DCL)

slide-4
SLIDE 4

So why did DigiCash fail?

  • Poor business decisions?
  • Financial institutions not ready

for cryptocurrencies?

  • Governments worried about

money laundering?

slide-5
SLIDE 5

An alternate approach is for everyone to track all transactions, and vote whenever a discrepancy arises.

slide-6
SLIDE 6

Bitcoin

  • Protocol designed by

Satoshi Nakamoto in 2008 https://bitcoin.org/bitcoin.pdf

  • First Bitcoin client launched in 2009
  • Peer-to-peer – no centralized control

– Every client keeps track of the history of all bitcoins

slide-7
SLIDE 7

What is a cryptocoin worth?

Some cryptocurrencies tie there value to another currency. Other cryptocurrencies (such as Bitcoin) are not tied to any other currency. We'll follow this model.

slide-8
SLIDE 8

Digital Currency – Ledger

Alice

Bob "I am giving 10 cryptocoins to Bob" Charlie David

Alice: 20 Bob: 11 Charlie: 5 David: 34 Alice: 20 Bob: 11 Charlie: 5 David: 34 Alice: 20 Bob: 11 Charlie: 5 David: 34 Alice: 20 Bob: 11 Charlie: 5 David: 34

slide-9
SLIDE 9

Digital Currency – Ledger

Alice

Bob "I am giving 15 cryptocoins to Charlie" Charlie David

Alice: 5 Bob: 11 Charlie: 20 David: 34 Alice: 5 Bob: 11 Charlie: 20 David: 34 Alice: 5 Bob: 11 Charlie: 20 David: 34 Alice: 5 Bob: 11 Charlie: 20 David: 34

slide-10
SLIDE 10

Digital Currency – Ledger

Alice

Bob "I am giving 8 cryptocoins to David" Charlie David

Invalid transaction! Invalid transaction! Invalid transaction!

slide-11
SLIDE 11

Lab, part 1: Implement a Distributed Ledger

Details in Canvas and on course website.

slide-12
SLIDE 12

Goals of a Distributed Protocol

  • Consistency

– Every read receives most recent write (or an error).

  • Availability

– Every request receives a (possibly stale) response.

  • Partition tolerance

– System continues to operate despite messages being dropped/delayed.

slide-13
SLIDE 13

Unfortunately, we can't have all three. (At least, not all of the time).

slide-14
SLIDE 14

CAP theorem

  • Also known as Brewer's theorem.
  • Proves we can't guarantee consistency,

availability, and partition tolerance.

–We can get all 3 most of the time.

  • When there is an error, which do we

choose?

slide-15
SLIDE 15

Which do protocols forfeit?

All have their place.

  • Sacrifice Partition Tolerance

– Single-site databases – (Not an option for distributed systems)

  • Sacrifice Availability

– Distributed databases – Majority protocols

  • Sacrifice Consistency

– DNS

slide-16
SLIDE 16

Bitcoin

  • Partition tolerance

– Yes – pretty much essential for dist. protocols

  • Availability

– Yes – Extremely resistant to censorship

  • "Eventually consistent"

– Fancy term for "not consistent" – Transactions may be dropped – But… pretty good after a while

slide-17
SLIDE 17

Lab, part 2: Break consistency of distributed ledger

See details on Canvas/course website.