SlideShare una empresa de Scribd logo
1 de 44
Descargar para leer sin conexión
IPFS: a whole new world
Brought to you by Tyr Chen
1
Existing issues in internet
2
Addressing 3
Bandwith & Latency 4
Collaboration & O ine support 5
And something horrible…WTF on resiliency? 6
More horrible…WTF data security? 7
And the ultimate tragedy…in the history of mankind 8
What rst?
• web first
• mobile first
• data first
• AI first
• …
• …
• distributed, offline first?
9
Entering InterPlanetary File System world!
10
The big things before IPFS
• DHT: Ditributed Hash Table
• Kademlia DHT: query is . Used widely by Gnutella and BitTorrent
• Coral DSHT: make the storage and bandwidth usage more efficient than Kademlia
• s/kademlia DHT: add PoW to prevent attack (PoW on node id gen, ).
• BitTorrent: incentified by bit-for-tat and prioritized with rare block
• Git: Merkle DAG
O(log2N )
11
DHT
12
What is DHT?
A distributed hash table (DHT) is a class of a decentralized distributed system
that provides a lookup service similar to a hash table: (key, value) pairs are
stored in a DHT, and any participating node can efficiently retrieve the value
associated with a given key. Keys are unique identifiers which map to particular
values, which in turn can be anything from addresses, to documents, to
arbitrary data.[1] Responsibility for maintaining the mapping from keys to
values is distributed among the nodes, in such a way that a change in the set of
participants causes a minimal amount of disruption.
“
13
Chord, Pastry DHT 14
Node join / leave 15
BitTorrent / Kademlia DHT 16
IPFS & BitTorrent
• Similarity:
• exchange of data (blocks) in IPFS is inspired by BitTorrent
• tit-for-tat strategy (if you don’t share, you won’t get)
• get rare pieces first
• Difference:
• separate swarm for each file (BitTorrent), one swarm for all (BitSwap in IPFS)
17
IPFS & Git (copied from white paper)
1. Immutable objects represent Files (blob), Directories (tree), and Changes (commit).
2. Objects are content-addressed, by the cryptographic hash of their contents.
3. Links to other objects are embedded, forming a Merkle DAG. This provides many
useful integrity and workflow properties.
4. Most versioning metadata (branches, tags, etc.) are simply pointer references, and
thus inexpensive to create and update.
5. Version changes only update references or add objects.
6. Distributing version changes to other users is simply transferring objects and
updating remote references.
18
Merkle DAG 19
What are the use cases for Merkle DAG? 20
IPFS Design
21
IPFS Core Parts
• Identities: node identity generation & verification
• Network: p2p
• Routing: DHT
• Exchange: BitSwap
• Objects: Merkle DAG
• Files: versioned file system like Git
• Naming: self-certifying mutable name system
22
Exchange: BitSwap
• peers exchange which blocks they have (have_list) and which blocks they are looking
for (want_list) upon connecting
• to decide if a node will actually share data, it will apply its BitSwap Strategy
• based on previous data exchanges between these two peers
• peers keep track of the amount of data they share (builds credit) and the amount of
data they receive (builds debt)
• kept track of in the BitSwap Ledger
• if a peer has credit (shared more than received)
• our node will send the requested block
• if a peer has debt, our node will share or not share
• depending on a deterministic function where the chance of sharing becomes smaller when the
debt is bigger
• a data exchange always starts with the exchange of the ledger, if it is not identical our
node disconnects
23
BitSwap Ledger
type Ledger struct {
owner NodeId
partner NodeId
bytes_sent int
bytes_recv int
timestamp Timestamp
}
24
BitSwap Spec
// Additional state kept
type BitSwap struct {
ledgers map[NodeId]Ledger
// Ledgers known to this node, inc inactive
active map[NodeId]Peer
// currently open connections to other nodes
need_list []Multihash
// checksums of blocks this node needs
have_list []Multihash
// checksums of blocks this node has
}
type Peer struct {
nodeid NodeId
ledger Ledger
// Ledger between the node and this peer
last_seen Timestamp
// timestamp of last received message
want_list []Multihash
// checksums of all blocks wanted by peer
// includes blocks wanted by peer’s peers
}
// Protocol interface:
interface Peer {
open (nodeid :NodeId, ledger :Ledger);
send_want_list (want_list :WantList);
send_block (block :Block) -> (complete :Bool);
25
Files: unixfs
syntax = "proto2";
package unixfs.pb;
message Data {
enum DataType {
Raw = 0;
Directory = 1;
File = 2;
Metadata = 3;
Symlink = 4;
HAMTShard = 5;
}
required DataType Type = 1;
optional bytes Data = 2;
optional uint64 filesize = 3;
repeated uint64 blocksizes = 4;
optional uint64 hashType = 5;
optional uint64 fanout = 6;
}
message Metadata {
optional string MimeType = 1;
}
26
Naming: add mutability
• The root address of a node is /ipns/
• The content it points to can be changed by publishing an IPFS object to this address
• By publishing, the owner of the node (the person who knows the secret key that was
generated with ipfs init) cryptographically signs this “pointer”.
• This enables other users to verify the authenticity of the object published by the
owner.
• Just like IPFS paths, IPNS paths also start with a hash, followed by a Unix-like path.
• IPNS records are announced and resolved via the DHT.
27
IPFS stack 28
IPFS stack
• Moving the data easily and efficiently: libp2p
• Defining the data: IPLD, IPNS
• Using the data: IPFS app
29
Concepts
• CID: content identifier. Based on the content’s cryptographic hash.
• DNS link: use DNS TXT records to map a domain name (e.g. ipfs.io) to an IPFS address.
• IPNS: Inter-Planetary Name System is a system for creating and updating mutable
links to IPFS content. IPFS address changes everytime the content changes. A name in
IPNS is the hash of a public key.
• MFS: Mutible File System allows to treat files like a normal file system. It takes care of
all the work of updating links and hashes upon change of file.
• Pinning: IPFS nodes treads data like a cache so if you want something to be retained
long-term you can pin it.
• UinxFS: UnixFS is a data format to respresent files and all their links and metadata,
loosely based on how files work in Unix.
30
Node 31
IPNS 32
Exploring IPFS
33
Start IPFS
$ ipfs init
initializing IPFS node at /Users/tchen/.ipfs
generating 2048-bit RSA keypair...done
peer identity: QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6
to get started, enter:
ipfs cat /ipfs/QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv/readme
$ brew services start ipfs
==> Successfully started `ipfs` (label: homebrew.mxcl.ipfs)
34
Add a le
$ echo 'hello world' | ipfs add
added QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o
12 B / ? [--------------------------------------------------------------------------------------------------------------------------=------
$ ipfs cat QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o
hello world
35
IPFS peers
$ ipfs swarm peers
/ip4/100.6.104.240/tcp/4001/ipfs/Qmb8unXAJNurpDkXKbJ33pTV8Yukdm6AXj2ReWVLFvFAvt
/ip4/103.26.76.33/tcp/4001/ipfs/QmTmFmwHfBQVb7xFRzxp2BsXPF1ouK8yY2tc6Wjb79BraZ
/ip4/103.60.164.126/tcp/4001/ipfs/QmaLvFXd1b5GcdbdPTEspnSkDMDojfCsSfwYmRotSovjas
/ip4/103.94.185.80/tcp/4001/ipfs/QmP3CNi3z2c3JivxQMrmegZWx8n7r2LQWAD5yGiUT6nPX1
/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ
/ip4/104.190.120.58/tcp/58352/ipfs/QmQ3kYdbLMLEyF2sMgFb4eAygRmiPeNnFrE6xCQ2n4ifVe
/ip4/104.196.41.154/tcp/4001/ipfs/QmXJVVR32yC1ehjQhp5ZBiq7EymxZF9ZBB1F6FodW2JytF
/ip4/104.214.73.60/tcp/4001/ipfs/QmNe5CK9EWEZYttijNJ4gaGuHLsjNbjHbj9MdM6XAJR9es
36
IPFS id
$ ipfs id
{
"ID": "QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6",
"PublicKey": "CAASpgIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC0VFzN0Dv90LqJXTvRoS0G1nhHi6S0mONQ1jftl9QUUv8hTucf1XpWu+VfkSKcoWwr4MZZi5
"Addresses": [
"/ip4/127.0.0.1/tcp/4001/ipfs/QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6",
"/ip4/192.168.86.208/tcp/4001/ipfs/QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6",
"/ip6/::1/tcp/4001/ipfs/QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6",
"/ip4/75.172.98.84/tcp/4001/ipfs/QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6",
"/ip4/192.168.0.16/tcp/27891/ipfs/QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6"
],
"AgentVersion": "go-ipfs/0.4.18/aefc746",
"ProtocolVersion": "ipfs/0.1.0"
}
37
Providers
$ ipfs dht findprovs QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o
QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6
Qmbut9Ywz9YEDrz8ySBSgWyJk41Uvm2QJPhwDJzJyGFsD6
QmceZ5vcFtpcaPeAa66xnL79xo6fRrAmx6Gp6UZAFdkrDA
QmfFj5Am7Jw2DZm7s1aVdR5Ti5baT6a8B1ifcxCbya1vw5
QmVGkGSV25o3AMjcjjnPVb1PqJzrA1PvvhMiV57cMEuExb
QmaAbZQVFavUub1cvsXP8tfbk7p5i2cRVvimWv5La2E9U8
QmPDcnTLF5HftAhteRGVhAHnxwNfLzm541W7LL1rpaChy7
QmPDpBw1xsGvnNmkt9z9NsgNpezKzFNwVPcLcPVh2Weuwv
QmPMT3ZUATZWqZEiHd4Kjfe6H9UTTYjRJN4kqLvgWhrJpU
QmPR6Ggp5BTaKtvGJ9rwn3e86dMtzPRGRNmdLG8Yp7bhkP
QmNRZdPPtYycST9dPUPLQEqMoFq43fRx5pkKYBjYKuw1Fa
QmNSYDHzei4vn91k1sdF7oEcBHQWVTbibEBtXUpYSdkapX
QmNTXQyssJ5vMynxdW1jo5EcQq9XARS9nrGJykcYGKYbNH
QmNdtfrpDhP4yaRnPTUdqynnewBF4p5tUoq6Ngw1XFdmdj
QmNfFvrEoBThgW7dcPTkWjqAsicH1eq2GHsHrmCx8bMrxv
QmNjm16wkUUsUoRmr3b8QoQAPZYBwfBHcygkjGbSauTSWu
QmNkZvJVtf1AfkudwvkSwfV3Ru5hHFvitUugzvYBxtuPT7
QmNn2QFMrNcHstJVWnaT8XK31xe1e6HLvz7qg29yE2BGkS
QmNnnkCTY1ZbtusjMAtJ9Rn5arVtaDBjwRkFTf2WdPGmRq
QmNoBE4qVq7vuNtAMTqLhMYryL2YiWcrVB7eEbw4nYkjpW
38
Wait a moment, why everything starts with Qm ?
• sha2-256
• base58
• multihash
39
IPFS use cases
1. As a mounted global filesystem, under /ipfs and /ipns.
2. As a mounted personal sync folder that automatically versions, publishes, and backs
up any writes.
3. As an encrypted file or data sharing system.
4. As a versioned package manager for all software.
5. As the root filesystem of a Virtual Machine.
6. As the boot filesystem of a VM (under a hypervisor).
7. As a database: applications can write directly to the Merkle DAG data model and get
all the versioning, caching, and distribution IPFS provides.
8. As a linked (and encrypted) communications platform.
9. As an integrity checked CDN for large files (without SSL).
10. As an encrypted CDN.
11. On webpages, as a web CDN.
40
Problems in IPFS
• Data is not automatically replicated by default
• you may lose your data if nobody is using or pinning it, see this discussion
• at the moment it serves as a filesystem cache
• ipfs cluster allows files to be pinned across a cluster
• IPFS cluster is not efficient on replication
• at the moment, either accept it
• or build your own with eraser code like Reed-Solomon algo
41
IPFS for private usage 42
IPFS for blockchain 43
44

Más contenido relacionado

La actualidad más candente

OpenShift Container Platform 4.12 Release Notes
OpenShift Container Platform 4.12 Release NotesOpenShift Container Platform 4.12 Release Notes
OpenShift Container Platform 4.12 Release NotesGerryJamisola1
 
Kafka Streams: What it is, and how to use it?
Kafka Streams: What it is, and how to use it?Kafka Streams: What it is, and how to use it?
Kafka Streams: What it is, and how to use it?confluent
 
Unique ID generation in distributed systems
Unique ID generation in distributed systemsUnique ID generation in distributed systems
Unique ID generation in distributed systemsDave Gardner
 
Storing 16 Bytes at Scale
Storing 16 Bytes at ScaleStoring 16 Bytes at Scale
Storing 16 Bytes at ScaleFabian Reinartz
 
Intro to Telegraf
Intro to TelegrafIntro to Telegraf
Intro to TelegrafInfluxData
 
Protecting Apps from Hacks in Kubernetes with NGINX
Protecting Apps from Hacks in Kubernetes with NGINXProtecting Apps from Hacks in Kubernetes with NGINX
Protecting Apps from Hacks in Kubernetes with NGINXNGINX, Inc.
 
Introduction to data flow management using apache nifi
Introduction to data flow management using apache nifiIntroduction to data flow management using apache nifi
Introduction to data flow management using apache nifiAnshuman Ghosh
 
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2InfraEngineer
 
When NOT to use Apache Kafka?
When NOT to use Apache Kafka?When NOT to use Apache Kafka?
When NOT to use Apache Kafka?Kai Wähner
 
SeaweedFS introduction
SeaweedFS introductionSeaweedFS introduction
SeaweedFS introductionchrislusf
 
Apache Pulsar Development 101 with Python
Apache Pulsar Development 101 with PythonApache Pulsar Development 101 with Python
Apache Pulsar Development 101 with PythonTimothy Spann
 
Replacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with CiliumReplacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with CiliumMichal Rostecki
 
Integrating Apache NiFi and Apache Flink
Integrating Apache NiFi and Apache FlinkIntegrating Apache NiFi and Apache Flink
Integrating Apache NiFi and Apache FlinkHortonworks
 
Building Microservices with Apache Kafka
Building Microservices with Apache KafkaBuilding Microservices with Apache Kafka
Building Microservices with Apache Kafkaconfluent
 
Module: InterPlanetary Linked Data (IPLD)
Module: InterPlanetary Linked Data (IPLD)Module: InterPlanetary Linked Data (IPLD)
Module: InterPlanetary Linked Data (IPLD)Ioannis Psaras
 
Apache Arrow Flight Overview
Apache Arrow Flight OverviewApache Arrow Flight Overview
Apache Arrow Flight OverviewJacques Nadeau
 
eBPF - Observability In Deep
eBPF - Observability In DeepeBPF - Observability In Deep
eBPF - Observability In DeepMydbops
 

La actualidad más candente (20)

Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
OpenShift Container Platform 4.12 Release Notes
OpenShift Container Platform 4.12 Release NotesOpenShift Container Platform 4.12 Release Notes
OpenShift Container Platform 4.12 Release Notes
 
Kafka Streams: What it is, and how to use it?
Kafka Streams: What it is, and how to use it?Kafka Streams: What it is, and how to use it?
Kafka Streams: What it is, and how to use it?
 
Unique ID generation in distributed systems
Unique ID generation in distributed systemsUnique ID generation in distributed systems
Unique ID generation in distributed systems
 
Storing 16 Bytes at Scale
Storing 16 Bytes at ScaleStoring 16 Bytes at Scale
Storing 16 Bytes at Scale
 
Intro to Telegraf
Intro to TelegrafIntro to Telegraf
Intro to Telegraf
 
Protecting Apps from Hacks in Kubernetes with NGINX
Protecting Apps from Hacks in Kubernetes with NGINXProtecting Apps from Hacks in Kubernetes with NGINX
Protecting Apps from Hacks in Kubernetes with NGINX
 
Introduction to data flow management using apache nifi
Introduction to data flow management using apache nifiIntroduction to data flow management using apache nifi
Introduction to data flow management using apache nifi
 
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2
 
When NOT to use Apache Kafka?
When NOT to use Apache Kafka?When NOT to use Apache Kafka?
When NOT to use Apache Kafka?
 
SeaweedFS introduction
SeaweedFS introductionSeaweedFS introduction
SeaweedFS introduction
 
Apache Nifi Crash Course
Apache Nifi Crash CourseApache Nifi Crash Course
Apache Nifi Crash Course
 
Apache Pulsar Development 101 with Python
Apache Pulsar Development 101 with PythonApache Pulsar Development 101 with Python
Apache Pulsar Development 101 with Python
 
Replacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with CiliumReplacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with Cilium
 
Integrating Apache NiFi and Apache Flink
Integrating Apache NiFi and Apache FlinkIntegrating Apache NiFi and Apache Flink
Integrating Apache NiFi and Apache Flink
 
Apache Kafka Best Practices
Apache Kafka Best PracticesApache Kafka Best Practices
Apache Kafka Best Practices
 
Building Microservices with Apache Kafka
Building Microservices with Apache KafkaBuilding Microservices with Apache Kafka
Building Microservices with Apache Kafka
 
Module: InterPlanetary Linked Data (IPLD)
Module: InterPlanetary Linked Data (IPLD)Module: InterPlanetary Linked Data (IPLD)
Module: InterPlanetary Linked Data (IPLD)
 
Apache Arrow Flight Overview
Apache Arrow Flight OverviewApache Arrow Flight Overview
Apache Arrow Flight Overview
 
eBPF - Observability In Deep
eBPF - Observability In DeepeBPF - Observability In Deep
eBPF - Observability In Deep
 

Similar a IPFS: A Whole New World

Introduction to IPFS & Filecoin - longer version
Introduction to IPFS & Filecoin - longer versionIntroduction to IPFS & Filecoin - longer version
Introduction to IPFS & Filecoin - longer versionTinaBregovi
 
Introduction to IPFS & Filecoin
Introduction to IPFS & FilecoinIntroduction to IPFS & Filecoin
Introduction to IPFS & FilecoinTinaBregovi
 
WHITEPAPER ON Serverless Hosting platform based on Blockchain and by Vivek Ch...
WHITEPAPER ON Serverless Hosting platform based on Blockchain and by Vivek Ch...WHITEPAPER ON Serverless Hosting platform based on Blockchain and by Vivek Ch...
WHITEPAPER ON Serverless Hosting platform based on Blockchain and by Vivek Ch...CyberLab
 
Distributed Storage with IPFS and Python!
Distributed Storage with IPFS and Python!Distributed Storage with IPFS and Python!
Distributed Storage with IPFS and Python!Abhinav Srivastava
 
Introduction to Filecoin
Introduction to Filecoin   Introduction to Filecoin
Introduction to Filecoin Vanessa Lošić
 
Spectrum Scale Unified File and Object with WAN Caching
Spectrum Scale Unified File and Object with WAN CachingSpectrum Scale Unified File and Object with WAN Caching
Spectrum Scale Unified File and Object with WAN CachingSandeep Patil
 
Software Defined Analytics with File and Object Access Plus Geographically Di...
Software Defined Analytics with File and Object Access Plus Geographically Di...Software Defined Analytics with File and Object Access Plus Geographically Di...
Software Defined Analytics with File and Object Access Plus Geographically Di...Trishali Nayar
 
The State of Decentralized Storage
The State of Decentralized StorageThe State of Decentralized Storage
The State of Decentralized StorageCoinGecko
 
OSDC 2016 - Unifying Logs and Metrics Data with Elastic Beats by Monica Sarbu
OSDC 2016 - Unifying Logs and Metrics Data with Elastic Beats by Monica SarbuOSDC 2016 - Unifying Logs and Metrics Data with Elastic Beats by Monica Sarbu
OSDC 2016 - Unifying Logs and Metrics Data with Elastic Beats by Monica SarbuNETWAYS
 
Module: Content Routing in IPFS
Module: Content Routing in IPFSModule: Content Routing in IPFS
Module: Content Routing in IPFSIoannis Psaras
 
Storing and distributing data
Storing and distributing dataStoring and distributing data
Storing and distributing dataPhil Cryer
 
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...BlueHat Security Conference
 

Similar a IPFS: A Whole New World (20)

Introduction to IPFS & Filecoin - longer version
Introduction to IPFS & Filecoin - longer versionIntroduction to IPFS & Filecoin - longer version
Introduction to IPFS & Filecoin - longer version
 
Introduction to IPFS & Filecoin
Introduction to IPFS & FilecoinIntroduction to IPFS & Filecoin
Introduction to IPFS & Filecoin
 
WHITEPAPER ON Serverless Hosting platform based on Blockchain and by Vivek Ch...
WHITEPAPER ON Serverless Hosting platform based on Blockchain and by Vivek Ch...WHITEPAPER ON Serverless Hosting platform based on Blockchain and by Vivek Ch...
WHITEPAPER ON Serverless Hosting platform based on Blockchain and by Vivek Ch...
 
Distributed Storage with IPFS and Python!
Distributed Storage with IPFS and Python!Distributed Storage with IPFS and Python!
Distributed Storage with IPFS and Python!
 
Decentralized storage
Decentralized storageDecentralized storage
Decentralized storage
 
Introduction to Filecoin
Introduction to Filecoin   Introduction to Filecoin
Introduction to Filecoin
 
Spectrum Scale Unified File and Object with WAN Caching
Spectrum Scale Unified File and Object with WAN CachingSpectrum Scale Unified File and Object with WAN Caching
Spectrum Scale Unified File and Object with WAN Caching
 
Software Defined Analytics with File and Object Access Plus Geographically Di...
Software Defined Analytics with File and Object Access Plus Geographically Di...Software Defined Analytics with File and Object Access Plus Geographically Di...
Software Defined Analytics with File and Object Access Plus Geographically Di...
 
IPFSNov5.pptx
IPFSNov5.pptxIPFSNov5.pptx
IPFSNov5.pptx
 
The State of Decentralized Storage
The State of Decentralized StorageThe State of Decentralized Storage
The State of Decentralized Storage
 
Kfs presentation
Kfs presentationKfs presentation
Kfs presentation
 
OSDC 2016 - Unifying Logs and Metrics Data with Elastic Beats by Monica Sarbu
OSDC 2016 - Unifying Logs and Metrics Data with Elastic Beats by Monica SarbuOSDC 2016 - Unifying Logs and Metrics Data with Elastic Beats by Monica Sarbu
OSDC 2016 - Unifying Logs and Metrics Data with Elastic Beats by Monica Sarbu
 
BitTorrent on iOS
BitTorrent on iOSBitTorrent on iOS
BitTorrent on iOS
 
Hadoop introduction
Hadoop introductionHadoop introduction
Hadoop introduction
 
HDFCloud Workshop: HDF5 in the Cloud
HDFCloud Workshop: HDF5 in the CloudHDFCloud Workshop: HDF5 in the Cloud
HDFCloud Workshop: HDF5 in the Cloud
 
Hadoop training in bangalore
Hadoop training in bangaloreHadoop training in bangalore
Hadoop training in bangalore
 
Module: Content Routing in IPFS
Module: Content Routing in IPFSModule: Content Routing in IPFS
Module: Content Routing in IPFS
 
P2P Lecture.ppt
P2P Lecture.pptP2P Lecture.ppt
P2P Lecture.ppt
 
Storing and distributing data
Storing and distributing dataStoring and distributing data
Storing and distributing data
 
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...
 

Más de ArcBlock

ArcBlock Introduction to Blockchain
ArcBlock Introduction to BlockchainArcBlock Introduction to Blockchain
ArcBlock Introduction to BlockchainArcBlock
 
Forge blockchain deployment made easy
Forge  blockchain deployment made easyForge  blockchain deployment made easy
Forge blockchain deployment made easyArcBlock
 
Designing Decentralized Apps: Programmable Tokens
Designing Decentralized Apps: Programmable TokensDesigning Decentralized Apps: Programmable Tokens
Designing Decentralized Apps: Programmable TokensArcBlock
 
Build a Decentralized, public verifiable Database with ex_abci and Tendermint
Build a Decentralized, public verifiable Database with ex_abci and TendermintBuild a Decentralized, public verifiable Database with ex_abci and Tendermint
Build a Decentralized, public verifiable Database with ex_abci and TendermintArcBlock
 
ArcBlock Presents 5 Winning Factors to Building a Successful DApp
ArcBlock Presents 5 Winning Factors to Building a Successful DAppArcBlock Presents 5 Winning Factors to Building a Successful DApp
ArcBlock Presents 5 Winning Factors to Building a Successful DAppArcBlock
 
QRCodes are Fun, Easy, and Useful for Links, Payments and Identity Verification
QRCodes are Fun, Easy, and Useful for Links, Payments and Identity VerificationQRCodes are Fun, Easy, and Useful for Links, Payments and Identity Verification
QRCodes are Fun, Easy, and Useful for Links, Payments and Identity VerificationArcBlock
 
Designing Decentralized Applications (DApps)
Designing Decentralized Applications (DApps) Designing Decentralized Applications (DApps)
Designing Decentralized Applications (DApps) ArcBlock
 
Cryptography for everyone
Cryptography for everyoneCryptography for everyone
Cryptography for everyoneArcBlock
 
Introduction to HTTP/2 and How To Use It
Introduction to HTTP/2 and How To Use ItIntroduction to HTTP/2 and How To Use It
Introduction to HTTP/2 and How To Use ItArcBlock
 
Ethereum virtual machine for Developers Part 1
Ethereum virtual machine for Developers Part 1Ethereum virtual machine for Developers Part 1
Ethereum virtual machine for Developers Part 1ArcBlock
 
Understanding hd wallets design and implementation
Understanding hd wallets  design and implementationUnderstanding hd wallets  design and implementation
Understanding hd wallets design and implementationArcBlock
 
Technical Learning Series - Elixir ExUnit
Technical Learning Series - Elixir ExUnitTechnical Learning Series - Elixir ExUnit
Technical Learning Series - Elixir ExUnitArcBlock
 
Tendermint in a nutshell
Tendermint in a nutshellTendermint in a nutshell
Tendermint in a nutshellArcBlock
 
Introduction to CQRS & Commended
Introduction to CQRS & CommendedIntroduction to CQRS & Commended
Introduction to CQRS & CommendedArcBlock
 
Decipher Multi-Factor Authentication - A Developers Introduction
Decipher Multi-Factor Authentication - A Developers IntroductionDecipher Multi-Factor Authentication - A Developers Introduction
Decipher Multi-Factor Authentication - A Developers IntroductionArcBlock
 
Introduction to aws data pipeline services
Introduction to aws data pipeline servicesIntroduction to aws data pipeline services
Introduction to aws data pipeline servicesArcBlock
 
Introduction to Ethereum Smart Contracts
Introduction to Ethereum Smart Contracts Introduction to Ethereum Smart Contracts
Introduction to Ethereum Smart Contracts ArcBlock
 
ArcBlock Presents An Introduction to Blockchain
ArcBlock Presents An Introduction to BlockchainArcBlock Presents An Introduction to Blockchain
ArcBlock Presents An Introduction to BlockchainArcBlock
 

Más de ArcBlock (18)

ArcBlock Introduction to Blockchain
ArcBlock Introduction to BlockchainArcBlock Introduction to Blockchain
ArcBlock Introduction to Blockchain
 
Forge blockchain deployment made easy
Forge  blockchain deployment made easyForge  blockchain deployment made easy
Forge blockchain deployment made easy
 
Designing Decentralized Apps: Programmable Tokens
Designing Decentralized Apps: Programmable TokensDesigning Decentralized Apps: Programmable Tokens
Designing Decentralized Apps: Programmable Tokens
 
Build a Decentralized, public verifiable Database with ex_abci and Tendermint
Build a Decentralized, public verifiable Database with ex_abci and TendermintBuild a Decentralized, public verifiable Database with ex_abci and Tendermint
Build a Decentralized, public verifiable Database with ex_abci and Tendermint
 
ArcBlock Presents 5 Winning Factors to Building a Successful DApp
ArcBlock Presents 5 Winning Factors to Building a Successful DAppArcBlock Presents 5 Winning Factors to Building a Successful DApp
ArcBlock Presents 5 Winning Factors to Building a Successful DApp
 
QRCodes are Fun, Easy, and Useful for Links, Payments and Identity Verification
QRCodes are Fun, Easy, and Useful for Links, Payments and Identity VerificationQRCodes are Fun, Easy, and Useful for Links, Payments and Identity Verification
QRCodes are Fun, Easy, and Useful for Links, Payments and Identity Verification
 
Designing Decentralized Applications (DApps)
Designing Decentralized Applications (DApps) Designing Decentralized Applications (DApps)
Designing Decentralized Applications (DApps)
 
Cryptography for everyone
Cryptography for everyoneCryptography for everyone
Cryptography for everyone
 
Introduction to HTTP/2 and How To Use It
Introduction to HTTP/2 and How To Use ItIntroduction to HTTP/2 and How To Use It
Introduction to HTTP/2 and How To Use It
 
Ethereum virtual machine for Developers Part 1
Ethereum virtual machine for Developers Part 1Ethereum virtual machine for Developers Part 1
Ethereum virtual machine for Developers Part 1
 
Understanding hd wallets design and implementation
Understanding hd wallets  design and implementationUnderstanding hd wallets  design and implementation
Understanding hd wallets design and implementation
 
Technical Learning Series - Elixir ExUnit
Technical Learning Series - Elixir ExUnitTechnical Learning Series - Elixir ExUnit
Technical Learning Series - Elixir ExUnit
 
Tendermint in a nutshell
Tendermint in a nutshellTendermint in a nutshell
Tendermint in a nutshell
 
Introduction to CQRS & Commended
Introduction to CQRS & CommendedIntroduction to CQRS & Commended
Introduction to CQRS & Commended
 
Decipher Multi-Factor Authentication - A Developers Introduction
Decipher Multi-Factor Authentication - A Developers IntroductionDecipher Multi-Factor Authentication - A Developers Introduction
Decipher Multi-Factor Authentication - A Developers Introduction
 
Introduction to aws data pipeline services
Introduction to aws data pipeline servicesIntroduction to aws data pipeline services
Introduction to aws data pipeline services
 
Introduction to Ethereum Smart Contracts
Introduction to Ethereum Smart Contracts Introduction to Ethereum Smart Contracts
Introduction to Ethereum Smart Contracts
 
ArcBlock Presents An Introduction to Blockchain
ArcBlock Presents An Introduction to BlockchainArcBlock Presents An Introduction to Blockchain
ArcBlock Presents An Introduction to Blockchain
 

Último

MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...masabamasaba
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburgmasabamasaba
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxAnnaArtyushina1
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 

Último (20)

MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 

IPFS: A Whole New World

  • 1. IPFS: a whole new world Brought to you by Tyr Chen 1
  • 2. Existing issues in internet 2
  • 5. Collaboration & O ine support 5
  • 6. And something horrible…WTF on resiliency? 6
  • 8. And the ultimate tragedy…in the history of mankind 8
  • 9. What rst? • web first • mobile first • data first • AI first • … • … • distributed, offline first? 9
  • 10. Entering InterPlanetary File System world! 10
  • 11. The big things before IPFS • DHT: Ditributed Hash Table • Kademlia DHT: query is . Used widely by Gnutella and BitTorrent • Coral DSHT: make the storage and bandwidth usage more efficient than Kademlia • s/kademlia DHT: add PoW to prevent attack (PoW on node id gen, ). • BitTorrent: incentified by bit-for-tat and prioritized with rare block • Git: Merkle DAG O(log2N ) 11
  • 13. What is DHT? A distributed hash table (DHT) is a class of a decentralized distributed system that provides a lookup service similar to a hash table: (key, value) pairs are stored in a DHT, and any participating node can efficiently retrieve the value associated with a given key. Keys are unique identifiers which map to particular values, which in turn can be anything from addresses, to documents, to arbitrary data.[1] Responsibility for maintaining the mapping from keys to values is distributed among the nodes, in such a way that a change in the set of participants causes a minimal amount of disruption. “ 13
  • 15. Node join / leave 15
  • 17. IPFS & BitTorrent • Similarity: • exchange of data (blocks) in IPFS is inspired by BitTorrent • tit-for-tat strategy (if you don’t share, you won’t get) • get rare pieces first • Difference: • separate swarm for each file (BitTorrent), one swarm for all (BitSwap in IPFS) 17
  • 18. IPFS & Git (copied from white paper) 1. Immutable objects represent Files (blob), Directories (tree), and Changes (commit). 2. Objects are content-addressed, by the cryptographic hash of their contents. 3. Links to other objects are embedded, forming a Merkle DAG. This provides many useful integrity and workflow properties. 4. Most versioning metadata (branches, tags, etc.) are simply pointer references, and thus inexpensive to create and update. 5. Version changes only update references or add objects. 6. Distributing version changes to other users is simply transferring objects and updating remote references. 18
  • 20. What are the use cases for Merkle DAG? 20
  • 22. IPFS Core Parts • Identities: node identity generation & verification • Network: p2p • Routing: DHT • Exchange: BitSwap • Objects: Merkle DAG • Files: versioned file system like Git • Naming: self-certifying mutable name system 22
  • 23. Exchange: BitSwap • peers exchange which blocks they have (have_list) and which blocks they are looking for (want_list) upon connecting • to decide if a node will actually share data, it will apply its BitSwap Strategy • based on previous data exchanges between these two peers • peers keep track of the amount of data they share (builds credit) and the amount of data they receive (builds debt) • kept track of in the BitSwap Ledger • if a peer has credit (shared more than received) • our node will send the requested block • if a peer has debt, our node will share or not share • depending on a deterministic function where the chance of sharing becomes smaller when the debt is bigger • a data exchange always starts with the exchange of the ledger, if it is not identical our node disconnects 23
  • 24. BitSwap Ledger type Ledger struct { owner NodeId partner NodeId bytes_sent int bytes_recv int timestamp Timestamp } 24
  • 25. BitSwap Spec // Additional state kept type BitSwap struct { ledgers map[NodeId]Ledger // Ledgers known to this node, inc inactive active map[NodeId]Peer // currently open connections to other nodes need_list []Multihash // checksums of blocks this node needs have_list []Multihash // checksums of blocks this node has } type Peer struct { nodeid NodeId ledger Ledger // Ledger between the node and this peer last_seen Timestamp // timestamp of last received message want_list []Multihash // checksums of all blocks wanted by peer // includes blocks wanted by peer’s peers } // Protocol interface: interface Peer { open (nodeid :NodeId, ledger :Ledger); send_want_list (want_list :WantList); send_block (block :Block) -> (complete :Bool); 25
  • 26. Files: unixfs syntax = "proto2"; package unixfs.pb; message Data { enum DataType { Raw = 0; Directory = 1; File = 2; Metadata = 3; Symlink = 4; HAMTShard = 5; } required DataType Type = 1; optional bytes Data = 2; optional uint64 filesize = 3; repeated uint64 blocksizes = 4; optional uint64 hashType = 5; optional uint64 fanout = 6; } message Metadata { optional string MimeType = 1; } 26
  • 27. Naming: add mutability • The root address of a node is /ipns/ • The content it points to can be changed by publishing an IPFS object to this address • By publishing, the owner of the node (the person who knows the secret key that was generated with ipfs init) cryptographically signs this “pointer”. • This enables other users to verify the authenticity of the object published by the owner. • Just like IPFS paths, IPNS paths also start with a hash, followed by a Unix-like path. • IPNS records are announced and resolved via the DHT. 27
  • 29. IPFS stack • Moving the data easily and efficiently: libp2p • Defining the data: IPLD, IPNS • Using the data: IPFS app 29
  • 30. Concepts • CID: content identifier. Based on the content’s cryptographic hash. • DNS link: use DNS TXT records to map a domain name (e.g. ipfs.io) to an IPFS address. • IPNS: Inter-Planetary Name System is a system for creating and updating mutable links to IPFS content. IPFS address changes everytime the content changes. A name in IPNS is the hash of a public key. • MFS: Mutible File System allows to treat files like a normal file system. It takes care of all the work of updating links and hashes upon change of file. • Pinning: IPFS nodes treads data like a cache so if you want something to be retained long-term you can pin it. • UinxFS: UnixFS is a data format to respresent files and all their links and metadata, loosely based on how files work in Unix. 30
  • 34. Start IPFS $ ipfs init initializing IPFS node at /Users/tchen/.ipfs generating 2048-bit RSA keypair...done peer identity: QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6 to get started, enter: ipfs cat /ipfs/QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv/readme $ brew services start ipfs ==> Successfully started `ipfs` (label: homebrew.mxcl.ipfs) 34
  • 35. Add a le $ echo 'hello world' | ipfs add added QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o 12 B / ? [--------------------------------------------------------------------------------------------------------------------------=------ $ ipfs cat QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o hello world 35
  • 36. IPFS peers $ ipfs swarm peers /ip4/100.6.104.240/tcp/4001/ipfs/Qmb8unXAJNurpDkXKbJ33pTV8Yukdm6AXj2ReWVLFvFAvt /ip4/103.26.76.33/tcp/4001/ipfs/QmTmFmwHfBQVb7xFRzxp2BsXPF1ouK8yY2tc6Wjb79BraZ /ip4/103.60.164.126/tcp/4001/ipfs/QmaLvFXd1b5GcdbdPTEspnSkDMDojfCsSfwYmRotSovjas /ip4/103.94.185.80/tcp/4001/ipfs/QmP3CNi3z2c3JivxQMrmegZWx8n7r2LQWAD5yGiUT6nPX1 /ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ /ip4/104.190.120.58/tcp/58352/ipfs/QmQ3kYdbLMLEyF2sMgFb4eAygRmiPeNnFrE6xCQ2n4ifVe /ip4/104.196.41.154/tcp/4001/ipfs/QmXJVVR32yC1ehjQhp5ZBiq7EymxZF9ZBB1F6FodW2JytF /ip4/104.214.73.60/tcp/4001/ipfs/QmNe5CK9EWEZYttijNJ4gaGuHLsjNbjHbj9MdM6XAJR9es 36
  • 37. IPFS id $ ipfs id { "ID": "QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6", "PublicKey": "CAASpgIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC0VFzN0Dv90LqJXTvRoS0G1nhHi6S0mONQ1jftl9QUUv8hTucf1XpWu+VfkSKcoWwr4MZZi5 "Addresses": [ "/ip4/127.0.0.1/tcp/4001/ipfs/QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6", "/ip4/192.168.86.208/tcp/4001/ipfs/QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6", "/ip6/::1/tcp/4001/ipfs/QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6", "/ip4/75.172.98.84/tcp/4001/ipfs/QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6", "/ip4/192.168.0.16/tcp/27891/ipfs/QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6" ], "AgentVersion": "go-ipfs/0.4.18/aefc746", "ProtocolVersion": "ipfs/0.1.0" } 37
  • 38. Providers $ ipfs dht findprovs QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6 Qmbut9Ywz9YEDrz8ySBSgWyJk41Uvm2QJPhwDJzJyGFsD6 QmceZ5vcFtpcaPeAa66xnL79xo6fRrAmx6Gp6UZAFdkrDA QmfFj5Am7Jw2DZm7s1aVdR5Ti5baT6a8B1ifcxCbya1vw5 QmVGkGSV25o3AMjcjjnPVb1PqJzrA1PvvhMiV57cMEuExb QmaAbZQVFavUub1cvsXP8tfbk7p5i2cRVvimWv5La2E9U8 QmPDcnTLF5HftAhteRGVhAHnxwNfLzm541W7LL1rpaChy7 QmPDpBw1xsGvnNmkt9z9NsgNpezKzFNwVPcLcPVh2Weuwv QmPMT3ZUATZWqZEiHd4Kjfe6H9UTTYjRJN4kqLvgWhrJpU QmPR6Ggp5BTaKtvGJ9rwn3e86dMtzPRGRNmdLG8Yp7bhkP QmNRZdPPtYycST9dPUPLQEqMoFq43fRx5pkKYBjYKuw1Fa QmNSYDHzei4vn91k1sdF7oEcBHQWVTbibEBtXUpYSdkapX QmNTXQyssJ5vMynxdW1jo5EcQq9XARS9nrGJykcYGKYbNH QmNdtfrpDhP4yaRnPTUdqynnewBF4p5tUoq6Ngw1XFdmdj QmNfFvrEoBThgW7dcPTkWjqAsicH1eq2GHsHrmCx8bMrxv QmNjm16wkUUsUoRmr3b8QoQAPZYBwfBHcygkjGbSauTSWu QmNkZvJVtf1AfkudwvkSwfV3Ru5hHFvitUugzvYBxtuPT7 QmNn2QFMrNcHstJVWnaT8XK31xe1e6HLvz7qg29yE2BGkS QmNnnkCTY1ZbtusjMAtJ9Rn5arVtaDBjwRkFTf2WdPGmRq QmNoBE4qVq7vuNtAMTqLhMYryL2YiWcrVB7eEbw4nYkjpW 38
  • 39. Wait a moment, why everything starts with Qm ? • sha2-256 • base58 • multihash 39
  • 40. IPFS use cases 1. As a mounted global filesystem, under /ipfs and /ipns. 2. As a mounted personal sync folder that automatically versions, publishes, and backs up any writes. 3. As an encrypted file or data sharing system. 4. As a versioned package manager for all software. 5. As the root filesystem of a Virtual Machine. 6. As the boot filesystem of a VM (under a hypervisor). 7. As a database: applications can write directly to the Merkle DAG data model and get all the versioning, caching, and distribution IPFS provides. 8. As a linked (and encrypted) communications platform. 9. As an integrity checked CDN for large files (without SSL). 10. As an encrypted CDN. 11. On webpages, as a web CDN. 40
  • 41. Problems in IPFS • Data is not automatically replicated by default • you may lose your data if nobody is using or pinning it, see this discussion • at the moment it serves as a filesystem cache • ipfs cluster allows files to be pinned across a cluster • IPFS cluster is not efficient on replication • at the moment, either accept it • or build your own with eraser code like Reed-Solomon algo 41
  • 42. IPFS for private usage 42
  • 44. 44