Initial version of coinbase checking funciton for stratum pool

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 to unknown address;
    4. This also creates possibility for other kind of collaborative mode between pool and miners, which we are actually looking on...

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-addr='XXXX' --coinbase-perc='=1', or --coinbase-perc='>0.99', or --coinbase-perc='<0.05', etc, the command will check the addr 'XXXX' get corresponding percent of the whole benefit, else it would output an error message.

Signed-off-by: Huang Le <4tarhl@gmail.com>
I am totally new at this and I have no idea what you are talking about or
what to do.


On Sat, Aug 16, 2014 at 8:26 PM, Huang Le <notifications@github.com> wrote:

> In api.c:
>
> > @@ -2597,7 +2597,7 @@ static void removepool(struct io_data *io_data, __maybe_unused SOCKETTYPE c, cha
> >  		return;
> >  	}
> >
> > -	pool->enabled = POOL_DISABLED;
> > +	disable_pool(pool, POOL_DISABLED);
>
> Please clarify which is is what you want:
>
>    1. No independent disable_pool(), any time when the user choose to
>    disable a pool, we just do remove_pool();
>    2. Still going to have two separate func disable_pool() and
>    remove_pool(), but just combine them when they appear together in the code;
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/luke-jr/bfgminer/pull/540/files#r16328016>.
>



-- 

"I can do all things through Christ which strengtheneth me" (Phil 4:13).

Jerry and God <http://www.jerryandgod.com/>

Biblical People <http://www.biblicalpeople.wordpress.com/>

Jerry and God: The Mighty Hunters
<http://www.slideboom.com/presentations/698053/Jerry-and-God%3A-The-Mighty-Hunters%2C-Book-1?pk=c0ec-6052-c01e-c608-d056-b3aa-f4f4-dd40>

Virtual Assistant <http://curtstowellvirtualassistant.wordpress.com/>