dStorage for Hyperledger to preserve document consistency among endorsers - #dstorage #dstorage-sawtooth


0Chain dStorage for dApps


A decentralized app (dApp) needs to provide a auditable transaction history for which it relies on a distributed ledger technology, DLT, provided by blockchains. Blockchains are designed to support small amounts of storage in the transaction and they are not meant to store large amounts of data such as documents, images and videos. These dApps have a need to store content that is also decentralized.


0Chain dStorage is a decentralized storage from 0Chain. While dStorage leverages the 0Chain blockchain to provide the auditable transactions, the storage protocol itself is suitable to upload and download the content by any app and get the benefits of decentralized storage. More information about dStorage is available here. Below we describe how any app leveraging any blockchain can make use of the dStorage.


Below are some of the key requirements of an app for decentralized storage.


  1. The content should be distributed across many storage providers to increase security and availability of the content.
  2. The content can only be accessed by the authorized party.
  3. In a multi-party transaction, the app needs to prove that the same document is shared with all the parties involved and hence is not tampered in any way.
  4. All reads of the document should be auditable.


dStorage provides all the above requirements by using advanced concepts such as erasure coding and proxy re-encryption.


Erasure Coding


Erasure coding is a technique where by the original content is broken into parts and by running through a transformation function, is expanded in size compared to the original size. This expansion allows later to be able to download any of parts of sufficient number to reconstruct the original content. For example, when a 10-of-16 erasure coding is used, each set of 10 blocks are expanded into 16 and later during download, any 10 of the 16 blocks will be sufficient to reconstruct the original content. So, if the content is distributed among 16 storage providers (called blobbers in dStorage protocol), at any given time only 10 of these service providers are required to recover the content.


Proxy ReEncryption


Proxy re-encryption is a technique where a party can encrypt and save the content with a 3rd party and later share the encrypted content securely with anyone by providing proxy re-encryption keys. These keys are tied to the public/private keys of the receiving party and the re-encryption process is performed by the 3rd party storing the content before serving the content to the receiver.

dStorage usage by an app leveraging decentralized storage


The diagram below provides an overview of how an app can integrate with dStorage to leverage decentralized storage. The use case is an enterprise app that is collaborating with multiple parties using HyperLedger wants to share the documents while submitting the HyperLedger transaction. However, since HyperLedger is not suitable for storing large amounts of data like documents, the document is first uploaded to dStorage and then the hash of the content is submitted to in the HyperLedger transaction along with the PRE keys for each endorser that needs to verify the content. The endorsers then download the content from dStorage and confirm that the hash of the content matches with that provided in the transaction. This ensures that all the parties can trust that they have received the same document pertaining to that transaction.





Join {sawtooth@lists.hyperledger.org to automatically receive all group messages.