Review of the Ethash cryptographic algorithm, cryptocurrency mining


This encryption algorithm was first used in mining the Ethereum cryptocurrency. In order to increase the efficiency of coin mining, it is necessary to use video cards with an impressive amount of RAM. AMD microprocessors are considered the preferred option for mining, but the tenth series equipment from Nvidia also shows impressive results on the Ethash algorithm.

Ethash Algorithm Overview

In this article I will talk about the Ethash algorithm, which is used for mining various cryptocurrencies, but the main one is, of course, Ethereum.
Ethash is a Proof of Work (PoW) algorithm that is the latest version of the Dagger-Hashimoto algorithm, although it can no longer be called such as many of the original features of both algorithms have been radically changed. The term Proof of Work means that miners are looking for a solution (“nonce” or nonce) that, when hashed, will produce a value less than a target threshold that is preset. Due to the cryptographic nature of the hash function, it is virtually impossible to reverse compute a nonce that satisfies the target threshold limit. Only if you manually go through all possible options.

The Dagger-Hashimoto algorithm was invented by combining the Dagger algorithm - Vitalik Buterin (one of the founders of Ethereum) and the Hashimoto Thaddeus Dryja algorithm. It was created to make mining difficult for ASIC (Application Specific Integrated Circuits) equipment, as well as to allow for easy verification and full on-chain storage.

Making ASIC hardware more difficult to mine is necessary to make it possible for users who do not have enough capital to purchase such devices to mine coins.

Many people know that currently mining Bitcoin coins is impossible even on a very powerful computer. This is due to the fact that there are a large number of mining farms consisting of ASIC equipment and having much greater computing power than any personal computer. This is precisely the situation that the developers of the Dagger-Hashimoto algorithm and, accordingly, Ethash tried to avoid.

What is an ASIC device? This is special equipment that is created on the basis of integrated circuits specifically designed for coin mining. The power of such a device is comparable to the total power of several of the most advanced video cards, but the power consumption is significantly lower.

The creation of large farms on ASIC equipment has a negative impact on the blockchain, as it significantly reduces the level of decentralization. And decentralization is necessary for the reliability of cryptocurrency. Using the uniform distribution of blockchain nodes and multiple duplication of platform files, it is possible to create a system that will be immune to blocking, deletion, modification and hacker attacks.

As a result, the advent of ASIC devices forced users who do not have sufficient capital to purchase them to stop mining Bitcoin. According to some analysts, Bitcoin will soon be mined only by large ASIC farms, which will lead to centralization.

As mentioned above, the Ethash algorithm was created with the goal of preventing the emergence of ASIC devices for mining on this algorithm. But at the beginning of 2022, Bitmain announced the release of the first ASIC devices for Ethash. However, Ethereum has strongly opposed the prospect of these devices dominating their network, leading to talk of “briquetting” this hardware. Briquetting is a technological upgrade to a network that renders hardware useless or even broken if it is connected to the network. Because of this, miners on such equipment were forced to hide their presence and reduce the hashing power of their devices. Also, Ethereum’s plan to switch to PoW/PoS technology (a hybrid of Proof of Work and Proof of Stake) with just PoW makes the development of ASIC devices for Ethash very risky for manufacturers.

Reaching the memory bandwidth limit in real hardware

As an example of how memory bandwidth limitations affect real-world hardware, let's take a closer look at the mining performance of a commonly used graphics card: the RX 590.

If Ethash hashing is indeed memory intensive, we would expect the actual mining speed for this hardware to be very close to the maximum theoretical hashing rate, assuming fetching DAG pages is the only step performed.

We can calculate this maximum theoretical hashrate as follows:

(Memory Bandwidth) / (DAG Memory Retrieved for Hashing) = Maximum Theoretical Hashrate

(256 gigabytes/sec) / (8 kilobytes/hash) = 32 Megahash/sec.

The RX 490's empirical hashrate during real-world operation is ~31 megahash/s.

This slight delay can easily be explained by memory latency or other fast operations on the system. So the performance of this graphics card is as expected, provided data hashing is memory-heavy and DAG page fetch is a rate-limiting step.

How the Ethash algorithm works

Ethash is based on a special graph consisting of sequential nodes. The graph can be represented as a kind of tree with a large number of branches. This feature significantly complicates the creation of ASIC devices to work with this algorithm. Therefore, only video cards can be used to mine Ethash-based coins.

At the beginning of the mining process, a special DAG file is loaded into the memory of video cards. The size of this file is constantly increasing and the more cryptocurrency there is, the larger the size. Therefore, it is necessary to remember that the larger the DAG file, the more powerful the video card is needed to mine this cryptocurrency.

The size of the DAG file increases every time a new 30,000 blocks are created. At the moment, the DAG file size for Ethereum is about 3.5 GB. This means that soon 4 GB video cards will not be able to mine this coin. The situation was even more sad for Ethereum classic, when the DAG size approached 3.96 GB. At that moment, the decision was made to reduce the file size to ~2.5 GB. This was necessary to do, since most of the miners used 4 GB video cards and, accordingly, they would not be able to mine, which would lead to the centralization of mining among large players and a decrease in the reliability of the cryptocurrency.

Now let's move on to the description of the Ethash hashing algorithm:

The process consists of 6 main stages:

  1. The input to the algorithm is a preprocessed header obtained from the last block and “nonce”. “Nonce” is a number chosen randomly or pseudo-randomly. This is fed into a SHA-3 like function which creates a 128 byte mix.
  2. This mix is ​​then used to determine which 128-byte page needs to be extracted from the DAG.
  3. The resulting page is combined with the mix using a special mixing function
  4. Steps 2 and 3 are repeated 64 times
  5. The resulting mix is ​​processed to produce a shorter 32-byte mix digest.
  6. At the end, the digest mix is ​​compared with the target threshold. If the digest mix is ​​less than or equal to the threshold, then the “nonce” is considered successful and is broadcast to the Ethereum network. If the digest mix is ​​greater than the threshold, then a new “nonce” is selected by random selection or by adding one to the old “nonce”. And then the algorithm restarts with a new “nonce” value.

Scrypt: balance between memory and time

In order to eliminate the SHA-256 vulnerability, the second most popular algorithm, Scrypt, was developed. The mining process using these two protocols is the same:

  1. A block of data is supplied as input.
  2. A hash function is applied to its processing.
  3. The output is a hash with the given parameters.

The fundamental difference is in the hash function. It is deliberately complex. At the beginning of the computation, a vector of bit sequences is generated and stored in memory. In the process of obtaining the key, these sequences are requested in random order, combined, and the function constantly accesses memory. In principle, the algorithm for generating sequences is known. You don’t have to store them, but calculate the one you need at the time of the request. In this case, the process becomes very slow. An ASIC based on Scrypt will no longer be orders of magnitude superior to simple memory-based miners.

Mining with the Ethash algorithm

Mining using the Ethash algorithm can be done on both the CPU and GPU. However, mining on a CPU is practically not profitable, since the GPU is much more efficient. I also mentioned mining on ASICs and FPGAs, which are currently capable of Ethash mining, but they are inefficient compared to GPUs and are not welcomed by both the community and developers. Therefore, GPU mining is the most profitable.

Ethash is light on memory but requires at least 2-3GB of RAM per GPU used. AMD GPUs generally perform better than Nvidia GPUs. In order to start mining, you need to download a special program, for example Ethminer.

Pool mining is also a very popular method of mining cryptocurrencies. It allows people with low computing power to participate in mining and get some profit from it. For this, pool creators take a percentage, usually around 1-2% of income.

Next, let's compare the main mining methods:

Way The essence Minuses pros
Self-mining The miner purchases the equipment independently 1. Video card costs

2. Equipment noise

3. Independent collection and setup of the farm

4. Energy costs

5. Risk of equipment failure

The miner gets all the money
Mining via pool The miner purchases equipment independently and connects to the pool 1. Video card costs

2. Equipment noise

3. Independent collection and setup of the farm

4. Energy costs

5. Risk of equipment failure

There are different profit distribution schemes, but most often it is more profitable than independent mining
Cloud mining Miner rents computing power 1. Rent payment There are no disadvantages associated with the purchase, setup and maintenance of equipment.

Conquering GPUs: The Future Generation of ETH Mining Devices

The only way a custom Ethereum mining hardware would be useful is if it is more economical or power efficient at memory bandwidth (less than $/(GB/sec) or less W/(GB/sec)).

Option 1: High Memory Bandwidth FPGA/ASIC Boards

Taking a look at the RX 590, we can do a little math ($245 per card/(256GB/s)) to see hashrate costs $0.95/GB/s.

Compared to a single GDDR5 chip (like the Micron EDW4032BABG) that costs $6.83 and has 24GB/s bandwidth, we can do better at $0.28/GB/s.

So if we can build a custom chip (either ASIC or FPGA) than interface with 9 GDDR5 chips, we will have 216GB/s memory bandwidth for $61.47.

However, this will not be a finished device yet, as we need an FPGA or ASIC memory controller, a circuit board, and supporting electronics.

If the shipped final assembly (adding extra parts, processes, testing, and logistics) costs less than the RX 590 ($245 total), then the custom board will outperform the graphics card.

That is, until a faster, more efficient, and cheaper graphics card hits the market.

For example HBM video cards are already available. But if you can find inexpensive off-the-shelf FPGAs or ASICs with 5-10 DDR or HBM memory controllers, or your company has experience building custom high-bandwidth memory ASICs, you can get by without the hardware.

However, in this situation, you should probably change your business model and create graphics cards instead, since this is already a huge market.

Option 2: Using next generation mobile chipsets

As the use of smartphones and mobile 3D graphics grows, we will see more mobile-friendly and high-bandwidth memory.

These may be mobile SoC solutions with an integrated GPU (e.g. NVidia Tegra X1) or a standalone mobile GPU (e.g. PowerVR Series 8XE), or dedicated high-bandwidth or neural network-centric processors with on-chip memory (e.g. , Movidius Myriad 2).

These classes of devices will continue to evolve, and if cost, power, and memory bandwidth hit the right spot, we could very well see custom Ethereum miners with 10-20 mobile GPUs, or VPUs, located on a single board.

Coins based on the Ethash algorithm

Currently, the Ethash algorithm is used in many cryptocurrencies. But the most popular of them are:

  1. Ethereum
  2. Ethereum Classic
  3. Expanse
  4. Ubiq

Below we will look at each of them in more detail:

  1. Ethereum. It is the second most popular cryptocurrency after Bitcoin. Its capitalization is $67.5 billion, which is comparable to the capitalization of Gazprom. One of the founders is Vitalik Buterin, a native of Kolomna. This platform allows you to create your own tokens, create and apply smart contracts and your own decentralized online services and applications.
  2. Ethereum Classic. This cryptocurrency appeared as a result of some users' disagreement with the hard fork of the original Ethereum. It happened because one hacker found a vulnerability and took advantage of it to steal about $50 million. The developers, in turn, released an update that removed this vulnerability and also made it possible to return the stolen money to the owners. Some people believed that the attacker did not violate any rules. And since the platform is decentralized, no one has the right to make changes to it. And that's why they spoke out against the update. And this ultimately led to the creation of Ethereum Classic.
  3. Expanse. The emergence of this cryptocurrency occurred in 2015 due to the Ethereum fork. This cryptocurrency is a means of payment on the decentralized Expanse Tech platform, which was created to create online services. This cryptocurrency is unique in that all decisions on the development of the network are made only by participants through voting. If the majority decides that the update is bad, then it will be canceled.
  4. Ubiq. This cryptocurrency appeared as a result of the next Ethereum fork in 2022. The development team is improving the source code to ensure that the cryptocurrency has a higher level of flexibility and reliability compared to Ethereum. The platform was created in order to create a fork-proof environment for both private and business use. However, many analysts have doubts about the usefulness of this cryptocurrency, since it does not bring anything new.

Bowhead

New technologies are advancing at an accelerated pace into the healthcare and wellness industry. Some health insurance plans provide Apple Watches for fitness and heart health monitoring. Other companies are developing a “smart scale” that displays the functions of the user’s body organs and transmits this data to a smartphone. But unlike the Blockchain technologies provided by Bowhead, these above-mentioned technologies can become easy prey for hackers.

General information

Ethash is one of the oldest algorithms organizing the second generation Blockchain. It was developed by V. Buterin and team to carry out more complex transactions and financial operations that were not possible on the BTC basis. In addition, the ever-increasing price of BTC at that time limited its use as anything other than a means of payment.

Ethereum had to solve issues related to programming based on Blockchain - and the basis for this was the database encryption algorithm, which allows solving many pressing problems!

Alert: Major Risk

Perhaps a serious drawback of Ethereum as a platform in general for miners can be called the desire of Vitarik Buterin and the Ethereum platform team to switch to PoS.

If we consider the initiative as a whole, then for the sphere itself, taking into account the peculiarities of the Ether blockchain, this can only be a plus. But if we consider the transition to PoS, then the existing emission rules put at risk the entire mining industry organized around the second most popular cryptocurrency among all those presented.

Therefore, if you seriously decide to engage in fairly profitable Ethereum mining - and consider Asic miners based on the Ethash algorithm as the main ones, then you should seriously think about choosing mining equipment.

It is quite possible that your solution will be to buy video cards for mining. Yes, this solution is much less profitable than the Asic miner from Bitmain. However, in the event of a successful release of Constantinople and subsequent projects, there is a risk of being left with nothing. If you support the blockchain using video cards, then they can always be sold on the secondary market for almost full cost.

However, if we consider mining seriously, then the payback rate of mining on ASICs significantly exceeds the payback rate of video cards, and given the general efforts and prospects regarding the modernization of the Ethash-based blockchain, we can say that before the full transition there will be an announcement, during which it will be possible to easily sell mining equipment without loss.

Controversy – What to mine

Until recently, the Ethash algorithm and the cryptocurrency based on it were considered impenetrable for ASICs. The electricity required for calculations was several times higher than the payload - and ETH continued to be mined with traditional video cards.

Nvidia added fuel to the fire by releasing its video card models specifically for mining, the P-106 (analogous to the GTX 1060), which differed from their counterparts solely in the lack of ports for monitor output, a warranty period for service, but also cost 30% less than the Gtx 1050 Ti.

But with the recent update to the Bitmain line for Ethash, the situation has changed radically. And today you can mine ETH using a miner even if the price of ETH falls below $80. And do this with no less profit than using Bitmain solutions for BTC.

Rating
( 2 ratings, average 5 out of 5 )
Did you like the article? Share with friends:
For any suggestions regarding the site: [email protected]
Для любых предложений по сайту: [email protected]