What is ProgPoW? The ASIC-resistant crypto mining algorithm explained

what is progpow

In the crypto world, there is more than one way to earn rewards for mining and how it happens mostly depends on the algorithms used.  Right now, the two most used types of algorithms are Proof-of-Work (PoW) and Proof-of-Stake (PoS). Understanding how they work is essential for both miners and crypto investors, so if you’re not familiar with these terms please check out our Proof-of-Work vs. Proof-of-Stake guide.

Some of the most successful cryptocurrencies rely on PoW consensus algorithms including Bitcoin, Ethereum, Litecoin, Bitcoin Cash, Monero, Dash, and Zcash among others.

PoW algorithms make sure that miners with similar resources have a similar chance of generating the next block which sounds great until we take ASIC resistance into consideration. But what does that mean exactly? When a crypto network lacks ASIC resistance, it means that specialized ASIC hardware will be able to mine that specific currency at increased efficiency compared to commodity hardware.

In fact, you could even think of CPUs, GPUs, and FPGAs (Field Programmable Gate Arrays) as ASICs so when trying to solve ASIC resistance the real question is how much more efficient a specialized ASIC will be compared to commodity hardware?

Zcash Asics

For this reason, the group known as IfDefElse worked on a new type of PoW algorithm called “ProgPow” that aims to make specialized ASICs less efficient compared to using commodity hardware for mining.

This project was submitted to the Zcash Foundation back in May and was approved for a grant at the beginning of November. It’s also worth mentioning that just a few days before the ProgPow algorithm was submitted, Bitmain the controversial crypto mining company has just released a specialized Zcash ASIC miner.

We will discuss in detail what is ProgPow, how this new PoW type of algorithm works as well as how it will help combat specalized ASIC resistance.

What is ProgPoW?

According to the proposal, the main purpose of ProgPoW is to offer a stable ASIC resistance to the Zcash network, so there will be no need to constantly change algorithms.

The Z9 ASIC miner Bitmain has developed allows specialized hardware to mine Zcash at significantly increased efficiency using the Equihash algorithm, and as a result, threaten decentralization by allowing miners with high computing power to dominate the network.

As a result, the IfDefElse group has developed ProgPoW, a new Proof-of-Work algorithm that ensures permanent ASIC-resistance with the purpose of replacing Equihash. 

How does ProgPoW work?

To begin with, ProgPow retains Zcash’s original 256-bit nonce size so light clients will not require changes but it does completely replace the rest of the Equihash PoW algorithm.

ProgPoW relies on Dagger Hashimoto a precursor research implementation and specification for the mining algorithm for Ethereum 1.0. The choice is based on the simple algorithm and memory-hard nature of Dagger Hashimoto which has also been thoroughly tested in the real world.

ProgPoW’s name is derived from the fact that the inner loop between global memory accesses is a randomly generated program based on the block number. More importantly, the random program is designed to run efficiently on commodity GPUs and at the same time use most of the GPU’s functionality. Also, the random program sequence ensures a fixed pipeline cannot be created, as it happens with specialized ASIC hardware. On top of that, the access size has been adjusted for current GPUs.

ProgPoW uses almost all parts of a commodity GPU except the graphics pipeline and floating point math which have been avoided to ensure the algorithm is portable between various commodity hardware manufacturers and also compatible with multiple programming languages.

In fact, the IfDefElse group has been working with both AMD and NVIDIA engineers to make sure the algorithm remains vendor-neutral. For this reason, ProgPoW doesn’t use any of the features that are exclusive to a certain manufacturer.

Bitcoin Interest ProgPow Miner

According to the project’s description, ProgPoW uses the GPU almost fully, making it very difficult for ASICs to gain efficiency. They also state that removing the graphics pipeline and floating point math could offer up to 1.2x gains in efficiency, a very low number compared to Dagger Hashimoto’s 2x gains, CryptoNight’s 50x gains, and the 100x gains possible in Equihash.

The ProgPoW algorithm has implemented five major changes to Dagger Hashimoto, each tailored for commodity GPUs while also ensuring specialized ASICs cannot achieve significant efficiency gains. Unlike Dagger Hashimoto, the implemented changes make ProgPoW rely on core computing capabilities, as well as memory bandwidth and size. The five main changes are:

  • The blake2s cryptographic hash function is used instead of keccak. Blake2s is optimized for 32-bit platforms and GPUs are natively 32-bit architectures which is why it was selected in the first place. In fact, both blake2s and blake2b functions offer the same degree of security but they are tailored for 32 and 64-bit platforms respectively.
  • Increased mix state. The large register file is an important part of a GPUs area, power, and complexity.  Using a large mix state forces specialized ASICs to implement similar state storage, restricting any potential advantage.
  • A random sequence of math was added to the main loop. Compilation overhead is amortized by the random math changing every 50 blocks. The random sequence of math reading and writing random locations within the state guarantees the ASIC running the algorithm is fully programmable. However, creating an ASIC with a fixed pipeline that would either increase speed or decrease power usage is not possible.
  • Reads from a small, low-latency cache supporting random addresses have been added. The memory hierarchy is also an important part of a GPU’s area, power, and complexity. Adding cached reads will use this hierarchy and also make sure specialized ASICs will use a similar one, limiting power or area savings.
  • DRAM read was increased from 128 bytes to 256 bytes. The DRAM read from the DAG has been retained from Dagger Hashimoto but the size was increased to 256 bytes which is more suitable to the workloads commodity GPUs are capable of. At the same time, specialized ASICs are unable to optimize the memory controller for extremely small accesses in order to gain performance. 

There are six parameters that can be used to tweak the ProgPoW algorithm for various commodity GPUs currently available:

  • ProgPoW_LANES: The number of parallel lanes that coordinate to calculate a single hash instance (default value is 32).
  • ProgPoW_REGS: The register file usage size (default value is 16).
  • ProgPoW_CACHE_BYTES: The size of the cache (default is 16 x 1024).
  • ProgPoW_CNT_MEM: The number of frame buffer accesses, defined as the outer loop of the algorithm (default value is 64 just like for Dagger Hashimoto).
  • ProgPoW_CNT_CACHE: The number of cache accesses per loop (default value is 8).
  • ProgPoW_CNT_MATH: The number of math operations per loop 
    (default value is 8).
  • ProgPoW uses FNV1a for merging data. The existing Dagger Hashimoto uses FNV1 for merging, but FNV1a provides better distribution properties.

It’s also mentioned that ProgPoW relies on FNV1a for data merging which has superior distribution properties compared to Dagger Hashimoto’s FNV1. The algorithm also relies on KISS99 for random number generation which is the simplest random generator that passes the TestU01 statistical test suite. A more complex random number generator can be successfully implemented on a specialized ASIC, potentially allowing efficiency gains.

The ProgPoW algorithm will require a fork to be adopted since it’s not backward compatible with the current Equihash implementation.

ProgPoW testing

The algorithm described above was tested using six GPU models from two manufacturers. Since ProgPoW uses almost all GPU functions, the results indicate relative GPU performance similar to gaming and graphics applications.

For each manufacturer, the tested models use two different chips and memory types (Polaris20-GDDR5 and Vega10-HBM2 for AMD; GP104-GDDR5 and GP102-GDDR5X for NVIDIA). Here are the average hashrate results from the tests:

  • AMD Radeon RX 580 – 9.4 MH/s
  • AMD Radeon Vega 56 – 16.6 MH/s
  • AMD Radeon Vega 64 – 18.7 MH/s
  • NVIDIA Geforce GTX 1070Ti – 13.1 MH/s
  • NVIDIA Geforce GTX 1080 – 14.9 MH/s
  • NVIDIA Geforce GTX 1080Ti – 21.8 MH/s

While Zcash approved ProgPow and it’s still working on implementing ProgPoW, the Bitcoin Interest (BCI) fork of Bitcoin has already made the switch back in September, becoming the first coin to use the new algorithm. Ethereum is also considering upgrading to ProgPoW and there are many arguments to validate this move but it remains to be seen if the guys behind Ethereum will finally adopt it.