{"id":9642,"date":"2023-07-17T09:18:17","date_gmt":"2023-07-17T09:18:17","guid":{"rendered":"https:\/\/www.bitnovo.com\/blog\/?p=9642"},"modified":"2022-05-16T18:35:10","modified_gmt":"2022-05-16T18:35:10","slug":"tutto-sullalgoritmo-ethash","status":"publish","type":"post","link":"https:\/\/www.bitnovo.com\/blog\/it\/tutto-sullalgoritmo-ethash","title":{"rendered":"Tutto sull\u2019algoritmo Ethash"},"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\/it\/tutto-sullalgoritmo-ethash\/#lorigine_di_ethash\" >L\u2019Origine di 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\/it\/tutto-sullalgoritmo-ethash\/#come_funziona_ethash\" >Come funziona Ethash?<\/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\/it\/tutto-sullalgoritmo-ethash\/#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 qualsiasi conversazione su Ethereum potresti aver sentito parlare di Ethash.\u00a0<b>Questo \u00e8 l\u2019algoritmo che rende possibile Ethereum<\/b>.\u00a0Tale algoritmo utilizza tecniche di elaborazione molto avanzate che aumentano il livello di sicurezza della rete.<\/p>\n<p>Un altro modo per chiamare questo algoritmo \u00e8 con il nome\u00a0<b>Ethash-Dagger-Hashimoto<\/b>.\u00a0Questo era il nome che ha adottato quando \u00e8 stato creato, tuttavia da allora \u00e8 cambiato e si \u00e8 evoluto molto.\u00a0In questo articolo vedremo cosa offre e come funziona.<\/p>\n<p>Sebbene il suo\u00a0nome\u00a0<b>completo<\/b>\u00a0sia Ethash-Dagger-Hashimoto, bisogna notare che Dagger-Hashimoto si riferisce all\u2019algoritmo di mining che \u00e8 servito come base per la\u00a0<b>creazione<\/b>\u00a0dell\u2019attuale\u00a0<b>Ethash<\/b>.\u00a0Tale algoritmo mirava a creare un meccanismo sicuro basato sulla resistenza al\u00a0mining\u00a0<b>ASIC<\/b>\u00a0e sull\u2019efficienza che apporta essendo altamente verificabile dai thin client.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"lorigine_di_ethash\"><\/span><b>L\u2019Origine di Ethash<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>I creatori di questo algoritmo sono\u00a0<a href=\"https:\/\/www.bitnovo.com\/blog\/en\/who-is-vitalik-buterin\/\"><b>Vitalik Buterin<\/b><\/a><b>\u00a0e Thaddeus Dryja<\/b>.\u00a0Entrambi svilupparano questo sistema tra il\u00a0<b>2013 e il 2014<\/b>.\u00a0Questo algoritmo si basa su due diversi algoritmi, per questo il nome composto.\u00a0Il primo, Dragger, \u00e8 un algoritmo sviluppato dallo stesso creatore di Ethereum, Buterin.\u00a0Questo algoritmo utilizza grafici aciclici diretti (DAG) per creare una struttura dati massiccia.<\/p>\n<p>All\u2019inizio del suo sviluppo, la struttura dell\u2019algoritmo occupava uno spazio di\u00a0<b>storage<\/b>\u00a0di circa\u00a0<b>1 Gb<\/b>, tuttavia negli anni il suo\u00a0<b>storage<\/b>\u00a0\u00e8 stato esteso fino a\u00a0<b>4 Gb o 5 Gb<\/b>.\u00a0La struttura di questo algoritmo consente il funzionamento del processo di mining di Hashimoto, l\u2019algoritmo di cui parleremo in seguito.<\/p>\n<p>Hashimoto \u00e8 il secondo algoritmo di base di Ethash sviluppato da Thaddeus Dryja con l\u2019intento di essere in grado di aggiungere\u00a0<b>resilienza ASIC<\/b>\u00a0al sistema in cui \u00e8 iutilizzato, e anche per effettuare l\u2019hash mining.\u00a0Tutto questo \u00e8 possibile perch\u00e9 l\u2019algoritmo stesso aumenta il\u00a0<b>consumo di RAM<\/b>\u00a0e quindi limita gli ASIC.<\/p>\n<p>Dall\u2019unione dei due algoritmi ne \u00e8 nato uno unico, che offre la possibilit\u00e0 di progettare un nuovo sistema di mining cos\u00ec complesso che i miners di ASIC non possono\u00a0<b>implementarlo in modo efficace<\/b>.\u00a0In effetti, la sua struttura \u00e8 cos\u00ec avanzata che molti sviluppatori stanno cercando di implementarla come\u00a0<b>opzione a Scrypt<\/b>.<\/p>\n<p>Tuttavia, Dragger-Hashimoto non \u00e8 sempre stato quello che \u00e8 oggi.\u00a0Come tutto il resto, presentava diversi difetti che lo hanno trasformato\u00a0<b>nell\u2019attuale algoritmo<\/b>.\u00a0Di seguito vedremo come funziona.<\/p>\n<div id=\"image_1540214495\" 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 ls-is-cached 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=\"come_funziona_ethash\"><\/span><b>Come funziona Ethash?<\/b><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_1496965830\" 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 ls-is-cached 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 qualsiasi conversazione su Ethereum potresti aver sentito parlare di Ethash.\u00a0Questo \u00e8 l\u2019algoritmo che rende possibile Ethereum.\u00a0Tale algoritmo utilizza tecniche di elaborazione molto avanzate che aumentano il livello di sicurezza della rete. Un altro modo per chiamare questo algoritmo \u00e8 con il nome\u00a0Ethash-Dagger-Hashimoto.\u00a0Questo era il nome che ha adottato quando \u00e8 stato creato, tuttavia da [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":6951,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[212],"tags":[],"class_list":["post-9642","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blockchain-it"],"_links":{"self":[{"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/posts\/9642","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=9642"}],"version-history":[{"count":0,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/posts\/9642\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/media\/6951"}],"wp:attachment":[{"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/media?parent=9642"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/categories?post=9642"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/tags?post=9642"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}