{"id":9638,"date":"2023-08-12T03:35:31","date_gmt":"2023-08-12T03:35:31","guid":{"rendered":"https:\/\/www.bitnovo.com\/blog\/?p=9638"},"modified":"2022-05-16T18:32:48","modified_gmt":"2022-05-16T18:32:48","slug":"all-about-the-ethash-algorithm","status":"publish","type":"post","link":"https:\/\/www.bitnovo.com\/blog\/en\/all-about-the-ethash-algorithm","title":{"rendered":"All about the Ethash algorithm"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Alternar tabla de contenidos\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #ffffff;color:#ffffff\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #ffffff;color:#ffffff\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.bitnovo.com\/blog\/en\/all-about-the-ethash-algorithm\/#origin_of_ethash\" >Origin of Ethash<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.bitnovo.com\/blog\/en\/all-about-the-ethash-algorithm\/#how_does_ethash_work\" >How does Ethash work?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.bitnovo.com\/blog\/en\/all-about-the-ethash-algorithm\/#advantages_and_disadvantages\" >Advantages and disadvantages<\/a><\/li><\/ul><\/nav><\/div>\n<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Tiempo de lectura:<\/span> <span class=\"rt-time\"> 4<\/span> <span class=\"rt-label rt-postfix\">minutos<\/span><\/span><p>In any conversation about Ethereum you may have heard about Ethash.\u00a0<strong>This is the algorithm that makes Ethereum possible<\/strong>. That algorithm makes use of very advanced computing techniques that increase the level of security on the network.<\/p>\n<p>Another way to call this algorithm is by the name<strong>\u00a0Ethash-Dagger-Hashimoto<\/strong>. This was the name it adopted when it was created, however it has changed and evolved a lot since then. In this article we will see what it offers and how it works.<\/p>\n<p>Although its\u00a0<strong>full<\/strong>\u00a0name is Ethash-Dagger-Hashimoto, we should note that Dagger-Hashimoto refers to the mining algorithm that served as the basis for the\u00a0<strong>creation<\/strong>\u00a0of the current\u00a0<strong>Ethash<\/strong>. That algorithm was aimed at creating a secure mechanism based on the resistance to\u00a0<strong>ASIC<\/strong>\u00a0mining and the efficiency it brings by being highly verifiable by thin clients.<\/p>\n<p>&nbsp;<\/p>\n<div class=\"is-divider divider clearfix\"><\/div>\n<h2><span class=\"ez-toc-section\" id=\"origin_of_ethash\"><\/span><strong>Origin of Ethash<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The creators of this algorithm are\u00a0<strong><a href=\"https:\/\/www.bitnovo.com\/blog\/en\/who-is-vitalik-buterin\/\">Vitalik Buterin<\/a>\u00a0and Thaddeus Dryja<\/strong>. Both developed this system between\u00a0<strong>2013 and 2014<\/strong>. This algorithm is based on two different algorithms, hence its compound name. The first, Dragger, is an algorithm developed by the same creator of Ethereum, Buterin. This algorithm makes use of directed acyclic graphs (DAG) in order to create a massive data structure.<\/p>\n<p>At the beginning of its development, the structure of the algorithm occupied a space of approximately<strong>\u00a01 Gb in storage<\/strong>, however, over the years its\u00a0<strong>storage<\/strong>\u00a0has been extended up to\u00a0<strong>4 Gb or 5 Gb<\/strong>. The structure of this algorithm allows the operation of the Hashimoto mining process, the algorithm we will talk about next.<\/p>\n<p>Hashimoto is the second base algorithm of Ethash developed by Thaddeus Dryja with the aim of being able to add\u00a0<strong>ASIC resilience<\/strong>\u00a0to the system in which it is implemented, and also to carry out hash mining. All this is possible because the algorithm itself increases the<strong>\u00a0RAM consumption<\/strong>\u00a0and thus limits the ASICs.<\/p>\n<p>From the union of the two algorithms comes another unique algorithm that offers the ability to design a new mining system so complex that ASIC miners cannot<strong>\u00a0implement it effectively<\/strong>. In fact, its structure is so advanced that many developers are trying to implement it as an\u00a0<strong>alternative option to Scrypt<\/strong>. However, Dragger-Hashimoto was not always what it is today. Like everything else, it presented several flaws that turned it into the\u00a0<strong>current algorithm<\/strong>. Below we will see how it works.<\/p>\n<div id=\"image_2113220476\" class=\"img has-hover x md-x lg-x y md-y lg-y\">\n<div class=\"img-inner dark\"><img fetchpriority=\"high\" decoding=\"async\" class=\"attachment-large size-large lazyloaded\" src=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/06\/Qu%C3%A9-es-Ethash1.jpg\" sizes=\"(max-width: 768px) 100vw, 768px\" srcset=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/06\/Qu\u00e9-es-Ethash1.jpg 768w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/06\/Qu\u00e9-es-Ethash1-300x205.jpg 300w\" alt=\"Qu\u00e9-es-Ethash\" width=\"768\" height=\"526\" data-srcset=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/06\/Qu\u00e9-es-Ethash1.jpg 768w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/06\/Qu\u00e9-es-Ethash1-300x205.jpg 300w\" data-src=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/06\/Qu\u00e9-es-Ethash1.jpg\" data-sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/div>\n<\/div>\n<div class=\"is-divider divider clearfix\"><\/div>\n<div class=\"is-divider divider clearfix\"><\/div>\n<h2><span class=\"ez-toc-section\" id=\"how_does_ethash_work\"><\/span><strong>How does Ethash work?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The operation of Ethash is completely different from the basic operation of the algorithm on which it is based, Dragger-Hashimoto. However, there are some fundamental features that remain in place.<\/p>\n<p>As the start of the algorithm, it creates a\u00a0<strong>seed<\/strong>\u00a0calculated through the block headers until the start of\u00a0<strong>mining<\/strong>. Subsequently, the previous seed is used to compute and create a\u00a0<strong>pseudo random cache with an exact size of 16 MB<\/strong>. Once created, this is used to create a data set that occupies more than<strong>\u00a04 GB<\/strong>. This data is what we call \u201c<strong>DAG<\/strong>\u201c.<\/p>\n<p>The DAG is updated every\u00a0<strong>30 thousand blocks<\/strong>\u00a0varying for each mining\u00a0<strong>season<\/strong>. The mining process starts with\u00a0<strong>the creation of the DAG<\/strong>. During mining, random values are taken from the DAG and these are\u00a0<strong>combined<\/strong>\u00a0with data provided by the network and the rest of the transactions to be\u00a0<strong>verified<\/strong>. For the final phase,\u00a0<strong>verification<\/strong>\u00a0is performed through a\u00a0<strong>process<\/strong>\u00a0that generates certain parts of the previous data set using the\u00a0<strong>cache memory<\/strong>\u00a0to accelerate the process.<\/p>\n<p>To reach the current performance, Ethash has gone through\u00a0<strong>23 versions of its algorithm<\/strong>. However, there are aspects that have not changed, such as the use of the Keccak-256 and\u00a0<strong>Keccak-512<\/strong>\u00a0functions. These are the algorithm from which what we know today as the SHA-3 standard was derived.<\/p>\n<p>It is possible that when we see such a high number of updates, we may think that the developers are not satisfied or that the project is incomplete. However, each update corresponds to a<strong>\u00a0solution<\/strong>\u00a0of problems that the algorithm may present. The updates were carried out to\u00a0<strong>improve, secure and fix<\/strong>\u00a0the algorithm, but above all, to increase the difficulty of<strong>\u00a0implementation in ASIC<\/strong>. In this way, an increasingly\u00a0<strong>GPU friendly<\/strong>\u00a0algorithm was created.<\/p>\n<div id=\"image_2038187021\" class=\"img has-hover x md-x lg-x y md-y lg-y\">\n<div class=\"img-inner dark\"><img decoding=\"async\" class=\"attachment-large size-large lazyloaded\" src=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/06\/Qu%C3%A9-es-Ethash2.jpg\" sizes=\"(max-width: 768px) 100vw, 768px\" srcset=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/06\/Qu\u00e9-es-Ethash2.jpg 768w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/06\/Qu\u00e9-es-Ethash2-300x205.jpg 300w\" alt=\"Qu\u00e9-es-Ethash\" width=\"768\" height=\"526\" data-srcset=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/06\/Qu\u00e9-es-Ethash2.jpg 768w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/06\/Qu\u00e9-es-Ethash2-300x205.jpg 300w\" data-src=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/06\/Qu\u00e9-es-Ethash2.jpg\" data-sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/div>\n<\/div>\n<div class=\"is-divider divider clearfix\"><\/div>\n<div class=\"is-divider divider clearfix\"><\/div>\n<h2><span class=\"ez-toc-section\" id=\"advantages_and_disadvantages\"><\/span><strong>Advantages and disadvantages<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Like any computer system, Ethash has advantages and disadvantages that differentiate it from other algorithms. Below we will see the most important ones:<\/p>\n<p><strong>Advantages:<\/strong><\/p>\n<ul>\n<li aria-level=\"1\"><b>Easy to implement.\u00a0<\/b>Ethash is a simple, secure and above all practical algorithm.<\/li>\n<li aria-level=\"1\"><b>Speed.\u00a0<\/b>By using the DAG structure in memory in addition to the Keccak function and the use of cache, Ethash becomes one of the most efficient algorithms in terms of block production. Thanks to this, the\u00a0<a href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-is-ethereum-eth-and-how-does-it-work\/\">Ethereum<\/a>\u00a0network uses a block production time adaptable to the requirements of the network.<\/li>\n<li aria-level=\"1\"><b>Verification capacity.\u00a0<\/b>One of the advantages over other algorithms is that with only 16 MB of RAM we can create a thin client with the ability to verify transactions quickly and easily. Such a client could carry out the verification process in as little as 30 seconds.<\/li>\n<\/ul>\n<p><strong>Disadvantages:<\/strong><\/p>\n<ul>\n<li aria-level=\"1\"><b>ASIC resistance.\u00a0<\/b>One of the advantages of Ethash was broken in 2018 due to the miner created by Bitmain that mined with Ethash.<\/li>\n<li aria-level=\"1\"><b>Excessive memory consumption.\u00a0<\/b>This makes it difficult to mine on computers with lower capacity. Its excessive consumption comes from its operation highly dependent on RAM operations that consume large amounts of bandwidth. Although it is a protective measure against ASICs, it is also necessary to maintain proper system operation. Thanks to the cache, more efficient mining can be performed using the space for performing calculations.<\/li>\n<li aria-level=\"1\">The\u00a0<strong>difficulty<\/strong>\u00a0of this algorithm is so\u00a0<strong>scalable<\/strong>\u00a0that it causes high mining difficulty for Ethereum network miners thus risking the security of its\u00a0<a href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-is-blockchain-and-how-does-it-work\/\">blockchain<\/a>.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Tiempo de lectura:<\/span> <span class=\"rt-time\"> 4<\/span> <span class=\"rt-label rt-postfix\">minutos<\/span><\/span>In any conversation about Ethereum you may have heard about Ethash.\u00a0This is the algorithm that makes Ethereum possible. That algorithm makes use of very advanced computing techniques that increase the level of security on the network. Another way to call this algorithm is by the name\u00a0Ethash-Dagger-Hashimoto. This was the name it adopted when it was [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":6949,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[185],"tags":[],"class_list":["post-9638","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blockchain-en"],"_links":{"self":[{"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/posts\/9638","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/comments?post=9638"}],"version-history":[{"count":0,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/posts\/9638\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/media\/6949"}],"wp:attachment":[{"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/media?parent=9638"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/categories?post=9638"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/tags?post=9638"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}