miningcore icon indicating copy to clipboard operation
miningcore copied to clipboard

Ethash: Abstract and light cache

Open jon4hz opened this issue 1 year ago • 31 comments

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/

  1. 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

jon4hz avatar Feb 01 '23 02:02 jon4hz