Skip to content

Commit

Permalink
Add TONBags wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
gavfu committed Aug 15, 2024
1 parent 9920696 commit 3c8eb7e
Show file tree
Hide file tree
Showing 9 changed files with 134 additions and 0 deletions.
Binary file added docs/assets/build/tonbags-smart-contract.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/build/tonbags-user-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions docs/ton-build-101.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
id: tonBuild101
title: Build With TON 101
sidebar_label: Build With TON 101
---

## I. Description

This article will describe how to use TON storage smart contract to place order.

## II. Storage smart contract

- Testnet storage contract address: https://testnet.tonviewer.com/kQBOOMNqG0rvNm6vFGfR4qZl48BTDw_gYefVI4DQ70t9GjhI
- Mainnet storage contract address: (coming soon)

## III. Example (coming soon)
42 changes: 42 additions & 0 deletions docs/ton-build-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
id: tonBuildOverview
title: Overview
sidebar_label: Overview
---

## I. Crust Network TONBags storage

Crust Network stands as one of the world’s largest decentralized storage networks. Over the past two years, we’ve successfully launched our Mainnet, boasting an impressive 600PB of storage across 1500+ nodes. Our network has facilitated storage for over 2 million orders, serving a diverse user base of 100,000+ individuals and establishing partnerships with more than 150 businesses. To further enhance Crust Network’s storage capabilities, we’ve already developed storage protocols for both the EVM and Algorand ecosystems.


**Introducing TONBags: On-Chain TONStorage Marketplace**

TONStorage is a fundamental component of the TON ecosystem. It enables users to store and distribute files of any size on a decentralized TON network. While it’s currently open and available for use, there are some limitations. Specifically, TONStorage users must manually identify reliable storage providers and create redundancy strategies to ensure better availability and failover. This process can be cumbersome.

Enter TONBags—an innovative solution. TONBags serves as an on-chain marketplace, simplifying storage discovery for users. With TONBags, everyone gains direct and effective access to TONStorage, making decentralized storage more accessible and user-friendly.

## II. TONBags storage protocol

### User flow

TONBags provides a unified storage interface via TONBags storage contract. And storage providers are incentivized to participate in the TON network by leveraging the [TON storage daemon](https://docs.ton.org/participate/ton-storage/storage-daemon).

The user flow within TONBags is straightforward:

1. Users call the TONBags storage contract, and pay a storage fee in $TON to place storage orders for their TONStorage files (referred to as bags).
2. Storage providers monitor these orders and store replicas of the files. To receive storage fees, providers periodically submit work reports (also known as storage proofs) to the TONBags storage contract.

![Pic](assets/build/tonbags-user-flow.png)


### TONBags storage contract

[TONBags storage contract](https://github.com/crustio/tonbags-contract) is a suite of open-source TON smart contracts developed and deployed by Crust Network. It provides interface for users to place storage orders for their files (*bags*), and for storage providers to monitor and discover orders for storage. It also consists of a Work Report Verifier to verify ZK storage proofs submitted by storage providers, and a Reward Pool to distribute storage fees to storage providers in a linearly and fairly manner.

![Pic](assets/build/tonbags-smart-contract.png)

### Storage providers

To participate as storage providers:
- Run the [TONBags manager](https://github.com/crustio/tonbags-manager) to handle storage orders and submit work reports.
- Maintain a local [TON storage daemon](https://docs.ton.org/participate/ton-storage/storage-daemon) node for efficient data propagation across the TON network.
9 changes: 9 additions & 0 deletions website/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,14 @@
"title": "TEE Technology",
"sidebar_label": "TEE Technology"
},
"tonBuild101": {
"title": "Build With TON 101",
"sidebar_label": "Build With TON 101"
},
"tonBuildOverview": {
"title": "Overview",
"sidebar_label": "Overview"
},
"validator": {
"title": "Validator",
"sidebar_label": "Validator"
Expand All @@ -396,6 +404,7 @@
"Build": "Build",
"Build With EVM": "Build With EVM",
"Build With Algorand": "Build With Algorand",
"Build With TON": "Build With TON",
"Node": "Node",
"Storage": "Storage",
"Q&A": "Q&A"
Expand Down
5 changes: 5 additions & 0 deletions website/i18n/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,10 @@
"title": "TEE 技术",
"sidebar_label": "TEE 技术"
},
"tonBuildOverview": {
"title": "Overview",
"sidebar_label": "Overview"
},
"validatorGuidance": {
"title": "验证人指南",
"sidebar_label": "验证人指南"
Expand All @@ -328,6 +332,7 @@
"Build": "构建",
"Build With EVM": "基于EVM构建",
"Build With Algorand": "基于Algorand构建",
"Build With TON": "基于TON构建",
"Node": "节点",
"Storage": "存储"
}
Expand Down
4 changes: 4 additions & 0 deletions website/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@
"algorandBuild101",
"algorandApplications"
],
"Build With TON": [
"tonBuildOverview",
"tonBuild101"
],
"Node": [
"nodeOverview",
"nodeHardwareSpec",
Expand Down
16 changes: 16 additions & 0 deletions website/translated_docs/zh-CN/ton-build-101.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
id: tonBuild101
title: Build With TON 101
sidebar_label: Build With TON 101
---

## I. Description

This article will describe how to use TON storage smart contract to place order.

## II. Storage smart contract

- Testnet storage contract address: https://testnet.tonviewer.com/kQBOOMNqG0rvNm6vFGfR4qZl48BTDw_gYefVI4DQ70t9GjhI
- Mainnet storage contract address: (coming soon)

## III. Example (coming soon)
42 changes: 42 additions & 0 deletions website/translated_docs/zh-CN/ton-build-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
id: tonBuildOverview
title: Overview
sidebar_label: Overview
---

## I. Crust Network TONBags storage

Crust Network stands as one of the world’s largest decentralized storage networks. Over the past two years, we’ve successfully launched our Mainnet, boasting an impressive 600PB of storage across 1500+ nodes. Our network has facilitated storage for over 2 million orders, serving a diverse user base of 100,000+ individuals and establishing partnerships with more than 150 businesses. To further enhance Crust Network’s storage capabilities, we’ve already developed storage protocols for both the EVM and Algorand ecosystems.


**Introducing TONBags: On-Chain TONStorage Marketplace**

TONStorage is a fundamental component of the TON ecosystem. It enables users to store and distribute files of any size on a decentralized TON network. While it’s currently open and available for use, there are some limitations. Specifically, TONStorage users must manually identify reliable storage providers and create redundancy strategies to ensure better availability and failover. This process can be cumbersome.

Enter TONBags—an innovative solution. TONBags serves as an on-chain marketplace, simplifying storage discovery for users. With TONBags, everyone gains direct and effective access to TONStorage, making decentralized storage more accessible and user-friendly.

## II. TONBags storage protocol

### User flow

TONBags provides a unified storage interface via TONBags storage contract. And storage providers are incentivized to participate in the TON network by leveraging the [TON storage daemon](https://docs.ton.org/participate/ton-storage/storage-daemon).

The user flow within TONBags is straightforward:

1. Users call the TONBags storage contract, and pay a storage fee in $TON to place storage orders for their TONStorage files (referred to as bags).
2. Storage providers monitor these orders and store replicas of the files. To receive storage fees, providers periodically submit work reports (also known as storage proofs) to the TONBags storage contract.

![Pic](assets/build/tonbags-user-flow.png)


### TONBags storage contract

[TONBags storage contract](https://github.com/crustio/tonbags-contract) is a suite of open-source TON smart contracts developed and deployed by Crust Network. It provides interface for users to place storage orders for their files (*bags*), and for storage providers to monitor and discover orders for storage. It also consists of a Work Report Verifier to verify ZK storage proofs submitted by storage providers, and a Reward Pool to distribute storage fees to storage providers in a linearly and fairly manner.

![Pic](assets/build/tonbags-smart-contract.png)

### Storage providers

To participate as storage providers:
- Run the [TONBags manager](https://github.com/crustio/tonbags-manager) to handle storage orders and submit work reports.
- Maintain a local [TON storage daemon](https://docs.ton.org/participate/ton-storage/storage-daemon) node for efficient data propagation across the TON network.

0 comments on commit 3c8eb7e

Please sign in to comment.