Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: baloo_kiev on May 27, 2013, 09:42:50 PM



Title: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: baloo_kiev on May 27, 2013, 09:42:50 PM
Source: https://github.com/baloo-kiev/p2pool Make sure you have the latest version!
Public node: http://78.27.191.182:8333 temporarily down because of network connection problems. Use http://coinminer.net:9444 . It charges 2% fee. Back again!

IMPORTANT
Unlike with other coin p2pools, you have to specify your public key (not an address!) as username when mining on a public node.

Note: You don't need this if you run your own p2pool node. This is only relevant when connecting your worker to some other node.
To point your worker to my (or any other) public node you have to get a public key:
1) launch bitbar

2) in bitbar directory, run
Code:
./bitbard getnewpubkey "someccount"
you will receive a hex string, call it <your_new_pubkey>, which is the public key to a new address in account "someaccount" (you don't have to keep the key secret, as it's public)

3) (optionally) make sure it works as supposed to: run
Code:
./bitbard getaddressesbyaccount "someaccount"
you will see a new address, and
Code:
./bitbard validatepubkey <your_new_pub_key>
will return JSON object, which is expected to have 'isvalid' and 'ismine' properties set to 'true'

4) use <your_new_pub_key> as a worker username when connecting to a public node, just like you use your address with other coin p2pools.

Happy mining!
Feedback appreciated.

Quote
UPDATE: One more fix to avoid rounding of the award to cents. Please re-download the code and clear data directory.

P2pool works!
Source: https://github.com/baloo-kiev/p2pool
All work submitted to a node by workers is payed to the node address! Address specified as worker's username is ignored!
Download the source, host your node, point your workers to it.

EDIT4. First block found! http://btb.cryptocoinexplorer.com/block/00000000055aa1afdb25984d4740e1e81f79c8f258cce029483a1c51c2b83fd6

EDIT3. Some changes reverted. All work submitted to a node by workers is payed to the node address! Address specified as worker's username is ignored! Download the source, host your node, point your workers to it.

EDIT2. Fixed. Get the code at https://github.com/baloo-kiev/p2pool or point workers here http://78.27.191.182:8333/, still 0% fee.
Launch with
Code:
python ./run_p2pool.py --net bitbar --give-author 0 

EDIT. Don't point your miners to my node. It does not payout to worker addresses at the moment! P2p vonnections work ok, though.

Testing Bitbar p2pool, help appreciated!

Please drop a little hashrate to http://78.27.191.182:8333/ (essentially, fee is 0%)
or
modify p2pool as described here https://bitcointalk.org/index.php?topic=193669.msg2288975 and launch with '-n 78.27.191.182' to connect to my node.

(Both options assume you know how to mine with p2pool: set username, view stats, etc.)

Thank you!


Title: Re: [TEST][BTB][P2POOL].
Post by: baloo_kiev on May 27, 2013, 10:58:06 PM
Works great in testnet (finds and submits valid blocks). P2pool connections also work. Grab the source!


Title: Re: [TEST][BTB][P2POOL].
Post by: MoTLD on May 28, 2013, 04:13:38 AM
Testing, with my paltry 1.7Kh or so from an old CPU.

One thing I noticed, the BTB address I'm mining with is listing in the local stats with a hash rate, but even after a few hours of hashing it hasn't shown up on either the users or the current payouts pages. I've heard P2Pool can be a bit slow to show such things, and my low hash rate probably doesn't help, but is this a problem or should I just leave it running and be patient?

Also, if I mine at such a low hash rate for a few hours but don't show up in the users or payouts, and then I shut down the machine, have I wasted all of the time I spent mining? I assume the payout stats indicate a payout for a block already found, so if I do show up in the payout stats and then stop mining in the pool, I'll eventually get a (small) payout...?

Good luck with the pool and the currency!

-Mo

Edit: Forgot to mention, BTB address is: BJH5ykFQisPAnwnAkeqgvisDbxnJs6owGt
Edit 2: Switched my meagre mining muscle to another pool for now. I'll be back if it'll help you test, I like P2Pools.


Title: Re: [TEST][BTB][P2POOL].
Post by: baloo_kiev on May 28, 2013, 08:17:54 AM
Testing, with my paltry 1.7Kh or so from an old CPU.

One thing I noticed, the BTB address I'm mining with is listing in the local stats with a hash rate, but even after a few hours of hashing it hasn't shown up on either the users or the current payouts pages. I've heard P2Pool can be a bit slow to show such things, and my low hash rate probably doesn't help, but is this a problem or should I just leave it running and be patient?

Also, if I mine at such a low hash rate for a few hours but don't show up in the users or payouts, and then I shut down the machine, have I wasted all of the time I spent mining? I assume the payout stats indicate a payout for a block already found, so if I do show up in the payout stats and then stop mining in the pool, I'll eventually get a (small) payout...?

Good luck with the pool and the currency!

-Mo

Edit: Forgot to mention, BTB address is: BJH5ykFQisPAnwnAkeqgvisDbxnJs6owGt
Edit 2: Switched my meagre mining muscle to another pool for now. I'll be back if it'll help you test, I like P2Pools.

I see your address on the stats page. At this hashrate, your expected time to share is about 10 hours, so the variance will be huge.

Once you submit a share, you get payout with every block found by the p2pool for some time. Current payouts (if a block were found now) for every address are shown here http://78.27.191.182:8333/static/graphs.html?Day



Title: Re: [TEST][BTB][P2POOL].
Post by: baloo_kiev on May 28, 2013, 08:33:50 AM
Strangely, payout does not increase for worker addresses  ???


Title: Re: [TEST][BTB][P2POOL].
Post by: baloo_kiev on May 28, 2013, 01:33:30 PM
Issues fixed. Everything seems to be working now (including worker address payouts).
Full code: https://github.com/baloo-kiev/p2pool


Title: Re: [TEST][BTB][P2POOL] 0% fee node + source code!
Post by: MoTLD on May 28, 2013, 04:43:23 PM
I see your address on the stats page. At this hashrate, your expected time to share is about 10 hours, so the variance will be huge.

Yeah, I figured hashing at such a low rate would make for delays in various ways, I just wanted to make sure it wasn't going to waste, otherwise I'll just solo mine and cross my fingers. ;)

Once you submit a share, you get payout with every block found by the p2pool for some time. Current payouts (if a block were found now) for every address are shown here http://78.27.191.182:8333/static/graphs.html?Day

So, my minerd telling me "accepted" isn't the same thing as having submitted a share? Because quite a few were accepted, which I'm sure is how P2Pool figured out my hashrate.

Is there a number it has to accept before I have a share?

Thanks!

-Mo

Edit: Mining for a few hours in the btb.ltcoin.net pool last night got me 4 shares and an eventual payout of around 0.00005. Useless since that pool pays out at 0.02, but it showed me that my minerd is working, at least. So what has me worried is that my address didn't show up in the P2Pool "Payouts if a block were found NOW:" table, even though I mined for longer last night under P2Pool than ltcoin.net and had "accepted" figures in the double digits. I'm back to P2Pool and I'll let it run for the day and see what happens.


Title: Re: [TEST][BTB][P2POOL] 0% fee node + source code!
Post by: baloo_kiev on May 28, 2013, 05:31:53 PM
I see your address on the stats page. At this hashrate, your expected time to share is about 10 hours, so the variance will be huge.

Yeah, I figured hashing at such a low rate would make for delays in various ways, I just wanted to make sure it wasn't going to waste, otherwise I'll just solo mine and cross my fingers. ;)

Once you submit a share, you get payout with every block found by the p2pool for some time. Current payouts (if a block were found now) for every address are shown here http://78.27.191.182:8333/static/graphs.html?Day

So, my minerd telling me "accepted" isn't the same thing as having submitted a share? Because quite a few were accepted, which I'm sure is how P2Pool figured out my hashrate.

Is there a number it has to accept before I have a share?

Thanks!

-Mo

Edit: Mining for a few hours in the btb.ltcoin.net pool last night got me 4 shares and an eventual payout of around 0.00005. Useless since that pool pays out at 0.02, but it showed me that my minerd is working, at least. So what has me worried is that my address didn't show up in the P2Pool "Payouts if a block were found NOW:" table, even though I mined for longer last night under P2Pool than ltcoin.net and had "accepted" figures in the double digits. I'm back to P2Pool and I'll let it run for the day and see what happens.

In p2pool, there are two types of shares.

'Real shares' are propagated by nodes in the p2pool network, and payouts are calculated based on them.

'Pseudoshares' are shares of small difficulty, which your minerd reports. If one of those pseudoshares meets difficulty requirement for a real share, it is accepted and propagated as a real share. Payout is based on number of submitted real shares.


Title: Re: [TEST][BTB][P2POOL] 0% fee node + source code!
Post by: MoTLD on May 28, 2013, 06:01:02 PM
Thanks, that's how I understood it to work.

So is there a number of pseudoshares I have to submit before I show up in the "Payouts if a block were found NOW" list?

Edit: Er, an estimated number? And, does my minerd know the difference?


Title: Re: [TEST][BTB][P2POOL] 0% fee node + source code!
Post by: jdebunt on May 28, 2013, 06:05:56 PM
doing some CPU mining here now, looks good so far :)


Title: Re: [TEST][BTB][P2POOL] 0% fee node + source code!
Post by: MoTLD on May 28, 2013, 06:06:37 PM
Never mind, I wasn't abstracting far enough. I was thinking blocks:pseudoshares, not blocks:shares:pseudoshares. So minerd won't know, but what's the difficulty difference between pseudoshares and shares so I can estimate?

I guess the difficulty difference between blocks and shares is bigger for the ltcoin pool, meaning I got 4 much smaller shares last night. Presumably after your estimate of 10 hours, give or take (a lot), I'll get one share from P2Pool that's a good deal bigger than the ones I got last night from ltcoin, right?


Title: Re: [TEST][BTB][P2POOL] 0% fee node + source code!
Post by: baloo_kiev on May 28, 2013, 07:19:30 PM
Never mind, I wasn't abstracting far enough. I was thinking blocks:pseudoshares, not blocks:shares:pseudoshares. So minerd won't know, but what's the difficulty difference between pseudoshares and shares so I can estimate?

I guess the difficulty difference between blocks and shares is bigger for the ltcoin pool, meaning I got 4 much smaller shares last night. Presumably after your estimate of 10 hours, give or take (a lot), I'll get one share from P2Pool that's a good deal bigger than the ones I got last night from ltcoin, right?

Current share difficulty is printed on the stats page. Pseudoshare difficulty can be anything, because it doesn't really matter. You can tune both of them by setting your username like this:
Code:
BL5vKqnKHmnzvLZ5qCxETNnMzTM6CCdUzf/0.01+0.001
Here, BL5vKqnKHmnzvLZ5qCxETNnMzTM6CCdUzf is payout address, 0.01 is share difficulty and 0.001 is pseudoshare difficulty. However, you can only set share difficulty higher than current p2pool share difficulty, so this is only useful for miners with high hashrate. You can find more p2pool basics here https://bitcointalk.org/index.php?topic=18313.0


Title: Re: [TEST][BTB][P2POOL] 0% fee node + source code!
Post by: MoTLD on May 28, 2013, 07:21:02 PM
Thanks! I'll go RTFM now. ;)


Title: Re: [TEST][BTB][P2POOL] 0% fee node + source code!
Post by: baloo_kiev on May 28, 2013, 07:24:25 PM
doing some CPU mining here now, looks good so far :)
Thank you for your help. I hope we will find a block eventually. Estimated time to block now is 6.5 hours.


Title: Re: [TEST][BTB][P2POOL] 0% fee node + source code!
Post by: jdebunt on May 28, 2013, 07:28:35 PM

Thank you for your help. I hope we will find a block eventually. Estimated time to block now is 6.5 hours.

No problem, i'll let it run overnight & throw my nvidia gpu at it, will move the cpu miner to an LTC pool :)


Title: Re: [TEST][BTB][P2POOL] 0% fee node + source code!
Post by: baloo_kiev on May 28, 2013, 07:29:32 PM
Thanks, that's how I understood it to work.

So is there a number of pseudoshares I have to submit before I show up in the "Payouts if a block were found NOW" list?

Edit: Er, an estimated number? And, does my minerd know the difference?

Your estimated time to share is  (Time_to_share * Local_hashrate / Your_hashrate). First two are reported on the stats page.


Title: Re: [TEST][BTB][P2POOL] 0% fee node + source code!
Post by: jdebunt on May 28, 2013, 08:07:24 PM
We found a block !!!

Tue May 28 2013 21:53:21 GMT+0200 (Mitteleuropäische Sommerzeit )   402334   000000000894834c5541ed8d289a693736677d7bf8f28412405e4f1878ebd70b

edit : no payout though, not sure if that's working properly?


Title: Re: [TEST][BTB][P2POOL] 0% fee node + source code!
Post by: baloo_kiev on May 28, 2013, 08:20:41 PM
We found a block !!!

Tue May 28 2013 21:53:21 GMT+0200 (Mitteleuropäische Sommerzeit )   402334   000000000894834c5541ed8d289a693736677d7bf8f28412405e4f1878ebd70b

edit : no payout though, not sure if that's working properly?

I'm not sure either. Now reading the logs. It definetly tried to submit it to bitbard, but then... I need a couple of minutes...


Title: Re: [TEST][BTB][P2POOL] 0% fee node + source code!
Post by: jdebunt on May 28, 2013, 08:27:55 PM
We found a block !!!

Tue May 28 2013 21:53:21 GMT+0200 (Mitteleuropäische Sommerzeit )   402334   000000000894834c5541ed8d289a693736677d7bf8f28412405e4f1878ebd70b

edit : no payout though, not sure if that's working properly?

I'm not sure either. Now reading the logs. It definetly tried to submit it to bitbard, but then... I need a couple of minutes...

Take your time, don't worry, just letting you know :)


Title: Re: [TEST][BTB][P2POOL] 0% fee node + source code!
Post by: baloo_kiev on May 28, 2013, 08:40:24 PM
We found a block !!!

Tue May 28 2013 21:53:21 GMT+0200 (Mitteleuropäische Sommerzeit )   402334   000000000894834c5541ed8d289a693736677d7bf8f28412405e4f1878ebd70b

edit : no payout though, not sure if that's working properly?

I'm not sure either. Now reading the logs. It definetly tried to submit it to bitbard, but then... I need a couple of minutes...

Oh crap  >:( I shouldn't have changed coinbase type to pubkeyhash.

The situation is like this.

Bitcoin/Bitbar/etc. address is encoded 160-bit hash of the public key. In Bitcoin, it is enough to provide coinbase (generation transaction) output. In PPC/NVC/BTB, coinbase type must be TX_PUBKEY, not TX_PUBKEYHASH, which means that you need full public key to create coinbase, not its 160-bit hash. So when a worker specifies its address as a username, the node cannot give it coins from the coinbase. Type of coinase outputs was TX_PUBKEY in NVC p2pool, so it didn't create payouts for workers. I changed it to TX_PUBKEYHASH, and as a result, the block was not accepted by bitbard. i will now change it back to TX_PUBKEY, so nodes can only mine to their own address. Worker names/addresses will be ignored (just like it is in NVC p2pool).


Title: Re: [TEST][BTB][P2POOL] 0% fee node + source code!
Post by: jdebunt on May 28, 2013, 08:48:21 PM
Only 1 way to learn these things, is by trial & error :)


Title: Re: [TEST][BTB][P2POOL] 0% fee node + source code!
Post by: baloo_kiev on May 28, 2013, 09:05:56 PM
We found a block !!!

Tue May 28 2013 21:53:21 GMT+0200 (Mitteleuropäische Sommerzeit )   402334   000000000894834c5541ed8d289a693736677d7bf8f28412405e4f1878ebd70b

edit : no payout though, not sure if that's working properly?

I'm not sure either. Now reading the logs. It definetly tried to submit it to bitbard, but then... I need a couple of minutes...

Oh crap  >:( I shouldn't have changed coinbase type to pubkeyhash.

The situation is like this.

Bitcoin/Bitbar/etc. address is encoded 160-bit hash of the public key. In Bitcoin, it is enough to provide coinbase (generation transaction) output. In PPC/NVC/BTB, coinbase type must be TX_PUBKEY, not TX_PUBKEYHASH, which means that you need full public key to create coinbase, not its 160-bit hash. So when a worker specifies its address as a username, the node cannot give it coins from the coinbase. Type of coinase outputs was TX_PUBKEY in NVC p2pool, so it didn't create payouts for workers. I changed it to TX_PUBKEYHASH, and as a result, the block was not accepted by bitbard. i will now change it back to TX_PUBKEY, so nodes can only mine to their own address. Worker names/addresses will be ignored (just like it is in NVC p2pool).


Fixed code at github.
All work submitted to a node by workers goes to the node's address!


Title: Re: [TEST][BTB][P2POOL] 0% fee node + source code!
Post by: baloo_kiev on May 28, 2013, 09:07:16 PM
Download the code from github and clear data/bitbar directory.


Title: Re: [TEST][BTB][P2POOL] Source code
Post by: baloo_kiev on May 28, 2013, 10:32:45 PM
One more fix. Re-download the source, please.


Title: Re: [TEST][BTB][P2POOL] Source code. First block found, join us!
Post by: baloo_kiev on May 29, 2013, 12:03:54 PM
First block found!

http://btb.cryptocoinexplorer.com/block/00000000055aa1afdb25984d4740e1e81f79c8f258cce029483a1c51c2b83fd6


Title: Re: [TEST][BTB][P2POOL] Source code. First block found, join us!
Post by: baloo_kiev on May 29, 2013, 03:05:06 PM
Fixed links to block explorer on the stats page.


Title: Re: [BTB][P2POOL] Source code. First block found, join us!
Post by: baloo_kiev on May 29, 2013, 04:20:48 PM
One more fix: disable reward rounding to cents, which is used in NVC but not BTB.
Previously found blocks generated 0.17 BTB instead of 0.172421 (e.g. http://btb.cryptocoinexplorer.com/block/0000000011f9f1834ebb07844db877b6016d9a8b0cb7191a13229066976ef197)


Title: Re: [BTB][P2POOL][UPDATED] Source code. Two blocks found, join us!
Post by: MoTLD on May 29, 2013, 11:40:35 PM
I have been unable to connect to the pool since yesterday, either with minerd or a web browser. It just times out.

Is it still at http://78.27.191.182:8333 ?



Title: Re: [BTB][P2POOL][UPDATED] Source code. Two blocks found, join us!
Post by: baloo_kiev on May 30, 2013, 01:43:57 AM
I have been unable to connect to the pool since yesterday, either with minerd or a web browser. It just times out.

Is it still at http://78.27.191.182:8333 ?



I closed access to port 8333 from outside because of this:

All work submitted to a node by workers is payed to the node address! Address specified as worker's username is ignored!
Download the source, host your node, point your workers to it.

If I open it, you will be able to connect, but all your work in this case will generate payouts to my address! So it only works like described above: launch bitbard and p2pool on your computer and point your workers to it. Your p2pool node will connect to my p2pool node (and other running nodes), grab an address from your local bitbard and generate payouts to this address.

I am trying to enable payouts to worker addresses now and will update if I get it working. Please read the thread if you want more technical details. Stay tuned!


Title: Re: [BTB][P2POOL][UPDATED] Source code. Two blocks found, join us!
Post by: MoTLD on May 30, 2013, 03:12:29 AM
Thanks for explaining! Setting up my own instance of P2Pool is probably beyond my current capabilities, but I'll read up on the technical details and see if I'm up to it. Probably about the time I get it working, you'll have yours back to accepting outside connections... ;)


Title: Re: [BTB][P2POOL][UPDATED] Source code. Two blocks found, join us!
Post by: baloo_kiev on May 30, 2013, 11:38:46 AM
Added bootstrap address.


Title: Re: [BTB][P2POOL][UPDATED] Source code. Two blocks found, join us!
Post by: baloo_kiev on May 30, 2013, 07:06:14 PM
Updated the code. Payouts to worker addresses now work! I open my public node to miners again. However, unlike with other p2pools, you have to specify your public key (not an address!) as username.
Since I am not a developer, I used a crazy python hack containing several lines of shit-code to achieve it. However, it works and generates payouts to workers. I have tested it in the testnet.

To point worker to my (or any other) public node you have to get a public key:
1) launch bitbar

2) in bitbar directory, run
Code:
./bitbard getnewpubkey "someccount"
you will receive a hex string, call it <your_new_pubkey>, which is the public key to a new address in account "someaccount" (you don't have to keep it secret, as it's public)

3) (optionally) make sure it works as supposed to: run
Code:
./bitbard getaddressesbyaccount "someaccount"
you should see a new address, and
Code:
./bitbard validatepubkey <your_new_pub_key>
will return JSON object, which is expected to have 'isvalid' and 'ismine' properties set to 'true'

4)use <your_new_pub_key> as a worker username when connecting to a public node, just like you use your address with other coin p2pools. You may now close your bitbar.


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: baloo_kiev on May 30, 2013, 10:05:37 PM
First block with payout to worker addresses!
http://btb.cryptocoinexplorer.com/block/0000000000ab9f661bdeb1367d553abee759326ba9244601ca09fb599176b00c


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: baloo_kiev on May 31, 2013, 09:08:06 AM
How do I get this to work in Windows?

Try to follow instructuion in README file (https://github.com/baloo-kiev/p2pool). The code is forked from NVC p2pool with minor changes.
This is all I can say, as I never tried to install and run it on Windows. If I had to, I would probably run it on linux in VirtualBox, this may be the easiest way ;D


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: baloo_kiev on May 31, 2013, 02:04:25 PM
I've got the p2pool running in windows, how do I get the public key?

Just in the same way.
If you run graphical interface of bitbar, you can type 'getnewpubkey' in console (I guess it's Help->Debug window->Console).

Also, you don't need to specify a public key if you run your own p2pool node. It will automatically request a pubkey from your bitbard and generate payouts to it. You only need to specify your pubkey if you connect your workers to a node run by someone else!



Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: jdebunt on May 31, 2013, 02:24:03 PM
gonna run this tonight to see how it goes, thanks for all the work :)


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: baloo_kiev on May 31, 2013, 03:11:12 PM
Updated the code. Fixed worker payouts and graphs, added one more bootstrap node.


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: baloo_kiev on May 31, 2013, 03:16:25 PM
I've got the p2pool running in windows, how do I get the public key?

Just in the same way.
If you run graphical interface of bitbar, you can type 'getnewpubkey' in console (I guess it's Help->Debug window->Console).

Also, you don't need to specify a public key if you run your own p2pool node. It will automatically request a pubkey from your bitbard and generate payouts to it. You only need to specify your pubkey if you connect your workers to a node run by someone else!



OK, cheers. So how long until payouts start from my own p2pool node?

Go to http://localhost:<your_worker_port>/static to see full stats. You will see 'Payout if a block were found NOW' line, which shows exactly what it states: you will receive this amount in the next found block generation transaction. Also, you can see how it changes with time on the graphs page (under 'Payout to default address'). Note that Bitbar has 520-block maturity period, i.e. you will be able to spend the coins in about 3.5 days after the generation. Until then, they will be labeled 'immature'.

P.S. The payout value is roughly proportional to number of your valid shares.


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: baloo_kiev on May 31, 2013, 03:32:58 PM
Updated the code. Fixed worker payouts and graphs, added one more bootstrap node.

This is a critical fix, please make sure you have the latest version!


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: MoTLD on May 31, 2013, 09:38:13 PM
Woohoo, got my first little bit of BTB! Thanks, baloo_kiev, for all your hard work and help.


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: MoTLD on June 01, 2013, 03:11:50 AM
Hmm...my address (BSAL3Gm4ckPbygyoyf2X6ZHBUdtBa1BFrn) is showing as a payout of 0. Shouldn't it drop off the list? Or should the payout not be 0?

I searched but didn't figure out if this is normal p2pool behavior so in this case I don't know if I'm pointing you towards a problem or just showing my ignorance. ;)

-Mo


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: baloo_kiev on June 01, 2013, 11:05:10 AM
My node is temporarily down because of network connection problems. Use http://coinminer.net:9444 . It charges 2% fee.


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: A L I E N on June 02, 2013, 01:13:29 AM
Ok, I'll try this out..

how long will you keep the pool up at 0%?


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: A L I E N on June 03, 2013, 06:18:59 AM
Ok, I'll try this out..

how long will you keep the pool up at 0%?

Is this your pool too?
http://coinminer.net:9444
Would you prefer that we use that one instead?


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: baloo_kiev on June 03, 2013, 11:41:02 AM
Ok, I'll try this out..

how long will you keep the pool up at 0%?

Is this your pool too?
http://coinminer.net:9444
Would you prefer that we use that one instead?

Coinminer is not my pool. I just came across it here on the forums. It uses the code posted here.

Well, initially, I just wanted to mine BTB in p2pool, like I mine other coins. I opened my public node to test the code and show that it works to encourage others to host their own nodes. Obviously, higher p2pool hashrate reduces variance like in any centralized pool. At the same time, distribution of hashing power between many p2pool nodes keeps decentralized nature of cryptocoins. My node does not consume any significant amount of resources, so for now, I will keep it up and free, as long as it comes under "no guarantees, no hoster responsibility, no complaints" terms :). Feedback from both miners and node hosters is highly appreciated. If I am going to close the node or introduce fee, I will announce beforehand both here and on the stats page.


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: baloo_kiev on June 03, 2013, 12:14:40 PM
Strangely, coinminer.net has no p2p connections to other nodes at the moment  ???

EDIT: seems like connected again. To be stable, the p2pool network definitely needs a couple more nodes.


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: A L I E N on June 03, 2013, 03:48:50 PM
Thanks for setting up the P2P.
Why does it adjust the difficulty and say "LONGPOLL from pool requested work restart" so often?  Is that optimizing the hash rate? Should I set the difficulty with my username to reduce this?


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: baloo_kiev on June 03, 2013, 04:40:10 PM
Thanks.
Why does it adjust the difficulty and say "LONGPOLL from pool requested work restart" so often?  Is that optimizing the hash rate? Should I set the difficulty with my username to reduce this?

This is normal p2pool behaviour. New work is set every time a share is found, which in our case is 30 seconds on average (10 seconds in BTC p2pool).

The short version is that the work to produce the "next" block depends on the previous block.  The moment a new block is found, any in-progress searching is aborted because it won't produce anything useful.  This is important because it encourages a "found" block to be used and distributed quickly.

It might very briefly decrease your mining hashrate because of the time required to fetch new work from the pool/start working on the new work. It should be noted that p2pool has 10-second blocks so you'll see this message about once every 10 seconds.  That's why you can't use p2pool with devices that take a long time to start new work like BFL singles.

Difficulty is adjusted every time a new share is found.

In any case, it is considered a good practice for miners with big hashrates to set their difficulty manually because it reduces p2pool's minimum share difficulty, helping small miners to achieve less variance. I would recommend tuning it in such way that your estimated time to share is several (5-10) times less than p2pool's time to block. So your difficulty can be calculated as
Code:
p2pool_difficulty * (your_hashrate / p2pool_hashrate) * (time_to_block / 30s) / 10

Details:https://bitcointalk.org/index.php?topic=18313.msg2060914#msg2060914


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: A L I E N on June 03, 2013, 05:06:23 PM
So if I had 2mh/s, I would set the diff to 0.256 by putting /0.256 at the end of my user name/key?


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: baloo_kiev on June 03, 2013, 05:13:30 PM
So if I had 2mh/s, I would set the diff to 0.256 by putting /0.256 at the end of my user name/key?

Yes.


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: A L I E N on June 03, 2013, 06:45:28 PM
So if I had 2mh/s, I would set the diff to 0.256 by putting /0.256 at the end of my user name/key?

Yes.

Thanks for your help,
I changed this on users 0387eaeedc4a2... and 02749f315187dc63e6... how will I know if it worked?  The diff on cgminer appears to be same as before (~85).


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: baloo_kiev on June 03, 2013, 07:08:00 PM
Thanks for your help,
I changed this on users 0387eaeedc4a2... and 02749f315187dc63e6... how will I know if it worked?  The diff on cgminer appears to be same as before (~85).

According to my logs, your share difficulty is now 0.256, just like intended. Your cgminer shows the same difficulty because this is pseudoshare difficulty, which is lower that "real share" difficulty. Pseudoshares are sent to the node but aren't propagated to p2pool network and don't affect payout. They are only useful for monitoring purposes, so that you can see if your miner is working shortly after launch, calculate hashrate precisely and find out quickly if it stops hashing or connection to the node is broken. You can adjust pseudoshare difficulty by setting username to <pubkey>/<share_diff>+<pseudoshare_diff>, e.g.
Code:
021c25e5046f6be38270ffe94ed4d2d05f926e957af6c061aaea3577fceb5822ed/0.25+0.025
Increasing pseudoshare difficulty should decrease network/CPU load.


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: A L I E N on June 04, 2013, 12:53:54 AM
Thanks for your help,
I changed this on users 0387eaeedc4a2... and 02749f315187dc63e6... how will I know if it worked?  The diff on cgminer appears to be same as before (~85).

According to my logs, your share difficulty is now 0.256, just like intended. Your cgminer shows the same difficulty because this is pseudoshare difficulty, which is lower that "real share" difficulty. Pseudoshares are sent to the node but aren't propagated to p2pool network and don't affect payout. They are only useful for monitoring purposes, so that you can see if your miner is working shortly after launch, calculate hashrate precisely and find out quickly if it stops hashing or connection to the node is broken. You can adjust pseudoshare difficulty by setting username to <pubkey>/<share_diff>+<pseudoshare_diff>, e.g.
Code:
021c25e5046f6be38270ffe94ed4d2d05f926e957af6c061aaea3577fceb5822ed/0.25+0.025
Increasing pseudoshare difficulty should decrease network/CPU load.

Thanks for the free lesson on P2P.  I get slightly higher worker utility with the pseudoshare set higher.
Does it show who found the last block?  Cgminer said rejected on the share that said BLOCK! on my console.


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: baloo_kiev on June 04, 2013, 04:20:55 PM
Does it show who found the last block?  Cgminer said rejected on the share that said BLOCK! on my console.

I guess (not sure though) that cgminer said rejected because the share was stale. This means that a new share was already found by someone else before you submitted yours. However, in p2pool, we need stale shares because a stale share can be a valid block if it satisfies block difficulty.

To find out who found a block, click on the arrow in the rightmost cell of the table on the stats page. Then look for 'payout address'. BTW, block solver receives 0.5% of its value in addition to his payout.


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: A L I E N on June 04, 2013, 04:26:43 PM
Does it show who found the last block?  Cgminer said rejected on the share that said BLOCK! on my console.

I guess (not sure though) that cgminer said rejected because the share was stale. This means that a new share was already found by someone else before you submitted yours. However, in p2pool, we need stale shares because a stale share can be a valid block if it satisfies block difficulty.

To find out who found a block, click on the arrow in the rightmost cell of the table on the stats page. Then look for 'payout address'. BTW, block solver receives 0.5% of its value in addition to his payout.

Ok thanks, I see it.  I have found all the blocks on the table (last 24hrs) so it must have went through even though it said rejected on cgminer.
Is that 0.5% for all blocks in Bitbar or just the way you set it up on this pool?


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: baloo_kiev on June 04, 2013, 04:46:44 PM
Is that 0.5% for all blocks in Bitbar or just the way you set it up on this pool?

It is set in original p2pool code (for BTC and all other coins). The rest 99.5% of block reward is distributed between miners proportionally to amount of work done.


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: A L I E N on June 05, 2013, 05:00:20 PM
For anyone who is confused about how to setup up your public key in windows:

Start the Bitbar-qt wallet.
Go to the wallet console by clicking on Help > Debug Window > then click on the Console tab.

1)
In console, type:
Code:
getnewpubkey "someaccount"
Hit enter and this will return your new public key.  The "someaccount" title can be any name.  This title will be the label of the wallet address tied to your public key.


2)
Next type:
Code:
validatepubkey xxxx...
xxxx... should be the new public key that was created by the console after you did step one.  This will return some data about your new public key including the wallet address that it is tied to.


3) Use your new public key as the worker username when connecting to a public node, just like you use your address with other coin p2pools.


Hope this helps.


Title: Re: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!
Post by: A L I E N on June 05, 2013, 07:37:13 PM
One thing great about P2Pools is that the block rewards are sent immediately to your wallet where they mature like solo mining.  This lowers the risk because your bars are not sitting at a pool for the long confirmation process where they could have problems.