Friday, April 22, 2016
More about mining
In my last post, I gave a basic introduction to ethereum mining. Since there is not much information available about eth mining compared to bitcoin mining, and some of the information I have found is even wrong, I decided to go into more detail on eth mining.
Comparing the bitcoin protocol to ethereum, one of the significant differences is the concept of uncle blocks. When two miners find a block at almost the same time, only one of them can be the next block in the chain, and the other will be an uncle. They are equivalent to stale blocks in bitcoin, but unlike bitcoin where the stale blocks go unrewarded, uncle blocks are rewarded based on how "fresh" they are, with the highest reward being 4.375 eth. An example of this can be found in block 1,378,035. Each additional generation that passes (i.e. each increment of the block count) before an uncle block gets included reduces the reward by .625 eth. An example of an uncle that was 2 generations late getting included in the blockchain can be found in block 1,378,048. The miner including the uncle in their block gets a bonus of .15625 eth on top of the normal 5 eth block reward.
Based on the current trend, I expect the uncle rate to be in the 6-7% range over the next few months. With the average uncle reward being around 3.5 eth (most uncles are more than one generation old), uncles provide a bonus income to miners of about 4%. Since uncles do not factor into ethereum's difficulty formula, when more uncles are mined the difficulty does not increase. The mining calculators I've looked at don't factor in uncle rewards, so real-world returns from mining in an optimal setup should be slightly higher than the estimates of the mining calculators.
Another thing the calculators do not factor is the .15625 eth uncle inclusion reward, but this is rather insignificant, and most pools do not share the uncle inclusion reward. Assuming a 6% uncle rate, the uncle inclusion reward increases mining returns by less than 0.2%. If your pool is down or otherwise unavailable for 3 minutes of the day, that would be a 0.21% loss in mining rewards. So a stable pool with good network connections is more important than a pool that shares the uncle inclusion reward. Transaction fees are also another source of mining revenue, but most pools do not share them, and they amount to even less than the uncle inclusion reward in any case.
Finding a good pool for ethereum mining has been much more difficult than bitcoin, where it is pretty hard to beat Antpool. For optimal mining returns, you need to use stratum mode, and there are two main variations of the stratum protocol for eth mining; dwarf and coinotron. Coinotron's stratum protocol is directly supported by Genoil's ethminer, which avoids the need to run eth-proxy in addition to the miner. Coinmine.pl and miningpoolhub.com support coinotron's stratum protocol, while nanopool, f2pool, and mininpoolhub support dwarf's protocol. Miningpoolhub is able to support both on the same port since the json connection string is different.
Coinmine.pl and coinotron only have servers in Europe, and half the time I've tried to go to coinotron's web site it doesn't even load after 15 seconds. Miningpoolhub has servers in the US, Europe, and Asia, and has had reasonable uptimes. As well, the admin responds adequately to issues, and speaks functional english. They have a status page that shows enough information to be able to confirm that your mining connection to the pool is working properly. I have a concern over how the pool reports rejected shares, but the impact on mining returns does not appear to be material. Rejected shares happens on other pools too, and since I am still investigating what is happening with rejected shares, there is not much useful information I can provide about it.
So for now my recommended pool is ethereum.miningpoolhub.com. My recommended mining progam is v1.0.7 of Genoil's ethminer, which added support for stratum connection failover where it can connect to a secondary pool server if the first goes down. The Ethereum Foundation is supporting the development of open-source mining pool software, so we may see an ideal eth mining pool in the near future, and maybe even improvements to the official ethminer supporting stratum protocol.