redecentralizing the web: ipfs and filecoin

158
Intro to Decentralized Systems Nicola Greco Protocol Labs

Upload: facultad-de-informatica-ucm

Post on 28-Jan-2018

85 views

Category:

Engineering


15 download

TRANSCRIPT

Page 1: Redecentralizing the Web: IPFS and Filecoin

Intro to Decentralized Systems

Nicola Greco Protocol Labs

Page 2: Redecentralizing the Web: IPFS and Filecoin

disclaimer

Page 3: Redecentralizing the Web: IPFS and Filecoin
Page 4: Redecentralizing the Web: IPFS and Filecoin
Page 5: Redecentralizing the Web: IPFS and Filecoin
Page 6: Redecentralizing the Web: IPFS and Filecoin
Page 7: Redecentralizing the Web: IPFS and Filecoin
Page 8: Redecentralizing the Web: IPFS and Filecoin
Page 9: Redecentralizing the Web: IPFS and Filecoin

Part 1 Decentralized Web Part 2 Universal Services Part 3 Decentralized Storage Part 4 Cryptonetworks

Page 10: Redecentralizing the Web: IPFS and Filecoin

Part 1

Page 11: Redecentralizing the Web: IPFS and Filecoin

Decentralizing the Web

Page 12: Redecentralizing the Web: IPFS and Filecoin

decentralization = de-concentration of powerBenkler 2016

Page 13: Redecentralizing the Web: IPFS and Filecoin

distributed system

decentralized systemno single authority fully trusted

minimize risk from misbehaving nodes

Page 14: Redecentralizing the Web: IPFS and Filecoin

Server <> ClientWeb

Server provides the right serviceServer uses data responsiblyServer is secureServer is always onlineServer is single point of reference

Page 15: Redecentralizing the Web: IPFS and Filecoin

Server <> ClientWeb

Server provides the right serviceServer uses data responsiblyServer is secureServer is always onlineServer is single point of reference

Server <> ServerP2P

Altruistic NetworkPeers are equal

Page 16: Redecentralizing the Web: IPFS and Filecoin

Server <> ClientWeb

Server provides the right serviceServer uses data responsiblyServer is secureServer is always onlineServer is single point of reference

Server <> ServerP2P

Altruistic NetworkPeers are equal

Network <> ClientIncentivized Protocols

Clients delegate their service to the networkThe network is “paid” to do so

Page 17: Redecentralizing the Web: IPFS and Filecoin

5,000,000,000+ files

• Video distribution & streaming • Legal documents • 3D Models (they’re big!) • Games • Scientific data & papers

• Blogs & websites • Within blockchains • Totally distributed web apps ex. forums, chat, messaging, cms, blogs, github, ...

IPFS

Page 18: Redecentralizing the Web: IPFS and Filecoin

Content Addressing

Page 19: Redecentralizing the Web: IPFS and Filecoin

Content Addressing

Where is the data??

http://nicolagreco.com/slides.pdf

Page 20: Redecentralizing the Web: IPFS and Filecoin

Content Addressing

Where is the data?

Who has the data?

?

http://nicolagreco.com/slides.pdf

QmeomffUNfmQy76CQGy9N…

[RFC6920][BITTORRENT]

[IPFS][BITCOIN]

Page 21: Redecentralizing the Web: IPFS and Filecoin

Content-addressable Web where: - data links work across application - links are cryptographic hashes - anyone can distribute data

Page 22: Redecentralizing the Web: IPFS and Filecoin

DHT

[CHORD]

A

D

F

H

J

O

Q

U

Page 23: Redecentralizing the Web: IPFS and Filecoin

DHT

[CHORD]

A

D

F

H

J

O

Q

USHA256( ) = GRxQ123..

Page 24: Redecentralizing the Web: IPFS and Filecoin

DHT

[CHORD]

A

D

F

H

J

O

Q

USHA256( ) = GRxQ123..

Page 25: Redecentralizing the Web: IPFS and Filecoin

DHT

[CHORD]

A

D

F

H

J

O

Q

USHA256( ) = GRxQ123..

LIBP2P

Page 26: Redecentralizing the Web: IPFS and Filecoin

http://10.20.30.40/foo/bar/baz.png

10.20.30.40

you

/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png

IPFS

Content Addressing

Page 27: Redecentralizing the Web: IPFS and Filecoin
Page 28: Redecentralizing the Web: IPFS and Filecoin

SLIDE: SIZE OF THE COMMUNITY

Large Open Source ProjectOver 2000+ Contributors

Over 150+ contribute Weekly

Page 29: Redecentralizing the Web: IPFS and Filecoin
Page 30: Redecentralizing the Web: IPFS and Filecoin

Server <> ClientWeb

Server provides the right serviceServer uses data responsiblyServer is secureServer is always onlineServer is single point of reference

Server <> ServerP2P

Altruistic NetworkPeers are equal

Network <> ClientIncentivized Protocols

Clients delegate their service to the networkThe network is “paid” to do so

Page 31: Redecentralizing the Web: IPFS and Filecoin

IPFS(altruistic)

Page 32: Redecentralizing the Web: IPFS and Filecoin

IPFS(altruistic)

Filecoin(incentivized)

Page 33: Redecentralizing the Web: IPFS and Filecoin

Part 2

Page 34: Redecentralizing the Web: IPFS and Filecoin

Universal Servicesdecentralization beyond the web

Page 35: Redecentralizing the Web: IPFS and Filecoin

Fair ExchangeNicola Samer

Page 36: Redecentralizing the Web: IPFS and Filecoin

Fair ExchangeNicola Samer

Fairness Either both parties receive their inputs or none

Page 37: Redecentralizing the Web: IPFS and Filecoin

Fair ExchangeNicola Samer

Fairness Either both parties receive their inputs or none

Timeliness Exchange either happens or does terminate

Page 38: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange

Nicola Samer

Scenario 1

Page 39: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange

Nicola Samer

runs with the money

Scenario 1

Page 40: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange

Nicola Samer

runs with the money

Scenario 1

Nicola Samer

Scenario 2

Page 41: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange

runs without paying

Nicola Samer

runs with the money

Scenario 1

Nicola Samer

Scenario 2

Page 42: Redecentralizing the Web: IPFS and Filecoin

Fair ExchangeNicola Samer

[Cleve1986]

Page 43: Redecentralizing the Web: IPFS and Filecoin

Fair ExchangeNicola Samer

Impossibility of Fair Exchange without a Trusted Third Party

[Cleve1986]

Page 44: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange

N S

Trusted

— Trust Assumptions —

Page 45: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange

N S

Trusted

N S

Building Trust

— Trust Assumptions —

Page 46: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange

N S

Trusted

N S

Building Trust

N S

Third Party

*

— Trust Assumptions —

Page 47: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange— Trust Assumptions —

Trusted Party

Page 48: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange— Trust Assumptions —

TrustedHardware

Trusted Party

Page 49: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange— Trust Assumptions —

TrustedHardware

Trusted Party

Trusted Auditors

Page 50: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange— Trust Assumptions —

Trusted m-of-n

TrustedHardware

Trusted Party

Trusted Auditors

Page 51: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange— Trust Assumptions —

Trusted Majority

Trusted m-of-n

TrustedHardware

Trusted Party

Trusted Auditors

Page 52: Redecentralizing the Web: IPFS and Filecoin

Public Ledger

Alice-Bob $2

…..

Page 53: Redecentralizing the Web: IPFS and Filecoin

Public Ledger

Alice-Bob $2

…..3 MAY 2017: A-B $2

Patent

Page 54: Redecentralizing the Web: IPFS and Filecoin

Public Ledger

Alice-Bob $2

…..3 MAY 2017: A-B $23 MAY 2017: C patent

Patent

Page 55: Redecentralizing the Web: IPFS and Filecoin

State Machine Replication

log

application

OP Log+1 -1 +1 +2 +4 -1

1 0 1 3 7 6 STATE Log

6

Page 56: Redecentralizing the Web: IPFS and Filecoin

Digital Currency

$5

Page 57: Redecentralizing the Web: IPFS and Filecoin

Digital Currency

$5

Page 58: Redecentralizing the Web: IPFS and Filecoin

Digital Currency

$5

Page 59: Redecentralizing the Web: IPFS and Filecoin

Digital Currency

$5

OKOK

OK

OK

OKOK

OK

OK

Page 60: Redecentralizing the Web: IPFS and Filecoin

Digital Currency

$5

A-B 5

A-B 5

A-B 5

A-B 5

A-B 5

A-B 5

A-B 5

A-B 5

Page 61: Redecentralizing the Web: IPFS and Filecoin

Digital Currency

$2A-B 5B-C 2

A-B 5B-C 2 A-B 5

B-C 2

A-B 5B-C 2

A-B 5B-C 2

A-B 5B-C 2

A-B 5B-C 2

A-B 5B-C 2

Page 62: Redecentralizing the Web: IPFS and Filecoin

Naming

Local Naming

./nicola.jpg

Global Naming

Trusted Party

[RFC1035]

Page 63: Redecentralizing the Web: IPFS and Filecoin

Naming

Local Naming

./nicola.jpg

Global Naming

Trusted Party

[RFC1035]

Untrusted Party

[RFC6962][CW2009][CONIKS]

Page 64: Redecentralizing the Web: IPFS and Filecoin

Naming

Local Naming

./nicola.jpg

Global Naming

Trusted Party

[RFC1035]

Untrusted Party

[RFC6962][CW2009][CONIKS]

hash( )

Qas13jdsjw

Cryptographic Hash

[RFC6920][BITTORRENT]

[IPFS]

Page 65: Redecentralizing the Web: IPFS and Filecoin

Naming

Local Naming

./nicola.jpg

Global Naming

Trusted Party

[RFC1035]

Blockchain

[ENS][BLOCKSTACK][NAMECOIN]

Untrusted Party

[RFC6962][CW2009][CONIKS]

hash( )

Qas13jdsjw

Cryptographic Hash

[RFC6920][BITTORRENT]

[IPFS]

Page 66: Redecentralizing the Web: IPFS and Filecoin

Naming

Local Naming

./nicola.jpg

Global Naming

Trusted Party Untrusted Party

[RFC1035] [RFC6962][CW2009]

Blockchain

[ENS][BLOCKSTACK][NAMECOIN][CONIKS]

hash( )

Qas13jdsjw

Cryptographic Hash

[RFC6920][BITTORRENT]

[IPFS]

Trusted Majority

Trusted Party Cryptography

Page 67: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange of Services

Nicola Samer

FairnessTimeliness

Either both parties receive their inputs or none

Exchange either happens or does terminate

Completeness If seller is honest, both parties receive their inputs

Soundness

Page 68: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange of Services

Page 69: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange of Services

Page 70: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange of Services

Page 71: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange of Services

Page 72: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange of Services

Page 73: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange of Services

Page 74: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange of Services

Page 75: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange of Services

Trusted Majority

Any Trust

TrustedHardware

Trusted Party

Trusted Auditors Reputation

PenalizationsRewards

Sigma Protocols SNARKs …

[NICOLA’s MASTER][ZKCSP][ZKCP]

Page 76: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange of Services

Trusted Majority

Any Trust

TrustedHardware

Trusted Party

Trusted Auditors Reputation

PenalizationsRewards

Sigma Protocols SNARKs …

[NICOLA’s MASTER][ZKCSP][ZKCP]

Page 77: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange of Services

Trusted Majority

Any Trust

TrustedHardware

Trusted Party

Trusted Auditors Reputation

PenalizationsRewards

Sigma Protocols SNARKs …

[NICOLA’s MASTER][ZKCSP][ZKCP]

Page 78: Redecentralizing the Web: IPFS and Filecoin

Fair Exchange of Services

Trusted Majority

Any Trust

TrustedHardware

Trusted Party

Trusted Auditors Reputation

PenalizationsRewards

Sigma Protocols SNARKs …

[NICOLA’s MASTER][ZKCSP][ZKCP]

Page 79: Redecentralizing the Web: IPFS and Filecoin

Trust Spectrum

You

Trusted Majority

Trusted 1-of-n

TrustedHardware

Trusted Party

Trusted Auditors Reputation Any

Trust

Interactive Proofs

Trust CryptographyRationality

PenalizationsRewards Sigma Protocols SNARKs …

Page 80: Redecentralizing the Web: IPFS and Filecoin

Verifiable Markets

Order matching

Settlement

Page 81: Redecentralizing the Web: IPFS and Filecoin

Verifiable Markets

Order matching

Settlement

– Don’t need to trustindividual service provider

– Anyone can participate inthe market as participant

Page 82: Redecentralizing the Web: IPFS and Filecoin

Part 3

Page 83: Redecentralizing the Web: IPFS and Filecoin

Filecoin (abstract)

Page 84: Redecentralizing the Web: IPFS and Filecoin

Cloud Storage

Store Get

Page 85: Redecentralizing the Web: IPFS and Filecoin

Cloud Storage

Store Get

Page 86: Redecentralizing the Web: IPFS and Filecoin

Decentralized Storage

Put Get

Page 87: Redecentralizing the Web: IPFS and Filecoin

Decentralized Storage

Store Get

How do we store files without trusting the providers?

Page 88: Redecentralizing the Web: IPFS and Filecoin

Filecoin Protocol

Get - Retrieve a file Put - Store a file Pledge - Add storage

Page 89: Redecentralizing the Web: IPFS and Filecoin

Proofs of Storage

CChallenge

Prove

Verify

Setup

Page 90: Redecentralizing the Web: IPFS and Filecoin

Proofs of Storage

Complete Sound Public Verifiable Transparent Useful

everyone with storage will generate valid proofs

no adversary can generate fake proofs

everyone can verify proofs

there is no secret information that can generate proofs info

proofs are about useful storage

Page 91: Redecentralizing the Web: IPFS and Filecoin

Proofs of Storage

h1,2 = h(h1,h2)

p1 p2 p3 p4

h(1) h(2) h(3) h(4)

h3,4 = h(h3,h4)

hroot = h(h1,2,h3,4)

Page 92: Redecentralizing the Web: IPFS and Filecoin

p1 p2 p3 p4

roothash

Proofs of Storage

Page 93: Redecentralizing the Web: IPFS and Filecoin

Proof of Replication

Sybil attackOutsourcing attackGeneration attack

Page 94: Redecentralizing the Web: IPFS and Filecoin

Proof of Retrievability

Setup

Page 95: Redecentralizing the Web: IPFS and Filecoin

Proof of Retrievability

Setup

Challenge C

Page 96: Redecentralizing the Web: IPFS and Filecoin

Setup

Proof of Retrievability

Page 97: Redecentralizing the Web: IPFS and Filecoin

Setup

Proof of Retrievability

Page 98: Redecentralizing the Web: IPFS and Filecoin

Setup

Challenge C

Proof of Retrievability

Page 99: Redecentralizing the Web: IPFS and Filecoin

Setup

Challenge C

Proof of Retrievability

Page 100: Redecentralizing the Web: IPFS and Filecoin

Setup

Challenge C

Proof of Retrievability

Page 101: Redecentralizing the Web: IPFS and Filecoin

Adding Replicas

Setup

Challenge

Page 102: Redecentralizing the Web: IPFS and Filecoin

Adding Replicas

Setup

Challenge C

Page 103: Redecentralizing the Web: IPFS and Filecoin

Adding Replicas

Setup

Challenge C

Page 104: Redecentralizing the Web: IPFS and Filecoin

Adding Replicas

Setup

Challenge C

Page 105: Redecentralizing the Web: IPFS and Filecoin

Adding Replicas

Setup

Challenge C

Page 106: Redecentralizing the Web: IPFS and Filecoin

Making Replicas slow

Setup

Page 107: Redecentralizing the Web: IPFS and Filecoin

Making Replicas slow

Setup

Page 108: Redecentralizing the Web: IPFS and Filecoin

Making Replicas slow

Setup

Challenge C

Page 109: Redecentralizing the Web: IPFS and Filecoin

Making Replicas slow

Setup

Challenge C

Page 110: Redecentralizing the Web: IPFS and Filecoin

Making Replicas slow

Setup

Challenge C

Page 111: Redecentralizing the Web: IPFS and Filecoin

Filecoin Markets

Order matching

Settlement

Order matching

Settlement

Exchange OTC

Page 112: Redecentralizing the Web: IPFS and Filecoin

Order Matching

Storage/ Retrieval

orders

Store a file for 1 week

at 50c GB/h

Offer storage for 1 week at 50c GB/h

Page 113: Redecentralizing the Web: IPFS and Filecoin

Paying for storage

C

Verify

Page 114: Redecentralizing the Web: IPFS and Filecoin

Storage Settlements

Page 115: Redecentralizing the Web: IPFS and Filecoin

Retrieval Settlements

Page 116: Redecentralizing the Web: IPFS and Filecoin

Storage-based Proof of Work

Page 117: Redecentralizing the Web: IPFS and Filecoin

Open Questions

Are there ways to do efficient proofs of replication? Are there ways to overcome front-running attacks? Are there ways to avoid miners posting proofs on chain? Can build a storage-based consensus? What are other incentives beyond economic reward?

Page 118: Redecentralizing the Web: IPFS and Filecoin

Part 4

Page 119: Redecentralizing the Web: IPFS and Filecoin

Foundational Infrastructure

Page 120: Redecentralizing the Web: IPFS and Filecoin

Bell Labs Holmdel site

Page 121: Redecentralizing the Web: IPFS and Filecoin
Page 122: Redecentralizing the Web: IPFS and Filecoin

Open Source

Page 123: Redecentralizing the Web: IPFS and Filecoin

Open Source

Page 124: Redecentralizing the Web: IPFS and Filecoin

Open Source

Page 125: Redecentralizing the Web: IPFS and Filecoin

Open Source

Page 126: Redecentralizing the Web: IPFS and Filecoin

Open Source

Page 127: Redecentralizing the Web: IPFS and Filecoin

Open Source

Page 128: Redecentralizing the Web: IPFS and Filecoin

Open Source

Page 129: Redecentralizing the Web: IPFS and Filecoin

Open Source

Page 130: Redecentralizing the Web: IPFS and Filecoin

Open Source

Page 131: Redecentralizing the Web: IPFS and Filecoin

Open Source

Page 132: Redecentralizing the Web: IPFS and Filecoin

Open Source

Page 133: Redecentralizing the Web: IPFS and Filecoin

Open Source

Page 134: Redecentralizing the Web: IPFS and Filecoin

Open Source

Page 135: Redecentralizing the Web: IPFS and Filecoin

Open Source

Page 136: Redecentralizing the Web: IPFS and Filecoin

Sharing Economy

Page 137: Redecentralizing the Web: IPFS and Filecoin

IPFS

Page 138: Redecentralizing the Web: IPFS and Filecoin
Page 139: Redecentralizing the Web: IPFS and Filecoin

Crypto Network & Tokens

Page 140: Redecentralizing the Web: IPFS and Filecoin

Text názvuText úrovně 1 Text úrovně 2 Text úrovně 3 Text úrovně 4 Text úrovně 5

Page 141: Redecentralizing the Web: IPFS and Filecoin

Text názvuText úrovně 1 Text úrovně 2 Text úrovně 3 Text úrovně 4 Text úrovně 5

Page 142: Redecentralizing the Web: IPFS and Filecoin
Page 143: Redecentralizing the Web: IPFS and Filecoin

Text názvuText úrovně 1 Text úrovně 2 Text úrovně 3 Text úrovně 4 Text úrovně 5

+

Page 144: Redecentralizing the Web: IPFS and Filecoin

Text názvuText úrovně 1 Text úrovně 2 Text úrovně 3 Text úrovně 4 Text úrovně 5

Page 145: Redecentralizing the Web: IPFS and Filecoin
Page 146: Redecentralizing the Web: IPFS and Filecoin

spend . to store

store to earn .

exchange for . . .

Page 147: Redecentralizing the Web: IPFS and Filecoin
Page 148: Redecentralizing the Web: IPFS and Filecoin

Free Market for Data Storage

Page 149: Redecentralizing the Web: IPFS and Filecoin

Governance?

Page 151: Redecentralizing the Web: IPFS and Filecoin

Thank you Samer

Page 152: Redecentralizing the Web: IPFS and Filecoin

Thank you Samer

Page 153: Redecentralizing the Web: IPFS and Filecoin

Question?What are other trust models? What is any-trust?

What are other types of Verifiable Markets?

Would this be enough for decentralizing the web?

Can DDoS attacks be possible on Filecoin?

How do you know Samer?

Page 154: Redecentralizing the Web: IPFS and Filecoin
Page 155: Redecentralizing the Web: IPFS and Filecoin

Refereed Multi-Prover

YES NO NO NO

Page 156: Redecentralizing the Web: IPFS and Filecoin

YES NO NO NO

Refereed Multi-Prover

Page 157: Redecentralizing the Web: IPFS and Filecoin

YES NO NO NO

Refereed Multi-Prover

Page 158: Redecentralizing the Web: IPFS and Filecoin

RationalRefereed Multi-Prover

YES NO NO NO

$$$$$$