Pro Yearly is on sale from $80 to $50! »

Introduction to the IPFS

Introduction to the IPFS

IPFSについて調べたのでまとめました

Dff59e8fd0bf8973701ee5c3c2a672a5?s=128

gentam

June 29, 2017
Tweet

Transcript

  1. Introduction to the IPFS 170629 SFC Arch B3 gentam

  2. ໨࣍ • IPFSͷ໨ඪͱશମ૾ • IPFSͷσβΠϯ • IPFSͷΞϓϦέʔγϣϯ 2

  3. ໨࣍ • IPFSͷ໨ඪͱશମ૾ • IPFSͷσβΠϯ • IPFSͷΞϓϦέʔγϣϯ 3

  4. *1'4ͷ໨ඪͱશମ૾ • IPFSͷίϯηϓτ • IPFSͷಛ௃ • IPFSͷ࢓૊Έ 4

  5. *1'4ͱ͸  • The InterPlanetary File System • ҰจͰݴ͏ͱ: "Content

    Addressed, Versioned, P2P File System" • Protocol Labs < https://protocol.ai> Juan Benet Λத৺ͱͯ͠ɼ2013 12݄ࠒʹ։ൃ։࢝ • GoͰॻ͔Ε࣮ͨ૷͕͜͜< https://github.com/ipfs/go-ipfs>ʹ͋Δ 5
  6. *1'4ͱ͸  • IPFSͱ͸ɼ੒ޭͨ͠P2PγεςϜͷΞΠσΟΞΛϨΠϠʹ෼͚ͯ૊Έ ߹ΘͤΔ͜ͱͰ࣮ݱͨ͠ɼ൚༻తͳ෼ࢄϑΝΠϧγεςϜ • DHTs, BitTorrent, Git, SFS

    ... • IPFSͷجຊతͳߟ͑ํ͸ɼશͯͷσʔλΛ1ͭͷMerkle DAGʹϞσ ϧԽ͍ͯ͘͜͠ͱ 6
  7. *1'4ͱ͸  • શͯͷσόΠεΛ1ͭͷ෼ࢄϑΝΠϧγεςϜʹΑͬͯ઀ଓ͢Δ • Webʹࣅ͍ͯΔ෦෼΋͋Δ͕ɼIPFS͸ɼGitϨϙδτϦ಺ͰΦϒδΣ ΫτΛަ׵͢Δ୯ҰͷBitTorrent εϫʔϜͱ΋ݟΔ͜ͱ͕Ͱ͖Δ • IPFS͸ߴεϧʔϓοτͷɼίϯςϯπ΁ͷϋΠύʔϦϯΫΛ࣋ͬͨ

    ϒϩοΫετϨʔδΛఏڙ͢Δ • ࠷ऴతʹ͸ Permanent Web ΋໨ࢦ͢ 7
  8. *1'4ͷ໨త • HTTPΛऔΓସ͑ɼΑΓྑ͍WebΛ࡞Δ͜ͱΛ໨తͱ͢Δ • ΑΓྑ͍Web • Faster: P2PܕͰܦ༝ΛݮΒͨ͢Ί? • Safer:

    ϒϩοΫνΣʔϯͱ૊Έ߹ΘͤΔ͜ͱͰରվ᜵ • Open: ͋ΒΏΔίϯςϯπ͕ɼڞ௨ͷ໊લۭؒʹΦʔϓϯʹΞυϨ γϯά͞ΕΔ 8
  9. *1'4ͱ#MPDLDIBJO • Blockchain ͸େྔͷσʔλΛอ࣋͢Δʹ͸޲͔ͳ͍ ‣ IPFSΛར༻ͯ͠ɼαΠζͷେ͖ͳσʔλʹରԠ ‣ ͦͷΠϛϡʔλϒϧ͔ͭύʔϚωϯτͳϦϯΫΛɼϒϩοΫνΣʔ ϯʹࡌͤΔ ‣

    Blockchain্ͷΞϓϦέʔγϣϯ͸IPFSΛར༻͢Δ͜ͱͰύϒ ϦοΫʹΞΫηεՄೳͳσʔλϕʔεΛ࡞Δ͜ͱ͕Ͱ͖Δ ‣ IPFSͱBlockchain͸ͱͯ΋૬ੑ͕ྑ͍ 9
  10. – Juan Benet “The contribution of IPFS is simplifying, evolving,

    and connecting proven techniques into a single cohesive system, greater than the sum of its parts.” 10
  11. ͔͜͜Β࣍ͷ2ηΫγϣϯ͸ɼIPFSͷHP (ipfs.io) Ͱ͞Ε͍ͯΔɼಛ௃ͱ ࢓૊Έͷ֓ཁΛ·ͱΊͨ΋ͷͰ͢ɽ 11

  12. *1'4ͷ໨ඪͱશମ૾ • IPFSͷίϯηϓτ • IPFSͷಛ௃ • IPFSͷ࢓૊Έ 12

  13. )551ͷ໰୊Λղܾ͢Δ • HTTPͰ͸ϑΝΠϧΛ1౓ʹ1ͭͷϚγ ϯ͔Β͔͠μ΢ϯϩʔυͰ͖ͳ͍ɽ • IPFSͰ͸ɼෳ਺ͷϚγϯ͔Βಉ࣌ʹ ϐʔεΛμ΢ϯϩʔυՄೳ • ಈըͷసૹʹ͓͍ͯ͸P2PܕͷΞϓ ϩʔνʹ͢Δ͜ͱͰ60%ͷόϯυ෯

    Λ࡟ݮͰ͖Δ (Β͍͠ • IPFSͰ͸ɼେྔͷσʔλΛॏෳͳ͠ ʹɼޮ཰ྑ͘෼ࢄͤ͞Δ͜ͱ͕Ͱ͖Δ 13
  14. όʔδϣϯ؅ཧ • ೔ʑਓྨͷྺ࢙͸ফ͞Ε͍ͯΔ • ΢Σϒϖʔδͷฏۉతण໋͸100೔ ͔͠ͳ͍ɽओཁͳϝσΟΞͱͯ͠ར ༻͢Δʹ͸͋·Γʹෆ҆ఆ • IPFS͸gitͷΑ͏ͳɼόʔδϣϯ؅ཧ ػೳΛఏڙ͠ɼϨδϦΤϯτͳωο

    τϫʔΫΛ࡞Δ͜ͱΛγϯϓϧʹ͢ Δ 14
  15. ୤த৺Խ • Webͷத৺Խ͸ػձΛୣ͍ͬͯΔ • Πϯλʔωοτ͸ྺ࢙తʹݟͯɼਓʑ ʹฏ౳ͳ৘ใΞΫηεΛఏڙ͠ɼΠ ϊϰΣʔγϣϯΛՃ଎͖͕ͯͨ͠ɼ ۙ೥ͷத৺Խͷ܏޲͸ͦΕΛڴ͔͢ ΋ͷͰ͋Δ •

    IPFS͸ॳظͷΦʔϓϯͰϑϥοτͳ ΢ΣϒΛอͪͳ͕Β΋ɼςΫϊϩδʔ ΛΞοϓάϨʔυ͢Δ 15
  16. όοΫϘʔϯʹґଘ͠ͳ͍ • ݱࡏͷΞϓϦέʔγϣϯ͸όοΫϘʔ ϯʹґଘ͍ͯ͠Δ • ్্ࠃɼࡂ֐࣌ɼෆ҆ఆͳ઀ଓɼ͞ Βʹ͸࿭੕ؒ௨৴ͳͲʹରԠ͢Δʹ ͸ࠓͷઃܭ͸޲͍͍ͯͳ͍ • IPFS͸୯ҰͷόοΫϘʔϯʹґଘͤ

    ͣʹɼߴ͍Մ༻ੑΛ࣋ͬͨଟ༷ͰϨ δϦΤϯτͳωοτϫʔΫΛՄೳʹ ͢Δ 16
  17. *1'4ͷ໨ඪͱશମ૾ • IPFSͷίϯηϓτ • IPFSͷಛ௃ • IPFSͷ࢓૊Έ 17

  18. *1'4ͷ࢓૊Έ • ৽͍͠ϑΝΠϧΛIPFSωοτϫʔΫʹ௥Ճͨ͠ͱ͖ • ϑΝΠϧΛIPFSωοτϫʔΫ͔Β୳͢ͱ͖ ʹى͜Δ͜ͱ 18

  19. ϋογϡ஋ͷ෇༩ શͯͷϑΝΠϧͱɼͦΕΛߏ੒͢Δϒ ϩοΫ͸ɼωοτϫʔΫ಺ͰϢχʔΫ ͳࣝผࢠͱͯ͠ɼ҉߸ֶతϋογϡ஋ ͕༩͑ΒΕΔ 19

  20. ॏෳճආͱόʔδϣϯ؅ཧ • ϋογϡ஋Λࣝผࢠͱ͢ΔͨΊɼωο τϫʔΫ಺Ͱͷɼॏෳ͢Δίϯςϯ πͷଘࡏ͸๷͕ΕΔ • ͞ΒʹશͯͷϑΝΠϧ͸όʔδϣϯ ཤྺ͕อଘ͞ΕΔ 20

  21. ৘ใอଘઌͷ෼ࢄ ֤ϊʔυ͸ɼࣗ෼͕ཉ͍͠ίϯςϯπ ࣗମͱɼ୭͕ԿΛ͍࣋ͬͯΔ͔ൃݟ͢ ΔͨΊʹඞཁͳΠϯσοΫε৘ใΛ࣋ ͭ 21

  22. ϋογϡ஋͔ΒͷϑΝΠϧ୳ࠪ ϑΝΠϧΛ୳͢ࡍʹ͸ɼϢχʔΫͳϋο γϡ஋Λར༻ͯ͠ɼωοτϫʔΫʹͦ ͷσʔλΛ࣋ͭϊʔυΛਘͶΔ 22

  23. ୤த৺తͳ໊લ؅ཧ શͯͷϑΝΠϧ͸ɼIPNSͱ͍͏୤த৺ తͳ໊લ؅ཧγεςϜΛ༻͍ͯɼਓؒ ͕ಡΊΔܗͷ໊લͰ୳͢͜ͱ͕Ͱ͖Δ 23

  24. ໨࣍ • IPFSͷ໨ඪͱશମ૾ • IPFSͷσβΠϯ • IPFSͷΞϓϦέʔγϣϯ 24

  25. ͜͜·Ͱ͸IPFSͱ͍͏ϓϩδΣΫτͷഎܠ΍໨ඪɼͦͷେ·͔ͳΞϓ ϩʔνํ๏ʹ৮Ε͖ͯ·ͨ͠ɽ ͔͜͜Β͸ɼ΋͏গ͠۩ମత͔ٕͭज़తͳ෦෼Λ·ͱΊ·͢ɽ 25

  26. *1'4ͷσβΠϯ • IPFSΛߏ੒͢Δٕज़ͱͦͷಛ௃ • IPFSͷϓϩτίϧ 26

  27. *1'4Λߏ੒͢Δٕज़ͱͦͷಛ௃ • IPFS͸༷ʑͳ੒ޭٕͨ͠ज़ͱͦͷΞΠσΟΞΛ૊Έ߹ΘͤΔ͜ͱ ͰɼϑΝΠϧγεςϜΛ࣮ݱ͍ͯ͠·͢ • ͜͜Ͱ͸֤ٕज़ͷ؆୯ͳ঺հͱɼIPFS͕ಛʹར༻͢Δಛ௃Λઆ໌͠ ·͢ 27

  28. 28 IPFSͷ໨ඪͱશମ૾ˠIPFSͷίϯηϓτ • ҰจͰݴ͏ͱ: "Content Addressed, Versioned, P2P File System"

    • Protocol Labs <https://protocol.ai> Juan Benet Λத৺ͱͯ͠ɼ2013 12݄ࠒʹ։ൃ։࢝ • GoͰॻ͔Ε࣮ͨ૷͕͜͜<https://github.com/ipfs/go-ipfs>ʹ͋Δ *1'4ͱ͸ 
  29. 29 IPFSͷ໨ඪͱશମ૾ˠIPFSͷίϯηϓτ • ҰจͰݴ͏ͱ: "Content Addressed, Versioned, P2P File System"

    • Protocol Labs < https://protocol.ai> Juan Benet Λத৺ͱͯ͠ɼ2013 12݄ࠒʹ։ൃ։࢝ • GoͰॻ͔Ε࣮ͨ૷͕͜͜<https://github.com/ipfs/go-ipfs>ʹ͋Δ *1'4ͱ͸  DHT, SFS Git (+Blockchain) SFS
  30. *1'4Λߏ੒͢Δٕज़ͱͦͷಛ௃ • Routing - DHT • Block Exchanges - BitTorrent

    • Version Control Systems - Git • Self-Certified Filesystems - SFS 30
  31. *1'4Λߏ੒͢Δٕज़ͱͦͷಛ௃ • Routing - DHT • Block Exchanges - BitTorrent

    • Version Control Systems - Git • Self-Certified Filesystems - SFS 31
  32. %JTUSJCVUFE)BTI5BCMF • ෼ࢄϋογϡςʔϒϧ͸ɼϝλσʔλ΍ϐΞͷ৘ใΛௐ੔/ҡ࣋͢Δ ͨΊʹP2PγεςϜʹ͓͍ͯ޿͘ར༻͞ΕΔ • ίϯςϯπͱϊʔυʹ͏·͘IDΛ͚ͭͯɼதԝͱͳΔΠϯσοΫε αʔόͷଘࡏͳ͠ʹɼ͔͠΋ϑϥοσΟϯά΋ىͣ͜͞৘ใΛൃݟ ͢Δ͜ͱ͕ՄೳͳΦʔόʔϨΠωοτϫʔΫΛ࡞Δ 32

  33. %)5ͷྫ  Kademlia • IDͷXORΛڑ཭ؔ਺ʹ͓͍ͯ໦ߏ଄Λ࡞Δ • log(n) ͷޮ཰తͳlookup (e.g. 10,000,000

    ϊʔυͰ ໿20ϗοϓ) • ίϯτϩʔϧϝοηʔδΛݮΒ͠ɼΫΤϦʔͷΦʔόʔϔουݮগ • ௕ੜ͖ͳϊʔυΛ༏ઌ͢ΔઃܭʹΑΓDoS߈ܸʹڧ͍ ͪͳΈʹࣗ෼͸Kademlia DHTͷγϛϡϨʔγϣϯΛErlangͰ࡞Ζ͏ͱͯ͠·͢ 33
  34. %)5ͷྫ  S/Kademlia DHT • Kademlia Λ͞Βʹѱҙͷ͋Δ߈ܸʹڧ͘ηΩϡΞʹ • PKIΩʔ΍PoWΛಋೖ͠ɼSybil ߈ܸΛ೉͘͠

    • ໾൒਺ͷϊʔυ͕߈ܸऀͷ৔߹Ͱ΋ 0.85 ͷ੒ޭ཰Λ࣮ݱ 34
  35. %)5ͷྫ  Coral DSHT • Distributed Sloppy Hash Table •

    KademliaͰ͸ίϯςϯπͷIDʹ"͍ۙ"ϊʔυ͕ཉ͘͠ͳ͍৘ใ·Ͱ࣋ͭඞཁ͕ ͋ͬͨɽ • → ୅ΘΓʹ"ϙΠϯλ" (࣮ࡍʹσʔλΛ͍࣋ͬͯΔϊʔυͷΞυϨε)Λอ࣋͢ Δ͜ͱͰޮ཰Խ • ஍Ҭͱن໛ʹΑͬͯ֊૚Խ͞Εͨ"Ϋϥελ"Λ࡞Δ͜ͱͰɼ͍ۙϊʔυ͔Β୳ࡧ Λ࢝Ίɼ௿͍ϨΠςϯγʔΛ࣮ݱ 35
  36. *1'4Λߏ੒͢Δٕज़ͱͦͷಛ௃ • Routing - DHT • Block Exchanges - BitTorrent

    • Version Control Systems - Git • Self-Certified Filesystems - SFS 36
  37. #JU5PSSFOU • BitTorrent͸޿࣮͘༻͞Ε͍ͯΔP2PͷϑΝΠϧڞ༗γεςϜ • Bram Cohen ͕2001೥͔Β։ൃ • ৴པͰ͖ͳ͍ "εϫʔϜ*"಺ͰɼϑΝΠϧͷҰ෦෼Λޓ͍ʹ഑෍͠߹

    ͏࢓૊ΈΛ࣮ݱ * ಉ͡τϨϯτϑΝΠϧʹΑΓɼಉ͡ϑΝΠϧΛఏڙʗμ΢ϯϩʔυதͷϐΞά ϧʔϓશମ 37
  38. #JU5PSSFOUͷಛ௃ 1. ωοτϫʔΫʹߩݙ͢Δ(ଟ͘ΛΞοϓϩʔυ)΄Ͳૣ͘μ΢ϯϩʔυͰ͖ɼٯ ʹଞऀ͔Β΋Β͏͚ͩͰɼࣗ෼͸Ξοϓϩʔυ͠ͳ͍"Ϧʔνϟʔ"͸േͤΒΕ Δ࢓૊Έ 2. ϑΝΠϧϐʔεͷೖख͠΍͢͞Λ֬ೝ͠ɼرগͳϐʔεΛ༏ઌతʹૹΔ͜ͱͰɼ ·ͩϑΝΠϧͷҰ෦͔͍࣋ͬͯ͠ͳ͍ϐΞؒͰ΋ަ׵͕ى͜Γ΍͘͢͢Δ࢓૊ Έ 3.

    BitTorrentඪ४ͷɼ"tit-for-tat"ઓུ (ͬ͠΃ฦ͠=1ͷ࢓૊Έ) ʹ͸ಛఆͷࡡऔత ͳϐΞʹର͢Δ੬ऑੑ͕͋Δɽͦ͜Λվળͨ͠PropShareͱ͍͏ߴύϑΥʔϚ ϯεͷઓུ΋͋Δ 38
  39. *1'4Λߏ੒͢Δٕज़ͱͦͷಛ௃ • Routing - DHT • Block Exchanges - BitTorrent

    • Version Control Systems - Git • Self-Certified Filesystems - SFS 39
  40. (JU • όʔδϣϯ؅ཧγεςϜ͸ɼϑΝΠϧͷมߋΛϞσϧԽ͠ผͷόʔδϣ ϯΛޮ཰తʹ഑෍͢ΔػೳΛఏڙ • Git͸ɼ෼ࢄ؀ڥʹదͨ͠ɼMerkle DAG* ΦϒδΣΫτϞσϧʹϑΟ ϧπϦʔ΁ͷมߋΛΩϟϓνϟ͢Δ *

    Merkle Directed Acyclic Graph (ϋογϡ໦ ༗޲ඇ॥؀άϥϑ?) – ϚʔΫϧπϦʔ ͱࣅ͍ͯΔ͕ɼΑΓ൚༻తͳߏ଄ɽॏෳΛόϥϯε͢Δඞཁ͕ͳ͘ɼ༿Ͱͳ͍ ϊʔυ΋σʔλΛ࣋ͭ 40
  41. (JU 1. ΠϛϡʔλϒϧͳΦϒδΣΫτ͕ɼϑΝΠϧ (blob), σΟϨΫτϦ (tree), มߋ (commit)Λද͢ 2. ΦϒδΣΫτ͸ɼίϯςϯπͷϋογϡ஋ʹΑͬͯΞυϨε͕͚ͭΒΕΔ

    3. ଞͷΦϒδΣΫτ΁ͷϦϯΫ͸ຒΊࠐ·ΕɼMerkle DAGΛܗ੒͢Δ 4. ΄ͱΜͲͷϝλσʔλ(ϒϥϯνɼλάɼetc)͸୯ʹΦϒδΣΫτ΁ͷࢀরϙΠϯλͰ͔͠ͳ ͍ͨΊɼ࡞੒΍ߋ৽ͷॲཧ͸͍ܰ 5. όʔδϣϯͷมߋ͸ɼࢀরͷߋ৽͔ΦϒδΣΫτͷ௥Ճ 6. όʔδϣϯͷมߋΛଞͷϢʔβ΁഑෍͢Δʹ͸ɼ୯ʹΦϒδΣΫτΛసૹ͠ɼͦ͜ͷࢀরΛ ߋ৽͢Δ͚ͩ 41
  42. ࢀߟࢿྉ ͜ͷลΓ͕ͱͯ΋෼͔Γ΍͍͢ࢿྉ: ίϯϯηϓτ͔Βཧղ͢ΔGitί Ϛϯυ <https://www.slideshare.net/ktateish/git-concept1> 42

  43. *1'4Λߏ੒͢Δٕज़ͱͦͷಛ௃ • Routing - DHT • Block Exchanges - BitTorrent

    • Version Control Systems - Git • Self-Certified Filesystems - SFS 43
  44. SFS4FMG$FSUJpFE'JMFTZTUFNT • SFS ͸ɼ෼ࢄܕτϥετνΣʔϯͱɼฏ౳Ͱάϩʔόϧͳ໊લۭؒΛ ҎԼͷΑ͏ͳεΩʔϚͰ࣮ݱ͢Δ /sfs/<Location>:<HostID> Location = αʔόͷωοτϫʔΫΞυϨε HostID

    = hash(public_key || Location) 44
  45. 4'4 /sfs/<Location>:<HostID> • ͭ·ΓɼϢʔβ͸SFSϑΝΠϧγεςϜͷ໊લͦΕࣗମ͔Βαʔόͷ ެ։伴ͷਖ਼͠͞Λ֬ೝͰ͖ɼશͯͷ௨৴Λ҉߸ԽͰ͖Δ • શͯͷSFSΠϯελϯε͸ɼάϩʔόϧͳ໊લۭؒΛڞ༗͠ɼத৺ͱ ͳΔ؅ཧऀͳ͠ʹɼ҉߸ֶతʹ໊લׂ͕Γ౰ͯΒΕΔ 45

  46. *1'4ͷσβΠϯ • IPFSΛߏ੒͢Δٕज़ͱͦͷಛ௃ • IPFSͷϓϩτίϧ 46

  47. *1'4ϓϩτίϧͷߏ੒ • IPFSͷϓϩτίϧ͸αϒϓϩτίϧͷελοΫʹ෼͚ΒΕɼͦΕͧ Ε͕ҟͳΔػೳΛΧόʔ͠·͢ Identities, Network, Routing, Exchange, Objects, Files,

    Naming 47
  48. *1'4ϓϩτίϧͷߏ੒ 1. Iden99es - ϊʔυͷIDੜ੒΍ೝূΛ؅ཧ 2. Network - ଞͷϐΞͱͷ઀ଓΛ؅ཧ 3.

    Rou9ng - ಛఆͷϐΞ΍ΦϒδΣΫτΛ୳ͨ͢Ίͷ৘ใΛ؅ཧ 4. Exchange - ϒϩοΫަ׵ϓϩτίϧ(BitSwap)Λར༻ͯ͠ɼޮ཰తͳϒϩοΫ഑෍ 5. Objects - ೚ҙͷσʔλΛΞυϨε෇͖ΠϛϡʔλϒϧͳΦϒδΣΫτͷMerkle DAG ΁ 6. Files - GitʹӨڹ͞Εͨόʔδϣϯ؅ཧϑΝΠϧγεςϜ 7. Naming - self-certifying ͰมߋՄೳͳ໊લ 48
  49. *1'4ϓϩτίϧͷߏ੒ 1. Identities 2. Network 3. Routing 4. Exchange 5.

    Objects 6. Files 7. Naming 49
  50. *EFOUJUJFT • ϊʔυ͸NodeID ʹΑͬͯࣝผ͞ΕΔ • ͜Ε͸ɼS/Kademlia ʹ͓͚Δ҉߸ύζϧͱڞʹ࡞ΒΕͨެ։伴ͷϋογϡ஋ • Ϣʔβ͸ࣗ༝ʹ৽ͨͳ NodeIDΛൃߦͰ͖ɼຖճҟͳΔIDΛར༻͢Δ͜ͱ΋Ͱ͖Δ

    (͕ɼͦ ͏͢ΔͱωοτϫʔΫతʹෆརʹͳΔͨΊಉ͡IDΛ࢖͏͜ͱ͕ಈػ෇͚ΒΕΔ type NodeId Multihash type Multihash []byte // self-describing cryptographic hash digest type PublicKey []byte type PrivateKey []byte // self-describing keys type Node struct { NodeId NodeID PubKey PublicKey PriKey PrivateKey } 50
  51. *%ͷੜ੒ • S/Kademlia ϕʔεͷ IPFS ʹ͓͚ΔIDੜ੒: difficulty = <integer parameter>

    n = Node{} do { n.PubKey, n.PrivKey = PKI.genKeyPair() n.NodeId = hash(n.PubKey) p = count_preceding_zero_bits(hash(n.NodeId)) } while (p < difficulty) • ࠷ॳͷ઀ଓ࣌ʹϐΞ͸ެ։伴Λަ׵͠ɼhash(other.PublicKey) ͕ other.NodeID ͱҰக͢Δ͔֬ೝ͢Δɽ͠ͳ͔ͬͨΒ઀ଓΛ੾Δɽ 51
  52. NVMUJIBTIϑΥʔϚοτ • IPFS͸কདྷੑΛߟ͑ɼಛఆͷϋογϡؔ਺ʹґଘ͠ͳ͍Α͏ʹઃܭ ͞Ε͍ͯΔ • ۩ମతʹɼmultihash ϑΥʔϚοτ͸ҎԼͷΑ͏ʹͳ͍ͬͯΔ: <function code><digest length><digest

    bytes> • ͜͏͢Δ͜ͱͰɼηΩϡϦςΟͱ଎౓ͷͲͪΒΛॏࢹ͢Δ͔ͱ͍͏ ৔߹͝ͱʹ࠷దͳϋογϡؔ਺ΛબͿ͜ͱ΋Ͱ͖Δ 52
  53. *1'4ϓϩτίϧͷߏ੒ 1. Identities 2. Network 3. Routing 4. Exchange 5.

    Objects 6. Files 7. Naming 53
  54. /FUXPSL • IPFSͷϊʔυ͸ɼΠϯλʔωοτ্ʹ޿͘෼ࢄ͍ͯ͠Δ͔΋͠Εͳ ͍Կඦ΋ͷϊʔυͱఆظతʹ௨৴Λ͢Δ • ωοτϫʔΫ͸ҎԼͷελοΫʹ෼ׂͰ͖Δ • Transport, Reliability, Connectivity,

    Integrity, Authenticity 54
  55. /FUXPSL4UBDL  • Transport: IPFSͷτϥϯεϙʔτϨΠϠʹ͸ͲΜͳϓϩτίϧͰ΋ ࢖͏͜ͱ͕Ͱ͖Δɽಛʹ WebRTC DataChannl (ϒϥ΢βͱͷ઀ଓ࣌) ΍ɼuTP

    (LEDBAT) ͕ద͍ͯ͠Δ • Reliability: ΋͠ԼҐͷωοτϫʔΫ͕৴པੑΛఏڙ͠ͳ͍৔߹͸ɼ IPFS͕uTP΍ɼSCTPΛར༻ͯ͠৴པੑΛ֬อͰ͖Δ 55
  56. /FUXPSL4UBDL  • Connectivity: ICE (Interactive Connectivity Establishment) NATӽ͑ ͷٕज़Λར༻͢Δ

    • Integrity: ϋογϡͷνΣοΫαϜΛར༻ͯ͠ϝοηʔδͷ׬શੑΛ νΣοΫͰ͖Δ(೚ҙ) • Authenticity: HMACͱૹ৴ऀͷެ։伴Λར༻ͯ͠ɼϝοηʔδͷ৴ པੑΛνΣοΫͰ͖Δ(೚ҙ) 56
  57. NVMUJBEESϑΥʔϚοτ • multihashϑΥʔϚοτͱಉ͡Α͏ʹɼωοτϫʔΫΞυϨε͸ multiaddrͱ͍͏ϑΥʔϚοτͰදݱ • ΑͬͯIP΍ͦͷόʔδϣϯʹ΋ґଘ͠ͳ͍ # an SCTP/IPv4 connection

    /ip4/10.20.30.40/sctp/1234/ # an SCTP/IPv4 connection proxied over TCP/IPv4 /ip4/5.6.7.8/tcp/5678/ip4/1.2.3.4/sctp/1234/ 57
  58. *1'4ϓϩτίϧͷߏ੒ 1. Identities 2. Network 3. Routing 4. Exchange 5.

    Objects 6. Files 7. Naming 58
  59. 3PVUJOH • IPFSϊʔυ͸ɼҎԼͷ৚݅Λຬͨ͢ϧʔςΟϯάγεςϜ͕ඞཁ: • ଞͷϐΞͷωοτϫʔΫΞυϨεΛ୳͢͜ͱ͕Ͱ͖Δ • ಛఆͷΦϒδΣΫτΛ͍࣋ͬͯΔϐΞΛ୳͢͜ͱ͕Ͱ͖Δ • IPFSͰ͸ɼS/Kademlia ͱ

    Coral Λϕʔεͱͨ͠DSHTΛར༻ͯ͠ɼ͜ΕΛ࣮ ݱ • 1KBҎԼͷখ͞ͳσʔλ͸DHT্ʹ௚઀ɼͦΕΑΓେ͖͍σʔλ͸ࢀর(࣮ ମΛ࣋ͭNodeID)Λอଘ͢Δ 59
  60. 3PVUJOH*OUFSGBDF type IPFSRouting interface { FindPeer(node NodeId) // gets a

    particular peer's network address SetValue(key []bytes, value []bytes) // stores a small metadata value in DHT GetValue(key []bytes) // retrieves small metadata value from DHT ProvideValue(key Multihash) // announces this node can serve a large value FindValuePeers(key Multihash, min int) // gets a number of peers serving a large value } • ͜ͷΠϯλʔϑΣΠεʹै͍ͬͯ͑͢͞Ε͹ɼશ͘ผͷϧʔςΟϯάγ εςϜͱೖΕସ͑ͯ΋໰୊͸ͳ͍ 60
  61. *1'4ϓϩτίϧͷߏ੒ 1. Identities 2. Network 3. Routing 4. Exchange 5.

    Objects 6. Files 7. Naming 61
  62. #MPDL&YDIBOHF#JU4XBQ1SPUPDPM • BitSwap: BitTorrentʹΠϯεύΠΞ͞ΕͨϒϩοΫަ׵ϓϩτίϧ • have_list ʹ͋ΔϒϩοΫΛަ׵ʹΦϑΝʔ͠ͳ͕Β • want_list ͷϒϩοΫΛ୳͍ͯ͘͠

    • BitTorrentͱ͸ҧ͍ɼ͜ͷަ׵͸1ͭͷτϨϯτϑΝΠϧʹ੍ݶ͞Ε ͳ͍ ‣ ͲͷϑΝΠϧΛߏ੒͢ΔϒϩοΫ͔ͱ͍͏͜ͱ͸ؔ܎ͳ͘ɼࣗ༝ ʹ(ϒϩοΫͷ)෺ʑަ׵Λ͢ΔϚʔέοτϓϨΠε 62
  63. #JU4XBQ$SFEJU • BitSwap͸ɼ୯७ͳΫϨδοτγεςϜʹΑΓҎԼͷޮՌΛ࣋ͭ: • Seeder (ϊʔυʹ͕શͯͷσʔλΛμ΢ϯϩʔυ͠ऴΘͬͨঢ়ଶ)ʹɼΞο ϓϩʔυΛଓ͚ΔΠϯηϯςΟϒΛ༩͑Δ • Leecher (ࣗ෼͸Ξοϓϩʔυ͠ͳ͍ͨͩ৐Γϊʔυ)Λ๷͙

    • ͜Ε͸ɼϐΞୡ͕ޓ͍ʹΫϨδοτͷόϥϯεΛه࿥͠ɼ"ෛ࠴"͕૿͑Δ΄ ͲʹϒϩοΫΛૹ৴͢Δ֬཰͕Լ͕ͬͯ͘Δ͜ͱͰ࣮ݱ • ͞Βʹɼ্ͷ࢓૊ΈʹΑͬͯૹΒͳ͍͜ͱʹͨ͠ϐΞ͸ɼignore_cooldown (10 sec)ͷ͚࣌ؒͩແࢹ͢Δ͜ͱͰɼ֬཰తήʔϜΛ͢Δ͜ͱΛ๷͙ 63
  64. #JU4XBQ4USBUFHZ   • BitTorrentʹ͓͍ͯσϑΥϧτͷઓུ͸ "tit-for-tat"͕ͩɼଞʹ΋༷ʑ ͳઓུ͕ଘࡏ͢Δ: • BitTyrant: ଎౓Λॏࢹͯ͠SelfishʹPeerΛબ୒͍ͯ͘͠ઓུ

    • BitThief: ࣗ෼͸શ͘ΞοϓϩʔυͤͣʹͨͩͷΓ͢Δઓུ • PropShare: ΦʔΫγϣϯͷϞσϧʹج͖ͮൺ཰తʹγΣΞ ‣ ަ׵ͷύϑΥʔϚϯεΛ࠷େԽͤͭͭ͞ɼͨͩͷΓϊʔυ΍ະ஌ͷ ઓུʹରͯ͠଱ੑΛ࣋ͨͳ͚Ε͹͍͚ͳ͍ɽ 64
  65. #JU4XBQ4USBUFHZ  • BitSwapʹ͓͚Δݱঢ়ͷબ୒͸debt ratio: r Ͱεέʔϧͤͨ͞γάϞ Πυؔ਺ (ෛ࠴ऀʹରͯ͠ૹ৴͢Δ֬཰) •

    r͕৴པͷई౓ͱͳΓɼγϏϧ߈ܸ΁ͷ଱ੑ΋࣋ͭ: աڈʹଟ͘ͷ σʔλΛަ׵ͨ͠৴པͰ͖Δϊʔυʹ͸׮େͰɼ৽ೖΓʹ͸ݫ͍͠ 65 P(send | r) = 1 1 + e6 3r r = bytes send bytes recv + 1
  66. #JU4XBQ-FEHFS • ϊʔυ͸ledgerʹɼଞͷϊʔυͱͷ௨৴Λه࿥͢Δ • ίωΫγϣϯΛ࡞Δࡍʹ͸ɼ͜ͷledgerΛަ׵͢Δ type Ledger struct { owner

    NodeId partner NodeId bytes_sent int bytes_recv int timestamp Timestamp } • ަ׵ͨ͠ledger͕Ұக͠ͳ͚Ε͹ɼॳظԽ͞ΕΔɽ͋Δ͍͸ෆਖ਼ͩͱ൑ அͯ͠ަ׵Λڋ൱͢Δ͜ͱ΋Ͱ͖Δ 66
  67. #JU4XBQͷ઀ଓྫ 1. Open: ϐΞ͸ ledgers Λ߹ҙ͕औΕΔ·ͰૹΓ߹͏ 2. Sending: want_lists ͱ

    ϒϩοΫΛަ׵͠߹͏ 3. Close: ϐΞ͕઀ଓΛ੾Δ 4. Ignored(ྫ֎): ϐΞ͸λΠϜΞ΢τ΍ɼෆਖ਼ͳઓུʹΑͬͯແࢹ͢Δ 67
  68. *1'4ϓϩτίϧͷߏ੒ 1. Identities 2. Network 3. Routing 4. Exchange 5.

    Objects 6. Files 7. Naming 68
  69. 0CKFDU.FSLMF%"( • DHTͱBitSwapʹΑͬͯɼσʔλͷอଘͱ഑෍ΛڊେͳP2PγεςϜ Ͱߦ͏͜ͱ͕Մೳʹͳͬͨ • IPFS͸͜ͷ্ʹɼGitͷσʔλߏ଄ΛҰൠԽͨ͠ Merkle DAG Λܗ੒ ͢Δ

    69
  70. .FSLMF%"(ͷಛ௃ 1. Content Addressing: શͯͷίϯςϯπͱϦϯΫ͸ϢχʔΫͳ multihashνΣοΫαϜʹΑͬͯಛఆ͞ΕΔ 2. Tamper resistance: ΋͠σʔλ͕վ͟Μ͞ΕͨΓɼյΕͨΓͨ͠৔

    ߹͸νΣοΫαϜʹΑͬͯݕ஌Ͱ͖Δ 3. Deduplica9on: ಺༰͕ಉ͡σʔλ͸ɼશ͘ಉ͡ϋογϡʹͳΔͨΊ ॏෳͯ͠อଘ͞ΕΔ͜ͱ͸ͳ͍ 70
  71. *1'40CKFDU IPFS ϦϯΫͱΦϒδΣΫτͷϑΥʔϚοτ: type IPFSLink struct { Name string //

    name or alias of this link Hash Multihash // cryptographic hash of target Size int // total size of target } type IPFSObject struct { links []IPFSLink // array of links data []byte // opaque content data } 71
  72. JQGTίϚϯυͱΦϒδΣΫτ • ipfs ίϚϯυͰ৭ʑͳૢ࡞͕Ͱ͖Δ (brew install ipfs) • ྫ: ϦϑΝϨϯεΛશͯϦετ͢Δ

    > ipfs ls /XLZ1625Jjn7SubMDgEyeaynFuR84ginqvzb XLYkgq61DYaQ8NhkcqyU7rLcnSa7dSHQ16x 189458 less XLHBNmRQ5sJJrdMPuu48pzeyTtRo39tNDR5 19441 script XLF4hwVHsVuZ78FZK6fozf8Jj9WEURMbCX4 5286 template <object multihash> <object size> <link name> • શͯͷΦϒδΣΫτ͕ϋογϡ஋Λ࣋ͭ͜ͱ͕Θ͔Δ 72
  73. 1BUIT  • ఻౷తͳUNIXϑΝΠϧγεςϜ΍Webͱಉ͡ύεͷϞσϧΛ࢖͏ # format /ipfs/<hash-of-object>/<name-path-to-object> # example /ipfs/XLYkgq61DYaQ8NhkcqyU7rLcnSa7dSHQ16x/foo.txt

    73
  74. 1BUIT  • /ipfs ϓϨϑΟοΫεʹΑͬͯɼطଘͷγεςϜʹϚ΢ϯτͰ͖Δ • άϩʔόϧͳ"ϧʔτ"͸ଘࡏ͠ͳ͍ͨΊɼ/ipfs/ ͷޙʹ͸ඞͣΦϒ δΣΫτͷϋογϡ͕དྷΔ ‣

    શͯͷϦϯΫ͕ϧʔτʹͳΓ͏Δ: /ipfs/<hash-of-foo>/bar/baz /ipfs/<hash-of-bar>/baz /ipfs/<hash-of-baz> 74
  75. ͦͷଞ • (౰વ͚ͩͲ) શͯͷΦϒδΣΫτ͸Ͳ͔͜ͷϊʔυͷ෺ཧతͳετϨʔ δʹଘࡏ͢Δ ‣ ΞΫηεͨ͠΋ͷ͸ϩʔΧϧʹΩϟογϡ͞ΕΔ (ظؒ͸ઃఆՄ • ಛఆͷΦϒδΣΫτΛϩʔΧϧʹཹΊ͓͖͍ͯͨ৔߹ɼ͸"ϐϯ"͢Δ͜ͱ

    ͕Ͱ͖Δ • ΦϒδΣΫτΛੈքʹެ։͢Δʹ͸ɼΩʔΛDHTʹ௥Ճ͢Δ͚ͩ ‣ όʔδϣϯΛߋ৽ͨ͠৔߹͸ผͷΦϒδΣΫτͱͳΔͨΊɼͦΕΛτ ϥοΩϯά͢Δʹ͸·ͨผͷΦϒδΣΫτ͕ඞཁ 75
  76. ΦϒδΣΫτͷ҉߸Խ • IPFSͰ͸ΦϒδΣΫτϨϕϧͰ҉߸Խ͕ߦΘΕΔ • ϢʔβͷΩʔνΣʔϯͰࣗಈతʹೝূ΍ॺ໊Λߦ͏ type EncryptedObject struct { Object

    []bytes // raw object data encrypted Tag []bytes // optional tag for encryption groups } type SignedObject struct { Object []bytes // raw object data signed Signature []bytes // hmac signature PublicKey []multihash // multihash identifying key } 76
  77. *1'4ϓϩτίϧͷߏ੒ 1. Identities 2. Network 3. Routing 4. Exchange 5.

    Objects 6. Files 7. Naming 77
  78. 'JMFT • IPFS ͸ҎԼͷΦϒδΣΫτͷछྨΛఆٛ͢Δ: 1. block: a variable-size block of

    data. 2. list: a collection of blocks or other lists. 3. tree: a collection of blocks, lists, or other trees. 4. commit: a snapshot in the version history of a tree. 78
  79. ܦҢͷิ଍ • Gitͷߏ଄Λͦͷ··ར༻͔͕ͨͬͨ͠ɼҎԼͷཧ༝ʹΑͬͯվมͨ͠΋ͷ Λར༻͍ͯ͠Δ: 1. ߴ଎ͳαΠζϧοΫΞοϓ (→objectsʹαΠζͷऩूػೳΛ௥Ճ) 2. ڊେϑΝΠϧͷෳ੡ (→

    listΦϒδΣΫτΛ௥Ճ) 3. commitsͷtree΁ͷຒΊࠐΈ • ͦΕͰ΋IPFSͱGitͷߏ଄͸े෼ʹ͍ۙͨΊม׵͢Δ͜ͱ͕Ͱ͖Δ • ϑΝΠϧΦϒδΣΫτ͸JSONͰදه͞ΕΔ͕ɼ࣮ࡍʹ͸protobufͰόΠφ ϦΤϯίʔυ͞Ε͍ͯΔ 79
  80. 'JMF0CKFDUCMPC • blob͸ΞυϨεΛ࣋ͭσʔλ୯ҐͰɼϑΝΠϧΛදݱ͢Δ • IPFSͷblob͸GitͷͦΕ΍ɼҰൠతϑΝΠϧγεςϜʹ͓͚Δσʔλ ϒϩοΫͱಉ͡Α͏ͳ΋ͷɽ { "data": "some data

    here", // blobs have no links } 80
  81. 'JMF0CKFDUMJTU • list ͸ෳ਺ͷblob͔Βߏ੒͞ΕΔڊେͳϑΝΠϧͳͲΛҙຯ͢Δ { "data": ["blob", "list", "blob"], //

    lists have an array of object types as data "links": [ { "hash": "XLYkgq61DYaQ8NhkcqyU7rLcnSa7dSHQ16x", "size": 189458 }, { "hash": "XLHBNmRQ5sJJrdMPuu48pzeyTtRo39tNDR5", "size": 19441 }, { "hash": "XLWVQDqxo9Km9zLyquoC9gAP8CL1gWnHZ7z", "size": 5286 } // lists have no names in links ] } 81
  82. 'JMF0CKFDUUSFF • tree ͸σΟϨΫτϦ: ໊લ͔Βϋογϡ΁ͷϚοϓͰɼGitͱࣅ͍ͯΔ { "data": ["blob", "list", "blob"],

    // trees have an array of object types as data "links": [ { "hash": "XLYkgq61DYaQ8NhkcqyU7rLcnSa7dSHQ16x", "name": "less", "size": 189458 }, { "hash": "XLHBNmRQ5sJJrdMPuu48pzeyTtRo39tNDR5", "name": "script", "size": 19441 }, { "hash": "XLWVQDqxo9Km9zLyquoC9gAP8CL1gWnHZ7z", "name": "template", "size": 5286 } // trees do have names ] } 82
  83. 'JMF0CKFDUDPNNJU  • commit͸೚ҙͷΦϒδΣΫτͷ͋Δ࣌ؒʹ͓͚Δεφοϓγϣοτ > ipfs file-cat <ccc111-hash> --json {

    "data": { "type": "tree", "date": "2014-09-20 12:44:06Z", "message": "This is a commit message." }, "links": [ { "hash": "<ccc000-hash>", "name": "parent", "size": 25309 }, { "hash": "<ttt111-hash>", "name": "object", "size": 5198 }, { "hash": "<aaa111-hash>", "name": "author", "size": 109 } ] } 83
  84. 'JMF0CKFDUDPNNJU  > ipfs file-cat <ttt111-hash> --json { "data": ["tree",

    "tree", "blob"], "links": [ { "hash": "<ttt222-hash>", "name": "ttt222-name", "size": 1234 }, { "hash": "<ttt333-hash>", "name": "ttt333-name", "size": 3456 }, { "hash": "<bbb222-hash>", "name": "bbb222-name", "size": 22 } ] } 84
  85. *1'4ϓϩτίϧͷߏ੒ 1. Identities 2. Network 3. Routing 4. Exchange 5.

    Objects 6. Files 7. Naming 85
  86. *1/4/BNJOHBOE.VUBCMF4UBUF • ͜͜·Ͱ࡞Γ্͖͛ͯͨʮΠϛϡʔλϒϧͳΦϒδΣΫτʯ͸ʮ໊લͷมߋʯ ͱ૬ੑ͕ѱ͍ • ͔͜͠͠ͷ··Ͱ͸ɼ৽͍͠ίϯςϯπʹؔ͢Δίϛϡχέʔγϣϯ͸શͯɼ IPFS֎෦ͰϦϯΫΛૹ৴͢Δඞཁ͕ग़ͯ͘Δ • ྫ: ϒϩάͷهࣄΛमਖ਼ͨ͠

    ‣ ౤ߘͷϋογϡ(= ID)͕มΘͬͯ͠·͏ ‣ هࣄҰཡϖʔδ͕ݹ͍هࣄʹϦϯΫͯ͠͠·͍ͬͯΔͷͰमਖ਼͢Δ ‣ Ұཡϖʔδͷϋογϡ(= ID)͕มΘͬͯ͠·͏ ‣ ͋ʔ... 86
  87. /BNFJO*1'4 ‣ SFSͷωʔϛϯάεΩʔϚΛར༻͢Δ͜ͱͰɼάϩʔόϧͳ໊લۭؒ ʹɼself-certifiedͰɼʮϛϡʔλϒϧʯͳ໊લΛ࡞Δ͜ͱ͕Ͱ͖Δ 87

  88. 4FMG$FSUJpFE/BNFT • IPFSͷ໊લ͸ҎԼͷεΩʔϚΛ࢖͏ 1. ·ͣɼNodeId = hash(node.PubKey) Ͱ͋Δ 2. શͯͷϢʔβʹɼNodeIdΛϓϨϑΟοΫεͱͨ͠"ϛϡʔλϒϧ"ͳ໊લۭؒΛ༩͑Δ:

    /ipns/<NodeId> 3. Ϣʔβ͸͜ͷύεʹࣗ෼ͷϓϥΠϕʔτΩʔͰαΠϯͨ͠ΦϒδΣΫτΛެ։Ͱ͖Δ ྫ͑͹: /ipns/XLF2ipQ4jD3UdeX5xp1KBgeHRhemUtaA8Vm/docs/hello 4. ଞͷϢʔβ͕ΦϒδΣΫτΛಘͨͱ͖ʹ͸ɼॺ໊͕ެ։伴ͱNodeIdʹҰக͢Δ͔͔֬ ΊΔ͜ͱͰɼϛϡʔλϒϧͳύεΛ࣮ݱ 88
  89. 4FMG$FSUJpFE/BNFT • IPFSͷ໊લ͸ҎԼͷεΩʔϚΛ࢖͏ 1. ·ͣɼNodeId = hash(node.PubKey) Ͱ͋Δ 2. શͯͷϢʔβʹɼNodeIdΛϓϨϑΟοΫεͱͨ͠"ϛϡʔλϒϧ"ͳ໊લۭؒΛ༩͑Δ:

    /ipns/<NodeId> 3. Ϣʔβ͸͜ͷύεʹࣗ෼ͷϓϥΠϕʔτΩʔͰαΠϯͨ͠ΦϒδΣΫτΛެ։Ͱ͖Δ ྫ͑͹: /ipns/XLF2ipQ4jD3UdeX5xp1KBgeHRhemUtaA8Vm/docs/hello 4. ଞͷϢʔβ͕ΦϒδΣΫτΛಘͨͱ͖ʹ͸ɼॺ໊͕ެ։伴ͱNodeIdʹҰக͢Δ͔͔֬ ΊΔ͜ͱͰɼϛϡʔλϒϧͳύεΛ࣮ݱ 88 f͡Όͳͯ͘n
  90. 89 IPFSϓϩτίϧͷߏ੒ → 5. Object • ఻౷తͳUNIXϑΝΠϧγεςϜ΍Webͱಉ͡ύεͷϞσϧΛ࢖͏ # format /ipfs/<hash-of-object>/<name-path-to-object>

    # example /ipfs/XLYkgq61DYaQ8NhkcqyU7rLcnSa7dSHQ16x/foo.txt 1BUIT 
  91. 89 IPFSϓϩτίϧͷߏ੒ → 5. Object • ఻౷తͳUNIXϑΝΠϧγεςϜ΍Webͱಉ͡ύεͷϞσϧΛ࢖͏ # format /ipfs/<hash-of-object>/<name-path-to-object>

    # example /ipfs/XLYkgq61DYaQ8NhkcqyU7rLcnSa7dSHQ16x/foo.txt 1BUIT  Ұํipfsͷύε͸"Φϒ δΣΫτ"ͷϋογϡ
  92. *OUFS1MBOFUBSZ/BNF4QBDF • "ipns"ͱ"ipfs"ɼ͸ϛϡʔλϒϧ͔Πϛϡʔλϒϧ͔؆୯ʹࣝผͰ͖ ΔΑ͏ʹผͷϓϨϑΟοΫεͱͯ͠ར༻͢Δ • IPNSͷ໊લ͸ίϯςϯπͷΞυϨεͰ͸ͳ͍ͨΊɼެ։͢Δʹ͸ ϧʔςΟϯάγεςϜΛར༻͢Δ: 1. ී௨ͷΠϛϡʔλϒϧͳΦϒδΣΫτͱͯ͠IPFSͰެ։ 2.

    ͦͷϋογϡ஋Λϝλσʔλͱͯ͠ϧʔςΟϯάγεςϜʹެ։ routing.setValue(NodeId, <ns-object-hash>) 90
  93. )VNBO'SJFOEMZ/BNFT • IPNS ͸ҎԼΛར༻ͯ͠ɼ௕֮ͯ͑͘ΒΕͳ͍ϋογϡΛώϡʔϚϯ ϑϨϯυϦʔͳܗʹ͢Δ͜ͱ͕Ͱ͖Δ 1. Peer Links 2. DNS

    TXT IPNS Records 3. Proquint Pronounceable Identifiers 4. Name Shortening Services 91
  94. 1FFS-JOLT • Ϣʔβ͸ଞͷϢʔβͷΦϒδΣΫτ΁ͷϦϯΫΛࣗ෼ͷΦϒδΣΫτʹ௚઀ೖΕΔ ͜ͱ͕Ͱ͖Δ • ͜Ε͸ɼweb of trustΛ࡞Δ͜ͱʹ΋໾ཱͭ # Alice

    links to bob Bob ipfs link /<alice-pk-hash>/friends/bob /<bob-pk-hash> # Eve links to Alice ipfs link /<eve-pk-hash/friends/alice /<alice-pk-hash> # Eve also has access to Bob /<eve-pk-hash/friends/alice/friends/bob # access Verisign certified domains /<verisign-pk-hash>/foo.com 92
  95. %/4595*1/43FDPSET • /ipns/<domain> ͕༗ޮͳυϝΠϯ໊Ͱ͋ͬͨ৔߹ɼIPFS͸ɼDNS TXT ϨίʔυΛϧοΫΞοϓ͢Δ: • IPFS͸ɼ஋ΛଞͷΦϒδΣΫτͷϋογϡ஋͔IPNSͷύεͱղऍ͢ Δ: #

    this DNS TXT record ipfs.benet.ai. TXT "ipfs=XLF2ipQ4jD3U ..." # behaves as symlink ln -s /ipns/XLF2ipQ4jD3U /ipns/fs.benet.ai 93
  96. 1SPRVJOU1SPOPVODFBCMF*EFOUJpFST • όΠφϦΛൃԻՄೳͳจࣈྻʹ͢ΔεΩʔϚ͕ଘࡏ͍ͯͯ͠ɼIPFS ͸ProquintΛαϙʔτ͍ͯ͠Δɽྫ͑͹: # this proquint phrase /ipns/dahih-dolij-sozuk-vosah-luvar-fuluh #

    will resolve to corresponding /ipns/KhAwNprxYVxKqpDZ 94
  97. /BNF4IPSUFOJOH4FSWJDF • ໊લͷϋογϡ஋Λ୹ॖͯ͠ಡΈ΍͍͢ܗʹ͢ΔαʔϏεΛ࡞Δ͜ ͱ͕Ͱ͖Δ • ͜Ε͸ɼࠓͷDNSͱWeb URLͷؔ܎ʹ͍ۙ: # User can

    get a link from /ipns/shorten.er/foobar # To her own namespace /ipns/XLF2ipQ4jD3UdeX5xp1KBgeHRhemUtaA8Vm 95
  98. ໨࣍ • IPFSͷ໨ඪͱશମ૾ • IPFSͷσβΠϯ • IPFSͷΞϓϦέʔγϣϯ 96

  99. *1'4ͷൃలՄೳੑ 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). 97 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. 12.As a new Permanent Web where links do not die.
  100. ଘࡏ͢Δ*1'4ΞϓϦέʔγϣϯ • ·ͱΊͯ͋ΔϨϙδτϦ <https://github.com/ipfs/awesome-ipfs> • IPFSBin - PastebinͷIPFS൛ • Interplanetary

    Wiki - IPFS্ͷWiki • ... 98
  101. ؔ࿈ͦ͠͏ͳϓϩδΣΫτ • Storj <https://storj.io/> • Gitchain <http://gitchain.org/> • ZeroTier One

    <https://www.zerotier.com/> • MaidSafe <https://maidsafe.net> • SIA < http://sia.tech/> • Upspin <https://upspin.io> 99
  102. 3FGFSFODFT • IPFS HP <https://ipfs.io/> • White Paper <https://github.com/ipfs/papers/raw/master/ipfs- cap2pfs/ipfs-p2p-file-system.pdf>

    • the morning paper<https://blog.acolyer.org/2015/10/05/ipfs-content- addressed-versioned-p2p-file-system/> 100