Author

Topic: [1500 TH] p2pool: Decentralized, DoS-resistant, Hop-Proof pool - page 736. (Read 2591916 times)

full member
Activity: 125
Merit: 100
While I was napping, my internal network failed.  That essentially killed pretty much everything including the boxes that keep p2pool.info fed with up-to-date data.  so the last block didn't appear until I rebooted the machine and there is a small gap in stats.  It's running normally again, now.

Sorry.



No worries, website is awesome and I don't think I've ever seen it miss something before, which is why I thought it was odd =)

Keep up the good work, i'll be sending a donation later today.
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
One last question(s)?

How does p2pool get updated work? 
The Bitcoind RPC doesn't support asyncronous calls does it (i.e bitcoind just sends work on a block change)?
Does it just continually poll bitcoind and check for changes?  Every x seconds?

1 BTC sent (I figured a bounty would get more detailed answers then just "yeah" or "I think so" Smiley )
c9cd269fe070ac3df98c23c965637910916e5e5223da6e8370afa04c6fde2b81

It's called lack of technical documentation ...
hero member
Activity: 737
Merit: 500
While I was napping, my internal network failed.  That essentially killed pretty much everything including the boxes that keep p2pool.info fed with up-to-date data.  so the last block didn't appear until I rebooted the machine and there is a small gap in stats.  It's running normally again, now.

Sorry.

sr. member
Activity: 383
Merit: 250
Did another big subsidy go out recently?  I have a mined payment that doesn't match up to any block.

It was a block payout. for some reason it is not showing up on p2pool.info.
hero member
Activity: 591
Merit: 500
Did another big subsidy go out recently?  I have a mined payment that doesn't match up to any block.
I don't see it on p2pool.info so I dunno.
full member
Activity: 125
Merit: 100
Did another big subsidy go out recently?  I have a mined payment that doesn't match up to any block.
legendary
Activity: 2126
Merit: 1001
DeathAndTaxes: Yes, it only listens for block invs, but also polls getmemorypool occasionally, so it does update the txs.

Ente: The share count varying is normal. Peers only exchange blocks of 1000 shares, when you start P2Pool, it loads more shares than it needs, and last, other peers that are downloading the sharechain may rebroadcast old shares that your node remembers for a while.

Interesting. Confusing, slightly, but still interesting. :-)

Thank you again for clarifying!

Ente
hero member
Activity: 516
Merit: 643
DeathAndTaxes: Yes, it only listens for block invs, but also polls getmemorypool occasionally, so it does update the txs.

Ente: The share count varying is normal. Peers only exchange blocks of 1000 shares, when you start P2Pool, it loads more shares than it needs, and last, other peers that are downloading the sharechain may rebroadcast old shares that your node remembers for a while.
legendary
Activity: 2126
Merit: 1001
I am restarting my p2pool every few hours to test and config.
Have some questions about the sharechain:

First, it took me around two days to verify all 17000 shares. It seems to have some influence, merged mining in a second instance seemed to not work while verifying?

I had around 17000 shares in the sharechain, all verified finally. I started a new instance, which loaded 25000 shares. When it was up, I stopped the first instance. Tjis is what I caught in the second instance after maybe two minutes:

Quote
2012-03-24 18:13:12.926276 P2Pool: 18121 shares in chain (17488 verified/18125 total) Peers: 10 (0 incoming)
[..]
2012-03-24 18:13:15.121819 New work for worker! Difficulty: 1.000000 Share difficulty: 1000.000177 Total block value: 50.029500 BTC including 19 transactions
2012-03-24 18:13:16.006935 P2Pool: 17851 shares in chain (17488 verified/17855 total) Peers: 10 (0 incoming)

So now I have three possible numbers for the size of the sharechain: 17000, 18000, 25000. Strange?

Well, I just post this out of curiosity, as it doesnt seem to influence (once the sharechain is verified at least).

Ente
donator
Activity: 1218
Merit: 1079
Gerald Davis
No, it connects to bitcoind over the P2P port and listens for "inv" block messages. So, yes, it's asynchronous.

Ahh smart.  

So if I am understanding right it is (to update my high level flow):
0) p2pool detects "inv" message on bitcoin port.
1) p2ool uses "getmemorypool" bitcoind RPC call to get block components.
2) p2pool generates coinbase transaction (reward split) from current sharechain
3) p2pool generates merkle tree (combining tx from bitcoind w/ coinbase from sharechain).
4) p2pool issues block headers to miners as they request work via getwork call.

One last "last question".
inv messages can contains things objects other than blocks (like tx broadcast from other nodes).  
Does p2pool only make getmemorypool request based on inv messages about blocks?
Is so that means the "work" (i.e. set of tx) is fixed until the next block right? (No picking up intra-block tx as they are broadcast).

And yeah I could have look it all up in the code but I got a lot on my plate right now so thank you for explaining it all (and providing cites).
hero member
Activity: 516
Merit: 643
No, it connects to bitcoind over the P2P port and listens for "inv" block messages. So, yes, it's asynchronous.
donator
Activity: 1218
Merit: 1079
Gerald Davis
One last question(s)?

How does p2pool get updated work? 
The Bitcoind RPC doesn't support asyncronous calls does it (i.e bitcoind just sends work on a block change)?
Does it just continually poll bitcoind and check for changes?  Every x seconds?

1 BTC sent (I figured a bounty would get more detailed answers then just "yeah" or "I think so" Smiley )
c9cd269fe070ac3df98c23c965637910916e5e5223da6e8370afa04c6fde2b81
hero member
Activity: 516
Merit: 643
Need clarification on how p2pool builds a block header.

Does this sound right?
1) p2ool uses RPC call "getmemorypool" to get block components from bitcoind
2) p2pool generates coinbase transaction from current sharechain
3) p2pool generates merkle tree (combining tx from bitcoind w/ coinbase from sharechain).
4) p2pool issues block headers to miners via getwork call (prior block, timestamp, merkle tree root, difficulty)

Right?  Wrong?  Clarifications?

Nobody?  

OK how about 1 BTC bounty
a) verify and/or correct the above execution flow above.
b) provide filename and line # of code (p2pool github) where p2pool pulls works from bitcoind.
c) provide fielname and line # of code (p2pool github) where p2pool modifies work from bitcoind to include coinbase reward split.



That's correct. P2Pool calls "getmemorypool" from p2pool.main.getwork (main.py line 30) and the generation transaction for a share is computed in p2pool.data.Share.generate_transaction (data.py lines 130-145 and 164). I have to say.. I don't think this should be that hard to find.

EDIT: Some more details: The current work from bitcoind is held in the current_work and current_work2 variables in main.py. When mining for a share, generate_transaction is called from WorkerBridge.get_work (line 535-554) in main.py. When a share is being validated, generate_transaction is called from Share.check in data.py (line 238).

P2Pool actually combines everything into a work unit on lines 581-588 in main.py.

EDIT EDIT: I think the reason you didn't get an answer is that most people were sleeping in between your two posts.. I was.
donator
Activity: 1218
Merit: 1079
Gerald Davis
Need clarification on how p2pool builds a block header.

Does this sound right?
1) p2ool uses RPC call "getmemorypool" to get block components from bitcoind
2) p2pool generates coinbase transaction from current sharechain
3) p2pool generates merkle tree (combining tx from bitcoind w/ coinbase from sharechain).
4) p2pool issues block headers to miners via getwork call (prior block, timestamp, merkle tree root, difficulty)

Right?  Wrong?  Clarifications?

Nobody?  

OK how about 1 BTC bounty
a) verify and/or correct the above execution flow above.
b) provide filename and line # of code (p2pool github) where p2pool pulls works from bitcoind.
c) provide fielname and line # of code (p2pool github) where p2pool modifies work from bitcoind to include coinbase reward split.

donator
Activity: 1218
Merit: 1079
Gerald Davis
Need clarification on how p2pool builds a block header.

Does this sound right?
1) p2ool uses RPC call "getmemorypool" to get block components from bitcoind
2) p2pool generates coinbase transaction from current sharechain
3) p2pool generates merkle tree (combining tx from bitcoind w/ coinbase from sharechain).
4) p2pool issues block headers to miners via getwork call (prior block, timestamp, merkle tree root, difficulty)

Right?  Wrong?  Clarifications?
hero member
Activity: 737
Merit: 500
Anyone have a guess at when we might hit our next block?

Right.......  NOW
sr. member
Activity: 604
Merit: 250
DUH your right.  Not sure what I was thinking.  Still with one block per hour your avg is only 24 which is likely too small of a sample to avoid significant swings due to variance.

I believe each share is paid on average 3 times, so that helps smooth things out. Not today though!
hero member
Activity: 516
Merit: 643
P2Pool release 0.10.3 signed tag: 0.10.3 UPGRADE REQUIRED before April 1st (BIP 16 date), March 27th for Litecoin

* New graph implementation (works on Windows!) with per-miner graphs. Go to http://127.0.0.1:9332/static/graphs.html once installed to view.

RELEASE NOTES: You have to go to http://127.0.0.1:9332/static/graphs.html , not http://127.0.0.1:9332/static to see graphs.

I am playing around with usernames (to change difficulty). Now the whole username (including the postfix /1000+1) is shown in the statistics, and whenever I change the postfix a new miner shows up in the stats.
WHen I delete the rrd stuff, the deprecated rrd graphs are cleaned.
How can I clean/reset the new graphs? I deleted most files in /data/bitcoin (or similar), no help. I had to reinstall p2pool, which starts the whole sharechain-load+verify again.

I would love to see the postfix ignored in the graphs altogether?

In the meantime, where is the data stored?

Ente

In the graph_db file. There isn't a way to just remove one username, but I'll change it to make it only consider the first part of the username.
hero member
Activity: 560
Merit: 500
Anyone have a guess at when we might hit our next block?
donator
Activity: 1218
Merit: 1079
Gerald Davis
DUH your right.  Not sure what I was thinking.  Still with one block per hour your avg is only 24 which is likely too small of a sample to avoid significant swings due to variance.
Jump to: