Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of...

29
Experiences with Scaling Blockchain-based Data Stores Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015 Experiences with Scaling Blockchain-based Data Stores Muneeb Ali, Co-Founder & CTO

Transcript of Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of...

Page 1: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

Experiences with Scaling Blockchain-based Data Stores

Muneeb Ali, Co-Founder & CTO

Page 2: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

Table of Contents

Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain Experiences from a Production Network Blockstore: Key-Value Store on BTC Blockchain

Page 3: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

Bitcoin

Page 4: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

Let’s design a new currency…

Ledger Currency

Page 5: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

Ledger Currency

Let’s design a new currency…

Muneeb Ali 10 coins

Brian Kernighan 10 coins

Page 6: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

Ledger Currency

Let’s design a new currency…

Muneeb Ali 10 coins

Brian Kernighan 10 coins

Paul Krugman 0 coins

Page 7: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

Ledger Currency

Let’s design a new currency…

Muneeb Ali 10 coins

Brian Kernighan 10 coins

Paul Krugman 0 coins

Muneeb —> Krugman 2 coins (unconfirmed)

Page 8: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

Ledger Currency

Let’s design a new currency…

Muneeb Ali 8 coins

Brian Kernighan 10 coins

Paul Krugman 2 coins

Muneeb —> Krugman 2 coins (confirmed)

Page 9: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

Congratulations!

You just learned how Bitcoin works.

Page 10: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

Ledger Currency

Muneeb Ali 8 coins

Brian Kernighan 10 coins

Paul Krugman 2 coins

Muneeb —> Krugman 2 coins (confirmed)

Bill Gates 0 coins

Page 11: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

Ledger Currency

Muneeb Ali 8 coins

Brian Kernighan 10 coins

Paul Krugman 2 coins

Muneeb —> Krugman 2 coins (confirmed)

Bill Gates 0 coins

Muneeb —> Bill 2 coins (unconfirmed)

Page 12: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

We need a distributed ledger (blockchain)

Page 13: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

Distributed Ledger

It’s a file! It grows as you make more transactions

Blockchain

Page 14: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

How Blockchain Works

•  Private-public key pairs

Page 15: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

How Blockchain Works

•  Private-public key pairs •  Bitcoin address = deterministic from pubkey

Page 16: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

How Blockchain Works

•  No such thing as a “bitcoin”. Only inputs and outputs

•  21 million total bitcoins (fixed) •  50 BTC minted each block, halved to 25 BTC

Page 17: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

How Blockchain Works

Page 18: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

How Blockchain Works

Page 19: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

How Blockchain Works

1 2 3 …..

3000

Register hash(name) Update name

Page 20: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

Decentralized Identity: Onename

Blockchain

Page 21: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

Decentralized Identity: Onename

Blockchain

Page 22: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

Decentralized Identity: Onename

Blockchain

Page 23: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

Decentralized Identity: Onename

Blockchain

Page 24: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

Lessons from Namecoin

Blockchain

•  Reliability and security of the blockchain •  Limit on size of data (520 bytes) •  Software engineering challenges •  Scalability challenges

Page 25: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

Blockstore

Blockchain

name_op, hash name_op, hash name_op, hash name_op, hash

name_op, hash

Bitcoin Blockchain

Virtual Blockchain

Mirror1 Mirror2 DHT

Page 26: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

Blockstore

Blockchain

n0 h0

n1 h1

n2 h2

nm-1 hm-1

nm hm

.

.

.

.

Secure Index (Blockchain)

(name, hash) (hash, value)

DHT Storage (Blockstore)

160-bit space

(h0,v0)

1 0

1

1

1

1

1

1

0

0 0

0

0

0

11..11 00..00

Page 27: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

Blockstore

Blockchain

•  Opensource (python), simpler (no blockchain functionality) •  Can support multiple data stores (mirrors) •  Separates control plane from data plane •  Enables to experiment with namespaces / spamming / pricing

Page 28: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

Blockstack: Common Infrastructure for Blockchain Apps

Page 29: Experiences with Scaling Blockchain-based Data Stores · Presentation at USENIX ATC 2015 Table of Contents Brief Intro to Bitcoin and Blockchain Decentralized Identity on the Blockchain

Experiences with Scaling Blockchain-based Data Stores

Onename. Decentralized identity on the bitcoin blockchain Presentation at USENIX ATC 2015

Question?

Thank You! [email protected] @muneeb

More information: Community: blockstack.org Code: github.com/blockstack