# \[S] Data Storage and Access

**Data Storage Process**

1. **Data Slicing**: Initially, data is segmented into equal-sized slices to manage the upload process effectively and enhance security.
2. **Hashing**: Each data slice is hashed individually. These hashes serve as a unique identifier and verification tool for each slice of data.
3. **Merkle Tree Storage**: The individual hashes are stored in a Merkle Tree structure. This approach not only secures the data integrity by providing a comprehensive hash of all data slices but also optimizes data verification processes.
4. **Contract Submission**: The root hash of the Merkle Tree, representing the entire data set, is submitted to the [Flow smart contract](https://github.com/0glabs/0g-storage-contracts/tree/main/contracts/dataFlow) on the 0G platform. This step is crucial for tracking and verifying the data integrity before and after storage.
5. **Data Upload to Storage Nodes**: Each slice of data is then uploaded sequentially to the storage nodes on the 0G network. The smart contract verifies each slice using its hash before it is considered successfully uploaded. This verification ensures that each piece of data stored in the network is intact, unaltered, and securely validated.

**Data Retrieval Process**

* **Utilizing Merkle Root Hash**: Data retrieval is facilitated by the Merkle Tree's root hash. Users,  applications or nodes can request specific data slices by referencing the root hash, which ensures that the retrieved data is correct and unaltered from its original form. The Merkle Tree structure allows for efficient verification of the data slices, ensuring that the integrity of the data is maintained even when accessing small segments of the overall dataset.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.2pm.network/2pm-data-vsies-service/s-data-storage-and-access.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
