{"id":2689,"date":"2020-11-06T10:59:52","date_gmt":"2020-11-06T10:59:52","guid":{"rendered":"https:\/\/2miners.com\/blog\/?p=2689"},"modified":"2020-11-06T10:59:52","modified_gmt":"2020-11-06T10:59:52","slug":"ethereum-classic-bits-of-the-epoch-potential-network-instability-due-to-a-severe-ethash-library-bug","status":"publish","type":"post","link":"https:\/\/2miners.com\/blog\/ethereum-classic-bits-of-the-epoch-potential-network-instability-due-to-a-severe-ethash-library-bug\/","title":{"rendered":"Ethereum Classic: Bits of the Epoch. Potential Network Instability Due to a Severe Ethash Library Bug"},"content":{"rendered":"<p>2Miners pool operators together with Lolliedieb (the author of <a href=\"https:\/\/bitcointalk.org\/index.php?topic=4724735.0\">Lolminer<\/a>) has discovered a bug in the core library used in both Ethereum and Ethereum Classic after closely monitoring the epoch switch (we always do control important milestone switches for the cryptocurrencies we support).<\/p>\n<p><!--more--><\/p>\n<h2>Ethereum Classic Rejected Shares Problem<\/h2>\n<p>As you may know, Ethereum Classic is preparing to undergo a fork that will activate the ECIP-1099 proposal. In short words, this was the team&#8217;s decision to cut down the amount of hashing power on the network to prevent attacks using NiceHash and to reduce the number of ASICs mining on the network. In the meantime, the Ethereum Classic has switched to epoch 385 last night.<\/p>\n<p>After the activation of the new epoch, we have noticed a much increased invalid share rate coming for ETC from our miners. This means, the miner software finds a valid solution but the pool rejects it and thinks it is not valid. The DAG file used to verify solutions has grown over 4 Gigabytes for the first time, which gave us a clue where the problem may lie.<\/p>\n<h2>Ethash Lib Problem Explained<\/h2>\n<p>Let\u2019s step back for a second and remind some of the basic computer science concepts to you so it\u2019s easier to grasp the source of the issue. Any number processed on a computer is stored in so-called variables, that are constrained to a particular number of bits. The more bits the variable size is, the larger number it may hold. If the variable is signed (as in, it can go from negative to positive numbers), it can hold an equal range of negative and positive values; if it is unsigned, it can hold only positive numbers but in a greater range. For example, as we all remember from basic CS, an 8-bit value can contain at most 256 values, ranging 0\u2026255 for unsigned variables (yes, zero is considered a valid distinct value too)  and -127\u2026127 for the signed ones. For 16 bits the range increases to 65536 (2^16), for 32 bits \u2014 2^32 equalling about 4 billion values, and so on.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/2miners.com\/blog\/wp-content\/uploads\/2020\/11\/04F61C7B-A942-4015-BD72-FC0C550E6ED3.jpeg\" alt=\"\" width=\"1422\" height=\"800\" class=\"alignnone size-full wp-image-2698\" data-wp-pid=\"2698\" nopin=\"nopin\" srcset=\"https:\/\/2miners.com\/blog\/wp-content\/uploads\/2020\/11\/04F61C7B-A942-4015-BD72-FC0C550E6ED3.jpeg 1422w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2020\/11\/04F61C7B-A942-4015-BD72-FC0C550E6ED3-300x169.jpeg 300w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2020\/11\/04F61C7B-A942-4015-BD72-FC0C550E6ED3-1024x576.jpeg 1024w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2020\/11\/04F61C7B-A942-4015-BD72-FC0C550E6ED3-768x432.jpeg 768w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2020\/11\/04F61C7B-A942-4015-BD72-FC0C550E6ED3-800x450.jpeg 800w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2020\/11\/04F61C7B-A942-4015-BD72-FC0C550E6ED3-1200x675-cropped.jpeg 1200w\" sizes=\"auto, (max-width: 1422px) 100vw, 1422px\" \/><\/p>\n<p>With thorough investigation, we have discovered that the math in one of the core libraries used in many Ethash-based cryptocurrencies is a little off: in the solution validity calculation values of 32 bits were used instead of 64 bits, thus failing the checks on the newly grown DAG file in the ETC. Moreover, the routine that was 32-bit is multi-threaded and the calculation breaks depending on the number of threads available on the host machine, which means some nodes of the same version could fail the verification and reject some new blocks, while other nodes may accept it, potentially inducing increased network instability due to a flawed consensus.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/2miners.com\/blog\/wp-content\/uploads\/2020\/05\/all_coins_on_the_crane.jpg\" alt=\"all_coins_on_the_crane\" width=\"1422\" height=\"800\" class=\"alignnone size-full wp-image-2293\" data-wp-pid=\"2293\" nopin=\"nopin\" srcset=\"https:\/\/2miners.com\/blog\/wp-content\/uploads\/2020\/05\/all_coins_on_the_crane.jpg 1422w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2020\/05\/all_coins_on_the_crane-300x169.jpg 300w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2020\/05\/all_coins_on_the_crane-1024x576.jpg 1024w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2020\/05\/all_coins_on_the_crane-768x432.jpg 768w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2020\/05\/all_coins_on_the_crane-800x450.jpg 800w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2020\/05\/all_coins_on_the_crane-1200x675.jpg 1200w\" sizes=\"auto, (max-width: 1422px) 100vw, 1422px\" \/><\/p>\n<h2>2Miners Pull Requests to Fix the Network<\/h2>\n<p>We have identified the problem and patched our pool software, so you could mine ETC on 2Miners without any rejected shares shares now.<\/p>\n<p>PPLNS: <a href=\"https:\/\/etc.2miners.com\">etc.2miners.com<\/a><br \/>\nSOLO: <a href=\"https:\/\/solo-etc.2miners.com\">solo-etc.2miners.com<\/a><\/p>\n<p>We have also submitted a pull request for the core Ethereum library that fixes the issue \u2014 <a href=\"https:\/\/github.com\/ethereum\/go-ethereum\/pull\/21793\">here<\/a> and <a href=\"https:\/\/github.com\/etclabscore\/core-geth\/pull\/223\">here<\/a>. But this also means the currently running ETC network is still not functioning correctly and is rejecting valid blocks because of the overflow problem. This already leads to the increased invalid block rate and could potentially lead to network splits. 2Miners remain in close contact with the developers we could reach in attempts to propagate the fix.<\/p>\n<p>Our pools are already patched and are accepting all shares correctly. Let\u2019s hope for a fast turnaround time for the core ETC devs\u2026 as another hard fork may be in order. <\/p>\n<p>Remember to follow us on <a href=\"https:\/\/twitter.com\/pool2miners\"><b>Twitter<\/b><\/a> to get all the news as soon as possible.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>2Miners pool operators together with Lolliedieb (the author of Lolminer) has discovered a bug in the core library used in both Ethereum and Ethereum Classic after closely monitoring the epoch switch (we always do control important milestone switches for the cryptocurrencies we support).<\/p>\n","protected":false},"author":3,"featured_media":2692,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-2689","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mining"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Ethereum Classic: Bits of the Epoch. Potential Network Instability Due to a Severe Ethash Library Bug - Crypto Mining Blog<\/title>\n<meta name=\"description\" content=\"2Miners pool operators together with Lolliedieb (the author of Lolminer) has discovered a bug in the core library used in both Ethereum and Ethereum\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/2miners.com\/blog\/ethereum-classic-bits-of-the-epoch-potential-network-instability-due-to-a-severe-ethash-library-bug\/\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/2miners.com\/blog\/ethereum-classic-bits-of-the-epoch-potential-network-instability-due-to-a-severe-ethash-library-bug\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/2miners.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ethereum Classic: Bits of the Epoch. Potential Network Instability Due to a Severe Ethash Library Bug\"}]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Ethereum Classic: Bits of the Epoch. Potential Network Instability Due to a Severe Ethash Library Bug - Crypto Mining Blog","description":"2Miners pool operators together with Lolliedieb (the author of Lolminer) has discovered a bug in the core library used in both Ethereum and Ethereum","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/2miners.com\/blog\/ethereum-classic-bits-of-the-epoch-potential-network-instability-due-to-a-severe-ethash-library-bug\/","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/2miners.com\/blog\/ethereum-classic-bits-of-the-epoch-potential-network-instability-due-to-a-severe-ethash-library-bug\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/2miners.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Ethereum Classic: Bits of the Epoch. Potential Network Instability Due to a Severe Ethash Library Bug"}]}]}},"_links":{"self":[{"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/posts\/2689","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/comments?post=2689"}],"version-history":[{"count":9,"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/posts\/2689\/revisions"}],"predecessor-version":[{"id":2701,"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/posts\/2689\/revisions\/2701"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/media\/2692"}],"wp:attachment":[{"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/media?parent=2689"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/categories?post=2689"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/tags?post=2689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}