By Qi Zhou (@qc_qizhou)

Introduction

A bedrock for future Web3 is decentralized storage (dStorage), where users can store a large amount of data in the network without worrying that the data is withheld or even discarded by a centralized organization. The essential part of dStorage is proof of storage – the network can prove that the data uploaded by the users are stored by data providers in the network. A couple of solutions such as FILECOIN/ARWEAVE are developed to solve the proof of storage problem and work quite well for static files. However, if the data from the users can be frequently modified or deleted, i.e., dynamic, we currently do not have an ideal solution.

In this article, we focus on proof of storage on large dynamic datasets, where

To illustrate how to solve the proof of storage problem, let us first revisit some native solutions and some existing solutions, and then we will explore the way to achieve proof of storage on the large dynamic datasets in detail.

Naïve Solution to Proof of Storage on a Static Dataset

Consider a static dataset containing a list of BLOBs that are stored off-chain by a data provider, and the commitment of the dataset is available on the blockchain.

Note that the commitment and proof must be succinct, i.e., they are much smaller than the actual dataset so that the verification cost is cheap on-chain - we do not need to upload the whole dataset to the expensive blockchain.

There are several well-known commitment schemes satisfying our needs such as Merkle tree and Polynomial commitment.  In the Merkle tree commitment scheme, the commitment is the Merkle root of the data, and the proof is the sibling's hashes of the nodes traversing from the leaf (data wants to prove) to the root. The good property of Merkle tree proof is that the size of the proof is O(log(n)).

An Illustration of the Merkle tree, where D1 (red) is the data to be verified, D0 and N1 (blue) are the proof, and Root is the commitment

An Illustration of the Merkle tree, where D1 (red) is the data to be verified, D0 and N1 (blue) are the proof, and Root is the commitment

With the above setup, we can now run the following naïve protocol to verify whether the data provider is actually storing the dataset:

  1. The data provider will first submit a transaction to the protocol to confirm that it will host the dataset together with a security deposit.
  2. For each specific period of time (e.g., every 1-hour using Chainlink Keepers), the protocol will generate a cryptographic random value that is unpredictable/unforgeable by any data providers. The random value can use RANDAO in ETH PoS or Verifiable Random Function (VRF) in Chainlink.