Skip to content

Commit db4849b

Browse files
committed
progress
1 parent 2924bb5 commit db4849b

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

docs/quickstart/publish.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Pinning a file to IPFS is how content is published to IPFS. Any given file repre
1616
:::callout
1717
Data pinned to the IPFS network is public by default and retrievable by anyone. Make sure to avoid publishing private data or take the necessary measures to adequately encrypt it before publishing.
1818
:::
19+
1920
## Prerequisites
2021

2122
- A free [web3.storage](https://web3.storage/) account.
@@ -55,7 +56,7 @@ Let's unpack what just happened, by looking at CIDs, and how they fits into the
5556

5657
In IPFS, every file and directory is identified with a Content Identifier ([CID](../concepts/content-addressing.md)). The CID serves as the **permanent address** of the file and can be used by anyone to find it on the IPFS network.
5758

58-
When a file is published to IPFS (like the image used in this guide), it's first transformed into a content-addressable representation by which the file is split into smaller chunks (if above ~1MB) which are linked, and hashed to produce the CID.
59+
When a file is published to IPFS (like the image used in this guide), it's first transformed into a content-addressable representation by which the file is split into smaller chunks (if above ~1MB) which are linked and hashed to produce the CID.
5960

6061
The CID for the uploaded image is:
6162

@@ -71,16 +72,18 @@ You can now share the CID and anyone should be able to fetch it.
7172

7273
To understand what happens when you pin a file, it's helpful to understand the lifecycle of data in IPFS, which can be summarised as follows:
7374

74-
1. **Content-addressable representation**: The file is transformed into a content-addressable representation with a CID. For this guide, the full details are not important. The basic idea is that this representation makes files and directories **content-addressable** via CIDs by chunking files into smaller blocks**, calculating their hashes, and constructing a [Merkle DAG](../concepts/merkle-dag.md).
75+
1. **Content-addressable representation**: The file is transformed into a content-addressable representation with a CID. For this guide, the full details are not important. The basic idea is that this representation makes files and directories **content-addressable** via CIDs by chunking files into smaller blocks\*\*, calculating their hashes, and constructing a [Merkle DAG](../concepts/merkle-dag.md).
7576
2. **Pinning:** refers to the stage where the blocks of the CID are saved on an IPFS node (or multiple nodes), in this case, web3.storage. Since saving is not enough for the CID to be retrievable, pinning typically refers to two things:
76-
- **Advertising:** Making it discoverable to the IPFS network by advertising a record linking between the CID and the server's IP address to the network. This advertising stage is a continuous process that repeats.
77+
- **Advertising:** Making it discoverable to the IPFS network by advertising a record linking between the CID and the server's IP address to <VueCustomTooltip label="Distributed Hash Table: a decentralized data store that maps data based on key-value pairs." underlined multiline is-left>the DHT</VueCustomTooltip>. This advertising stage is a continuous process that repeats typically every 12 hours.
7778
- **Providing:** The content-addressable representation of the CID is persisted on one of web3.storage's IPFS nodes (servers running an IPFS node) and made publicly available to the IPFS network.
78-
3. **Retrieval:** refers to when an IPFS node fetches the blocks of the CID and constructs the Merkle DAG. This achieves several things:
79-
- **File access:** once the Merkle DAG is constructed, the file is essentially replicated and can be accessed.
80-
- **Verifying** that the blocks received are the correct ones by hashing them. This allows blocks to come from any node in the network. This type of retrieval is *trustless*.
81-
<!-- - **Replication:** when another IPFS node fetches the CID, it increases the replication factor of the CID, thereby increasing its resilience. -->
79+
3. **Retrieval:** refers to when an IPFS node fetches the blocks of the CID and constructs the Merkle DAG. This usually involves several steps:
80+
- **Block fetching:** An IPFS node fetches the blocks of the Merkle DAG (of the file or folder) from providers.
81+
- **Verifying** the IPFS node verifies the blocks fetched by hashing them and ensuring the resulting hash is correct. Note that blocks can come from any node in the network and this type of retrieval is _trustless_.
82+
- **File access:** once all the blocks are present, the Merkle DAG can be constructed making the CID successfully replicated and accessible.
8283
4. **Deleting:** refers to the deletion of a CID from a node. Deletion is always a local operation. If a CID has been replicated by other nodes, it will continue to be available on the IPFS network.
8384

85+
Note that once the CID is replicated, it is typically advertised by default, even if it isn't explicitly pinned.
86+
8487
## Fetching your published file
8588

8689
Now that the file is published and you have a CID, you will learn how it can be fetched from the IPFS network.
@@ -94,7 +97,7 @@ The first option allows you to speak the native IPFS protocol. The latter serves
9497

9598
### Using an IPFS Node
9699

97-
100+
Using a Kubo
98101

99102
### Fetching the CID with an IPFS Gateway
100103

0 commit comments

Comments
 (0)