Contents
Blockchain
To many, there is no need to explain what the blockchain is, but let’s 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’s every 14 seconds. Every new block contains information about the previous block. This is how the blockchain is organized – it’s 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.
Every node/computer in the cryptocurrency network is connected with other nodes and constantly exchanges data with them. Let’s 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 – #101. Once it is solved, a miner (or a mining pool) sends the solution to the network through it’s 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 – #102.
But what happens if two miners solve block 101 at the same time? Let’s 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’s take BTC and ETH as an example.
IMPORTANT. You can’t steal a block solution that is not yours. Cryptocurrency networks are protected against this type of fraud. The block solution from miner A doesn’t work for miner B, so the latter can’t take credit for it.
Types of Blocks in Bitcoin Blockchain
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.
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.
So which chain is the valid one? The solution is simple. Miner B’s followers have a longer chain, so it’s valid. Sadly, miner A’s followers worked for nothing and don’t get any reward for found blocks.
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 – 102, 103 and 104. The block found by miner A didn’t make it to the index. This block gets cut off and remains without a parent, so it is called an orphan block. Good news is that it has 2 children – the two blocks that were found afterwards. Bad news is that these blocks are useless, so they are known as stale blocks.
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.
People often confuse orphan and stale blocks. It’s because both types of blocks are useless to Bitcoin miners, as they don’t bring any profit. These blocks are also known as reject/rejected.
To sum up, there are three types of blocks in Bitcoin blockchain:
- Normal (valid) block is a block that gets included into Bitcoin blockchain. A miner that finds it gets rewarded.
- Orphan block is a block that doesn’t have a predecessor/parent. Miners don’t get rewarded for orphan blocks.
- Stale block (orphan’s offspring) is a block that doesn’t 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’t get rewarded for stale blocks.
Types of Blocks in Ethereum Blockchain
Average block find time in Ethereum is much less than in Bitcoin – 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 GHOST protocol (Greedy Heaviest Observed Subtree) implemented by Ethereum developers.
The concept of GHOST is simple. Miners that find orphan and stale blocks get rewarded, but the reward is lower than for standard blocks. In Ethereum and other Dagger-Hashimoto cryptocurrency networks, such blocks are called uncle blocks.
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.
So there are two types of blocks in Ethereum blockchain:
- Normal (valid) block is a block that gets included into Ethereum blockchain. A miner that finds it gets rewarded.
- Uncle block is a block that corresponds to orphan and stale blocks in Bitcoin network. It doesn’t get included into the main blockchain. A miner gets a lower reward for an uncle block than for a standard one.
Uncle Block Reward in Ethereum Network
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:
([Uncle block number] + 8 – [Block number]) * [Ethereum reward] / 8
In other words, if the standard block reward is 3 ETH, the uncle reward would be 1/8th less.
The reward for the very first uncle block is 2.625 ETH, for the second one – 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.
If you are interested to see Ethereum mining in action, check out Ethviewer. It is an awesome real-time infographic that shows the main chain and uncle chains. Really fascinating.