! The Dark Forest ”
A Distributed File System for Secure P2P Applications
github.com/wnfs-wg github.com/fission-codes
Slide 2
Brooklyn Zelenka @expede
Slide 3
Brooklyn Zelenka @expede
• Cofounder & CTO at Fission • @FissionCodes • https://fission.codes • Infra & SDK for edge apps • Standards: UCAN, EIPs, FVM, Multiformats, CAR Pool, WNFS,&c
Slide 4
Meta
WNFS
Slide 5
Meta
WNFS
WN FS
Slide 6
Meta
WNFS First principles, flipped tradeoffs “Can’t be done” → super hard but works & scales! Sharp corners Under explored design space Databases, blind busses, nym servers, etc Novel ways to recombine a few ideas
WN FS
Slide 7
Meta
WNFS First principles, flipped tradeoffs “Can’t be done” → super hard but works & scales! Sharp corners Under explored design space Databases, blind busses, nym servers, etc Novel ways to recombine a few ideas
) e l i F (
H C TE
WN FS
Slide 8
Meta
WNFS First principles, flipped tradeoffs “Can’t be done” → super hard but works & scales! Sharp corners Under explored design space Databases, blind busses, nym servers, etc Novel ways to recombine a few ideas
) e l i F (
⅔
H C TE
Secret Filesystem
WN FS ⅓
Public Filesystem
Slide 9
Video Killed the Radio Star
A New Environment #
Slide 10
A New Environment #
New Environment, Who Dis?
Slide 11
A New Environment #
New Environment, Who Dis? Then $
Now “
Slide 12
A New Environment #
New Environment, Who Dis? Need
Then $
Now ”
Convenient %
Critical &
Slide 13
A New Environment #
New Environment, Who Dis? Then $
Now ”
Need
Convenient %
Critical &
Location
Data Centre ’
Powerful Clients (M1, IoT) ⌚)*
Slide 14
A New Environment #
New Environment, Who Dis? Then $
Now ”
Need
Convenient %
Critical &
Location
Data Centre ’
Powerful Clients (M1, IoT) ⌚)*
+
,
Access
Slide 15
A New Environment #
New Environment, Who Dis? Then $
Now ”
Need
Convenient %
Critical &
Location
Data Centre ’
Powerful Clients (M1, IoT) ⌚)*
+
,
Bandwidth -
Latency ⏲
Access Bottleneck
Slide 16
A New Environment #
New Environment, Who Dis? Then $
Now ”
Need
Convenient %
Critical &
Location
Data Centre ’
Powerful Clients (M1, IoT) ⌚)*
+
,
Bandwidth -
Latency ⏲
/0
123 … 4
Access Bottleneck Market
Slide 17
A New Environment #
Toxic Data
• 2005: Credit card data in DB • 2015: Personal info in DB • 2025: Nothing in DB
Slide 18
A New Environment #
What LAMP Has Wrought
Slide 19
A New Environment #
What LAMP Has Wrought Users 5678
Developer 9
Slide 20
A New Environment #
What LAMP Has Wrought Users 5678 Browser + REST / JSON-RPC / GraphQL ↕ Server ⚙ Data Store < DevOps = Developer 9
Slide 21
A New Environment #
What LAMP Has Wrought Users 5678 Browser + REST / JSON-RPC / GraphQL ↕ Server ⚙ Data Store < DevOps = Developer 9
Slide 22
A New Environment #
Federate Data, Not Apps
Slide 23
A New Environment #
Federate Data, Not Apps
Alice’s Stuff
Bob’s Stuff
Carol’s Stuff
Slide 24
A New Environment #
Federate Data, Not Apps Photo Gallery
Alice’s Stuff
Bob’s Stuff
Carol’s Stuff
Slide 25
A New Environment #
Federate Data, Not Apps Photo Gallery
Alice’s Stuff
Bob’s Stuff
Carol’s Stuff
Social Media
?
Slide 26
A New Environment #
Federate Data, Not Apps Photo Gallery
Alice’s Stuff
Bob’s Stuff
Music Player
@
Carol’s Stuff
Social Media
?
Slide 27
A New Environment #
Common Needs
Slide 28
A New Environment #
Common Needs
A Local-first access control 2. B Arbitrary metadata 3. C Mutability 4. D Versioning (→ concurrency)
Slide 29
A New Environment #
Common Needs
A Local-first access control 2. B Arbitrary metadata 3. C Mutability 4. D Versioning (→ concurrency)
Slide 30
A New Environment #
Ideally Invisible & General
Slide 31
A New Environment #
Ideally Invisible & General
Web Apps
e.g. Fission Drive, Diffuse Music
Slide 32
A New Environment #
Ideally Invisible & General
Web Apps
e.g. Fission Drive, Diffuse Music
Slide 33
A New Environment #
Ideally Invisible & General
Web Apps
e.g. Fission Drive, Diffuse Music
Tools for Thought e.g. TiddlyWiki
Slide 34
A New Environment #
Ideally Invisible & General
Web Apps
e.g. Fission Drive, Diffuse Music
Tools for Thought e.g. TiddlyWiki
Data Science e.g. Qri
Slide 35
A New Environment #
Ideally Invisible & General
Web Apps
e.g. Fission Drive, Diffuse Music
Tools for Thought e.g. TiddlyWiki
Data Science e.g. Qri
Storage Networks WIP
Slide 36
A New Environment #
WNFS API
Slide 37
A New Environment #
WNFS API add cat ls mkdir rm mv write
Slide 38
A New Environment #
WNFS API add cat ls mkdir rm mv write
https://guide.fission.codes/developers/webnative/file-system-wnfs
Slide 39
A New Environment #
WNFS API add cat ls mkdir rm mv write
https://guide.fission.codes/developers/webnative/file-system-wnfs
Slide 40
Content Addressing Primer From a File System Perspective E
Slide 41
Content Addressing E
Slide 42
Content Addressing E
The limitation of local knowledge is the fundamental fact about the setting in which we work, and it is a very powerful limitation – Nancy Lynch, A Hundred Impossibility Proofs for Distributed Computing
Slide 43
Content Addressing E
Addressing Stack
Slide 44
Content Addressing E
Addressing Stack
Virtual (Machine) Location E
(42.123.45.6/path)@t0 = content1 (42.123.45.6/path)@t1 = content2
Slide 45
Content Addressing E
Addressing Stack
Named Location F Virtual (Machine) Location E
{DNS → IP} (42.123.45.6/path)@t0 = content1 (42.123.45.6/path)@t1 = content2
Slide 46
Content Addressing E
Addressing Stack
Universal Content ID
{hash(content) → content}
Named Location F
{DNS → IP}
Virtual (Machine) Location E
(42.123.45.6/path)@t0 = content1 (42.123.45.6/path)@t1 = content2
Slide 47
Content Addressing E
IPLD Node
Slide 48
Content Addressing E
IPLD Node
Bytes 0101000101001001010
Slide 49
Content Addressing E
IPLD Node
Bytes 0101000101001001010
Links
Foo
Bar
Slide 50
Content Addressing E
Raw IPLD Node
IPLD Node
Bytes 0101000101001001010
Links
bafy12345 Foo
Bar
Slide 51
Content Addressing E
Raw IPLD Node
IPLD Node
Bytes 0101000101001001010
Links
bafy12345 Foo
bafyABCDE
Bar
bafyVWXYZ
Slide 52
Content Addressing E
Mutability
Slide 53
Content Addressing E
Mutability
TXT _dnslink.akiko.example.com
Slide 54
Content Addressing E
Mutability
TXT _dnslink.akiko.example.com
bafy12345
Slide 55
Content Addressing E
Mutability
TXT _dnslink.akiko.example.com
bafy12345
Slide 56
Content Addressing E
Mutability
TXT _dnslink.akiko.example.com
bafyABCDE bafy12345
Slide 57
Content Addressing E
Mutability
TXT _dnslink.akiko.example.com
bafyABCDE bafy12345
Content Addressing E
Hard & Soft Links akiko.example.com
Slide 62
Content Addressing E
Hard & Soft Links akiko.example.com
boris.example.com
Slide 63
Content Addressing E
Hard & Soft Links akiko.example.com
Hard Links New for the web! Direct reference 2 pointers ~ deduplicate boris.example.com
Slide 64
Content Addressing E
Hard & Soft Links akiko.example.com
Hard Links New for the web! Direct reference 2 pointers ~ deduplicate boris.example.com
Slide 65
Content Addressing E
Hard & Soft Links akiko.example.com
Hard Links New for the web! Direct reference 2 pointers ~ deduplicate boris.example.com
Soft Links Symlink or web link (URL) Pointer ~ latest Latest may break
Slide 66
Content Addressing E
Data Partitioning & Selective Replication
Slide 67
Content Addressing E
Data Partitioning & Selective Replication
,
Slide 68
Content Addressing E
Data Partitioning & Selective Replication
,
Slide 69
Content Addressing E
Data Partitioning & Selective Replication
,
Slide 70
Content Addressing E
Layout
Slide 71
Content Addressing E
Layout
WNFS Root
Slide 72
Content Addressing E
Layout
WNFS Root
Owner DID G
Slide 73
Content Addressing E
Layout
WNFS Root
Public H
Photos
Avatars
Owner DID G
Apps
Slide 74
Content Addressing E
Layout
WNFS Root
Public H
Photos
Avatars
Owner DID G
Apps
Secret I
Photos
Apps
Family Photos
My Gallery
Slide 75
Content Addressing E
Layout
WNFS Root
Public H
Photos
Avatars
Owner DID G
Apps
Photos
Family Photos
Secret I
Apps
My Gallery
Sharing Out =
Keys & Pointers
Slide 76
Content Addressing E
Layout
WNFS Root
Public H
Photos
Avatars
Owner DID G
Apps
Photos
Family Photos
Secret I
Apps
My Gallery
Sharing In J
Sharing Out =
Keys and Keys and Keys & Pointers Pointers Pointers
Keys & Pointers
Slide 77
Content Addressing E
Layout
WNFS Root
Public H
Photos
Avatars
Owner DID G
Apps
Photos
Family Photos
Secret I
Apps
My Gallery
Sharing In J
Sharing Out =
Keys and Keys and Keys & Pointers Pointers Pointers
Keys & Pointers
Slide 78
Content Addressing Primer E
Semantic Layers
Slide 79
Content Addressing Primer E
Semantic Layers Noun
Files
Data
Slide 80
Content Addressing Primer E
Semantic Layers Noun
Visibility Decrypted
Files Encrypted Data
Slide 81
Content Addressing Primer E
Semantic Layers Noun
Visibility Decrypted
→
Files → Encrypted Data
→
Slide 82
Content Addressing Primer E
Semantic Layers Noun
Visibility Decrypted
Example →
Paths & Content
→
Headers & Node Layout
→
Merkle Set
Files Encrypted Data
Slide 83
Content Addressing Primer E
Semantic Layers Noun
Visibility Decrypted
Example →
Paths & Content
→
Headers & Node Layout
→
Merkle Set
Files Encrypted Data
Slide 84
Public Files K WNFS Data Model Public
Photos
Avatars
Apps
Slide 85
Public Files K
Virtual Nodes
Slide 86
Public Files K
Virtual Nodes Raw Content (Hash Linked Binary Data)
Slide 87
Public Files K
Virtual Nodes Raw Content (Hash Linked Binary Data)
File Node
Slide 88
Public Files K
Virtual Nodes Raw Content (Hash Linked Binary Data)
File Node Kernel Header
Slide 89
Public Files K
Virtual Nodes Raw Content (Hash Linked Binary Data)
File Node Kernel Header
Userland Raw Data
Slide 90
Public Files K
Virtual Nodes Raw Content (Hash Linked Binary Data)
File Node Kernel Header
Userland Raw Data
Userland Metadata
Slide 91
Public Files K
Virtual Nodes Raw Content (Hash Linked Binary Data)
File Node Kernel Header
Userland Raw Data
Userland Metadata
Slide 92
Public Files K
Virtual Nodes Raw Content (Hash Linked Binary Data)
Virtual Node
File Node Kernel Header
Userland Raw Data
Consistent interface Arbitrary metadata Tags, creators, MIME, sources, &c
Userland Metadata
Slide 93
Public Files K
Virtual Nodes Raw Content (Hash Linked Binary Data)
Virtual Node
File Node Kernel Header
Userland Raw Data
Consistent interface Arbitrary metadata Tags, creators, MIME, sources, &c
Userland Metadata
Directory Node Kernel Header
Index
Metadata
Slide 94
Public Files K
Hash-Linked Layout
Slide 95
Public Files K
Hash-Linked Layout
bafyVWXYZ
beach.png
Slide 96
Public Files K
Hash-Linked Layout
bafy12345
Vacation
bafyVWXYZ
beach.png
Slide 97
Public Files K
Hash-Linked Layout
bafy12345
Vacation
bafyVWXYZ
beach.png
caricature.jpg
bafyLMNOP
Slide 98
Public Files K
Hash-Linked Layout
bafy12345
Vacation
Avatars@r0
bafyABCDE
bafyVWXYZ
beach.png
caricature.jpg
bafyLMNOP
Slide 99
Public Files K
Hash-Linked Layout bafy0000
Photos@r0
bafy12345
Vacation
Avatars@r0
bafyABCDE
bafyVWXYZ
beach.png
caricature.jpg
bafyLMNOP
Slide 100
Public Files K
Hash-Linked Layout Photos@r0
Vacation
Avatars@r0
beach.png
caricature.jpg
Slide 101
Public Files K
Persistent Versioning Photos@r0
Vacation
Avatars@r0
beach.png
caricature.jpg
Slide 102
Public Files K
Persistent Versioning Photos@r0
Vacation
Avatars@r0
beach.png
caricature.jpg Revision 0
Slide 103
Public Files K
Persistent Versioning Photos@r0
Vacation
Avatars@r0
beach.png
caricature.jpg Revision 0 L
Slide 104
Public Files K
Persistent Versioning Photos@r0
Vacation
Avatars@r0
beach.png
caricature.jpg Revision 0
Revision 1 L
Slide 105
Public Files K
Persistent Versioning Photos@r0
Vacation
Avatars@r0
beach.png
caricature.jpg Revision 0
smiling.png Revision 1
L
Slide 106
Public Files K
Persistent Versioning Photos@r0
Vacation
Avatars@r0
Avatars@r1
beach.png
caricature.jpg
smiling.png
Revision 0
Revision 1 L
Slide 107
Public Files K
Persistent Versioning Photos@r0
Vacation
Avatars@r0
Avatars@r1
beach.png
caricature.jpg
smiling.png
Revision 0
Revision 1 L
Slide 108
Public Files K
Persistent Versioning Photos@r0
Photos@r1
Vacation
Avatars@r0
Avatars@r1
beach.png
caricature.jpg
smiling.png
Revision 0
Revision 1 L
Slide 109
Public Files K
Persistent Versioning Photos@r0
Photos@r1
Vacation
Avatars@r0
Avatars@r1
beach.png
caricature.jpg
smiling.png
Revision 0
Revision 1 L
Slide 110
Public Files K
Persistent Versioning Photos@r0
Photos@r1
Vacation
Avatars@r0
Avatars@r1
beach.png
caricature.jpg
smiling.png
Revision 0
Revision 1 L
Slide 111
Public Files K
Persistent Versioning Photos@r0
Photos@r1
Vacation
Avatars@r0
Avatars@r1
beach.png
caricature.jpg
smiling.png
Revision 0
Revision 1 L
Slide 112
Public Files K
Persistent Versioning Photos@r0
ChildHasEvent
Vacation
Avatars@r0
beach.png
caricature.jpg
Photos@r1
InsertNew
Revision 0
smiling.png Revision 1
L
Avatars@r1
Slide 113
Public Files K
Persistent Versioning Photos@r0
ChildHasEvent
Vacation
Avatars@r0
beach.png
caricature.jpg
Photos@r1
InsertNew
Revision 0
smiling.png Revision 1
L
Avatars@r1
Slide 114
Public Files K
Rearranged
Photos@r1
ChildHasEvent Avatars@r1 Photos@r0 InsertNew
Vacation
Avatars@r0
beach.png
caricature.jpg
headshot.png
Slide 115
Public Files K
Rearranged
Photos@r1
M
ChildHasEvent Avatars@r1 Photos@r0 InsertNew
Vacation
Avatars@r0
beach.png
caricature.jpg
headshot.png
Slide 116
Public Files K
Rearranged
Photos@r1
M
ChildHasEvent Avatars@r1 Photos@r0 InsertNew
Vacation
Avatars@r0
beach.png
caricature.jpg
headshot.png
Slide 117
Public Files K
It’s All Just Maps
Slide 118
Public Files K
It’s All Just Maps
Slide 119
Public Files K
It’s All Just Maps
Slide 120
Public Files K
It’s All Just Maps Multiple?! (More on this later)
Slide 121
Public Files K
It’s All Just Maps
Slide 122
Public Files K
It’s All Just Maps
Slide 123
Public Files K
Single Public File History
Slide 124
Public Files K
Single Public File History
Single File History / “Causal Shadow”
Slide 125
Public Files K
Single Public File History
A
Single File History / “Causal Shadow”
Slide 126
Public Files K
Single Public File History
A
B
Single File History / “Causal Shadow”
Slide 127
Public Files K
Single Public File History
A
B
Single File History / “Causal Shadow”
C
Slide 128
Public Files K
Single Public File Confluence B
C
A
Single File History / “Causal Shadow”
Slide 129
Public Files K
Single Public File Confluence B
C
A
X
W
Single File History / “Causal Shadow”
Y
Slide 130
Public Files K
Single Public File Confluence B
C
≠
A
X
W
Single File History / “Causal Shadow”
Y
Slide 131
Public Files K
Single Public File Confluence B
C
A
X
W
Single File History / “Causal Shadow”
Y
Slide 132
Public Files K
Single Public File Confluence B
C
Z
A
X
W
Single File History / “Causal Shadow”
Y
Slide 133
Public Files K
Single Public File Confluence
B
C
A
Z W
X
Y
Slide 134
Public Files K
Directory History
B
C
A
Z W
X
Y
Slide 135
Public Files K
Directory History PB
PC
PA
PZ PW
PX
B
PY
C
A
Z W
X
Y
Slide 136
Public Files K
Directory History + Extra Updates PB + 1
PB
PC + 1
PC
PA
PZ PW
PX + 1
PX
B
PY
C
A
Z W
X
Y
Slide 137
Public Files K
Directory History + Extra Updates PB + 1
PB
PC + 1
PC
PA
PZ PW
PX + 1
PX
B
PY
C
A
Z W
X
Y
Slide 138
Public Files K
Directory History + Extra Updates PB + 1
PB
PC + 1
PC
PA
PZ PW
PX + 1
PX
B
PY
C
A
Z W
X
Y
Slide 139
Public Files K
Diff Checkpointing
Slide 140
Public Files K
Diff Checkpointing
bafyZYX
bafyY00
bafyABC
Slide 141
Public Files K
Diff Checkpointing
bafy123 bafyZYX
bafyY00
bafyABC
bafy789
bafyhai
Slide 142
Public Files K
Diff Checkpointing
bafy123 bafyZYX
bafyY00
bafy789
bafyABC bafyX00
bafy456
bafyhai
Slide 143
Public Files K
Diff Checkpointing
bafy123 bafyZYX
bafyY00
bafy789
bafyhai
bafyABC bafyX00
bafy456
bafy0Y2
Slide 144
Public Files K
Diff Checkpointing Skip to nodes ending in “00”
bafy123 bafyZYX
bafyY00
bafy789
bafyhai
bafyABC bafyX00
bafy456
bafy0Y2
Slide 145
Public Files K
Diff Checkpointing Skip to nodes ending in “00”
bafy123 bafyZYX
bafyY00
bafy789
bafyhai
bafyABC bafyX00
bafy456
bafy0Y2
Slide 146
Public Files K
Diff Checkpointing Skip to nodes ending in “00”
bafy123 bafyZYX
bafyY00
bafy789
bafyhai
bafyABC bafyX00
bafy456
bafy0Y2
Slide 147
Public Files K
Diff Checkpointing Skip to nodes ending in “00”
bafy123 bafyZYX
bafyY00
bafy789
bafyhai
bafyABC bafyX00
bafy456
bafy0Y2
Slide 148
Public Files K
Diff Checkpointing Skip to nodes ending in “00”
bafy123 bafyZYX
bafyY00
bafy789
bafyhai
bafyABC bafyX00
bafy456
bafy0Y2
Slide 149
Public Files K
Diff Checkpointing Skip to nodes ending in “00”
bafy123 bafyZYX
bafyY00
bafy789
bafyhai
bafyABC bafyX00
bafy456
bafy0Y2
Slide 150
Public Files K
Diff Checkpointing Skip to nodes ending in “00”
bafy123 bafyZYX
bafyY00
bafy789
bafyhai
bafyABC bafyX00
bafy456
bafy0Y2
Slide 151
Public Files K
Diff Checkpointing Skip to nodes ending in “00”
bafy123 bafyZYX
bafyY00
bafy789
bafyhai
bafyABC bafyX00
bafy456
bafy0Y2
Slide 152
Public Files K
Diff Checkpointing Skip to nodes ending in “00”
bafy123 bafyZYX
bafyY00
bafy789
bafyhai
bafyABC bafyX00
bafy456
bafy0Y2
Slide 153
Public Files K
…Moving On…
Slide 154
Public Files K
…Moving On…
Slide 155
㊙ Secret Files O
Distributed Storage When The Pipes Are Broken P
Slide 156
Slide 157
Cryptography is a tool for turning lots of different problems into key management problems Dr. Lea Kissner, Google’s Global Lead of Privacy Technologies
Slide 158
Secret Files O
Dark Forest
Slide 159
Secret Files O
Dark Forest
Slide 160
Secret Files O
Dark Forest CHAMP (weight 16)
Slide 161
Secret Files O
Dark Forest
163 > 4k buckets CHAMP 164 > 65k buckets (weight 16) 165 > 1M buckets
Secret Files O
Single Private Node
Binary Encrypted Node Q
Slide 179
Secret Files O
Single Private Node
Binary
AES-256 (file)
Encrypted Node Q
R
File Kernel Header
Raw Data
Metadata
Slide 180
Secret Files O
Single Private Node
Directory Kernel Header
Index
Binary
AES-256 (file)
Encrypted Node Q
R
Metadata
File Kernel Header
Raw Data
Metadata
Slide 181
Secret Files O
Single Private Node Binary
AES-256 (dir)
Encrypted Node Q
R
Binary
AES-256 (file)
Encrypted Node Q
R
Directory Kernel Header
Index
Metadata
File Kernel Header
Raw Data
Metadata
Slide 182
Secret Files O
Single Private Node Binary
AES-256 (dir)
Encrypted Node Q
R
Binary Encrypted Node Q
??? AES-256 (file)
R
Directory Kernel Header
Index
Metadata
???
File Kernel Header
Raw Data
Metadata
Slide 183
Secret Files O
Keys… Lots of Keys Encrypted Node Q
R
Encrypted Node Q
R
Encrypted Node Q
R
Encrypted Node Q
R
Slide 184
Secret Files O
Keys… Lots of Keys Encrypted Node Q
R
Encrypted Node Q
R
Encrypted Node Q
R
Encrypted Node Q
R
Slide 185
Secret Files O
Keys… Lots of Keys Encrypted Node Q
Encrypted Node Q
Encrypted Node Q
Encrypted Node Q
R
Wrap Up Y
Is That All?
• Hash linked files • Privacy-preserving paths • Cryptrees: one key per entrypoint • Temporal access control • History & fork/merge on public and private data
Slide 272
Wrap Up Y
Future Work
• Wasm & native SDKs based on rs-wnfs — soon! • Local-first, encrypted-at-rest, collaborative datalog • Faster, more reliable networking • ZK-ify private tree certificates • FUSE support
Slide 273
Wrap Up Y
Where To Get Started
guide.fission.codes github.com/wnfs-wg/spec github.com/wnfs-wg/rs-wnfs
Slide 274
Slide 275
The Difficult is that which can be done immediately; the Impossible that which takes a little longer.
— George Santayana