# Proof of Capacity (PoC) in Blockchain

*Proof of Capacity in blockchain is an alternative solution to the problems by proof of work and proof of stake. It uses the storage capacity for mining a block in a decentralized network. Let's understand more!*

**What is Proof of Capacity (PoC)?****How does the Proof of Capacity Algorithm work?****Benefits of Proof of Capacity****Limitations of Proof of Capacity**

**What is Proof of Capacity (PoC)?**

**Proof of Capacity (PoC),** also known as **proof of space,** is a consensus mechanism in the blockchain. Unlike **Proof of Work (PoW) **which uses separate mining hardware for computing power, or **Proof of stake (PoS)**, which stakes miners’ coins. **PoC allows network participants (nodes) to use their available hard drives space for mining a new block and validating transactions.**

Compared to other renowned consensus mechanisms, PoC has proven to be more energy-efficient and less time-consuming. Generally, it takes 4 minutes to create a new block. In contrast, PoW takes 10 minutes to mine a bitcoin. Hence, it** takes less than half the time of PoW to validate and add a new block** of transactions to the network.

Blockchains like Storj, Burst, Chia, and SpaceMint use the consensus mechanism proof of capacity (PoC).

Let’s dig into how proof of capacity works?

**How does the Proof of Capacity Algorithm work?**

Unlike Bitcoin’s PoW, which repeatedly hashes to create a right block hash. **PoC allows miners to generate a list of all the possible hashes beforehand. Then store them on local hard drives. **Hence, the larger the hard drive, the more possible solutions. It increases the chances of getting the correct hash (less than the threshold difficulty level).

Using an analogy, Sheldon Cooper has greater chances of winning a dice game with a list of all the possible solutions than thinking and trying each solution at the time of the game.

The PoC mechanism requires the miner’s hard drive to get mapped with the block header to find the right nonce. Hence, the new block will get mined, resulting from the right combinations of hashes. Which will be created by mapping block nonce to the hashes stored in the hard disk.

**Let me simplify the process using the following steps:**

**Plotting the Hard drive**

**Creating a list of all the possible nonce**values using cryptographic hash functions like SHA-256.- The list of possible nonces is a
**plot**which has a unique account ID associated with them. **Account ID**helps to differ plot files of miners even with the same nonce numbers.- Burstcoin (uses PoC) uses the Shabal 256 hash function for hashing. It creates a 256-bit (32 bytes) hash.
- Each nonce on the list has 8192 hashes numbered from 0 to 8191.
- Adjacent hashes of a nonce in paired into 4096
**scoops**. Example: hash 0 and 1 create scoop 0 — similarly, hash 2 and 3 scoops into 1 and more.

- Each scoop has 64 bytes of data with 2 hashes.

**Mining the block**

- Here the
**miner calculates the scoop number**using computation**.**Then use the scoop number to generate scoop data. - The scoop data is used to evaluate a
**deadline**value. - The process of calculating deadlines continues until it covers each nonce in the hard drive. Hence, the miner selects the
**minimum deadline**. - FYI, the deadline is a time period that must elapse since the last block was added. After that period, a miner is allowed to forge the next block.
- Therefore, a miner needs to find a minimum deadline time. So that after that, he/she can add their block.
- However, if another miner generates a lesser deadline time and interrupts the current deadline, he’ll get the opportunity to add his block. Therefore, he gets the block reward.

**Benefits of Proof of Capacity**

The following are the advantages of the Proof of Capacity consensus algorithm:

- PoC can use general-purpose or regular hard drives like Android-based systems.
- It’s 30 times more energy-efficient than the PoW mechanism.
- PoC saves half the time consumed by PoW.
- It doesn’t require dedicated hardware or any continuous need to upgrade it.
- Drives can also be used for other storage space purposes.

**Limitations of Proof of Capacity**

The following are the disadvantages of the Proof of Capacity consensus algorithm:

- PoC is still not under mass usage, like proof of work.
- The drives used for storing data of hashes have a lot of free space. Which makes it hard to detect any malicious computation storage by network intruders.
- Massive adoption of this approach might lead to competition among high-capacity hard drive sellers.

**Conclusion**

In the above article, you explore the functioning of the Proof of Capacity (PoC) consensus algorithm. How does it overcome the shortcomings of the proof of Work (PoW) and proof of Stake (PoS) mechanism? It also goes through the workings of PoC along with its pros and cons.

## FAQs

**What are the other blockchain consensus mechanisms?**

Some alternative consensus protocols include Proof of Work (PoW), Proof-of-Stake (PoS), Delegated Proof-of-Stake (DPoS), Proof-of-History (PoH), Proof-of-Authority (PoA), Proof-of-Importance (PoI), Proof-of-Elapsed-Time (PoET), Proof of Burn (PoB) and many more.

**What is the Consensus Mechanism?**

Consensus mechanism helps network participants to decide the next global change (like adding a new block of transactions) in the network together.

**What is proof of work (PoW)?**

Proof of Work (PoW) in the blockchain is a consensus mechanism that lets miners add a new block to the network based on the computation done to find the perfect hash.

**What is proof of stake (PoS)?**

It uses a staking mechanism where participants lock up some of their coins to get selected to become a block validator.

**About the Author**

This is a collection of insightful articles from domain experts in the fields of Cloud Computing, DevOps, AWS, Data Science, Machine Learning, AI, and Natural Language Processing. The range of topics caters to upski... Read Full Bio