0.0415 s - время 43 - запросов

We use cookies in order to improve your experience while using our website. If you continue to use our site, you accept our Cookies Policy, revised Privacy Policy and updated Terms of Use.

BTC $ 9188.44181164 (1.23 %)
ETH $ 270.135254696 (-1.08 %)
XRP $ 0.4317046952 (2.82 %)
LTC $ 136.226035196 (-0.71 %)
BCH $ 431.025380953 (0.15 %)
EOS $ 7.0705466575 (0.34 %)
BNB $ 32.5319021573 (-0.64 %)
BSV $ 213.341878529 (-0.56 %)
USDT $ 1.0047962566 (-0.09 %)
XLM $ 0.1294261303 (1.05 %)

Ethereum Hashing Implementation Called Ethash

20:45 10/01/2019
Ethash hash method in the Ethereum network



Compared to Bitcoin, Ethereum has many new features. Also, plenty of properties inherited from Bitcoin have been improved. Some of them were partially modified (for example, addresses), while others (such as hashing algorithms) were completely replaced.


As for hashing, Bitcoin still uses the SHA256 method, while Ethereum has implemented the Keccak and Ethash algorithms. The target areas for these two methods are address compression, block connection, and mining.


Keccak and Ethash


Since the Keccak and Ethash algorithms have different properties, they are used in different processes. The main hash algorithm in Ethereum is called Keccak, which works like a “sponge”: it gathers data and spreads the result basing on all previously used processed data units. This brings up significant flexibility and may be considered as pseudorandomness. Keccak is used in many areas, except for mining.


Some Ethash details


Ethash is used for mining purposes only. Such an approach was chosen for the following reasons:


 Mining algorithm is supposed to be ASIC-resistant. In order to achieve this goal, the algorithm was designed to use maximum memory.

 Mining algorithm should be friendly to GPU-devices. Unfortunately, CPU can’t be used as the main target but GPU implementation is a fairly balanced solution.

 New blocks should be quickly verified on light clients (also known as lightweight nodes).

 New blocks should be slowly processed on light clients.

 Light clients should be able to start working as soon as possible.


Overall, the Ethash algorithm consists of the following steps:


  1. Scanning blocks' headers allows to get a seed.
  2. Once the seed is found, it becomes a source of 15 MB pseudorandom cache. It is stored by light clients as well.
  3. Cash is a source of 1 GB data. It consists of many chunks, each of them depends on a part of cache. This data is stored by miners and full clients only.
  4. Random data units are taken and processed with hash for mining. If necessarily, one can store cache only and generate hashes instantly.


The Ethash algorithm is a reworked Dagger-Hashimoto method. It was revised at least 23 times. The block number defines the cache size and calculated data volume. Still, their growth rate is linear. Applied data aggregation uses a FNV-based function instead of the common logical operator XOR. It has two main differences. First, it is not cryptographic. It was intended to be used for checksum verifications and fast hash table construction.  As a consequence, it is much faster to calculate. Second, it is implemented with ease.

Some Ethash details

More details on each step of cache, main dataset, mining calculations and others are presented and explained on the correspondent web page. Some calculations are implemented with the help of Recursive Length Prefix, the main encoding method for Ethereum objects serialization.




Ethereum is a very interesting solution. Most of other crypto projects proposed to public were just copies of Bitcoin with minor changes in the code. Ethereum instead offers a new approach to many of crypto components. Here, we have looked at one of two hashing methods in detail, but there are many other features worth mentioning. We will talk about them in the following articles.

Found a mistake? Highlight it and press Ctrl + Enter to notify the administrator.

Up-to-date Blockchain and cryptocurrency news. Be the first to know!

What is it for?