miningcore
miningcore copied to clipboard
Ethash: Abstract and light cache
Hi again, This PR does not only abstract the ethash algos, it also makes the DAG generation obsolete by only using a light cache only. I did some research an this is the same behavior as open-ethereum-pool has. Initially I was a bit concerned the this might have a performance impact, but even the official ethereum wiki mentions that the cache is enough for hash validation.
https://ethereum.org/en/developers/docs/consensus-mechanisms/pow/mining-algorithms/ethash/
- Mining involves grabbing random slices of the dataset and hashing them together. Verification can be done with low memory by using the cache to regenerate the specific pieces of the dataset that you need, so you only need to store the cache.
The code was tested on mordor.
Related discussion: https://github.com/oliverw/miningcore/discussions/1586