SLIDE 1 Cryptocurrencies & Security on the Blockchain
San José State University
Introduction to Bitcoin and Distributed Systems
SLIDE 2
Review Lab
SLIDE 3
HW1: DigiCash Lite (DCL)
SLIDE 4 So why did DigiCash fail?
- Poor business decisions?
- Financial institutions not ready
for cryptocurrencies?
- Governments worried about
money laundering?
SLIDE 5
An alternate approach is for everyone to track all transactions, and vote whenever a discrepancy arises.
SLIDE 6 Bitcoin
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
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 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 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 Digital Currency – Ledger
Alice
Bob "I am giving 8 cryptocoins to David" Charlie David
Invalid transaction! Invalid transaction! Invalid transaction!
SLIDE 11
Lab, part 1: Implement a Distributed Ledger
Details in Canvas and on course website.
SLIDE 12 Goals of a Distributed Protocol
– Every read receives most recent write (or an error).
– Every request receives a (possibly stale) response.
– System continues to operate despite messages being dropped/delayed.
SLIDE 13
Unfortunately, we can't have all three. (At least, not all of the time).
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 Which do protocols forfeit?
All have their place.
- Sacrifice Partition Tolerance
– Single-site databases – (Not an option for distributed systems)
– Distributed databases – Majority protocols
– DNS
SLIDE 16 Bitcoin
– Yes – pretty much essential for dist. protocols
– Yes – Extremely resistant to censorship
– Fancy term for "not consistent" – Transactions may be dropped – But… pretty good after a while
SLIDE 17
Lab, part 2: Break consistency of distributed ledger
See details on Canvas/course website.