pooler/cpuminer — pull request #84 by 4tar (2014-08-14 07:52:17+00:00)
Title: Add coinbase checking for pool mining

In stratum pool mining mode, the pool sends mining_notify message to distribute job, however, to reduce bandwidth usage, there is no transaction list included in the message, the miner would have to ask for it explicitly by sending a get_transactions message if desired, that in effect loses the bandwidth saving of stratum protocol, which actually is the essence.

By adding a coinbase checking function, we can possibly obsolete the necessary of get_transactions message during most circumstance:
1. We ensure this is a valid BTC coinbase for btc, so reduce the possibility of pool stealing power for other kind of work;
2. We check amount and to-address by going through the whole payout list, so reduce the possibility of pool stealing the coins mined;
3. We can even specify the percent regards how much pool can gain from this mining job, so reduce the possibility of pool transferring (part of) coins mined;

The coinbase checking can not totally replace get_transactions message, but combined with other human actions it can give miners‘ enough confidence to trust a pool.

The usage is pretty straightforward: input --coinbase-perc argument with --coinbase-addr, e.g.: --coinbase-perc='=1', or --coinbase-perc='>0.99', or --coinbase-perc='<0.05', etc, the command will ensure the addr specified by --coinbase-addr get corresponding percent of all benefit.

Sign-off-by: Huang Le <4tarhl@gmail.com>