forrestv (OP)
|
|
March 24, 2012, 03:34:39 PM |
|
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.
|
1J1zegkNSbwX4smvTdoHSanUfwvXFeuV23
|
|
|
DeathAndTaxes
Donator
Legendary
Offline
Activity: 1218
Merit: 1079
Gerald Davis
|
|
March 24, 2012, 04:30:41 PM |
|
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" ) c9cd269fe070ac3df98c23c965637910916e5e5223da6e8370afa04c6fde2b81
|
|
|
|
forrestv (OP)
|
|
March 24, 2012, 04:33:37 PM |
|
No, it connects to bitcoind over the P2P port and listens for "inv" block messages. So, yes, it's asynchronous.
|
1J1zegkNSbwX4smvTdoHSanUfwvXFeuV23
|
|
|
DeathAndTaxes
Donator
Legendary
Offline
Activity: 1218
Merit: 1079
Gerald Davis
|
|
March 24, 2012, 04:51:49 PM |
|
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).
|
|
|
|
Ente
Legendary
Offline
Activity: 2126
Merit: 1001
|
|
March 24, 2012, 05:20:16 PM |
|
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: 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
|
|
|
|
forrestv (OP)
|
|
March 24, 2012, 06:06:37 PM |
|
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.
|
1J1zegkNSbwX4smvTdoHSanUfwvXFeuV23
|
|
|
Ente
Legendary
Offline
Activity: 2126
Merit: 1001
|
|
March 24, 2012, 06:10:02 PM |
|
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
|
|
|
|
echris1
|
|
March 24, 2012, 08:06:35 PM |
|
Did another big subsidy go out recently? I have a mined payment that doesn't match up to any block.
|
|
|
|
Krak
|
|
March 24, 2012, 08:57:16 PM |
|
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.
|
BTC: 1KrakenLFEFg33A4f6xpwgv3UUoxrLPuGn
|
|
|
sharky112065
|
|
March 24, 2012, 09:23:25 PM |
|
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.
|
Donations welcome: 12KaKtrK52iQjPdtsJq7fJ7smC32tXWbWr
|
|
|
twmz
|
|
March 24, 2012, 09:55:55 PM |
|
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.
|
Was I helpful? 1 TwmzX1wBxNF2qtAJRhdKmi2WyLZ5VHRs WoT, GPGBitrated user: ewal.
|
|
|
kano
Legendary
Offline
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
|
|
March 24, 2012, 10:00:48 PM |
|
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" ) c9cd269fe070ac3df98c23c965637910916e5e5223da6e8370afa04c6fde2b81 It's called lack of technical documentation ...
|
|
|
|
echris1
|
|
March 24, 2012, 10:33:54 PM Last edit: March 25, 2012, 12:18:43 AM by echris1 |
|
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.
|
|
|
|
lueo
Member
Offline
Activity: 61
Merit: 10
Bitcoin believer
|
|
March 25, 2012, 12:21:22 AM |
|
Why my payout drop down so dramatically?
|
|
|
|
echris1
|
|
March 25, 2012, 12:28:23 AM |
|
What do the other graphs look like? Or instead of the graph, the output P2Pool is showing you. Not enough information here to go on.
|
|
|
|
bitpop
Legendary
Offline
Activity: 2912
Merit: 1060
|
|
March 25, 2012, 02:52:54 AM |
|
P2Pool 0.10.3 for Windows starts up good then stops responding my windows 2k8 r2
|
|
|
|
NothinG
|
|
March 25, 2012, 04:11:48 AM |
|
P2Pool 0.10.3 for Windows starts up good then stops responding my windows 2k8 r2
Do you get any errors? Roughly, how long before it stops responding? Do you get the "{processname.exe} isn't responding"?
|
|
|
|
bitpop
Legendary
Offline
Activity: 2912
Merit: 1060
|
|
March 25, 2012, 04:26:07 AM |
|
No the process looked ok, but it just stopped listening over rpc. After several restarts and deleting the data directory, it seems fine now. I'll let you know of any updates.
|
|
|
|
ChanceCoats123
|
|
March 25, 2012, 05:31:31 AM |
|
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.
Holy... I had no idea p2pool.info was your baby...! Great resource and it's greatly appreciated on my end!
|
|
|
|
Boognish
Newbie
Offline
Activity: 55
Merit: 0
|
|
March 25, 2012, 06:04:57 AM |
|
|
|
|
|
|