Closed poseidon-aisland closed 1 year ago
rocksdb is the underlying db engine in substrate,here the limits for key and value: In general, RocksDB is not designed for large keys. The maximum recommended sizes for key and value are 8MB and 3GB respectively.
we could divide in chunks of 100K maximum and compute the gas fees properly for the size stored
the data structure may be: { document_id: uint chunk_id: uint documentdata: blob }
Set the correct weight for the data stored: https://substrate-developer-hub.github.io/substrate-how-to-guides/docs/weights/conditional-weight-struct
unit tests have been completed.
Documents Storage - We will optionally store on-chain the signed contracts. We wish to give immutability of whole document even if it's little bit more expensive. Actually the MVP is storing only the hash of the document and keeping the document in the server storage. The pallet will be modified to accept the storage of an encrypted binary blob with some limitations in size to be configured in the pallet itself. We will add 2 functions to the current pallet: newBlob(id,documentdata), deleteBlob(id)