3 Things:
...
Thanks. My node is not showing 2 blocks found today. It is only showing 1 of the 3. My node shows block 328799, but is missing 328777 and 328755. Would be great if anyone knows how to fix this in the front-end code. Cheers.
Edit: Oops... Congrats Windpath!
It is not actually a bug in the front end code, it is a limitation of only pulling data from the p2pool node.
When a share is DOA it is not included in the share chain, so other p2pool nodes do not know about it.
However, DOA shares that meet the minimum bitcoin difficulty are still submitted to the bitcoin network just to be safe.
Two of these DOA shares found a block today...
This does happen relatively frequently.
The problem is that however you find the "DOA blocks" it ads dependencies to the front end that are not required to run a node, and increases the complexity of running one...
CoinCadence can find these blocks because we scan the bitcoin blockchain for p2pool blocks and store them in a MySQL DB.
There are 3 ways that come to mind to accomplish including these blocks in your front end:
1. Scan the local bitcoin blockchain as mentioned above
2. Pull P2Pool blocks from another source (i.e.
https://blockchain.info/blocks/P2Pool contains blocks from the last 3 days, someone did this on the
Node Status front end and shared the source here if you want to dig through the thread for it)
3. Monitor the balance on your payout address (will have some false positives when donations occur)
Or you can just visit
http://minefast.coincadence.com/p2pool-stats.php Thank you for the explanation. I already have the coincadence site bookmarked, so I'm good to go there. I was just hoping there was an easy way to adjust the code on the local node. And now I understand why. Thanks again.
As windpath stated, virtually every front end relies upon the share data on your local node to obtain the information used in the display. Since DOA/Orphan shares never make it into the chain, nodes don't know about them, and hence can't display the info to the user. The most reliable way to actually get p2pool blocks is to query the blockchain.info APIs and filter on p2pool.
http://blockchain.info/blocks/P2Pool?format=json
gets you this:
{
"blocks" : [
{
"height" : 328799,
"hash" : "00000000000000000c3ad871b33074e0c7764ef49c8b55b3b7adeaa23368a434",
"time" : 1415269319,
"main_chain" : true
},
{
"height" : 328777,
"hash" : "000000000000000014887e877f75f2b2891ae07794d3d9f89b2e18cde0640f7d",
"time" : 1415260433,
"main_chain" : true
},
{
"height" : 328755,
"hash" : "000000000000000014d699b2c406f04bd9ebfb0be4971db7159b2e87e498ad26",
"time" : 1415249780,
"main_chain" : true
},
{
"height" : 328555,
"hash" : "000000000000000011ca6426165101ea682e9432383a10d7877dce5086c9be06",
"time" : 1415131036,
"main_chain" : true
},
{
"height" : 328506,
"hash" : "000000000000000004228856bb5340644e299c85e03ff0dfec46165cdd6fe90f",
"time" : 1415104948,
"main_chain" : true
},
{
"height" : 328402,
"hash" : "00000000000000001ad400d94bcefa5712325b159b9f0c20f83ab74f69d91bf0",
"time" : 1415050207,
"main_chain" : true
},
{
"height" : 328270,
"hash" : "00000000000000000ef9d63a3e7a93bd86aee5d38a050665febcd7d63f7fc6d6",
"time" : 1414979743,
"main_chain" : true
},
{
"height" : 328253,
"hash" : "000000000000000015baf96ed8e738f41c69fbcdd76e73a49b9d1f481890d197",
"time" : 1414973069,
"main_chain" : true
}
]
}
If you want more detailed information about the block, you can then query about each specifically:
http://blockchain.info/block-index/328799?format=json
gets you the following:
{
"hash":"0000000000000001a90ea36d3c2b44e5dc9658a63b99916ca77e81be9fde3fb0",
"ver":2,
"prev_block":"0000000000000009c0ea1ce62d6affc55cb84455e51edd7c6cea352563b6fcc3",
"mrkl_root":"2921c6ddb81babe9baf571cee293bc7b6c2d7d36944ae1d039bb8bbd6a0ceca7",
"time":1382908236,
"bits":420150405,
"fee":6356397,
"nonce":1565264106,
"n_tx":151,
"size":105883,
"block_index":328799,
"main_chain":true,
"height":266427,
"received_time":1382908240,
"relayed_by":"68.168.104.126",
"tx":[{"ver":1,"size":2954,"inputs":[{"sequence":4294967295,"script":"03bb10040d00456c696769757300526d8118fabe6d6d91f57b13a8f0ef318e7afb8f221514d0571fd65f87d6b62095efc2cf02ea60bc0400000000000000002f7373312f00d037e70e00000000563b0200"}],"time":1382908240,"tx_index":41908536,"vin_sz":1,"hash":"2a4076ba40e87159549f3fbe3a7725f0256326426dd06c056bc2b1fdb7b256b5","vout_sz":83,"relayed_by":"68.168.104.126","out":
.....
.....
}
Using this information, you can properly render things.