Beginner FAQ about Mining pools & shares & difficulty

kommradHomer
5 min readNov 25, 2019

--

A few months ago , I was reading about coinhive and how it was widely and easily abused, from an infosec perspective and I was later intrigued by the Monero project. Especially, by the way the whole project is handled: Transparency , the community , the goals like being ASIC resistance… Monero looks like the Crypto-currency for good guys. Then I started reading about Monero. Anyway, without further due , I’ll start asking and answering questions that was bugging me

Chinese&Russian ASIC bitcoin miners - circa 2019

Before the mining pool , what does a miner system actually do ?

First step — Create a BLOCK HEADER

Second Step — Hash The BLOCK HEADER with SHA256 and check if the value is below the TARGET. If so , you won the lottery ! If not (which is almost always) , change the last 4 Bytes(the NONCE) of the BLOCK HEADER and try again

Is a miner trying to guess a single value ?

NO. It would be almost impossible , with the odds of 1 / 2²²⁴ . The miner is trying to reach any value that’s less than the TARGET. For example , as of November 2019 , the TARGET is roughly around 13 trillion (12973235968799). So the miner will win the lottery if it finds any of the 13 trillion values below that TARGET.

What the hell is DIFFICULTY ?

simply put , 2²²⁴ / TARGET . So the reverse ratio says , smaller target = bigger difficulty.

Difficulty is basically a different representation of the target to make it easier for normal humans to understand it. Pretty ironically, It took me great a deal of time to understand what it is

what about the LEADING ZEROs ?

Just another way of simplifying the target or difficulty presentation. For example, the value below has 14 leading zeros: 0000000000000083ee9371ddff055eed7f02348e4eda36c741a2fc62c85bc5cfAnother value of same length , with 16 leading zeros ,like the one below 0000000000000000ee9371ddff055eed7f02348e4eda36c741a2fc62c85bc5cf would be a number smaller than the first one , by at least a factor of 2⁴ .

Hence smaller TARGET= bigger DIFFICULTY

Do miners of a pool help each other for solving the problem ?

NO . Miners don’t help each other “solve the problem”. Every miner tries to solve the same problem , over and over again. There is no progress. Pool mining is simply pooling your money for buying more tickets for this lottery.

What does a MINING POOL do ?

  • The mining pool creates the BLOCK HEADER and distributes it to the miners , so that all the miners can try to solve the same problem.
  • And then It checks the results submitted by the miners and credits the SHAREs , keeping the track for the fair sharing of the REWARD , when the time comes.
  • When a block is found , creates a new BLOCK HEADER and distributes again
  • If the Block is found by the pool , divides the reward between the miners, according to the reward method chosen (Proportional, PPLNS, SMPSS, PPS)

What is a SHARE ?

The proof of work for the POOL. Has no actual value. Has 2 uses :

  • An accounting method for diving the reward fairly
  • Easily proving the POOL that you’re actually trying to solve the problem for the pool.

This system is what I find ingenious about the pool mechanism because without it , the whole scheme wouldn’t work , and the solution is intuitive and boot-strapped. Using the same system of proof of work for the miners of the pool , helping tackle the proof of work and the issue of sharing the booty at the same time , with zero overhead. How ?

As you try to mine for the pool , you use the BLOCK HEADER that’s created by the pool . The problem is that , any result you submit to the pool , for telling that you have performed a try for solving the problem for the pool , requires the same amount of computation to be validated. If the pool manager were to do as many computations as the miners , where’s the benefit ? A total failure ? How will the pool know that the miners are actually working? How will it know how hard each miner is working ?

Here comes the SHARE mechanism. This mechanism suggests that ,in average ,before reaching a value below the TARGET , you are , for example , 2¹⁶ times more likely to find a value below (2¹⁶ * TARGET) . So , instead of sending all the results you compute , you can only send the ones below (2¹⁶ * TARGET) , and the pool , after validating your result , would give you a SHARE.

For someone submitting a result for a greater DIFFICULTY , the pool would credit more SHAREs , proportional to the level of DIFFICULTY, as It is more difficult to find such result , which shows that you’re doing more work.

Usually pools have preset thresholds for SHARE difficulties. Also , some pools tend to reward more SHAREs for higher difficulties , as those miners submit less results and require less validation computation eventually.

This ingenious system helps with reducing the network traffic between the workers and the pool as well. The downside is the loss of precision.

If you pick a high difficulty threshold that you rarely catch a result , you would end up submitting results rarely, not getting any SHAREs.

Can the Miner who found a result , keep the reward to themselves?

No , they Can’t. The BLOCK HEADER that’s used by the miners , points to the mining pool manager’s wallet for the reward. And the result found is only valid for this particular BLOCK HEADER. So , in practice , all the miners are mining for the mining pool manager

Can the mining pool run away with the rewards ?

Absolutely YES . The mining pool might not send the actual currency to the miners’ wallets and there is nothing that would be able to make them do so. Also, there’s almost always a cap before you can withdraw your earnings, and many miners who give up mining for that pool , would just be leaving their actual currency there. So It is crucial to pick the right mining pool.

These are the beginner questions that were bugging me. I’ll try to add more If I can remember at any point. I would like to hear your questions of any level as well !

--

--

kommradHomer
kommradHomer

Written by kommradHomer

proud seeder of 146.5GB The.Lord.of.the.Rings.Trilogy.1080p.Extended.Complete.Bluray.DTS-HD-6.1.x264-Grym

Responses (1)