# Proof of Capacity

Proof-of-Capacity (PoC) is a consensus mechanism based on providing a proof of storage space. In a PoC consensus algorithm, when a node submits a block to the network it must also provide a valid proof of capacity. It is very difficult for a node to generate a valid capacity proof without having the corresponding storage size, and the proof can be verified by any node in the network. If both the block data and the proof are valid, the block will be accepted by the rest of the network. The basic principle behind how a proof is provided is as follows: during the initialisation phase, a series of data is generated according to the protocol and is saved in the storage devicecapacity. When the a new block is to be generated, a part of this stored data is revealed retrieved based on the value of a random number. This data part is then used to generate a proof and the node is able to compete for the next block.

The MASS PoC protocol and bitcoin’s Nakamoto consensus protocol can both be described with a unified mathematical model. $F \left( ∙ \right)$ is a one-way permutation function for space $|N|\_x$ to space $|N|\_y$. The verifier takes a value y from space $|N|\_y$, and within a certain period of time, the prover must submit give a corresponding value x for in space $|N|\_x$ within a certain period of time so that where $F \left( x \right) = y$. The Nakamoto consensus protocol uses an exhaustive brute-force search method to calculate $y$ values with $F \left( ∙ \right)$ by iterating all possible $x$ value in order to find the right $x$ when a collision of $y$ happens, making multiple requests on the function to find the corresponding $y$ value and thereby confirm the value of $x$. On the other hand, the MASS PoC protocol uses a look-up table method, first performing an offline analysis and recording all the $x$ values that correspond with $y$, and then when solving for $y$ simply looking up the corresponding $x$ value when finding a $y$. Despite the difference in methods, in terms of security the MASS and Nakamoto consensus protocols are very similar within regards to algorithm security.