From d5c015cdbc7842aabe34493b86a162cf1f3def4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Duarte?= Date: Mon, 2 Sep 2024 13:42:15 +0100 Subject: [PATCH] docs: update docs --- src/getting-started/demo.md | 57 ++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/src/getting-started/demo.md b/src/getting-started/demo.md index f78d637..91cfaf0 100644 --- a/src/getting-started/demo.md +++ b/src/getting-started/demo.md @@ -4,20 +4,31 @@ Before reading this guide, please follow the local testnet guide and have a working testnet running! -> For convenience's sake, we have a script that automates the actions in this guide. -> The script is available at the following link: -> -> -> Alternatively, download and run in a single step: -> -> ```bash -> wget https://polka-storage.s3.eu-central-1.amazonaws.com/demo.sh -> chmod +x demo.sh -> ./demo.sh -> ``` -> -> The script requires the `storagext-cli` binary to exist and be present in the `$PATH`. -> Instructions on how to achieve that are available in the [*Local Testnet - Polka Storage Parachain*](../getting-started/local-testnet.md) chapter. +
+ +For convenience's sake, we have a script that automates the actions in this guide. +The script is available at the following link: + + +Alternatively, download and run in a single step: + +```bash +wget https://polka-storage.s3.eu-central-1.amazonaws.com/demo.sh +chmod +x demo.sh +./demo.sh +``` + +
+ +The script has some pre-requisites: +* The storagext-cli binary *must* exist and be present in the $PATH — + instructions on how to achieve that are available in the Local Testnet - Polka Storage Parachain chapter. +* You need to launch a *fresh* parachain, as the script needs to be run while the Charlie node is booting up; + the script will wait for the first block before starting. *This process may need more than one attempt.* + +
+ +
A high-level overview with diagrams of the process described below can be found in Pallets section. @@ -110,15 +121,16 @@ So he should do his part! } ``` -| Name | Value | Description | -| -------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------ | -| [`sector_number`](../glossary.md#sector) | 1 | The place where `husky.jpg` will be stored. Charlie decided it'll be on his 1st sector. | -| `deal_ids` | `[0]` | A sector can contain multiple deals, but it only contains the first one ever created (id: 0). | +| Name | Value | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------- | +| [`sector_number`](../glossary.md#sector) | 1 | The place where `husky.jpg` will be stored. Charlie decided it'll be on his 1st sector. | +| `deal_ids` | `[0]` | A sector can contain multiple deals, but it only contains the first one ever created (id: 0). | | `expiration` | `75` | The 75th block is 5 minutes after the `end_block`, so the sector expires only after the deal has been terminated. | -| [`sealed_cid`](../glossary.md#commitment-of-replication), [`unsealed_cid`](../glossary.md#commitment-of-data), | multiple | Currently, placeholder values (any CID) since the proof mechanism is a work-in-progress. | -| `seal_proof` | `StackedDRG2KiBV1P1` | Currently, we only accept sector sizes of 2KiB, so this is the only value possible. | +| [`sealed_cid`](../glossary.md#commitment-of-replication), [`unsealed_cid`](../glossary.md#commitment-of-data), | multiple | Currently, placeholder values (any CID) since the proof mechanism is a work-in-progress. | +| `seal_proof` | `StackedDRG2KiBV1P1` | Currently, we only accept sector sizes of 2KiB, so this is the only value possible. | `prove-commit-husky.json` + ```json { "sector_number": 1, @@ -143,7 +155,7 @@ $ storagext-cli --sr25519-key "//Charlie" storage-provider prove-commit "@prove- ### Aside on Deadlines -There is a little something that Charlie needs to know about: deadlines *(don't we all...)*. +There is a little something that Charlie needs to know about: deadlines _(don't we all...)_. Each Storage Provider has a Proving Period, a time divided into segments (deadlines). To simplify, let's say a proving period lasts a day (24 hours), and between the start and end of each hour, there is a segment, just like on a clock. @@ -160,6 +172,7 @@ We divide a proving period into deadlines and when we prove commit, we assign a From now on, the sector must be proven periodically and daily during this lifetime. `windowed-post.json` + ```json { "deadline": 0, @@ -171,7 +184,6 @@ From now on, the sector must be proven periodically and daily during this lifeti } ``` - | Name | Value | Description | | ------------- | ---------------- | ----------------------------------------------------------------------------- | | `deadline` | `0` | the deadline index which has been assigned by the Prove Commit | @@ -224,7 +236,6 @@ Caused by: Pallet error: StorageProvider::FaultRecoveryTooLate ``` - If he does it at least a minute before, it succeeds: ```bash