โšก๐Ÿ“ฆ CAR Pool & More ๐Ÿš™๐Ÿ’จ A Pragmatic Improvement to Sync Performance github.com/fission-suite/spec/car-pool

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

Some peers are โ€œmore peerโ€ than others (especially in an operator context)

BROOKLYN ZELENKA JUSTIN JOHNSON @expede CTO @ Fission @justincjohnson IPFS Engineer @ Fission Wonโ€™t have time to cover everything in depth. Come talk to us after, or read the spec ;)

Caveat Trusted, Point-to-Point IPLD Transfer

The Problem Pain In Practice โค๐Ÿฉน

The Problem Why?

The Problem Why? We ๐Ÿ’• IPLD Fission has deeply nested, cross-linked data that Cannot fit into browser storage Benefits from deduplication Has multiple writers Using mature, universally supported transports would be awesome โ€œLight clientsโ€ Speed of light concerns

The Problem Food. Water. Shelter.

The Problem Food. Water. Shelter.

The Problem Flakiness in Browsers & CLI & GitHub Actions

The Problem Flakiness in Browsers & CLI & GitHub Actions ๐Ÿ–ฅ

The Problem Are You There? ๐Ÿคณ

The Problem Are You There? ๐Ÿคณ Keeping nodes reliably connected in production is extremely di cult (browser, server, desktop, mobile) Private networks donโ€™t make sense for our use case ffi (Weโ€™d love to share an operator node architecture wish list with any maintainers, though)

The Problem Are You There? ๐Ÿคณ Keeping nodes reliably connected in production is extremely di cult (browser, server, desktop, mobile) Private networks donโ€™t make sense for our use case (Weโ€™d love to share an operator node architecture wish list with any maintainers, though) ffi Up/down over a HTTP Gateway is just LARPing decentralization ๐ŸŒถ

The Problem Are You There? ๐Ÿคณ Keeping nodes reliably connected in production is extremely di cult (browser, server, desktop, mobile) Private networks donโ€™t make sense for our use case (Weโ€™d love to share an operator node architecture wish list with any maintainers, though) Up/down over a HTTP Gateway is just LARPing decentralization ๐ŸŒถ ffi Native push doesnโ€™t make sense

The Problem Are You There? ๐Ÿคณ Keeping nodes reliably connected in production is extremely di cult (browser, server, desktop, mobile) Private networks donโ€™t make sense for our use case (Weโ€™d love to share an operator node architecture wish list with any maintainers, though) Up/down over a HTTP Gateway is just LARPing decentralization ๐ŸŒถ Native push doesnโ€™t make sense ffi ๐Ÿ–ฅ

The Problem Are You There? ๐Ÿคณ Keeping nodes reliably connected in production is extremely di cult (browser, server, desktop, mobile) Private networks donโ€™t make sense for our use case (Weโ€™d love to share an operator node architecture wish list with any maintainers, though) Up/down over a HTTP Gateway is just LARPing decentralization ๐ŸŒถ Native push doesnโ€™t make sense ffi ๐Ÿ–ฅ ๐Ÿ’พ

The Problem Bitswap Redux

The Problem Bitswap Redux

The Problem Bitswap Redux ๐ŸŽ?

The Problem Bitswap Redux ๐ŸŽ? ๐ŸŽ!

The Problem Bitswap Redux ๐ŸŽ? ๐Ÿ‘€ ๐ŸŽ!

The Problem Bitswap Redux ๐ŸŽ? ๐Ÿ‘€ ๐ŸŽ! ๐Ÿ”‘๐ŸŒฒ?

The Problem Bitswap Redux ๐ŸŽ? ๐Ÿ‘€ ๐ŸŽ! ๐Ÿ”‘๐ŸŒฒ? ๐Ÿ”‘๐ŸŒฒ!

The Problem Bitswap Redux ๐ŸŽ? ๐Ÿ‘€ ๐ŸŽ! ๐Ÿ”‘๐ŸŒฒ? ๐Ÿ”‘๐ŸŒฒ! ๐Ÿ‘€

The Problem Bitswap Redux ๐ŸŽ? ๐Ÿ‘€ ๐ŸŽ! ๐Ÿ”‘๐ŸŒฒ? ๐Ÿ”‘๐ŸŒฒ! ๐Ÿ‘€ ๐Ÿ’พ ๐ŸŽŸ ๐Ÿ–ผ?

The Problem Bitswap Redux ๐ŸŽ? ๐Ÿ‘€ ๐ŸŽ! ๐Ÿ”‘๐ŸŒฒ? ๐Ÿ”‘๐ŸŒฒ! ๐Ÿ‘€ ๐Ÿ’พ ๐ŸŽŸ ๐Ÿ–ผ? ๐ŸŽŸ!

The Problem Bitswap Redux ๐ŸŽ? ๐Ÿ‘€ ๐ŸŽ! ๐Ÿ”‘๐ŸŒฒ? ๐Ÿ”‘๐ŸŒฒ! ๐Ÿ‘€ ๐Ÿ’พ ๐ŸŽŸ ๐Ÿ–ผ? ๐ŸŽŸ! ๐Ÿ‘€

The Problem Bitswap Redux ๐ŸŽ? ๐Ÿ‘€ ๐ŸŽ! ๐Ÿ”‘๐ŸŒฒ? ๐Ÿ”‘๐ŸŒฒ! ๐Ÿ‘€ ๐Ÿ’พ ๐ŸŽŸ ๐Ÿ–ผ? ๐ŸŽŸ! ๐Ÿ‘€ ๐Ÿงธ?

The Problem Bitswap Redux ๐ŸŽ? ๐Ÿ‘€ ๐ŸŽ! ๐Ÿ”‘๐ŸŒฒ? ๐Ÿ”‘๐ŸŒฒ! ๐Ÿ‘€ ๐Ÿ’พ ๐ŸŽŸ ๐Ÿ–ผ? ๐ŸŽŸ! ๐Ÿ‘€ ๐Ÿงธ? ๐Ÿงธ!

The Problem Bitswap Redux ๐ŸŽ? ๐Ÿ‘€ ๐ŸŽ! ๐Ÿ”‘๐ŸŒฒ? ๐Ÿ”‘๐ŸŒฒ! ๐Ÿ‘€ ๐Ÿ’พ ๐ŸŽŸ ๐Ÿ–ผ? ๐ŸŽŸ! ๐Ÿ‘€ ๐Ÿงธ? ๐Ÿงธ!

The Problem Bitswap Redux ๐Ÿ—œ ๐ŸŽ? ๐Ÿ‘€ ๐ŸŽ! ๐Ÿ”‘๐ŸŒฒ? ๐Ÿ”‘๐ŸŒฒ! ๐Ÿ‘€ ๐Ÿ’พ ๐ŸŽŸ ๐Ÿ–ผ? ๐ŸŽŸ! ๐Ÿ‘€ ๐Ÿงธ? ๐Ÿงธ!

The Problem Breadth vs Depth

The Problem Breadth vs Depth

The Problem Breadth vs Depth โœ…

The Problem Breadth vs Depth โœ…

The Problem Breadth vs Depth โœ… โŒ

The Problem Breadth vs Depth โŒ โœ… โ˜

Prior Art On the Shoulders of Giants

Prior Art IPFS Ecosystem

Prior Art IPFS Ecosystem Qriโ€™s DSync GraphSync, Selectors (orthogonal) WNFS(v1) Hashed History Table Merkle Bloom

The Problem Papers ๐Ÿ“œ

The Problem Papers ๐Ÿ“œ To Push or Pull: On Reducing Communication and Synchronization in Graph Computations Whatโ€™s The Di erence? E cient Set Reconciliation Without Prior Context Synchronizing Namespaces with Invertible Bloom Filters The Hash History Approach for Reconciling Mutual Inconsistency HEX BLOOM: An E cient Method for Authenticity and Integrity Verification in Privacy-preserving Computing ffi ffi ff The Distributed Bloom Filter

CAR Mirror One-to-One

CAR Mirror Strategy

CAR Mirror Strategy Reduce graph scope Send index with request Use heuristics to find deduplication

CAR Mirror

CAR Mirror Balancing Factors

CAR Mirror Balancing Factors Latency Accuracy/Deduplication

CAR Mirror Balancing Factors Latency Accuracy/Deduplication

CAR Mirror Balancing Factors Latency Accuracy/Deduplication

CAR Mirror Balancing Factors Latency Equilibrium TL;DR We can a ord to be messy ff Accuracy/Deduplication

CAR Mirror First Reduce Scope

CAR Mirror First Reduce Scope AOT Mutable pointers (IPNS, DNSLink, ENS, di ed CID, etc) ff Previous CAR Mirror sessions

CAR Mirror First Reduce Scope AOT Mutable pointers (IPNS, DNSLink, ENS, di ed CID, etc) Previous CAR Mirror sessions Adaptive Optimization ff Previous CAR Mirror rounds

CAR Mirror First Reduce Scope AOT Mutable pointers (IPNS, DNSLink, ENS, di ed CID, etc) Previous CAR Mirror sessions Adaptive Optimization Previous CAR Mirror rounds No Overlap or Cold Start If the set is small, use random nodes ff โ€œWorst caseโ€ looks very similar to Bitswap

CAR Mirror Back of the Napkin

CAR Mirror Back of the Napkin 500k nodes

CAR Mirror Back of the Napkin 500k nodes 46-59 chars + 1 delimiter each ~ average 53 chars each

CAR Mirror Back of the Napkin 500k nodes 46-59 chars + 1 delimiter each ~ average 53 chars each 53 ASCII chars x 500k nodes = 26.5MB

CAR Mirror Back of the Napkin 500k nodes 46-59 chars + 1 delimiter each ~ average 53 chars each 53 ASCII chars x 500k nodes = 26.5MB Gzipped ~ 11.5MB

CAR Mirror Back of the Napkin 500k nodes 46-59 chars + 1 delimiter each ~ average 53 chars each 53 ASCII chars x 500k nodes = 26.5MB Gzipped ~ 11.5MB

CAR Mirror Back of the Napkin 500k nodes 46-59 chars + 1 delimiter each ~ average 53 chars each 53 ASCII chars x 500k nodes = 26.5MB Gzipped ~ 11.5MB ๐Ÿค” ? r e t t e b o d e w Can

CAR Mirror Bloom Filter Primer

CAR Mirror Context and Heuristics

CAR Mirror Context and Heuristics 500k nodes @ FPP 1/1M = 1.71MB

CAR Mirror Context and Heuristics (Recommend +1 OOM) 500k nodes @ FPP 1/1M = 1.71MB

CAR Mirror Context and Heuristics (Recommend +1 OOM) 500k nodes @ FPP 1/1M = 1.71MB 93% savings! ๐Ÿ‘

CAR Mirror Context and Heuristics (Recommend +1 OOM) 500k nodes @ FPP 1/1M = 1.71MB Gzipped ~ 896 KB 93% savings! ๐Ÿ‘

CAR Mirror Context and Heuristics (Recommend +1 OOM) 500k nodes @ FPP 1/1M = 1.71MB 93% savings! ๐Ÿ‘ Gzipped ~ 896 KB 92% savings! ๐Ÿ‘

CAR Mirror Context and Heuristics (Recommend +1 OOM) 500k nodes @ FPP 1/1M = 1.71MB 93% savings! ๐Ÿ‘ Gzipped ~ 896 KB 92% savings! ๐Ÿ‘ AKA ~ 1 x OOM ๐ŸŽ‰ Zero false positives on average

CAR Mirror Stages

CAR Mirror Stages Selection Narrowing Transmission Graph Status Cleanup

CAR Mirror Stages Selection Narrowing Transmission Graph Status Cleanup Next Round

CAR Mirror Over the Wire

CAR Mirror Over the Wire Bloom CID Roots CAR

CAR Mirror Over the Wire Requestor Pull Bloom CID Roots CAR

CAR Mirror Over the Wire Requestor Pull Bloom CID Roots CAR Requestor Push

Meta Pull Previous Round Bloom & Roots ๐Ÿฅบ ๐Ÿฆธ ๐Ÿ“ƒ๐ŸŒธ Analyze New Roots New Bloom ๐Ÿ“€๐Ÿ“€๐Ÿ“€๐Ÿ“€๐Ÿ“€ Updated Bloom & Roots Previous Round Hash Set Analyze & Fetch Response CAR Updated Hash Set

Meta Push Previous Round Bloom & Roots ๐Ÿฅบ ๐Ÿฆธ Previous Round Hash Set ๐Ÿฅต ๐Ÿ“€๐Ÿ“€๐Ÿ“€๐Ÿ“€๐Ÿ“€๐Ÿ“ƒ Store & Analyze Request CAR DAG Bloom ๐ŸŒธ ๐Ÿ“ƒ Updated Bloom & Roots Bloom & CID Roots Updated Hash Set

CAR Mirror Straggler Cleanup ๐Ÿงน ๐Ÿงน ๐Ÿงน

CAR Mirror Graph Contraction

CAR Pool Many-to-One

CAR Pool Why

CAR Pool Why Recover multiple providers Stream in true parallel Work sharing Stepping stone to trustless network seeding (more later)

CAR Pool Requestor-Controlled Sharding A-H I-P Q-Z ๐Ÿฆธ ๐Ÿฆธ ๐Ÿฆธ ๐Ÿ“ฑ

CAR Pool Invertible Bloom Filter (IBF) Primer

CAR Pool Invertible Bloom Filter (IBF) Primer 1 0 1 1 0 1 0 0 0 1 0 0 0 1 0 1 0 0

CAR Pool Invertible Bloom Filter (IBF) Primer 1 0 1 1 0 1 0 0 0 1 0 (Not to scale ๐Ÿ“) 0 0 1 0 1 0 0

CAR Pool Invertible Bloom Filter (IBF) Primer 1 0 1 1 0 1 0 0 0 1 0 0 0 1 0 1 0 0 (Not to scale ๐Ÿ“) XOR 3 XOR 2 XOR 6 XOR 4 XOR 7 XOR 5 XOR 2

CAR Pool Invertible Bloom Filter (IBF) Primer 1 0 1 1 0 1 0 0 0 1 0 0 0 1 0 1 0 0 (Not to scale ๐Ÿ“) XORed CIDs XOR 3 XOR 2 XOR 6 XOR 4 XOR 7 XOR 5 XOR 2

CAR Pool Invertible Bloom Filter (IBF) Primer 1 0 1 1 0 1 0 0 0 1 0 0 0 1 0 1 0 0 (Not to scale ๐Ÿ“) Counter XORed CIDs XOR 3 XOR 2 XOR 6 XOR 4 XOR 7 XOR 5 XOR 2

CAR Pool Invertible Bloom Filter (IBF) Primer 1 0 1 1 0 1 0 0 0 1 0 0 0 1 0 1 0 0 (Not to scale ๐Ÿ“) Counter XORed CIDs XOR 3 XOR 2 XOR 6 XOR 4 XOR 7 XOR 5 XOR 2 XOR 1 XOR 4 XOR 3 XOR 1 XOR 2 XOR 2 XOR 3

CAR Pool Invertible Bloom Filter (IBF) Primer 1 0 1 1 0 1 0 0 0 1 0 0 0 1 0 1 0 0 (Not to scale ๐Ÿ“) Counter XORed CIDs XOR 3 XOR 2 XOR 6 XOR 4 XOR 7 XOR 5 XOR 2 XOR 1 XOR 4 XOR 3 XOR 1 XOR 2 XOR 2 XOR 3 +

CAR Pool Invertible Bloom Filter (IBF) Primer 1 0 1 1 0 1 0 0 0 1 0 0 0 1 0 1 0 0 (Not to scale ๐Ÿ“) Counter XORed CIDs XOR 3 XOR 2 XOR 6 XOR 4 XOR 7 XOR 5 XOR 2 XOR 1 XOR 4 XOR 3 XOR 1 XOR 2 XOR 2 XOR 3

  • =

CAR Pool Invertible Bloom Filter (IBF) Primer 1 0 1 1 0 1 0 0 0 1 0 0 0 1 0 1 0 0 (Not to scale ๐Ÿ“) Counter XORed CIDs XOR 3 XOR 2 XOR 6 XOR 4 XOR 7 XOR 5 XOR 2 XOR 1 XOR 4 XOR 3 XOR 1 XOR 2 XOR 2 XOR 3 XOR 1 XOR 4 XOR 3 XOR 1 XOR 2 XOR 2 XOR 3

  • =

CAR Pool Invertible Bloom Filter (IBF) Primer 1 0 1 1 0 1 0 0 0 1 0 0 0 1 0 1 0 0 (Not to scale ๐Ÿ“) Counter XORed CIDs XOR 3 XOR 2 XOR 6 XOR 4 XOR 7 XOR 5 XOR 2 XOR 1 XOR 4 XOR 3 XOR 1 XOR 2 XOR 2 XOR 3

  • = XOR 1 XOR 4 XOR 3 XOR 1 XOR 2 XOR 2 XOR 3

CAR Pool Invertible Bloom Filter (IBF) Primer 1 0 1 1 0 1 0 0 0 1 0 0 0 1 0 1 0 0 (Not to scale ๐Ÿ“) Counter XORed CIDs XOR 3 XOR 2 XOR 6 XOR 4 XOR 7 XOR 5 XOR 2 + = XOR 1 XOR 4 XOR 3 XOR 1 XOR 2 XOR 2 XOR 3

XOR 1 XOR 4 XOR 3 XOR 1 XOR 2 XOR 2 XOR 3

CAR Pool Invertible Bloom Filter (IBF) Primer 1 0 1 1 0 1 0 0 0 1 0 0 0 1 0 1 0 0 (Not to scale ๐Ÿ“) Counter XORed CIDs XOR 3 XOR 2 XOR 6 XOR 4 XOR 7 XOR 5 XOR 2 + = XOR 1 XOR 4 XOR 3 XOR 1 XOR 2 XOR 2 XOR

3 ๐ŸงนCleanup XOR 1 XOR 4 XOR 3 XOR 1 XOR 2 XOR 2 XOR 3

CAR Pool Invertible Bloom Filter (IBF) Primer 1 0 1 1 0 1 0 0 0 1 0 0 0 1 0 1 0 0 (Not to scale ๐Ÿ“) Counter XORed CIDs XOR 3 XOR 2 XOR 6 XOR 4 XOR 7 XOR 5 XOR 2 + = XOR 1 XOR 4 XOR 3 XOR 1 XOR 2 XOR 2 XOR

3 ๐ŸงนCleanup XOR 1 XOR 4 XOR 3 XOR 1 XOR 2 XOR 2 XOR 3

CAR Pool Provider Coordinator ๐Ÿฆธ ๐ŸŒธ๐Ÿ” ๐Ÿคน ๐Ÿ“ฑ ๐ŸŒธ๐Ÿ” ๐Ÿฆธ

CAR Pool Linear Network Coding

BONUS: Wild Ideas for Future Research PSI, PSU, NN Compression, XOR-Folding, etc

CAR Pool PSI youtube.com/watch?v=tsCD4i9SpxA

CAR Pool XOR-Folding https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3527984

An Eager Backbone ๐Ÿฆด Content Addressed Alliance Teaser

๐ŸŽ‰ Thank You, IPFS รพing ๐Ÿ‡ฎ๐Ÿ‡ธ https://fission.codes โœจ github.com/fission-suite/spec โœจ {brooklyn,justin}@fission.codes @expede & @justincjohnson