<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>IPFS on Bitsy Wiki</title>
    <link>https://wiki.bitsy.services/wiki/cs/ipfs/</link>
    <description>Recent content in IPFS on Bitsy Wiki</description>
    <generator>Hugo</generator>
    <language>en</language>
    <atom:link href="https://wiki.bitsy.services/wiki/cs/ipfs/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Content Identifiers</title>
      <link>https://wiki.bitsy.services/wiki/cs/ipfs/cid/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://wiki.bitsy.services/wiki/cs/ipfs/cid/</guid>
      <description>&lt;p&gt;A &lt;strong&gt;content identifier (CID)&lt;/strong&gt; is the name &lt;a href=&#34;https://wiki.bitsy.services/wiki/cs/ipfs&#34;&gt;IPFS&lt;/a&gt; gives a block.&#xA;It is not a bare hash: it is a hash wrapped in enough metadata to say which hash&#xA;function produced it, how long the digest is, how the bytes it names should be&#xA;interpreted, and which alphabet the whole thing is written in. Every one of&#xA;those is a decision that would otherwise have to be agreed out of band, and&#xA;baking them into the identifier is what lets the format change without breaking&#xA;the names already in circulation.&lt;/p&gt;</description>
    </item>
    <item>
      <title>UnixFS and Chunking</title>
      <link>https://wiki.bitsy.services/wiki/cs/ipfs/unixfs/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://wiki.bitsy.services/wiki/cs/ipfs/unixfs/</guid>
      <description>&lt;p&gt;A hash names one block. A film does not fit in one block, and neither does a&#xA;directory of ten thousand files. &lt;strong&gt;UnixFS&lt;/strong&gt; is the layout that turns files and&#xA;directories into a &lt;a href=&#34;https://wiki.bitsy.services/wiki/cs/dag&#34;&gt;Merkle DAG&lt;/a&gt; of blocks, and it is the reason&#xA;&lt;a href=&#34;https://wiki.bitsy.services/wiki/cs/ipfs&#34;&gt;IPFS&lt;/a&gt; can hand out a single&#xA;&lt;a href=&#34;https://wiki.bitsy.services/wiki/cs/ipfs/cid&#34;&gt;content identifier (CID)&lt;/a&gt; for something far larger than&#xA;anything it moves in one piece.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-chunker&#34;&gt;The chunker&lt;a class=&#34;anchor&#34; href=&#34;#the-chunker&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Import starts by cutting the byte stream into chunks. Kubo&amp;rsquo;s default is&#xA;&lt;code&gt;size-262144&lt;/code&gt; — fixed 256 KiB pieces, cut at offsets that ignore the content&#xA;entirely.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Content Routing and Bitswap</title>
      <link>https://wiki.bitsy.services/wiki/cs/ipfs/content-routing/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://wiki.bitsy.services/wiki/cs/ipfs/content-routing/</guid>
      <description>&lt;p&gt;Fetching a &lt;a href=&#34;https://wiki.bitsy.services/wiki/cs/ipfs/cid&#34;&gt;content identifier (CID)&lt;/a&gt; is two problems that&#xA;&lt;a href=&#34;https://wiki.bitsy.services/wiki/cs/ipfs&#34;&gt;IPFS&lt;/a&gt; solves with two separate subsystems. &lt;em&gt;Routing&lt;/em&gt; answers&#xA;&amp;ldquo;which peers claim to have this block&amp;rdquo;. &lt;em&gt;Transfer&lt;/em&gt; gets the bytes from one of&#xA;them. Neither is guaranteed to succeed, and they fail for unrelated reasons —&#xA;which is why a CID that stops resolving is rarely a storage problem.&lt;/p&gt;&#xA;&lt;h2 id=&#34;provider-records-and-the-amino-dht&#34;&gt;Provider records and the Amino DHT&lt;a class=&#34;anchor&#34; href=&#34;#provider-records-and-the-amino-dht&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;The public IPFS distributed hash table (DHT), named &lt;strong&gt;Amino&lt;/strong&gt; in 2023 to&#xA;separate the specific network from the Kademlia protocol it runs, maps a&#xA;multihash — the raw digest inside the CID, without the version and codec&#xA;wrapper — to a list of peers advertising it. A node holding a block &lt;em&gt;provides&lt;/em&gt;&#xA;it by writing a record to the peers whose IDs sit closest to that multihash in&#xA;the keyspace. Keying on the digest rather than the whole CID means two CIDs over&#xA;the same bytes, differing only in codec or base, share one set of provider&#xA;records.&lt;/p&gt;</description>
    </item>
    <item>
      <title>IPNS and DNSLink</title>
      <link>https://wiki.bitsy.services/wiki/cs/ipfs/ipns-and-dnslink/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://wiki.bitsy.services/wiki/cs/ipfs/ipns-and-dnslink/</guid>
      <description>&lt;p&gt;A &lt;a href=&#34;https://wiki.bitsy.services/wiki/cs/ipfs/cid&#34;&gt;content identifier (CID)&lt;/a&gt; is a hash, so publishing a new&#xA;version of anything produces a new name. Every real deployment on&#xA;&lt;a href=&#34;https://wiki.bitsy.services/wiki/cs/ipfs&#34;&gt;IPFS&lt;/a&gt; therefore needs a second layer: a stable name that points&#xA;at a CID and can be repointed. Three mechanisms do this, and they differ in who&#xA;is allowed to repoint, how fast the change propagates, and what has to be&#xA;trusted for the answer to be right.&lt;/p&gt;&#xA;&lt;h2 id=&#34;ipns&#34;&gt;IPNS&lt;a class=&#34;anchor&#34; href=&#34;#ipns&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;The &lt;strong&gt;InterPlanetary Name System (IPNS)&lt;/strong&gt; names content by a key pair. The name&#xA;is the CID of the public key under the &lt;code&gt;libp2p-key&lt;/code&gt; codec, written in base36 by&#xA;default — &lt;code&gt;k51qzi5uqu5...&lt;/code&gt; — and the base36 choice is a consequence of the&#xA;default key type. An Ed25519 public key is small enough that libp2p embeds it in&#xA;the identifier verbatim, under the identity multihash, rather than hashing it.&#xA;That makes the CID 40 bytes, which comes to 65 characters in base32 including&#xA;the multibase prefix — over the 63-character limit on a domain label, and&#xA;therefore unusable as a &lt;a href=&#34;https://wiki.bitsy.services/wiki/cs/ipfs/gateways&#34;&gt;subdomain gateway&lt;/a&gt; host. The&#xA;same 40 bytes in base36 come to 62. An RSA key is too large to embed and gets&#xA;hashed instead, producing the shorter 59-character base32 form that never had&#xA;the problem.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Gateways</title>
      <link>https://wiki.bitsy.services/wiki/cs/ipfs/gateways/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://wiki.bitsy.services/wiki/cs/ipfs/gateways/</guid>
      <description>&lt;p&gt;A gateway is an HTTP server that speaks &lt;a href=&#34;https://wiki.bitsy.services/wiki/cs/ipfs&#34;&gt;IPFS&lt;/a&gt; so the client does&#xA;not have to. It accepts a URL containing a&#xA;&lt;a href=&#34;https://wiki.bitsy.services/wiki/cs/ipfs/cid&#34;&gt;content identifier (CID)&lt;/a&gt;, fetches the blocks over the&#xA;peer-to-peer network, reassembles them, and returns an ordinary HTTP response.&#xA;Every browser follows such a link with no extension, no daemon, and no awareness&#xA;that any of this happened.&lt;/p&gt;&#xA;&lt;h2 id=&#34;three-url-shapes&#34;&gt;Three URL shapes&lt;a class=&#34;anchor&#34; href=&#34;#three-url-shapes&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;div style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&#xA;&lt;table style=&#34;border-spacing:0;padding:0;margin:0;border:0;&#34;&gt;&lt;tr&gt;&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;1&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;2&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;3&#xA;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#xA;&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;;width:100%&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;https://ipfs.io/ipfs/&amp;lt;cid&amp;gt;/logo.png                path gateway&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;https://&amp;lt;cid&amp;gt;.ipfs.dweb.link/logo.png              subdomain gateway&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;https://example.com/logo.png                       DNSLink gateway&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&lt;p&gt;The path form is the one people paste, and it puts every CID on the network&#xA;under a single browser origin. Anything served from &lt;code&gt;ipfs.io/ipfs/&lt;/code&gt; shares&#xA;cookies, local storage, and permissions with everything else served from&#xA;&lt;code&gt;ipfs.io/ipfs/&lt;/code&gt;, so one hostile page can read another page&amp;rsquo;s state. The&#xA;subdomain form exists to fix exactly that: each CID gets its own origin, and the&#xA;browser&amp;rsquo;s same-origin policy does the isolation it was designed to do. &lt;code&gt;ipfs.io&lt;/code&gt;&#xA;and &lt;code&gt;dweb.link&lt;/code&gt; redirect path requests into the subdomain form for this reason.&#xA;Only a version-1 CID in lowercase base32 can appear in that hostname, because a&#xA;domain label is case-insensitive and capped at 63 characters, so a &lt;code&gt;Qm&lt;/code&gt; link&#xA;still works and is converted on the way through.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
