PascalCoin: PIP-0009
RandomHash: GPU & ASIC Resistant Hash Algorithm
There’s a centralization issue for PascalCoin which is being addressed by PIP-0009. Namely, a single pool (“Pool-X”) is responsible for 99% mining centralization. Considering a single pool has most of the hash rate, exchanges are reluctant to list PascalCoin with infrastructure providers feeling the same way about investment into PascalCoin. This has resulted in stunted growth and adoption for the currency.
Why and How Is This Happening?
PascalCoin is a “GPU-friendly” coin. That is, it does not take steps to inhibit GPU performance like some other currencies do. Additionally, PascalCoin is not memory-hard. For this reason, miners are dual-mining the coin in Pool-X in conjunction with Ethereum. Since Ethereum is memory-hard, the computational power of the GPU is left idle. With this idle power, coins that are not memory-hard, like PascalCoin, can be mined simultaneously without an increase in electrical usage. Essentially, miners get to mine the non-memory-hard coin for free. The fact that they can essentially mine for free is crucial to why it poses such a problem for PascalCoin.
Traditionally, a coin’s hash rate increases when its price does. It is a self-regulating system, much like the way in which our sun regulates itself through a process of expansion and contraction. When the price increases, more miners jump on board, increasing the hash rate. With each new miner, though, the profitability decreases. Once too many miners have joined, the profitability decreases to an unacceptable level. At this time, some miners leave and the profitability goes back up.
So, what’s the problem? Miners of Pool-X, primarily concerned about mining Ethereum, get to mine PascalCoin essentially for free. As such, they don’t care if the coin is unprofitable for a miner who primarily would be mining PascalCoin because anything is better than the price of free. This creates an undesirable system where primary miners disappear due to the level of profitability and the growth and adoption of the currency is stunted.
The Solution
Several options were considered, including:
· Encouraging other Ethereum pools to increase ETH-PASC mining to reduce centralization
· Using RandomHash
· Using other hash algorthms, such as Equihash
Encouraging other pools would result in exclusion of PASC-only pools and solo miners and does not align with PascalCoin’s goals. The utilization of other hash algorithms, such as Equihash specifically, was undesirable as they showed excessive memory consumption. As a result, using RandomHash is the winner.
RandomHash Process (from proposal)
1. Hashing a nonce requires N iterations (called rounds)
2. Each round selects a random hash function from a set of 16 well-known hash algorithms
3. The input at round x depends on the output from round x-1
4. The input at round x depends on the output from another previous round 1..x-1, randomly selected
5. The input at round x depends on the output from round x-1 of a different nonce
6. The input at round x is a compression of (3), (4) and (5) to 100 bytes
7. The output of every round is expanded for memory-hardness
8. Randomness is generated using Mersenne Twister algorithm
9. Randomness is seeded via MurMur3 checksum of previous round
10. The final round is then hashed again via SHA2_256, in keeping with traditional cryptocurrency approaches.
Serial hashers (CPU) are able to perform this work with far greater ease than parallel hashers (GPU). Serial hashers have an easier time with branching, recursion, and the caching of partial calculations of other nonces.
Parallel hashers, however, are significantly penalized by these features. The dependence on other random nonces incurs severe memory usage and subsequent waste. ASICs, specifically, would become economically infeasible if they had to support 16 hash algorithms and were confronted with Mersenne Twister, expansion, and contraction.
Hard-Fork Activation
This proposal requires hard-fork activation.
Consensus is attained by changing types to numbers corresponding to the desired vote. Block difficulty will be reset upon activation to an “appropriately low number.” Over approximately 200 blocks, block times will stabilize.
For more information on PascalCoin, see http://pascalcoin.org
For more information on PIP-0009, see https://github.com/PascalCoin/PascalCoin/blob/master/PIP/PIP-0009.md