I've been thinking the following.
Say a coin has difficulty 10000
Block 1 is found after 10k shares
Block 2 is found after 10k shares
Block 3 is found after 10k shares
So N for block 4, based on what miningpoolhub says, is 10k
Then suddenly difficulty drop to 1
Now, each "share" should worth much more right.
How does miningpoolhub implement this?
How does pool in general implement that shares that are given during low difficulty worth far more than shares that are given during high difficulty.
This is important for those making bots to buy hash to send to miningpoolhub because, of course, we would send hash only if difficulty is lower
Basically do people get more share if they send hash when difficulty is lower and how automatic is that?
From what you said, it seems that people get the same share and the expected value of how much those shares worth (inversely proportional to N) is not directly derived from difficulty but depends the amount of shares required to mine last blocks. It is possible that amount of shares required to mine last blocks may be far higher because those blocked are mined when difficulty were higher.
One thing I would imagine is to implement N in PPLNS in such a way that N is always proportional to difficulty when a block is found. So if difficulty is really low when a block is found then only few shares get a piece.
Another way to implement this is to have weighted share. So each share is divided by difficulty and people get paid based on those weighted share. Obviously share that are earned when difficulty is lower worths more.
What exactly did miningpoolhub do? When difficulty is fluctuating and the round is the same, how did miningpoolhub reward those who hash during low difficulty more the way they deserve it. Or is it just being ignored?
The reason I ask is because pool's difficulty is pretty much constant while network difficulty may fluctuate wildly.
Sorry for late reply. Hew.. Much server works these days.
Hmm... Many questions and complicate to answer each of them. I think you misunderstood what share is.
There's no pool's difficulty. It's actually miner's difficulty set for each of them. This difficulty value is automatically adjusted from pool side.
This difficulty allocated to each miner is not related to block creation difficulty.
Block creation difficulty is much higher.
Miner's difficulty is useless (except one share that satisfies block creation difficulty), but it is crucial because it is used for validating from pool whether miners are working or not.
Share represents how many times CPU/GPU/ASIC have done hashing. It is probability thing assuming that hash results are normally distributed.
Here's an example.
If there's a hash algo that can output from 1 ~ 100, normally distributed, then this algo will output number "less or equal than 10" about 10% of probability.
So if miner finds a solution that outputs <= 10, other people can think that miner did hashing work about 10 times total. Because miner should find this solution about 10% of probability.
if miner finds this kind of solution 5 times, then other people can think that this miner did hashing work 50 times.
Other people don't need to verify each solution to check whether this miner really worked or not. Just some portion of work validation will do it. And this is what pool is doing.
This is share. Each share has difficulty value which means the work size, hashing works done.
As each miner's performance is different, this share difficulty is set dynamically. If miner inserts share too frequently, pool raises that miner's difficulty. Not all, just that miner only.
So every miner works are validated from pool within certain interval.
This dynamically setting difficulty is called vardiff.
So, whether the block network difficulty drops or not, it doesn't affect miner's difficulty at all.
Each share doesn't worth more or not by itself actually. Each of them just represents hashing work done.
If block difficulty drops, like total share needed 10k to 5k, then it's fine too.
Half of works are counted. Each miner works are calculated proportionally (by rate from total share), and block reward will be distributed fairly for their contribution.
Please leave message if there's some confusion still.