1
When miners connect to the server, they get a "job" message back with a merkle_branch field that has hashes that correspond to transactions that will be included in the block being worked on.
What I'm wondering is, does the pool server bother changing that transaction set very often, or do they just wait for a block to be solved, and only then broadcast a new job with a different list?
In other words, in between block solvings, is everyone in the pool generally working on the same set of transactions?
Ok, thanks this is good stuff. From what I see initially (might take me a while to digest this) processTemplate will just return false if the block hasn't changed. So I'm still missing where the data gets refreshed if the block hasn't changed. Seems like it will keep the same data unless the block changes, which means all miners would be working on the same job essentially, and the same set of txs. I'll keep looking at it though. – Fraggle – 2015-12-15T03:41:51.937
Now that I look at it again, I think you're right. This seems like a poor strategy, though, because newer transactions wouldn't get mined. It could be done intentionally, if it had some benefit for miners, but I don't see any benefits off hand. The regular get block template polling seems to only use the result if there has been a new block. Maybe we should open a github issue about this. – morsecoder – 2015-12-16T14:51:05.290
Judging by their commit log and un maintained issues list, though, I don't think it will do any good. You might try looking at https://github.com/int6/CoiniumServ or https://github.com/slush0/stratum.
– morsecoder – 2015-12-16T14:58:29.983Needless to say, the way it SHOULD work in any decently implemented stratum server is that you regularly check for new transactions (so that new transactions get mined), and update the current job to be given out from here forward (until a new block is found). Any work done for any jobs given out that build on the most recent block are valid. So, in the expected behavior, miners would not be mining on exactly the same transaction set most of the time. – morsecoder – 2015-12-16T15:06:29.350
1Ok, thanks. I'm going to mark this as the answer. I think with the comments above it provides enough info. Also of course there are other stratum pool implementations that may work differently than this code base. So ultimately maybe figuring out what the top mining pools are doing is what I really need to do. – Fraggle – 2015-12-17T16:12:35.760