P2Pool Sub-Pool for Low Hash-Rate MinersI am planning up modifying the Bitcoin node at cryptominer.org:9332 to act as a sub-pool and be more friendly for low hash-rate miners. I'm looking for some feedback on my scheme to see if there are any glaring holes / vulnerabilities.
My basic plan is:
- Configure p2pool to have 100% fee so all hash rate goes to the pool
- A 'shift' is 12 hours in length, based on UTC midnight/noon
- P2Pool is modified to log all submitted shares with diff >= 25 (this is already completed - my patch provides a command line option to specify a logging function. I plan on submitting this to forrestv for inclusion upstream)
- The miner score is calculated as the logarithmic of the sum of the submitted difficulty of shares for that miner for that shift
- The miner is credited for all blocks found during the shift, minus an admin fee, based on the percentage of their score compared to the total
The admin fee will probably be on the order of 5% of the payout the node receives for each block found by the network.
I'm only logging submitted shares with diff >= 25 just so I don't have to log a heap of data but still allow the miners to submit a reasonable number of shares. My USB Erupters seem to find a >25 diff block every few minutes so a 12 hour shift should allow time for even very low rate miners to accrue a score. This value can be tweaked easily enough if needed.
I'm thinking the score will be the logarithmic of the sum of the total diff submitted rather than just the a count of shares that are higher than the threshold to provide a reward finding more difficult hashes, and especially shares and blocks. This is one area I can see there may be holes in the logic in.
If the miner connects to the pool using a valid bitcoin address, they are automatically paid out once a global threshold is reached (such as 0.25 BTC) or they can register on the website and choose more "friendly" usernames and payout threshold/address. This allows existing miners to continue as they are. I want to also modify p2pool so it rejects logins from users which are not a valid address or already registered on the website. If a miner that has mined using a bitcoin address subsequently registers on the website, they will have to sign a message using the address to claim the address and be able to modify settings.
An example: I have 3 miners, which submit scores of 100, 50 and 25 respectively. During a shift the networks finds 3 blocks which I get paid out 0.12412, 0.25121 and 0.16331 BTC.
Total received = 0.53864
Total score = 175
Admin fee (5%) = 0.026932 BTC
Payout for miners = 0.511708 BTC
Miner1 = 100/175*0.511708 = 0.29240457 BTC
Miner2 = 50/175*0.511708 = 0.14620228 BTC
Miner3 = 25/175*0.511708 = 0.07310114 BTC
Any feedback? Does this sound like a reasonable idea? Any big problems with it?