Counting stale shares in p2pool


SUBMITTED BY: Guest

DATE: Aug. 30, 2012, 7:45 p.m.

FORMAT: Text only

SIZE: 3.6 kB

HITS: 1680

  1. Counting stale shares in p2pool.
  2. This document is a result of a discussion on IRC between rkjnsn, br0k3n, and
  3. blodyx.
  4. Written by rkjnsn (1rkjnsnjXfDkjnQkY6ngAajRo5fh97G9L)
  5. Purpose:
  6. Including all shares into the block chain that were generated based on the
  7. current bitcoin block.
  8. Rational:
  9. Currently, there is a relatively hight percentage (~8%) of stale shares
  10. generated by p2pool miners. This increases the variance that miners experience
  11. in income when using p2pool.
  12. Also, batch mining devices, such as the BFL Single, perform a large number of
  13. hashes at a time, returning the results all at once. Users of these devices are
  14. severely penalized on p2pool for two reasons. First, because they take a few
  15. seconds to run through the batch, there is a high probability that the
  16. discovered shares will be stale before they are returned. Second, even when the
  17. results are returned in time, only the first share can be counted even though
  18. several may be found. This results in users of these devices receiving
  19. significantly less credit than they deserve, keeping them away from p2pool.
  20. Even if such devices can be modified such that results are returned immediately
  21. and operations can be interrupted, the various latencies involved would still
  22. lead to reduced efficiency.
  23. Proposed Approach:
  24. Instead of orphaning shares, merge them back into the tree. This would be
  25. accomplished by generating a share that is based on two or more previous
  26. shares.
  27. Share 2
  28. / \
  29. Share 1 Share 4
  30. \ /
  31. Share 3
  32. Share 2--Share 3----
  33. / \
  34. Share 1 Share 5
  35. \ /
  36. -------------Share 4
  37. The last share contains the appropriate payouts to the generators involved with
  38. both branches.
  39. Problem:
  40. While merging as above is in the collective interest of the pool, both to
  41. decrease variance and to allow the use of hardware miners, it is detrimental to
  42. the user actually performing the merge (Tragedy of the Commons). By merging the
  43. two branches rather than orphaning one of them, the user increases the number
  44. of shares in the pool belonging to other users, leading to a slight decrease in
  45. his/her own payout. In order for this approach to be successful, some incentive
  46. must be offered for merging.
  47. Possible Solution 1:
  48. One possible solution is to offer the user performing the merge an award. This
  49. award could either come from the the pool (like the finders fee) or from the
  50. shares of the branches being merged. The latter option would also serve to
  51. discourage purposeful splitting of the chain (e.g., in hopes of then collecting
  52. the merge fee). The exact award needed for adequate incentive would still need
  53. to be analyzed.
  54. Possible Solution 2:
  55. Another possible solution is to reject shares that don't merge when they could.
  56. Earning a new share is more beneficial for a user than excluding another user's
  57. share, so rejecting non-merging shares would make merging the more profitable.
  58. Unfortunately, rejecting all transactions that could have merged would also
  59. reject legitimate shares whose calculation was begun before one of the
  60. conflicting shares was known. It may be possible to take a propagation delay
  61. into account, only considering a share to be well known after it has been on
  62. the p2pool network for a given length of time.

comments powered by Disqus