Post
Topic
Board Pools
Re: [1500 TH] p2pool: Decentralized, DoS-resistant, Hop-Proof pool
by
-ck
on 12/12/2015, 22:15:45 UTC
P2Pool should immediately call getblocktemplate after it knows that there is a new block. It is notified that there is a new block via its P2P connection to bitcoind, through which bitcoind sents an inv message when it has a new block. The code that does this is the work_poller in node.py. The reason that you saw a 18 second delay is something within that loop. Maybe bitcoind was lagging and took a long time to announce the block after it printed "new best"? Or maybe P2Pool was lagging and took a long time to respond. Is the delay always long or just for this one block?
Thanks for that. No this bitcoind is very rapid with its responses. It's set up the same as I use for my own pool. This happened routinely, not just the one block though. Here are the 3 before it:

Code:
2015-12-12 21:51:12.963648 UpdateTip:
2015-12-12 21:51:32.679893 CreateNewBlock

2015-12-12 21:44:06.200074 UpdateTip:
2015-12-12 21:44:26.030397 CreateNewBlock

2015-12-12 21:42:07.479248 UpdateTip:
2015-12-12 21:42:26.094565 CreateNewBlock
I'm running current git master head.

That said, P2Pool will generate its own work if it knows that there is a new block (via its P2Pool peers) and bitcoind hasn't given it new work yet. These blocks will be empty, though. It's just a stopgap solution for bitcoind sometimes taking a long time to catch up.

EDIT:

Perhaps that actually explains these recent blocks then which are empty:
https://www.blocktrail.com/BTC/block/00000000000000000842de6ff4793f59ab08139a253f7e5622926f9d470c1ae9
https://www.blocktrail.com/BTC/block/000000000000000010e4a73a4abf8bd304809c021d636b1f39013ddf6e437d3c