Having written that, I'm wondering how the payouts are affected by long droughts between block finds, and hope someone can clarify things for me.
Hi jonnybravo0311. I will try to help.
Example 1: Miner finds a valid share every 4 hours. Pool finds a block every 24 hours.
This is the average example, so I would expect payout to be right on that 0.01BTC per day. Is my understanding correct?
Yes. BTC has a SPREAD of 3 and a maximum share chain of 3 days worth of shares. If block times get over 1 day on average, the share window will be smaller than SPREAD since we hit the 3 day cap, but your example fits perfectly.
Since shares are good for 3 days in your example, after mining 3 days if we're nailing the average like clockwork, you'd have 18 shares in the share chain (6 per day * 3 days). So the value of a share would be .01 BTC / 18 so that your one block per day pays out .01 to you.
Example 2: Miner finds a valid share every 4 hours. Pool finds a block every 96 hours.
In this example, the miner is still working and finding shares; however the pool has hit a string of bad luck and doesn't find a block for 4 days. Does the miner get rewarded for having submitted shares successfully during the entire 96 hours, or will only a given window of those shares be counted? In other words, when the pool finds the block, does the miner get paid for 4 days of work, or 1? My understanding is that this is a bad luck case, and the miner would only get the expected 0.01BTC once the pool finds the block. Is my understanding correct?
So we're assuming the pool is supposed to find a block every 24 hours on average, but it is a really long round. Nothing really changes. You have 18 shares in the chain that total .01 of value, when this block is found you are paid .01. So you've made less income over these 4 days because of bad pool luck. I don't know what CDF a 4x longer than expect block is (it could be calculated but I'm doing my taxes and I'm tired), but keep in mind the 5% chance you hit a bad luck 95% CDF round is the same as the 5% chance you hit a 5% CDF round. Over a long enough period of time the average CDF of all blocks found should be 50%.
Example 3: Miner finds 4 invalid shares (orphans) per day. Pool finds a block every 24 hours.
Here the miner's shares are beat getting into the share chain - at least that is what I assume orphaned means, if my understanding is wrong, then please define orphaned and dead shares as they relate to p2pool. My understanding here is that the miner would not be paid out anything because all of the shares submitted are invalid. Is this correct?
You have zero shares and so get paid nothing. Orphan rates should be somewhat similar across the p2pool networks, but a node that is super fast and efficient might have a lower orphan rate than some other poorly connected slow node. This gives an advantage to the better/faster nodes. The efficiency % in most interfaces is a way to try and measure that.
Example 4: Miner finds 4 valid shares a day for 3 days, but finds all invalid shares on the 4th day. Pool finds block on the 5th day.
So, the miner has been chugging along for 4 days, happily submitting shares. Unfortunately on the 4th day all of the submitted shares were invalid. If things follow the pattern I've laid out in previous examples, then the miner doesn't get paid for his efforts because the only shares seen in the past 24 hours are invalid ones. Is my understanding correct?
At the time the block is found you have 2 days of shares in the share chain (since day 3 was all orphans). That means 12 shares instead of 18 shares, giving you 2/3 of your normal payment. .00666666 instead of .01.
The max share chain length was increased to 3 days instead of 1 day at some point in the past, when the share chain was slowed down from 10 seconds to 30 seconds.
Example 5: Miner finds 8 valid shares in a day. Pool finds 2 blocks a day.
Since the examples have been all doom and gloom up to this point, let's look at the other side of the coin - where lady luck shines on us a bit. Here the miner is finding and submitting twice the expected amount of work and the pool is finding double the number of blocks. In this case, I expect that the miner would be making 4 times the expected payout. Twice as much because he's finding double the shares and twice as much again because the pool is finding 2 blocks in that 24 hour window. Is this correct?
If you are supposed to find 6 shares/day at your hash rate but get lucky and find 8 instead, then you're making about 1/3 more than normal. Or .01333333 per block instead of .01. If the pool is supposed to be finding 1 block a day but is constantly lucky and finding 2 instead, then you are getting two .01333333 payments per day. In total making .02666666 vs .01 per day. Of course, you are equally likely to have bad luck in the opposite direction and given enough time it will average out to .01/day.
I hope 1- this helps, and 2- I didn't actually get any of this wrong.