I have a requested enhancement (see below for the bounty). I have a need to log all of the shares that are found by cgminer (for statistical analysis purposes) and the existing information that is output is almost enough but In order to do my calculations, I need to know the target for the work that resulted in the share since I mine on pools that don't have a fixed share difficulty.
The current output looks something like this:
[2012-04-24 14:27:39] Accepted 00000000.131be987.c9501e82 PGA 0 thread 0 pool 1
My request is for some option to add in the target for the share. To save output space, it would be preferable for it to be displayed as the equivalent difficulty and not the massively verbose hex target. So as to not bother other cgminer users or those that are already parsing the current output, perhaps it should be optional (based on a new command line parameter, etc)?
I'm imagining something like:
[2012-04-24 14:27:39] Accepted 00000000.58373f06.7b5f26c7 (0.999985) PGA 1 thread 1 pool 1
[2012-04-24 14:27:44] Accepted 00000000.4534557e.a78f6b4a (2.314230) PGA 1 thread 1 pool 1
[2012-04-24 14:27:44] Accepted 00000000.db937fb0.34751330 (4.000000) PGA 1 thread 1 pool 1
[2012-04-24 14:27:44] Rejected 00000000.ca984202.8376eec0 (0.999985) PGA 1 thread 1 pool 1
[2012-04-24 14:27:47] Rejected 00000000.714a3646.4348042c (0.999985) PGA 0 thread 0 pool 1
Or some other equally parse-able format that includes the timestamp, accepted/rejected, the share hash (or at least as much as is currently included), the difficulty/target, which device it was, and which pool it was (for cases where there are multiple pools configured). It's fine if it also includes the thread (as shown above), but I don't need that information, myself.
I have looked at the code and I don't think this is super difficult, but I am not a skilled enough C/C++ programmer to do the enhancement myself with any confidence, so I will put up a bounty for it instead. I know ckolivas is busy and/or on a break, so I don't mind if someone else does it and provides a patch. That said, I'd prefer to see it incorporated into the mainline source code so that I don't have to worry about it breaking in the future, so I'm going to include some incentive for it to be merged as well. Here are the bounties I am willing to pay:
- 5 BTC to the author of a working patch against the current git cgminer source.
- 5 BTC to the author of the patch if and when it gets merged into the cgminer source. This obviously means the change has to be done well enough that ckolivas is comfortable merging it.
- 5 BTC to ckolivas if he merges the patch.
So that is 15 BTC to ckolivas if he does it all himself, or if it is done by someone else up to 10 BTC to the author and 5 BTC to ckolivas for merging it.