Skip to content

Commit 5c912db

Browse files
committed
refine lifecycle of data page
1 parent b22ae7d commit 5c912db

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

docs/concepts/lifecycle.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,19 @@ description: Learn about the lifecycle of data in IPFS.
55

66
# The lifecycle of data in IPFS
77

8-
The lifecycle of data in IPFS is summarized below.
8+
- [1. Content-addressable representation](#1-content-addressable-representation)
9+
- [2. Pinning](#2-pinning)
10+
- [3. Retrieval](#3-retrieval)
11+
- [4. Deleting](#4-deleting)
12+
- [Learn more](#learn-more)
913

1014
## 1. Content-addressable representation
1115

12-
The file is transformed into a content-addressable representation using a CID. 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](./merkle-dag.md).
16+
The file is transformed into a content-addressable representation using a CID. 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](./merkle-dag.md).
1317

1418
## 2. Pinning
1519

16-
In this stage, the blocks of the CID are saved on an IPFS node (or pinning service) and made retrievable to the network. Simply saving the CID on the node does not mean the CID is retrievable, so pinning must be used. Pinning allows the node to advertise that it has the CID, and provide it to the network.
20+
In this stage, the blocks of the CID are saved on an IPFS node (or pinning service) and made retrievable to the network. Simply saving the CID on the node does not mean the CID is retrievable, so pinning must be used. Pinning allows the node to advertise that it has the CID, and provide it to the network.
1721

1822
- **Advertising:** In this step, a CID is made discoverable to the IPFS network by advertising a record linking the CID and the server's IP address to the [DHT](./dht.md). Advertising is a continuous process that repeats typically every 12 hours. The term **publishing** is also commonly used to refer to this step.
1923

@@ -23,20 +27,24 @@ In this stage, the blocks of the CID are saved on an IPFS node (or pinning servi
2327

2428
In this stage, an IPFS node fetches the blocks of the CID and constructs the Merkle DAG. This usually involves several steps:
2529

30+
- **Content routing:** The IPFS node finds other IPFS nodes providing the CIDs you are requesting. Content routing is facilitated by either the [DHT](./dht.md), asking already connected peers over [Bitswap](./bitswap.md), or making an HTTP call to a [delegated routing](https://github.com/ipfs/specs/blob/main/IPIP/0337-delegated-routing-http-api.md) server like the [network indexer](https://cid.contact/). The term **content discovery** is also commonly used to refer to this step.
31+
2632
- **Block fetching:** An IPFS node fetches the blocks of the Merkle DAG (of the file or folder) from providers.
2733

28-
- **Verifying:** The IPFS node verifies the blocks fetched by hashing them and ensuring that the resulting hash is correct. Note that this type of retrieval is _trustless_; that is, blocks can come from any node in the network.
34+
- **Verification:** The IPFS node verifies the blocks fetched by hashing them and ensuring that the resulting hash is correct. Note that this type of retrieval is _trustless_; that is, blocks can come from any node in the network.
2935

3036
- **Local access:** Once all blocks are present, the Merkle DAG can be constructed, making the file or directory underlying the CID successfully replicated and accessible.
3137

3238
## 4. Deleting
3339

34-
At this point, the CID is deleted from a node. Deletion is always a local operation. If a CID has been replicated to other nodes, it will continue to be available on the IPFS network.
40+
At this point, the blocks associated with a CID are deleted from a node. **Deletion is always a local operation**. If a CID has been replicated to other nodes, it will continue to be available on the IPFS network.
3541

3642
:::callout
37-
Once the CID is replicated by another node, it is typically advertised by default, even if it isn't explicitly pinned.
43+
Once the CID is replicated by another node, it is typically advertised to DHT by default, even if it isn't explicitly pinned.
3844
:::
3945

46+
## Learn more
47+
4048
Learn more about the lifecycle of data in IPFS in the following video:
4149

42-
@[youtube](iaVXRPsRCUc)
50+
@[youtube](iaVXRPsRCUc)

0 commit comments

Comments
 (0)