From a1ae8ba204a1fb59e4f9173c42adfb0873be1883 Mon Sep 17 00:00:00 2001 From: Konrad Stepniak Date: Mon, 29 Jul 2024 16:31:30 +0200 Subject: [PATCH] docs(storagext): add prove commit docs --- cli/polka-storage/storagext-cli/README.md | 35 ++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/cli/polka-storage/storagext-cli/README.md b/cli/polka-storage/storagext-cli/README.md index 027030d62..6b8c84ae9 100644 --- a/cli/polka-storage/storagext-cli/README.md +++ b/cli/polka-storage/storagext-cli/README.md @@ -161,7 +161,7 @@ Deals in the sector are validated, so without calling `publish-storage-deals` it storagext-cli --sr25519-key storage-provider pre-commit ``` -This commant takes `pre-commit-sector` as JSON Object. +This command takes `pre-commit-sector` as JSON Object.
Example Pre-commit Sector JSON @@ -185,5 +185,38 @@ you prefix a file path with `@` and use the JSON file location instead: storagext-cli --sr25519-key storage-provider pre-commit @pre-commit-sector.json ``` +

+
+ +### `prove-commit` + +Storage Provider must prove commit a sector which has been pre-commited. +If the sector is not proven, deal won't become `Active` and will be **slashed**. + +``` +storagext-cli --sr25519-key storage-provider prove-commit +``` + +This command takes `prove-commit-sector` as JSON Object, here `proof` must be a valid hex-string. +Proof is accepted if it is any valid hex string of length >= 1. + +
+Example Prove Commit Sector JSON +

+ +```json +{ + "sector_number": 1, + "proof": "1230deadbeef" +} +``` + +However, writing a full JSON file in a single command is cumbersome, to solve that, +you prefix a file path with `@` and use the JSON file location instead: + +``` +storagext-cli --sr25519-key storage-provider prove-commit @prove-commit-sector.json +``` +

\ No newline at end of file