One of the most elaborate mining algorithms in the crypto world is Ethash, Ethereum's mining algorithm, and which you'll learn about in this great article.
EThe Ethash mining algorithm is the algorithm that makes the operation of the mining is. en Ethereum. A high-quality algorithm that uses some very elaborate computer techniques to guarantee the highest possible security.
Ethash is also known as Ethash-Dagger-HashimotoAlthough the current algorithm has certainly changed so much, it could well be given another name. But what does all this mean? What is Dagger-Hashimoto and how does it relate to Ethash? How does Ethash work? What is your future?
Well, all these questions will be answered below in this new article from Bit2Me Academy.
What is Dagger-Hashimoto? The origin of Ethash
To understand how Ethash works, you first have to know what it is Dagger-Hashimoto. That is why, we will first explain this point to advance and understand this striking algorithm.
When we talk about Dagger-Hashimoto, we refer to a mining algorithm that served as the basis for the creation of Ethash. This algorithm sought to create a secure algorithm built on two pillars:
- Be resistant to mining ASIC.
- Highly efficient and easily verifiable by thin clients.
These two pillars are fundamental in the operation of Dagger-Hashimoto. The minds behind the design of this algorithm are Vitalik Buterin y Thaddeus Dryja, who devised the same between the years 2013 and 2014. As you can see, its name comes because the algorithm is actually the union of two different algorithms.
First of all, we have Dagger, an algorithm developed by Vitalik Buterin that uses directed acyclic graphs (DAG) to build a massive data structure. Initially this structure took up a little more than 1 Gb of storage, but currently it is around 4-5 GB. On this structure a series of memory calculations are executed that add a high level of work. This structure is what allows the mining process carried out by the Hashimoto algorithm.
Hashimoto For its part, it is an algorithm developed by Thaddeus Dryja, and aims to add ASIC resistance, and perform mining of hash. This is achieved by making it have a high consumption of RAM and this is a limitation to ASICs. Basically what Hashimoto does, is to take the generated DAG, add the network information about the difficulty, the transactions and generate a hash that identifies the block that is being mined.
By combining both algorithms, we obtain a single algorithm that allows us to design a mining system complex enough for ASIC miners to have problems implementing it efficiently. The structure is so advanced and secure that it was sought to be implemented as an alternative to Scrypt.
However, Dragger-Hashimoto had some flaws that caused its development and evolution to end up giving rise to Ethash.
How does the Ethash algorithm work?
Building on what was learned at Dagger-Hashimoto, the development team at Ethereum He then presented his Ethash algorithm. The basic operation of this algorithm is completely different from the original Dagger-Hashimoto, but the fundamental principles remain. So we have that Ethash works as follows:
- A calculated seed is created using the block headers up to the point where mining begins.
- This seed is then used to calculate and generate a 16 MB pseudorandom cache.
- This cache is then used to generate a data set of more than 4 GB (the DAG). This data set is semi-permanent and is updated every 30 thousand blocks. In this way, the DAG varies for each "mining season".
- Once the DAG is generated, mining begins. This process takes random values from the DAG and combines them using the data supplied by the network and the transactions to be verified.
- Finally verification is done with a process that regenerates specific parts of the dataset using the cache memory, speeding up this process.
This operation is the one currently running, and corresponds to version number 23 of the algorithm. Throughout the process the Keccak-256 and Keccak-512 functions are used, an algorithm from which the SHA-3 standard was derived.
Now surely you will wonder why so many revisions and changes? And the answer to this is that these updates respond to problem resolutions, vulnerabilities, optimizations and, of course, modifications to make work more complex for ASICs and more user-friendly. GPU, which is where the Ethereum community usually makes its biggest mining life.
Ethash algorithm features
All of the above guarantees that Ethash has unique working characteristics, among which we can mention:
- It is highly dependent on operations in RAM memory, consuming large amounts of bandwidth. This is a security measure against ASICs and also elementary for the proper functioning of Ethash. The operations required to build the DAG and the Ethash working cache are highly dependent on these features.
- The algorithm is GPU friendly. Surely you know that current graphics cards or GPUs have an immense capacity. In fact, moving graphics like those in today's games requires huge amounts of memory and unmatched parallel processing. This is a strength if you run mining using Ethash, because you can use the GPU memory to have the entire DAG in memory, along with the cache, and perform all the calculations in a high-speed workspace. As a result, you have the ability to mine much faster.
- Offers excellent verification capabilities for thin clients. With about 16 MB of RAM, it is possible to create a thin client that is able to verify transactions very easily and quickly. In addition to this, a thin client can be up and running and perform the verification process in as little as 30 seconds.
Keccak and SHA-3, how are they different?
Keccak and SHA-3 are two very similar hash functions, in fact, the principle they work on is the same, but applied differently, which gives different results. However, both are practically equivalent in security, speed and computing power necessary for their calculation.
So although both functions generate different hashes, the operating base and their security are practically equivalent.
Pros and Cons of the algorithm
Pros
- It is a simple algorithm to implement, safe and practical when it comes to doing a great job of resisting ASICs.
- It is fast, the use of a structure (DAG) in memory, use of cache and use of the Keccak function, make this algorithm an efficient process in the production of blocks. Thanks to this, Ethereum can count on an adjustable production time to the needs of the network, always seeking the balance between security and scalability.
Cons
- ASIC resistance was broken in 2018, when Bitmain introduced its first miner to Ethash. Since then, mechanisms have been sought to prevent further centralization of mining on Ethereum. However, the development of Ethereum 2.0 foresees the abandonment of the Proof of Work (PoW), and with it Ethash as a mining algorithm, in favor of a Proof of Participation (PoS).
- The high memory consumption of your DAG makes it very difficult to mine in more modest equipment.
- The way he scales the algorithm's difficulty has brought Ethereum to the brink of the well-known "Ice Eras." A point where Ethash's difficulty system would make mining impossible for any miner to try. This is a serious risk to the security of the Ethereum blockchain.
Blockchains that use the algorithm
The main blockchain that the Ethash mining algorithm uses is Ethereum. The algorithm has been developed on this project and this is where it has evolved so far. The project Ethereum Classic, being a hard fork Ethereum has also maintained its operation using this algorithm.
Remember that hundreds of thousands of people live on Ethereum Tokens, like Maker, DAI, or stablecoins as theter. So all of these tokens implicitly use the same algorithm as Ethereum. Other altcoins that Ethash uses are MusiCoin or Callisto, to name a few projects.
Click here to open your user account in Spanish for FREE and securely and receive a €5 gift.