From db233b67c966e89923891571ede9083a5a3023d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Duarte?= Date: Mon, 25 Nov 2024 17:39:35 +0000 Subject: [PATCH] release: phase 2.1 matches eigerco/polka-storage@90208a66c3a06ce95ff1cd7f891c8e98309f47d2 --- src/architecture/pallets/market.md | 18 +++++++++++++++++- src/getting-started/demo-file-store.md | 23 ++++++++++++++++++++--- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/src/architecture/pallets/market.md b/src/architecture/pallets/market.md index 504db7a..33997aa 100644 --- a/src/architecture/pallets/market.md +++ b/src/architecture/pallets/market.md @@ -211,7 +211,6 @@ The Market Pallet actions can fail with following errors: - `InsufficientFreeFunds` - Market participants do not have enough free funds. - `NoProposalsToBePublished` - `publish_storage_deals` was called with an empty list of `deals`. - `ProposalsPublishedByIncorrectStorageProvider` - Is returned when calling `publish_storage_deals` and the deals in a list are not published by the same storage provider. -- `AllProposalsInvalid` - `publish_storage_deals` call was supplied with a list of `deals` which are all invalid. - `DuplicateDeal` - There is more than one deal with this ID in the Sector. - `DealNotFound` - Tried to activate a deal that is not in the system. - `DealActivationError` - Tried to activate a deal, but data was malformed. @@ -222,6 +221,23 @@ The Market Pallet actions can fail with following errors: - Deal is not pending. - `DealsTooLargeToFitIntoSector` - Sum of all deals piece sizes for a sector exceeds sector size. The sector size is based on the registered proof type. We currently only support registered `StackedDRG2KiBV1P1` proofs, which have 2KiB sector sizes. - `TooManyDealsPerBlock` - Tried to activate too many deals at a given `start_block`. +- `StorageProviderNotRegistered` - An account tries to call `publish_storage_deals` but is not registered as a storage provider. +- `CommD` - An error occurred when trying to calculate CommD. +- `TooManyPendingDeals` - A storage provider tried to propose a deal, but there are too many pending deals. The pending deals should be activated or wait for expiry. +- `InvalidProvider` - A deal was tried to be activated by a provider which does not own it. +- `StartBlockElapsed` - A storage provider tries to activate a deal after the start block. +- `SectorExpiresBeforeDeal` - Sector containing the deal will expire before the deal is supposed to end. +- `InvalidDealState` - A deal was attempted to be activated twice. +- `DealNotPending` - A storage provider tried to activate a deal which is not in the pending proposals. +- `WrongClientSignatureOnProposal` - The client signature did not match the client's public key and data. +- `DealEndBeforeStart` - A deal was attempted to be published but the end block is before the start block and the deal is rejected. +- `DealStartExpired` - A deal was attempted to be published but the start block is in the past and the deal is rejected. +- `DealNotPublished` - A deal was attempted to be published but is not in the correct state. +- `DealDurationOutOfBounds` - A deal was attempted to be published but the duration is not between [MinDealDuration](#constants) and [MaxDealDuration](#constants). +- `InvalidPieceCid` - The deal trying to be published has an invalid piece Cid. +- `DealIsNotActive` - When a sector is being terminated but the deal state is not active. This is the result of a programmer bug. Please [report an issue](https://github.com/eigerco/polka-storage-book/issues/new) to the developers. +- `InvalidCaller` - A deal was found that does not belong to the storage provider. This is the result of a programmer bug. Please [report an issue](https://github.com/eigerco/polka-storage-book/issues/new) to the developers. +- `DealNotFound` - A deal was attempted to be fetched but could not be found. This is the result of a programmer bug. Please [report an issue](https://github.com/eigerco/polka-storage-book/issues/new) to the developers. - `UnexpectedValidationError` - `publish_storage_deals`'s core logic was invoked with a broken invariant that should be called by `validate_deals`. Please [report an issue](https://github.com/eigerco/polka-storage-book/issues/new) to the developers. - `DealPreconditionFailed` - Due to a programmer bug. Please [report an issue](https://github.com/eigerco/polka-storage-book/issues/new) to the developers. diff --git a/src/getting-started/demo-file-store.md b/src/getting-started/demo-file-store.md index 74871c6..47f4272 100644 --- a/src/getting-started/demo-file-store.md +++ b/src/getting-started/demo-file-store.md @@ -14,6 +14,12 @@ Alice is a [Storage User](../glossary.md#storage-user) and wants to store an ima Alice knows that she needs to prepare an image for storage and get its [CID](https://github.com/multiformats/cid). To do so, she first converts it into a [CARv2 archive](https://ipld.io/specs/transport/car/carv2/) and gets the piece cid. +
+ +**🚧 Currently, the maximum supported piece size is 2048 bytes!** + +
+ ```bash $ mater-cli convert -q --overwrite polkadot.svg polkadot.car bafkreihoxd7eg2domoh2fxqae35t7ihbonyzcdzh5baevxzrzkaakevuvy @@ -112,9 +118,6 @@ To sign her deal proposal she runs: ```bash $ polka-storage-provider-client sign-deal --sr25519-key "//Alice" @polka-logo-deal.json -``` - -```json { "deal_proposal": { "piece_cid": "baga6ea4seaqabpfwrqjcwrb4pxmo2d3dyrgj24kt4vqqqcbjoph4flpj2e5lyoq", @@ -147,3 +150,17 @@ Successfully published deal of id: 0 ``` On Alice's side, that's it! + +> Note that you **must** sign and submit the deals before the `start_block`! +> +> Currently, the storage provider **does not reject deal proposals** on the basis of how early or late they are, +> however, this may change! ⚠️ — for example, if a storage provider knows that they won't have enough time to process +> your file for proof submission, they may refuse your proposal on the basis that if they accept it, they may fail the deadline. + +## Additional Notes + +* As other parts of this project, file retrieval is actively being worked on! 🚧 +* Files stored in storage providers are public, as such, we suggest you encrypt your files. + While file encryption is a broad enough topic, if you not sure about which tools to use, + we suggest you keep it simple by compressing your file in a format such as [7zip](https://www.7-zip.org/) and using its encryption features. + If 7zip doesn't cut it, you may want to take a look into [age](https://github.com/FiloSottile/age) or [VeraCrypt](https://www.veracrypt.fr/code/VeraCrypt/).