blockchainpowmining

In a mining pool service, do the client execute the entire PoW algorithm?


I know that a peer in a cryptocurrency network can contribute deciding the next block that has to be added to the blockchain. To do that and gain some rewards, such peer has to be the first peer able to resolve some PoW algorithm. From what I have understood, mining pools use computational power of client machines in order to resolve the PoW as fast as possible. I guess so that the mining pool server is the only peer that directly participates to the network and it performs entirely the algorithm using the computational power of the clients which perform only some secondary tasks.

How can be splitted this computational task to many clients?


Solution

  • Pool server receives "task" from a current coin node, by request getblocktemplate. Thereafter server, based on received tasks, prepares subtasks for participant miners, and also provide them another getblocktemplate strucutres, with reduced difficulty parameter. When miner solves subtask (with reduced difficulty), he sends his solution to a pool, this partial solution named a share. Pool computes participants contribution by number of submitted shares and shares difficulty.

    Difficulty of some shares can be enough to comply coin network difficulty. Such share named solving share, and this is block solution. As result, this solving share added to blockchain as a block, and pool receives block reward. Technically, miner can directly work with a wallet, without pool. This mode named solo mining.

    See spec for getblocktemplate: https://github.com/bitcoin/bips/blob/master/bip-0022.mediawiki