The Blockchain Josh Vorick Bitcoin is a currency. Blockchain is a - - PowerPoint PPT Presentation

the blockchain
SMART_READER_LITE
LIVE PREVIEW

The Blockchain Josh Vorick Bitcoin is a currency. Blockchain is a - - PowerPoint PPT Presentation

The Blockchain Josh Vorick Bitcoin is a currency. Blockchain is a technology. What is a blockchain? A decentralized database that anyone can add to and no one can delete from The Bitcoin blockchain Why You Should Care Bitcoin


slide-1
SLIDE 1

The Blockchain

Josh Vorick

slide-2
SLIDE 2

Bitcoin is a currency. Blockchain is a technology.

slide-3
SLIDE 3

What is a blockchain?

  • A decentralized database that

anyone can add to and no

  • ne can delete from
slide-4
SLIDE 4

The Bitcoin blockchain

slide-5
SLIDE 5

Agenda

  • Why You Should Care
  • Bitcoin
○ Transactions ○ Mining ○ Mining Pools ○ Scalability
  • Other blockchain applications
slide-6
SLIDE 6

Why you should care

slide-7
SLIDE 7

Many are comparing the blockchain to TCP/IP

slide-8
SLIDE 8

$1 Billion

invested into blockchain-related startups

slide-9
SLIDE 9
slide-10
SLIDE 10
slide-11
SLIDE 11

$110,000

median “blockchain engineer” starting salary

slide-12
SLIDE 12

In case money isn’t enough...

  • Trustless, decentralized networks
  • Remove third parties
○ Smaller fees ○ Don’t need to trust a central authority
  • Corruption-proof (e.g. Bitcoin is a safe haven from bank crisis)
  • Privacy
  • Completely Digital
  • Trustless
  • Removes Third Parties
slide-13
SLIDE 13

time to get technical

slide-14
SLIDE 14

The Bitcoin blockchain

slide-15
SLIDE 15
  • Public key (verification key)
  • Secret key (signing key)
  • Sign a message with your secret key
  • Verify that a signature is valid using their
public key

Digital Signatures

slide-16
SLIDE 16

Cryptographic Hash

  • Deterministically maps an input string to
a fixed length output
  • Output looks like a random number
  • Collision resistant
HASH 6d324eff6c3f40c14c24642f 82272e8b16bc158a67a6e6 4e8c511e534dbb7c8d
slide-17
SLIDE 17 a0cd8d94408af12bc1bdb677ca47d86b049c448e 300568b5015c396a56827ea70fe8d2bf473ea9be8 265a6b39e9d1e3e0581db2b25a4cc061a6de9ff44 b30a314400b44ebad3d1af844cdb40b58bcf35632 152bf825718912eaa0f65b4a780c0581983570796 b7a8eced52f936e2b106e8191227c351415b8f525 f994077ca002460cc3b6f9e45776042f9cbe8cd644 1dc891fe4daf5a7ce22bb0e7c04e3253ff37542514 e3967e7dca8518310f8851301e33ad1b831aaae1 ca1ec6c31639dd54691c4987ede6c3228bf453c01 dc1a1f67242d601473c2f533f6b30a31440c3b6f9e 45776042831 00000000000000000000000 00000000000000000000000 00000000000000000000000 00000000000000000000000 00000000000000000000000 00000000000000000000000 00 00000000000000000000000 00000000000000000000000 00000000000000000000000 00000000000000000000000 00000000000000000000000 00000000000000000000000 01 2ca5cfc1a35679225c87410c2039dce459f67138 c8a23b8d19aad4d3c037c23b hash 5feceb66ffc86f38d952786c6d696c79c2dbc239dd 4e91b46729d73a27fb57e9 hash 0a13032d6e91709e88effb654657fcb620432caa2 dc1f37db32871eb5e3a2aa7 hash 57bb432fbc63aa7588e8a66329e4534b6567fd2f4f 26f91caa5f9b01396d4f98 hash
slide-18
SLIDE 18

(non-cryptographic) hash

def myHash(str): hash = 5831 for c in str: hash = hash * 33 + int(c) return hash

cryptographic hash (blake2b)

slide-19
SLIDE 19

Transactions

are complicated

slide-20
SLIDE 20

What’s in a Transaction?

the super duper basics

  • Sender
  • Recipient
  • Amount
  • Signature
slide-21
SLIDE 21

txn1 Alice -> Bob 25 Btc

  • Alice
slide-22
SLIDE 22

What’s Really in a Transaction?

the super basics

  • Sender
  • Recipient
  • Amount
○ List of inputs ○ List of outputs ○ SUM(in) = SUM(out)
  • Signature
slide-23
SLIDE 23

txn1

Alice -> Carol

15 Btc (see txnx)

  • Alice

txn2

Bob -> Carol

10 Btc (see txny)

  • Bob

txn3

Carol -> Dave

25 Btc (txn1+txn2)

  • Carol
slide-24
SLIDE 24

txn1

15 Btc to Carol

see txnx

  • Alice

txn2

10 Btc to Carol

see txny

  • Bob

txn3

25 Btc to Dave

see txn1, txn2

  • Carol
slide-25
SLIDE 25

txn1

15 Btc to Carol

see txnx

  • Alice

txn2

10 Btc to Carol

see txny

  • Bob

txn3

20 Btc to Dave 5 Btc to Carol

see txn1, txn2

  • Carol
slide-26
SLIDE 26

What’s Really Really in a Transaction?

the basics

  • Sender
  • Recipient’s public key
  • Amount
○ List of inputs ○ List of outputs ○ SUM(in) = SUM(out) + Miner fee
  • Sender’s signature
slide-27
SLIDE 27

txn1

15 Btc to pkC

see txnx

sign(txn1, skA)

txn2

10 Btc to pkC

see txny

sign(txn2, skB)

txn3

20 Btc to pkD 4.999 Btc to pkC

see txn1, txn2

sign(txn3, skC)
slide-28
SLIDE 28

txn1

15 Btc to pkC

see txnx

sign(txn1, skA)

txn2

10 Btc to pkC

see txny

sign(txn2, skB)

txn3

20 Btc to pkD 4.999 Btc to pkC

see txn1, txn2

sign(txn3, skC)
slide-29
SLIDE 29

What’s Really Really Really in a Transaction?

  • Sender
  • Recipient’s public key
  • Amount
○ List of inputs ○ List of outputs ○ SUM(in) = SUM(out) + Miner fee
  • Script
○ Multisig ○ Locktime ○ Puzzles ○ etc
  • Sender’s signature
slide-30
SLIDE 30

Mining

slide-31
SLIDE 31

Miners

  • Get sent transactions
  • Compile them into blocks
  • Add their blocks to the blockchain
slide-32
SLIDE 32

If miners add blocks willy-nilly, the blockchain will quickly become inconsistent

slide-33
SLIDE 33

Give the miners a hard puzzle

  • Miners work on puzzle
  • Whoever solves it shows the network their solution
  • Their block gets added to the blockchain
  • Puzzle is called “proof of work”
slide-34
SLIDE 34

Proof of Work

  • Used to prevent fraud
○ DoS attacks ○ Spam ○ Blockchain!
  • Make it computationally hard to do something
  • e.g. “You can’t access my website unless you do work”
slide-35
SLIDE 35

Example challenge

  • m = “Challenge text”
  • n = ???
  • target = 0x0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
  • Find some n such that hash(m + n) < target
slide-36
SLIDE 36 “Challenge Text0” hash 0xa34adb8461404adfab8d08e6cbdb24029e1bb0a8d906d0 80d01842ce57ee9156 “Challenge Text1” hash 0xcc6122116e95dae6279fdb241497f92e5f50093a35a5c7d c010f1f357d43ed6c “Challenge Text2” hash 0x669a60a2bcefaa27cad56b0d9754bbaf7cc596d2b80978 2345d99e8b53e5f3bd “Challenge Text3” hash 0x85a38de18ed2a5246c778c4888b72ee62e6464e243070 55a55afd995dd548576 “Challenge Text4” hash 0x67618f5b9a7f6358609f96eab68c610f375f1a580f7d9bb9 9d628c8ee8ba21fa “Challenge Text5” hash 0x04f0d5919eccd435de1521c5234663971bf0e9113b129f2 f689d586596dbe4fc Lucky!! target = 0x0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
slide-37
SLIDE 37

Miner code!!

def mine(Block, target): n = 0 while true: h = hash(Block + n) if h < target: return n n++ Block up to 1MB => hashing is SLOW def mine(Block, target): n = 0 b = hash(Block) while true: h = hash(b + n) if h < target: return n n++

Version 2

slide-38
SLIDE 38

Now we only hash Block once, right?

No :(

slide-39
SLIDE 39

How can we do this faster?

slide-40
SLIDE 40 Block hash
slide-41
SLIDE 41 Block hash b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15
slide-42
SLIDE 42 Block hash b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15
slide-43
SLIDE 43 Block hash b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 hash hash
slide-44
SLIDE 44 Block hash b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 hash hash
slide-45
SLIDE 45 hash b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 hash hash hash hash hash hash hash hash hash hash hash hash hash hash

Merkle tree

slide-46
SLIDE 46 hash b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 hash hash hash hash hash hash hash hash hash hash hash hash hash hash

Merkle tree

slide-47
SLIDE 47 hash b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 hash hash hash hash hash hash hash hash hash hash hash hash hash hash

Merkle tree

slide-48
SLIDE 48

Sweet! Let’s Mine!

slide-49
SLIDE 49

1 ~720,000,000,000,000,000,000

Chance of solving a block on the first try

slide-50
SLIDE 50

= Chance of being struck by lightning 1,977,098 times

in one second

slide-51
SLIDE 51

1 ~20,000,000,000

Chance of solving a block in 1 hour on a $300 CPU

slide-52
SLIDE 52

1 ~100,000,000

Chance of solving a block in 1 hour on a $300 GPU

slide-53
SLIDE 53

1 ~240,000

Chance of solving a block in 1 hour on a $370 ASIC

slide-54
SLIDE 54

≈$1

per day (amortized)

slide-55
SLIDE 55

Mining Pools

slide-56
SLIDE 56

Use a Central Server to Run the Pool

  • Mine blocks for the server
  • Submit ‘partial blocks’ to server
○ e.g. when you almost beat the target
  • Types
○ slush ○ Pay-per-Share ○ Luke-Jr’s
slide-57
SLIDE 57

P2Pool

  • Using a blockchain to create a mining pool
  • Miners in the pool have their own side-blockchain
  • Not used commonly due to network latency
slide-58
SLIDE 58
slide-59
SLIDE 59

14,695,844

PetaFLOPS Tianhe-2 operates at just 33.86 PetaFLOPS

slide-60
SLIDE 60

What if we replaced the hash with meaningful work?

slide-61
SLIDE 61

Related Topics

  • Decentralized Computing
○ P versus NP?
  • Homomorphic encryption
○ Compute on encrypted data ○ Still really slow
slide-62
SLIDE 62

Scalability

slide-63
SLIDE 63

230,000

transactions every day

slide-64
SLIDE 64

Other Applications

slide-65
SLIDE 65

All blockchains:

  • Have transactions
  • Have miners
  • Use Merkle trees
  • Have similar scalability issues (for now)
slide-66
SLIDE 66
  • Trade custom assets
  • Make bets
  • Leverage
  • Hedging
slide-67
SLIDE 67
  • Turing complete block chain
  • Smart Contracts
  • Platform for other blockchain

applications

slide-68
SLIDE 68
  • Decentralized prediction

market

  • People bet on events’
  • utcomes
  • Get precise forecasts on any

event

slide-69
SLIDE 69
  • Decentralized eBay
  • Create your own store and

sell to peers on the network

  • No fees / restrictions
slide-70
SLIDE 70

Proof of Existence

  • Add the hash of a document

to Bitcoin’s block chain

  • Enables to prove you had that

document on that date

slide-71
SLIDE 71
  • Add an ownership layer to the

Internet

  • Enable artists to know

when/where their art is being used

  • Allow users to easily pay

commissions

  • Enable for limited editions of

digital art

slide-72
SLIDE 72
  • Decentralized cloud storage
  • Secure peer-to-peer file

storage

  • Rent out empty hard drive

space

slide-73
SLIDE 73
slide-74
SLIDE 74

Bitcoin Club!

  • Focus on blockchain technologies
  • Learn more about how they work
  • Discuss applications of the blockchain in greater detail
  • Workshops
○ Bitcoin ○ Ethereum ○ etc
  • Expos!
○ Get funding to go to expos
  • Hackathons!
○ Blockchain Madness
slide-75
SLIDE 75

How do I join?

  • Facebook
○ Georgia Tech => Bitcoin Club ○ Message Josh Vorick (me)
  • Looking for Leadership
○ Drafting a Constitution soon ○ Let me know if you want to help!
slide-76
SLIDE 76

Questions?