{"id":1713,"date":"2019-07-08T16:42:43","date_gmt":"2019-07-08T16:42:43","guid":{"rendered":"https:\/\/2miners.com\/blog\/?p=1713"},"modified":"2021-04-28T13:34:49","modified_gmt":"2021-04-28T13:34:49","slug":"grin-hardfork","status":"publish","type":"post","link":"https:\/\/2miners.com\/blog\/grin-hardfork\/","title":{"rendered":"Grin First Hardfork: What Will Change and How to Prepare?"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Many hardforks have been planned for this summer. <\/span><a href=\"https:\/\/2miners.com\/blog\/zelcash-upcoming-hardfork-and-mining-algorithm-change\/\"><span style=\"font-weight: 400;\">Zel<\/span><\/a><span style=\"font-weight: 400;\"> has just switched to the new ZelHash mining algorithm and became even more ASIC resistant. Grin comes next with its first-ever hardfork. Let\u2019s get into it.<\/span><!--more--><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1714\" src=\"https:\/\/2miners.com\/blog\/wp-content\/uploads\/2019\/07\/134m.jpg\" alt=\"\" width=\"1422\" height=\"800\" data-wp-pid=\"1714\" srcset=\"https:\/\/2miners.com\/blog\/wp-content\/uploads\/2019\/07\/134m.jpg 1422w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2019\/07\/134m-300x169.jpg 300w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2019\/07\/134m-768x432.jpg 768w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2019\/07\/134m-1024x576.jpg 1024w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2019\/07\/134m-800x450.jpg 800w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2019\/07\/134m-1200x675-cropped.jpg 1200w\" sizes=\"auto, (max-width: 1422px) 100vw, 1422px\" \/><\/p>\n<h2><b>Grin Hardfork: What is it for?<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">The upcoming Grin hardfork is intentional. In August 2018 Grin\u2019s main developer known as Igno Peverell published <\/span><a href=\"https:\/\/www.grin-forum.org\/t\/proof-of-work-update\/713\"><span style=\"font-weight: 400;\">the post about Proof of Work Update<\/span><\/a><span style=\"font-weight: 400;\">. Back then the team decided to update the network every 262,080 blocks which are roughly every six months. Grin was launched on mainnet on January 17, so mid-July seems perfect for the first hardfork.<\/span><\/p>\n<p><i><span style=\"font-weight: 400;\">Read more: <\/span><\/i><a href=\"https:\/\/2miners.com\/blog\/what-is-a-hard-fork-understanding-hard-forks-in-cryptocurrency\/\"><i><span style=\"font-weight: 400;\">What Is a Hard Fork? Understanding Hard Forks in Cryptocurrency<\/span><\/i><\/a><\/p>\n<p><span style=\"font-weight: 400;\">The purpose of hardfork is to stop ASICs from dominating the network and make their production meaningless. With that being said, the second algorithm CuckAToo-31 is intended for ASICs, though it is available only for cards with memory over 11 GB.<\/span><\/p>\n<h2><b>Grin Update<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">The testnet of the new network version was launched on June 23 at block 185,040. Grin hardfork will take place at block 262,080. Expect it to occur on July 17, 2019 at 09:28:28 (UTC+3). The live countdown is held <\/span><a href=\"https:\/\/www.coingecko.com\/en\/explain\/grin_hard_fork\"><span style=\"font-weight: 400;\">on this page<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1715\" src=\"https:\/\/2miners.com\/blog\/wp-content\/uploads\/2019\/07\/image1-1.png\" alt=\"\" width=\"1100\" height=\"570\" data-wp-pid=\"1715\" srcset=\"https:\/\/2miners.com\/blog\/wp-content\/uploads\/2019\/07\/image1-1.png 1100w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2019\/07\/image1-1-300x155.png 300w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2019\/07\/image1-1-768x398.png 768w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2019\/07\/image1-1-1024x531.png 1024w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2019\/07\/image1-1-800x415.png 800w\" sizes=\"auto, (max-width: 1100px) 100vw, 1100px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">After the update pre-2.0.0 Grin nodes, wallets and miners will stop working.<\/span><\/p>\n<p><i><span style=\"font-weight: 400;\">Important note. After the network switches to Grin v2.0.0, users should only update their nodes. No further actions are required, so beware of potential scams that invite you to download third-party software or anything like that. This may lead to you losing money.<\/span><\/i><\/p>\n<h2><b>What does will change after Grin Hardfork?<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">The update will bring a lot of changes, so we are going to divide them into two groups.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">First, we will take a look at nodes.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><b>Updated Proof-of-Work algorithm<\/b><span style=\"font-weight: 400;\"> \u2013 Grin developers continue fighting against ASIC manufacturers, so they will switch from Cuckaroo29 to Cuckarood29. More details about the new algorithm below.<\/span><\/li>\n<li style=\"font-weight: 400;\"><b>Node API<\/b><span style=\"font-weight: 400;\"> \u2013 the endpoint must be changed from <\/span><i><span style=\"font-weight: 400;\">v1\/pool\/push<\/span><\/i><span style=\"font-weight: 400;\"> to <\/span><i><span style=\"font-weight: 400;\">v1\/pool\/push_tx<\/span><\/i><span style=\"font-weight: 400;\">. This will create a <\/span><a href=\"https:\/\/github.com\/mimblewimble\/grin\/pull\/2897\"><span style=\"font-weight: 400;\">minor incompatibility<\/span><\/a><span style=\"font-weight: 400;\"> for wallets, which will prevent pre-2.0.0 wallets from connecting to respective nodes.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">And now let\u2019s take a look at wallets.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><b>New Bulletproof rewind scheme<\/b><span style=\"font-weight: 400;\"> \u2013 it will make the wallet more flexible and will make it possible to hide information.<\/span><\/li>\n<li style=\"font-weight: 400;\"><b>Switch to V2 API <\/b><span style=\"font-weight: 400;\">\u2013 V1 REST API will be substituted by V2 JSON-RPC API. You can find the related documentation <\/span><a href=\"https:\/\/docs.rs\/grin_wallet_api\/1.1.0\/grin_wallet_api\/trait.ForeignRpc.html\"><span style=\"font-weight: 400;\">here<\/span><\/a><span style=\"font-weight: 400;\"> and <\/span><a href=\"https:\/\/docs.rs\/grin_wallet_api\/1.1.0\/grin_wallet_api\/trait.OwnerRpc.html\"><span style=\"font-weight: 400;\">here<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\"><b>V0 Slate<\/b><span style=\"font-weight: 400;\"> \u2013 originally it was created for pre-1.0.2 Grin. From now on it will be incompatible with new versions.<\/span><\/li>\n<\/ul>\n<h2><b>What is special about the new Cuckarood29 Algorithm?<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Grin secondary PoW algorithm Cuckaroo-29 has shown great results. Since the network mainnet launch, there has been no sign of ASIC mining, which is <\/span><a href=\"https:\/\/www.grin-forum.org\/t\/mid-july-pow-hardfork-cuckaroo29-cuckarood29\/5082\"><span style=\"font-weight: 400;\">confirmed by the developer <\/span><\/a><span style=\"font-weight: 400;\">known as <\/span><i><span style=\"font-weight: 400;\">tromp<\/span><\/i><span style=\"font-weight: 400;\">. Moreover, the team knows of ASICs planned to come out this summer, so Cuckarood29 is sure to happen.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Let\u2019s start with the theory. There are three separate aspects of\u00a0 standard Cuckaroo that can be changed by developers:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">the underlying hash function \u2013\u00a0currently it\u2019s siphash-2-4;<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">the computation of endpoints of a whole block of edges;<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">the cycle type.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">The developers decided to leave the second aspect alone and concentrate on the rest. As a result the new siphash is defined by templates on one of the rotation amounts.<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">template &lt; int rotE = 21 &gt;<\/span>\r\n<span style=\"font-weight: 400;\">class siphash_state {<\/span>\r\n<span style=\"font-weight: 400;\">...<\/span>\r\n<span style=\"font-weight: 400;\">void sip_round() {<\/span>\r\n<span style=\"font-weight: 400;\">v0 += v1; v2 += v3; v1 = rotl(v1,13);<\/span>\r\n<span style=\"font-weight: 400;\">v3 = rotl(v3,16); v1 ^= v0; v3 ^= v2;<\/span>\r\n<span style=\"font-weight: 400;\">v0 = rotl(v0,32); v2 += v1; v0 += v3;<\/span>\r\n<span style=\"font-weight: 400;\">v1 = rotl(v1,17); v3 = rotl(v3,rotE);<\/span>\r\n<span style=\"font-weight: 400;\">v1 ^= v2; v3 ^= v0; v2 = rotl(v2,32);<\/span>\r\n<span style=\"font-weight: 400;\">}<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">The new cycle type is directed. One-half of the edges (with even index) is directed from U to V, while the other half (with odd index) is directed from V to U. In other words, the cycle must alternate between even-indexed and odd-indexed edges. At the same time, the number of nodes in every U and V is halved. So Cuckarood29 will have 2^28 U-nodes, as well as 2^28 U-&gt;V edges and 2^28 V-&gt;U edges. This will result in twice as many cycles as expected.<\/span><\/p>\n<p>https:\/\/2miners.com\/blog\/how-to-mine-grin\/<\/p>\n<p><span style=\"font-weight: 400;\">The developers are not planning to change the mining difficulty. So if half of the current Cuckaroo29 miners fail to upgrade, the solution rate in the secondary PoW algorithm will remain the same. If everyone upgrades in time, the average block time may drop to 36 seconds. In this case, ar_scale will go down to compensate and things will come back to normal in a few hours.<\/span><\/p>\n<p><i><span style=\"font-weight: 400;\">About the name. The added \u201cd\u201d in Cuckarood29 mainly stands for \u201cdirected\u201d, but may also stand for \u201cdoubling\u201d (of solutions) like in SHA256d.<\/span><\/i><\/p>\n<h2><b>How to Prepare for the Hardfork?<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Here are the actions that should be taken by the main groups of network members.<\/span><\/p>\n<h3><b>Miners [Updated]<\/b><\/h3>\n<p><a href=\"https:\/\/grin.2miners.com\/\"><span style=\"font-weight: 400;\">C31 Grin miners<\/span><\/a><span style=\"font-weight: 400;\"> don\u2019t need to upgrade anything.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">C29 Grin miners must upgrade to the latest grin-miner version or download the update of the software compatible with Cuckarood29. <a href=\"https:\/\/github.com\/develsoftware\/GMinerRelease\/releases\/\">Download the latest version of Gminer<\/a>. We&#8217;ve successfully tested the new gminer software on 2Miners test pool.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1718\" src=\"https:\/\/2miners.com\/blog\/wp-content\/uploads\/2019\/07\/gminer-grin-fork.jpg\" alt=\"\" width=\"1103\" height=\"639\" data-wp-pid=\"1718\" srcset=\"https:\/\/2miners.com\/blog\/wp-content\/uploads\/2019\/07\/gminer-grin-fork.jpg 1103w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2019\/07\/gminer-grin-fork-300x174.jpg 300w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2019\/07\/gminer-grin-fork-768x445.jpg 768w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2019\/07\/gminer-grin-fork-1024x593.jpg 1024w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2019\/07\/gminer-grin-fork-800x463.jpg 800w\" sizes=\"auto, (max-width: 1103px) 100vw, 1103px\" \/><\/p>\n<p>Miner settings are same as before. If you use Gminer it will automatically switch to the new algorithm:<\/p>\n<pre>miner.exe --algo grin29 --server grin.2miners.com --port 3030 --user 2aHR0cHM6Ly9ncmluLmJpdG1lc2guY29tL3NuQW80UXhHVjlWYnQ3WDhydU5NNDFmOTRm.RIG_ID<\/pre>\n<p><a href=\"https:\/\/2miners.com\/\"><i><span style=\"font-weight: 400;\">2Miners<\/span><\/i><\/a><i><span style=\"font-weight: 400;\"> members have nothing to worry about. The pool will automatically switch to the new algorithm and continue working.<\/span><\/i><\/p>\n<h3><b>Exchanges<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Owners of exchanges must:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">upgrade Grin to v2.0.0 or higher;<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">upgrade Grin-wallet to v2.0.0 or higher. Transactions will be available only after the hardfork;<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">upgrade the exchange infrastructure for V2 API wallet.<\/span><\/li>\n<\/ul>\n<h3><b>Pools<\/b><\/h3>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">upgrade Grin to v2.0.0 or higher;<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">upgrade Grin-wallet to v2.0.0 or higher. Transactions will also be available only after the hardfork;<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">upgrade the pool infrastructure for V2 API wallet;<\/span><\/li>\n<li style=\"font-weight: 400;\"><a href=\"https:\/\/2miners.com\/\"><span style=\"font-weight: 400;\">2Miners pool<\/span><\/a><span style=\"font-weight: 400;\"> is ready for the hardfork.<\/span><\/li>\n<\/ul>\n<p><a href=\"https:\/\/twitter.com\/pool2miners\"><b>PLEASE MAKE SURE TO SUBSCRIBE TO OUR TWITTER <\/b><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many hardforks have been planned for this summer. Zel has just switched to the new ZelHash mining algorithm and became even more ASIC resistant. Grin comes next with its first-ever hardfork. Let\u2019s get into it.<\/p>\n","protected":false},"author":3,"featured_media":1714,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-1713","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>Grin First Hardfork: What Will Change and How to Prepare? - Crypto Mining Blog<\/title>\n<meta name=\"description\" content=\"Many hardforks have been planned for this summer. Zel has just switched to the new ZelHash mining algorithm and became even more ASIC resistant. Grin\" \/>\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\/grin-hardfork\/\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/2miners.com\/blog\/grin-hardfork\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/2miners.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Grin First Hardfork: What Will Change and How to Prepare?\"}]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Grin First Hardfork: What Will Change and How to Prepare? - Crypto Mining Blog","description":"Many hardforks have been planned for this summer. Zel has just switched to the new ZelHash mining algorithm and became even more ASIC resistant. Grin","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\/grin-hardfork\/","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/2miners.com\/blog\/grin-hardfork\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/2miners.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Grin First Hardfork: What Will Change and How to Prepare?"}]}]}},"_links":{"self":[{"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/posts\/1713","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=1713"}],"version-history":[{"count":4,"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/posts\/1713\/revisions"}],"predecessor-version":[{"id":3170,"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/posts\/1713\/revisions\/3170"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/media\/1714"}],"wp:attachment":[{"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/media?parent=1713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/categories?post=1713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/tags?post=1713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}