4

I setup p2pool for Dogecoin. It seems to work fine, only it submits every single share to the Dogecoin client. The client naturally rejects blocks with insufficient PoW.

Is this how it should work? Is there a parameter that would cause p2pool to submit only valid blocks that meet the required difficulty?

stanga
  • 255
  • 1
  • 5

2 Answers2

2

When p2pool is started with --debug, it submits all shares to the node (dogecoind, bitcoind etc.).

stanga
  • 255
  • 1
  • 5
1

It sounds like your client and pool node are working properly, and there is no parameter which will make the p2pool node set the worker difficulty to the share difficulty.

The p2pool node will take care of adjusting the difficulty for your mining client so that it is not submitting work too often. It's not a bad thing for your mining client to be submitting shares regularly to the pool node, even if they are at a lower difficulty than what is required to get a p2pool share. Regular traffic between the client and the pool node allows you to verify that everything is working properly and it allows the p2pool node to measure statistics about the client.

From the the wiki:

Q: Why does my miner say it has found a lot of shares but p2pool say I have only found a few?!

A: The real P2Pool difficulty is hundreds of times higher than on normal pools, but p2pool essentially lies to your miner and tells it to work on relatively easy shares so that it submits shares every few seconds instead of every few hours. P2Pool then ignores any submitted shares that don't match the real share difficulty. By doing this, P2Pool can more accurately report your local hash rate and you can see if you are having problems with too many stale shares quickly

atomicpirate
  • 201
  • 1
  • 2
  • Thanks, atomicpriate, but that's not my question. P2Pool connects to a Dogecoin client (similar to bitcoind), and it seems to submit all shares to this client. That's what doesn't make sense to me. – stanga Jan 06 '14 at 15:01
  • I see, thanks for the clarification. It is certainly true that in the mainline BTC p2pool node implementation, only valid blocks found by a peer or miner are relayed to bitcoind. Perhaps the dogecoin p2pool branch was sloppily implemented and submits more shares than necessary? That is not how it _should_ be done. – atomicpirate Jan 08 '14 at 04:10
  • I actually took a standard repo (https://github.com/forrestv/p2pool) and adapted it to Dogecoin. That's why I suspected I did something wrong. – stanga Jan 08 '14 at 15:05
  • 1
    Very cool that you've branched p2pool for dogecoin! If you look in the original code at node.py and work.py you can see where p2pool checks that `pow_hash` is less than or equal to `header['bits'].target` before sending it to the client with `helper.submit_block(.)`, perhaps that's the place to start. – atomicpirate Jan 09 '14 at 01:58