Skip to content

Commit 7b03374

Browse files
committed
overhaul site
1 parent 2e9f998 commit 7b03374

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1245
-703
lines changed

config.toml

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,34 @@ highlight_code = true
1414

1515
[extra]
1616
# Put all your custom variables here
17-
1817
[[extra.docs_sidebar]]
19-
section = "iroh"
18+
section = "Iroh"
2019
links = [
21-
{ title = "Overview", path = "/docs" },
22-
{ title = "Install", path = "/docs/install" },
23-
# { title = "Quickstart", path = "/docs/quickstart" },
24-
{ title = "Services", path = "/docs/services" },
25-
# { title = "Metrics", path = "/docs/metrics" },
26-
{ title = "Concepts", path = "/docs/concepts" },
27-
{ title = "Iroh & Kubo (go-IPFS)", path = "/docs/iroh-and-kubo" },
28-
{ title = "Use Cases", path = "/docs/use-cases" },
20+
{ title = "Overview", path = "/docs/"},
21+
{ title = "Install", path = "/docs/install" },
22+
{ title = "CLI", path = "/docs/cli" },
2923
]
3024

3125
[[extra.docs_sidebar]]
32-
section = "platforms"
26+
section = "Beetle"
3327
links = [
34-
{ title = "Overview", path = "/docs/platforms" },
35-
{ title = "cloud", path = "/docs/platforms/cloud" },
36-
{ title = "mobile", path = "/docs/platforms/mobile" },
28+
{ title = "Overview", path = "/docs/beetle" },
29+
{ title = "Install", path = "/docs/beetle/install" },
30+
{ title = "Services", path = "/docs/beetle/services" },
31+
{ title = "CLI", path = "/docs/beetle/cli" },
32+
{ title = "Data Locations", path = "/docs/beetle/data-locations" },
33+
{ title = "Beetle & Kubo (go-IPFS)", path = "/docs/beetle/beetle-and-kubo" },
3734
]
3835

39-
[[extra.docs_sidebar]]
40-
section = "reference"
36+
[[extra.design_docs_sidebar]]
37+
section = "Iroh Design Documents"
4138
links = [
42-
{ title = "Data Locations", path = "/docs/data-locations" },
43-
{ title = "CLI", path = "/docs/cli" },
44-
# { title = "configuration", path = "/docs/config" },
45-
# { title = "config: store", path = "/docs/config/store" },
46-
# { title = "config: p2p", path = "/docs/config/p2p" },
47-
# { title = "config: gateway", path = "/docs/config/gateway" },
48-
# { title = "config: cli", path = "/docs/config/cli" },
39+
{ title = "0. Introduction", path = "/design" },
40+
{ title = "1. Iroh", path = "/design/iroh" },
41+
{ title = "2. Content Addressing", path = "/design/content-addressing" },
42+
{ title = "3. DSHT", path = "/design/dsht" },
43+
{ title = "4. Data Transfer", path = "/design/data-transfer" },
44+
# { title = "concepts", path = "/design/concepts" },
45+
# { title = "FAQ", path = "/design/faq" },
46+
# { title = "For IPFS Veterans", path = "/design/for-ipfs-veterans" },
4947
]

content/design/_index.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
+++
2+
title = "Introduction"
3+
description = ""
4+
template="design/page.html"
5+
[extra]
6+
section="0."
7+
+++
8+
9+
# Design Documents
10+
11+
These _design documents_ describe at a high level how we are building Iroh. Think of them as a constantly evolving whitepaper: Design documents should help you reason about how iroh might work one day.
12+
13+
**These design documents are a work in progress. They change often, integrating feedback & research as we go.** Each document ends with a changelog. A fine-grained history is available [on github](https://github.com/n0-computer/iroh.compute). Our goal with design documents is to present a single source of truth for our research. We gather feedback from numerous places ([github discussions](https://github.com/n0-computer/iroh/discussions), [twitter](https://twitter.com/n0computer), [meetings](https://www.youtube.com/watch?v=XMLiq9d50Fs), [chats](https://discord.com/invite/ipfs), etc.) and integreate them here.
14+
15+
## These are not specs
16+
17+
We're reserving the word _specs_ for finished, detailed descriptions of how Iroh actually works. You should be able to write an interoperable implementation of Iroh from specs. Iroh is currently pre-1.0 sofware, and has no formalized specs.
18+
19+
## These are not docs
20+
21+
Our [docs](/docs) describe released versions of Iroh. If you want an accurate description of actual working software, head there.
22+
23+
24+
## Discussion
25+
26+
The best way to influence these documents is to share your views on the Iroh [github discussion](https://github.com/n0-computer/iroh) forum. Numerous conversations are already in progress there, please search before posting a new topic.
27+
28+
## Evaluation
29+
30+
The only way to know if this design works is to build it, test it, put it into production and measure the results. We work hard to take a measurements-focused approach to designing distributed systems. **Our [perf suite](https://perf.iroh.computer) is the primary set of figures we use to evalaute designs.** The results we gather from continual experimentation directly impacts these design documents.
31+
32+
33+
<a class="next-page-button" href="/design/iroh">
34+
Next: 1. Iroh
35+
</a>

content/design/concepts.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
+++
2+
title = "concepts"
3+
description = "common data types & concepts used throughout iroh"
4+
template="design/page.html"
5+
[extra]
6+
section="design"
7+
+++
8+
9+
# Concepts
10+
IPFS intrduces a number of new terms & techniques. We outline some of the more prominent ones here for reference.
11+
12+
## Content IDentifier (CID)
13+
Content IDentifiers look like this:
14+
15+
```
16+
bafybeihjgu5w6wbbxqevdgccj5xm453dbzpkwmkyoepvs3vh6wft4uvf2q
17+
```
18+
19+
A CID contains the _hash_ of it's contents, which is: the result of running the content through a hash function. The CID for different things will always be a different set of characters. Once content is in IPFS, we refer to it by the CID. A great tool for learning about CIDs is the [CID inspector](https://cid.ipfs.tech). Iroh only produces CIDs that use the BLAKE3 hashing function.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
+++
2+
title = "Content Addressing"
3+
description = ""
4+
template="design/page.html"
5+
[extra]
6+
section="2."
7+
+++
8+
9+
## Content Addressed Blobs
10+
11+
Iroh works with _blobs_ of opaque data, which are often the bytes of a file. Blobs can be of arbitrary size ranging from 0-u64MAX bytes.
12+
13+
All blobs within Iroh are referred to by the BLAKE3 [3] hash of contents. BLAKE3 is a _tree hashing_ algorithm, that splits its input into uniform chunks and arranges them as the leaves of a binary tree, producing intermediate _chunk hashes_ that accumulate up to a _root hash._ Iroh uses the 32 byte root hash (or just “hash”) as an immutable blob identifier.
14+
15+
<img class="figure" src="/design/content-addressing/fig_1_blob.svg" />
16+
17+
We leverage the tree hash structure of BLAKE3 as a basis for incremental verification when data is sent over the network, as described by Section 6.4 “Verified Streaming” in [3] and implemented in [4]. Iroh caches all chunk hashes as external metadata, leaving the unaltered input blob as the canonical source of bytes. Verified streaming also facilitates _range requests:_ fetching a verifiable contiguous subsequence of a blob by streaming only the portions of the BLAKE3 binary tree required to verify the designated subsequence.
18+
19+
Chunk hashes are distinct from root hashes, and only used during data transfer. The chunk size of BLAKE3 is a tunable constant that defaults to 1KiB, which results in a 6% overhead on on the size of the input blob. Increasing the chunk size reduces overhead, at the cost of requiring more data transfer before an incremental verification checkpoint is reached. The chunk size constant can be modified & recalculated *without affecting the root hash.* This opens the door to experiment with different chunk size constants, even at runtime. We intend to investigate chunk size optimization in future work.
20+
21+
Root hashes are expressed as a Content identifier (CID) as defined in [5], making Iroh an *IPFS system* capable of interoperating with other systems that use CIDs. In contrast to other IPFS systems, only root hashes are valid content identifiers, which enforces a strict 1-1 relationship between a Content Identifier and blob. This 1-1 relationship brings Iroh into alignment with common whole-file checksum systems. A naive implementation of Iroh can skip verified streaming entirely and use the the CID as a whole-file checksum.
22+
23+
## Collections
24+
25+
A *Collection* is an ordered set of named *links* to blobs. Collection sizes can range from 0-billions of links. Collections are the only means of relating blobs within iroh, and form the basis of synchronization & querying. Collections are true sets, and cannot be nested to form graphs.
26+
27+
A link is a triple of `name, size, CID`. *Name* is an opaque, arbitrary sequence of bytes that labels the link, typically a UTF-8 string. Names must be unique across the collection, and order the set. *size* is the length of the blob in bytes, and *CID* is the content identifier for the linked blob.
28+
29+
Collections have an optional _header_ section that stores the number of items in the collection and offsets to items within the list, forming a skip list index.
30+
31+
<img class="figure" src="/design/content-addressing/fig_2_collection.svg" />
32+
33+
Collections are content addressed in the exact same manner as blobs, but use differing CID multicodec identifier to distinguish them from opaque blobs. Like blobs, collections can be seeked into using byte offsets.
34+
35+
## Collection Querying
36+
37+
Queries can be performed to animate collection sets into graph structures. A typical example is constructing directories using slash separators combined with a prefix query. We have yet to begin researching collection querying and will have more to report in the future.
38+
39+
40+
<a class="next-page-button" href="/design/dsht">
41+
Next: 3. Distributed Sloppy Hash Table
42+
</a>
Lines changed: 1 addition & 0 deletions
Loading

content/design/content-addressing/fig_2_collection.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)