{"id":955,"date":"2018-11-12T20:20:54","date_gmt":"2018-11-12T20:20:54","guid":{"rendered":"https:\/\/2miners.com\/blog\/?p=955"},"modified":"2018-11-12T20:21:16","modified_gmt":"2018-11-12T20:21:16","slug":"orphan-stale-uncle-blocks-in-bitcoin-and-ethereum","status":"publish","type":"post","link":"https:\/\/2miners.com\/blog\/orphan-stale-uncle-blocks-in-bitcoin-and-ethereum\/","title":{"rendered":"Orphan, Stale &#038; Uncle Blocks in Bitcoin and Ethereum"},"content":{"rendered":"<p>Sometimes the reward for the found block can be lower than usual or there may be no reward at all. Are you interested in finding out why that happens? Then keep on reading, but make sure to read <a href=\"https:\/\/2miners.com\/blog\/mining-mining-luck\/\">this article<\/a> first.<\/p>\n<p><!--more--><\/p>\n<h2><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-956\" src=\"https:\/\/2miners.com\/blog\/wp-content\/uploads\/2018\/11\/image2.jpg\" alt=\"\" width=\"1024\" height=\"576\" data-wp-pid=\"956\" srcset=\"https:\/\/2miners.com\/blog\/wp-content\/uploads\/2018\/11\/image2.jpg 1024w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2018\/11\/image2-300x169.jpg 300w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2018\/11\/image2-768x432.jpg 768w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2018\/11\/image2-800x450.jpg 800w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/h2>\n<h2>Blockchain<\/h2>\n<p>To many, there is no need to explain what the blockchain is, but let\u2019s take a closer look at the chain itself. In the Bitcoin network, a new block is created every 10 minutes, whereas in the Ethereum network it\u2019s every 14 seconds. Every new block contains information about the previous block. This is how the blockchain is organized \u2013 it\u2019s an index, just like a numbered list or an Excel table. No gaps are allowed. Number 1 is always followed by number 2 which is followed by 3 and then 4, and so on.<\/p>\n<p>Every node\/computer in the cryptocurrency network is connected with other nodes and constantly exchanges data with them. Let\u2019s say for example, that the last block in a cryptocurrency network is #100. This means that at that moment all miners worldwide are trying to solve the same block \u2013\u00a0#101. Once it is solved, a miner (or a mining pool) sends the solution to the network through it\u2019s node. In the course of a few seconds or even milliseconds, all nodes in the network get information about block #101. The block goes through the verification process to make sure there is no fraud, and then the nodes wait for the next block \u2013 #102.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-958\" src=\"https:\/\/2miners.com\/blog\/wp-content\/uploads\/2018\/11\/image3.png\" alt=\"\" width=\"710\" height=\"110\" data-wp-pid=\"958\" srcset=\"https:\/\/2miners.com\/blog\/wp-content\/uploads\/2018\/11\/image3.png 710w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2018\/11\/image3-300x46.png 300w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/><\/p>\n<p>But what happens if two miners solve block 101 at the same time? Let\u2019s say, for example, there are 100 nodes in the network. Miner A solved the block a bit earlier and sent the information about the block to 60 nodes. Miner B finished later and sent the information to only 40 nodes. Does it mean that miner A wins against miner B? Not necessarily. Let\u2019s take BTC and ETH as an example.<\/p>\n<p><strong>IMPORTANT<\/strong>. You can\u2019t steal a block solution that is not yours. Cryptocurrency networks are protected against this type of fraud. The block solution from miner A doesn\u2019t work for miner B, so the latter can\u2019t take credit for it.<\/p>\n<h2>Types of Blocks in Bitcoin Blockchain<\/h2>\n<p>Ten minutes is an average block find time for Bitcoin. In reality, it can vary from a few seconds to even a few hours. For example, it may depend on how fast blocks are being processed or how fast nodes exchange data with one another.<\/p>\n<p>Miner A and miner B solved block 101 at the same time. 60% of nodes got the new block from miner A, while 40% got it from miner B. At this point both blocks are completely legitimate and valid. After that, miners that followed miner A found 2 more blocks, while miners that followed miner B found 3 more blocks.<\/p>\n<p>So which chain is the valid one? The solution is simple. Miner B\u2019s followers have a longer chain, so it\u2019s valid. Sadly, miner A\u2019s followers worked for nothing and don\u2019t get any reward for found blocks.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-959\" src=\"https:\/\/2miners.com\/blog\/wp-content\/uploads\/2018\/11\/image4.png\" alt=\"\" width=\"710\" height=\"164\" data-wp-pid=\"959\" srcset=\"https:\/\/2miners.com\/blog\/wp-content\/uploads\/2018\/11\/image4.png 710w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2018\/11\/image4-300x69.png 300w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/><\/p>\n<p>Do you remember that the blockchain is organized in the form of an index? Block 101 found by miner B is added to the list, as well as the next 3 blocks found by its followers \u2013 102, 103 and 104. The block found by miner A didn\u2019t make it to the index. This block gets cut off and remains without a parent, so it is called an <i>orphan block<\/i>. Good news is that it has 2 children \u2013 the two blocks that were found afterwards. Bad news is that these blocks are useless, so they are known as <i>stale blocks<\/i>.<\/p>\n<p>In reality, nodes are unlikely to wait for so long. Once block 102 comes out following the disputable block 101, all the cryptocurrency network will switch to this chain and abandon the other.<\/p>\n<p>People often confuse orphan and stale blocks. It\u2019s because both types of blocks are useless to Bitcoin miners, as they don\u2019t bring any profit. These blocks are also known as <i>reject\/rejected<\/i>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-960\" src=\"https:\/\/2miners.com\/blog\/wp-content\/uploads\/2018\/11\/image5.png\" alt=\"\" width=\"622\" height=\"171\" data-wp-pid=\"960\" srcset=\"https:\/\/2miners.com\/blog\/wp-content\/uploads\/2018\/11\/image5.png 622w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2018\/11\/image5-300x82.png 300w\" sizes=\"auto, (max-width: 622px) 100vw, 622px\" \/><\/p>\n<p>To sum up, there are three types of blocks in Bitcoin blockchain:<\/p>\n<ul>\n<li><strong>Normal (valid) block<\/strong> is a block that gets included into Bitcoin blockchain. A miner that finds it gets rewarded.<\/li>\n<li><strong>Orphan block<\/strong> is a block that doesn\u2019t have a predecessor\/parent. Miners don\u2019t get rewarded for orphan blocks.<\/li>\n<li><strong>Stale block<\/strong> (orphan\u2019s offspring) is a block that doesn\u2019t get included into Bitcoin blockchain, because it is preceded by an orphan block. In other words, the chain starts with an orphan block. Miners don\u2019t get rewarded for stale blocks.<\/li>\n<\/ul>\n<h2>Types of Blocks in Ethereum Blockchain<\/h2>\n<p>Average block find time in <a href=\"https:\/\/2miners.com\/blog\/how-to-mine-ethereum-mining-and-profitability\/\">Ethereum<\/a> is much less than in Bitcoin \u2013 just 14 seconds. Orphan and stale blocks are expected to be encountered more often than in Bitcoin so miners should waste more time on them. Luckily, it is different thanks to <em>GHOST<\/em> protocol (Greedy Heaviest Observed Subtree) implemented by Ethereum developers.<\/p>\n<p>The concept of <em>GHOST<\/em> is simple. Miners that find orphan and stale blocks get rewarded, but the reward is lower than for standard blocks. In Ethereum and other <a href=\"https:\/\/2miners.com\/blog\/mining-difficulty-and-network-hashrate-explained\/\">Dagger-Hashimoto<\/a> cryptocurrency networks, such blocks are called <i>uncle<\/i> <i>blocks<\/i>.<\/p>\n<p>Uncle blocks also resolve the problem of network centralization. Without them ,the network would be messed up. Considering the little block time, a major pool would work much more effectively and squeeze smaller competitors that would receive information about new blocks too slowly and would be creating an infinite amount of useless orphan and stale blocks.<\/p>\n<p>So there are two types of blocks in Ethereum blockchain:<\/p>\n<ul>\n<li><strong>Normal (valid) block<\/strong> is a block that gets included into Ethereum blockchain. A miner that finds it gets rewarded.<\/li>\n<li><strong>Uncle block<\/strong> is a block that corresponds to orphan and stale blocks in Bitcoin network. It doesn\u2019t get included into the main blockchain. A miner gets a lower reward for an uncle block than for a standard one.<\/li>\n<\/ul>\n<h2>Uncle Block Reward in Ethereum Network<\/h2>\n<p>Ethereum allows 7 nested levels of uncle blocks which would correspond to 1 orphan block and 6 stale blocks after it in Bitcoin. In Ethereum, the uncle block reward is calculated according to the following formula:<\/p>\n<blockquote><p>([Uncle block number] + 8 &#8211; [Block number]) * [Ethereum reward] \/ 8<\/p><\/blockquote>\n<p>In other words, if the standard block reward is 3 ETH, the uncle reward would be 1\/8th less.<\/p>\n<p>The reward for the very first uncle block is 2.625 ETH, for the second one \u2013 2.25 ETH, then 1.87 ETH and so on until 0.375 ETH. However, an uncle chain is unlikely to go on for so long. After one or two uncle blocks a miner node abandons the wrong chain and switches to the main mining chain.<\/p>\n<p>If you are interested to see Ethereum mining in action, check out <a href=\"https:\/\/www.ethviewer.live\/\">Ethviewer<\/a>. It is an awesome real-time infographic that shows the main chain and uncle chains. Really fascinating.<code><\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-961 aligncenter\" src=\"https:\/\/2miners.com\/blog\/wp-content\/uploads\/2018\/11\/image1.png\" alt=\"\" width=\"576\" height=\"401\" data-wp-pid=\"961\" srcset=\"https:\/\/2miners.com\/blog\/wp-content\/uploads\/2018\/11\/image1.png 576w, https:\/\/2miners.com\/blog\/wp-content\/uploads\/2018\/11\/image1-300x209.png 300w\" sizes=\"auto, (max-width: 576px) 100vw, 576px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes the reward for the found block can be lower than usual or there may be no reward at all. Are you interested in finding out why that happens? Then keep on reading, but make sure to read this article first.<\/p>\n","protected":false},"author":4,"featured_media":956,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-955","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>Orphan, Stale &amp; Uncle Blocks in Bitcoin and Ethereum - Crypto Mining Blog<\/title>\n<meta name=\"description\" content=\"Sometimes the reward for the found block can be lower than usual or there may be no reward at all. Are you interested in finding out why that happens?\" \/>\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\/orphan-stale-uncle-blocks-in-bitcoin-and-ethereum\/\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/2miners.com\/blog\/orphan-stale-uncle-blocks-in-bitcoin-and-ethereum\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/2miners.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Orphan, Stale &#038; Uncle Blocks in Bitcoin and Ethereum\"}]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Orphan, Stale & Uncle Blocks in Bitcoin and Ethereum - Crypto Mining Blog","description":"Sometimes the reward for the found block can be lower than usual or there may be no reward at all. Are you interested in finding out why that happens?","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\/orphan-stale-uncle-blocks-in-bitcoin-and-ethereum\/","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/2miners.com\/blog\/orphan-stale-uncle-blocks-in-bitcoin-and-ethereum\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/2miners.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Orphan, Stale &#038; Uncle Blocks in Bitcoin and Ethereum"}]}]}},"_links":{"self":[{"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/posts\/955","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\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/comments?post=955"}],"version-history":[{"count":4,"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/posts\/955\/revisions"}],"predecessor-version":[{"id":964,"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/posts\/955\/revisions\/964"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/media\/956"}],"wp:attachment":[{"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/media?parent=955"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/categories?post=955"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2miners.com\/blog\/wp-json\/wp\/v2\/tags?post=955"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}