Skip to content

Commit

Permalink
Test tooltips in new concepts page
Browse files Browse the repository at this point in the history
  • Loading branch information
ElPaisano committed Feb 2, 2023
1 parent c69d881 commit 597d0d7
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 11 deletions.
1 change: 1 addition & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ module.exports = {
plugins: [
[require('./plugins/vuepress-plugin-speedcurve'), { id: SPEEDCURVE_ID }],
'@vuepress/plugin-back-to-top',
['@adamdehaven/vuepress-plugin-custom-tooltip'],
[
'@vuepress/google-analytics',
{
Expand Down
40 changes: 32 additions & 8 deletions docs/concepts/ipfs-primer.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ draft: true

# What is IPFS?

The InterPlanetary File System (IPFS) is a set of composable, peer-to-peer protocols for addressing, routing, and transferring content-addressed data in a decentralized file system.
The InterPlanetary File System (IPFS) is a set of composable, peer-to-peer protocols for addressing, routing, and transferring <VueCustomTooltip label="A way to store information so a device can retrieve the data based on its content, not its location." underlined>content-addressed data</VueCustomTooltip> in a decentralized file system.

IPFS can be thought of as both the implementations of the IPFS protocols (like Kubo, a Go implementation) and the decentralized network comprised of the individual nodes that are running protocol implementations.
IPFS can be thought of as both the implementations of the IPFS protocols (like <VueCustomTooltip label="The earliest and most widely used implementation of IPFS, written in Go." underlined>Kubo</VueCustomTooltip>) and the decentralized network comprised of the individual <VueCustomTooltip label="The IPFS program that you run on your local computer to store files and then connect to the IPFS network." underlined>nodes</VueCustomTooltip> that are running protocol implementations.

## Problems that IPFS addresses

Expand Down Expand Up @@ -38,29 +38,53 @@ IPFS eliminates the problem of broken links by allowing data to be addressed by

### Security

IPFS uses cryptographic hashes to ensure the authenticity and integrity of files, making it difficult for malicious actors to tamper with or delete files.
IPFS uses <VueCustomTooltip label="A function that takes some arbitrary input (content) and returns a fixed-length value. The exact same input data will always generate the same hash as output. There are numerous hash algorithms." underlined multiline is-medium>cryptographic hashes</VueCustomTooltip> to ensure the authenticity and integrity of files, making it difficult for malicious actors to tamper with or delete files.

## How IPFS works

Data in IPFS is addressed by its contents (content addressing), rather than a location such as a server address (location addressing). Various subsystems in IPFS are responsible for addressing, routing, and transferring content-addressed data.

### How IPFS represents data

IPFS represents data as content-addressed objects.

IPFS uses the following subsystems to represent data:
IPFS represents data as content-addressed objects using the following subsystems to represent data:

- InterPlanetary Linked Data (IPLD)
- Content IDentifier (CID)


#### Content IDentifier (CID)

In IPFS, each object is assigned a self-describing unique identifier called a Content IDentifier (CID) based on its content, rather than on its location. The CID is generated by computing a cryptographic hash of the object's data, and combining it with other information, such as the format of the data being addressed, and the algorithmn used to generate the cryptographic hash. [Learn more about CIDs](../concepts/content-addressing.md).
In IPFS, each object is assigned a unique identifier called a <VueCustomTooltip label="An address used to point to material in IPFS, based on the content itself, as opposed to the location." underlined multiline is-medium>Content IDentifier (CID)</VueCustomTooltip>. In general, the CID is generated by:

1. Computing a cryptographic hash of the object's data.
1. Combining that hash with other information about the hashed data using the following <VueCustomTooltip label="A collection of interoperable, extensible protocols for making data self-describable." underlined multiline is-medium>multiformats</VueCustomTooltip>.
- <VueCustomTooltip label="A protocol for differentiating outputs from various well-established hash function." underlined multiline is-medium>Multihash</VueCustomTooltip> for information on the algorithm used to hash the data.
- <VueCustomTooltip label="A protocol for differentiating the format of the target data." underlined multiline is-medium>Multicodec</VueCustomTooltip> for information on how to interpret the hashed data after it has been fetched.
- <VueCustomTooltip label="A protocol for differentiating the encoding of base-encoded (e.g., base32, base36, base64, base58, etc.) binary data appearing in text." underlined multiline is-medium>Multibase</VueCustomTooltip> for information on how the hashed data is encoded.

CIDs are unique to the data from which they were computed, which provides IPFS with the following benefits:
- Data can fetched based on it's content, rather than it's location.
- The CID of the data received can be computed and compared to the CID requested, to verify that the data is what was requested.

:::callout
**Learn more**
The CID protocol has two versions, v0 and v1. Currently, v1 is the preferred version. Each version computes the CID in a slightly different way, Learn more in [the CID deep dive](../concepts/content-addressing.md#cid-versions).
:::


#### InterPlanetary Linked Data (IPLD)

IPFS uses InterPlanetary Linked Data (IPLD) to work with CIDs and content-addressed data. IPFS uses IPLD to structure, serialize, traverse and link content-addressed data. The IPLD linking mechanism allows IPFS to represent complex relationships between objects, such as file directories and other hierarchical structures, in a graph structure.
IPFS uses <VueCustomTooltip label="A set of specifications in support of decentralized, content-addressable data structures for the web." underlined multiline is-medium>InterPlanetary Linked Data (IPLD)</VueCustomTooltip> to work with CIDs and content-addressed data. IPFS uses IPLD to structure, serialize, traverse and link content-addressed data. The IPLD linking mechanism allows IPFS to represent complex relationships between data objects, such as file directories and other hierarchical structures, using a <VueCustomTooltip label="Data structured as a graph whose nodes are directionally related to each other and don’t form a directional closed loop." underlined multiline is-medium>Directed Acyclic Graph (DAG)</VueCustomTooltip> called an <VueCustomTooltip label="A special type of DAG where each node has a unique identifier that is a hash of the node's contents." underlined multiline is-medium>Merkle DAG</VueCustomTooltip>. IPLD provides IPFS with the following benefits:

- Interoperable protocols
- Easy upgradeability
- Backwards compatibility
- A single namespace for all hash-based protocols

:::callout
**Learn more**
Want to learn more about IPLD? See [the official docs](https://ipld.io/docs/intro/primer/).
:::

#### Content Addressable aRchive (CAR) files

Expand Down
39 changes: 36 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"docs:build": "NODE_OPTIONS=--openssl-legacy-provider vuepress build docs"
},
"dependencies": {
"@adamdehaven/vuepress-plugin-custom-tooltip": "^1.4.3",
"vue-tabs-component": "^1.5.0",
"vuepress-plugin-tabs": "^0.3.0"
}
Expand Down

0 comments on commit 597d0d7

Please sign in to comment.