Bitcoin Forum
April 25, 2024, 01:15:51 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 »  All
  Print  
Author Topic: [BTB][P2POOL][UPDATED] Source + 0% public node! Read instructions carefully!  (Read 4549 times)
baloo_kiev (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
May 27, 2013, 09:42:50 PM
Last edit: June 01, 2013, 01:50:40 PM by baloo_kiev
 #1

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!

PGP: 6EC48BA7
Welcome to my p2pool: BTC
1714007751
Hero Member
*
Offline Offline

Posts: 1714007751

View Profile Personal Message (Offline)

Ignore
1714007751
Reply with quote  #2

1714007751
Report to moderator
1714007751
Hero Member
*
Offline Offline

Posts: 1714007751

View Profile Personal Message (Offline)

Ignore
1714007751
Reply with quote  #2

1714007751
Report to moderator
1714007751
Hero Member
*
Offline Offline

Posts: 1714007751

View Profile Personal Message (Offline)

Ignore
1714007751
Reply with quote  #2

1714007751
Report to moderator
"With e-currency based on cryptographic proof, without the need to trust a third party middleman, money can be secure and transactions effortless." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714007751
Hero Member
*
Offline Offline

Posts: 1714007751

View Profile Personal Message (Offline)

Ignore
1714007751
Reply with quote  #2

1714007751
Report to moderator
1714007751
Hero Member
*
Offline Offline

Posts: 1714007751

View Profile Personal Message (Offline)

Ignore
1714007751
Reply with quote  #2

1714007751
Report to moderator
baloo_kiev (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
May 27, 2013, 10:58:06 PM
 #2

Works great in testnet (finds and submits valid blocks). P2pool connections also work. Grab the source!

PGP: 6EC48BA7
Welcome to my p2pool: BTC
MoTLD
Newbie
*
Offline Offline

Activity: 42
Merit: 0



View Profile WWW
May 28, 2013, 04:13:38 AM
Last edit: May 28, 2013, 04:49:53 AM by MoTLD
 #3

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.
baloo_kiev (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
May 28, 2013, 08:17:54 AM
 #4

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


PGP: 6EC48BA7
Welcome to my p2pool: BTC
baloo_kiev (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
May 28, 2013, 08:33:50 AM
Last edit: May 28, 2013, 08:46:20 AM by baloo_kiev
 #5

Strangely, payout does not increase for worker addresses  Huh

PGP: 6EC48BA7
Welcome to my p2pool: BTC
baloo_kiev (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
May 28, 2013, 01:33:30 PM
 #6

Issues fixed. Everything seems to be working now (including worker address payouts).
Full code: https://github.com/baloo-kiev/p2pool

PGP: 6EC48BA7
Welcome to my p2pool: BTC
MoTLD
Newbie
*
Offline Offline

Activity: 42
Merit: 0



View Profile WWW
May 28, 2013, 04:43:23 PM
Last edit: May 28, 2013, 05:23:40 PM by MoTLD
 #7

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. Wink

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.
baloo_kiev (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
May 28, 2013, 05:31:53 PM
 #8

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. Wink

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.

PGP: 6EC48BA7
Welcome to my p2pool: BTC
MoTLD
Newbie
*
Offline Offline

Activity: 42
Merit: 0



View Profile WWW
May 28, 2013, 06:01:02 PM
 #9

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?
jdebunt
Legendary
*
Offline Offline

Activity: 1596
Merit: 1010


View Profile WWW
May 28, 2013, 06:05:56 PM
 #10

doing some CPU mining here now, looks good so far Smiley
MoTLD
Newbie
*
Offline Offline

Activity: 42
Merit: 0



View Profile WWW
May 28, 2013, 06:06:37 PM
 #11

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?
baloo_kiev (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
May 28, 2013, 07:19:30 PM
 #12

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

PGP: 6EC48BA7
Welcome to my p2pool: BTC
MoTLD
Newbie
*
Offline Offline

Activity: 42
Merit: 0



View Profile WWW
May 28, 2013, 07:21:02 PM
 #13

Thanks! I'll go RTFM now. Wink
baloo_kiev (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
May 28, 2013, 07:24:25 PM
 #14

doing some CPU mining here now, looks good so far Smiley
Thank you for your help. I hope we will find a block eventually. Estimated time to block now is 6.5 hours.

PGP: 6EC48BA7
Welcome to my p2pool: BTC
jdebunt
Legendary
*
Offline Offline

Activity: 1596
Merit: 1010


View Profile WWW
May 28, 2013, 07:28:35 PM
 #15


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 Smiley
baloo_kiev (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
May 28, 2013, 07:29:32 PM
 #16

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.

PGP: 6EC48BA7
Welcome to my p2pool: BTC
jdebunt
Legendary
*
Offline Offline

Activity: 1596
Merit: 1010


View Profile WWW
May 28, 2013, 08:07:24 PM
 #17

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?
baloo_kiev (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
May 28, 2013, 08:20:41 PM
 #18

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...

PGP: 6EC48BA7
Welcome to my p2pool: BTC
jdebunt
Legendary
*
Offline Offline

Activity: 1596
Merit: 1010


View Profile WWW
May 28, 2013, 08:27:55 PM
 #19

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 Smiley
baloo_kiev (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
May 28, 2013, 08:40:24 PM
 #20

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  Angry 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).

PGP: 6EC48BA7
Welcome to my p2pool: BTC
Pages: [1] 2 3 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!