tevador / RandomX

Proof of work algorithm based on random code execution

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why fast mode is being used?

bl00mber opened this issue · comments

Why fast mode is being used if the goal is to make the least amount of hashes?
Why light mode said to be not suitable for mining, if it does produce the same hash as fast mode?
I understand how fast mode used, that it is faster than light mode, and reasoning that it makes possible verification on systems with low memory, but not why it is needed if light mode does the same.

I'm not sure if this is a trolling attempt, but the goal of mining is to calculate as many hashes as possible, so obviously, miners want to use the fast mode. Light mode is for verification because it requires less memory.

@tevador where it is a trolling attempt? It is a perfectly valid question. Again, I know how fast and light modes are used.
I will say it another way: the goal is not to make the least amount of hashes, but to make PoW ASIC-resistant. "The goal of mining is to calculate as many hashes" - that is incorrect, the goal of mining is to validate proof of work. If the total number of hashes per second produced will decrease but total network PoW complexity remain the same the PoW validation effect on network will be the same. Why fast mode cannot be removed, if this PoW algorithm is CPU-hard, not RAM-hard? What issues can happen if fast mode is removed?

With current RandomX design, it's easier to remove "light mode" instead of fast mode, because fast mode is primary. Initialize the whole dataset using Argon2 hash, and that's it - light mode is not possible anymore.

Light mode was only added to make verification possible on low memory devices, and it was made deliberately slow and energy burning to discourage ASICs using it.

this PoW algorithm is CPU-hard, not RAM-hard

So the whole question was misphrased. You are really asking why RandomX needs to be memory-hard.

CPUs have access to DRAM, so RandomX was designed to need DRAM (>2 GB) as explained in the documentation. If the memory requirement was lowered to 256 MB, an ASIC could be built that doesn't need DRAM (it could use just on-chip memory).

The light mode is a secondary mode to allow hashes to be verified on devices with less than 2 GB of RAM (e.g. Raspberry Pi). The existence of the light mode makes no sense without the fast mode.

@tevador thanks for the response, I got that fast mode is primary and cannot be turned off, I see now that hypothetical mining using light mode on custom CPUs (it is probably should be a fully functional CPU) with integrated memory of 256 MB will yield 10x less hashrate than in fast mode, so manufacturer of light mode chips will have to spend 10x? more electricity to achieve the same hashrate. The real issue here seems to be: will 10 light mode chips in the end be more expensive for ASIC manufacturer to produce and maintain than 1 fast mode chip for a solo miner.

I see now that hypothetical mining using light mode on custom CPUs [...] with integrated memory of 256 MB will yield 10x less hashrate than in fast mode, so manufacturer of light mode chips will have to spend 10x? more electricity to achieve the same hashrate.

You can't make conclusions like this about custom hardware. The "light mode" ASIC is a completely different chip than the "fast mode" ASIC, so you can't say one is x-times faster than the other one like you can say about a CPU that can operate in both modes.

I recommend you to read the discussions in #11 and #31.