Pages:
Author

Topic: Pushpool - Tech Support - page 19. (Read 135257 times)

sr. member
Activity: 280
Merit: 252
June 27, 2011, 02:28:44 AM
Can anybody give me a rundown of how exactly an optimal mining pool web front end would work with the mysql databases and information that pushpoolcreates?

For starters... how can I translate a "solution" (that looks like this 00000001823e485a4f458cfad7aa684392fdb0ddeb678...) into the current blockchain's block number we are trying to solve?

Do I have to check to see what is the latest (non-stale) solution that was submit to the pool is and at the same time check ./bitcoind getblockcount simultaneously to correlate a block number or..?

How is this page possible: http://btcmine.com/stats/
legendary
Activity: 2492
Merit: 1491
LEALANA Bitcoin Grim Reaper
June 27, 2011, 01:08:03 AM
I would run it with strace and see what it's up to before it quits. If you like post the output (last 30-40 lines) and I'll see what I can tell you.

What is strace and where can I get it?
legendary
Activity: 1428
Merit: 1000
https://www.bitworks.io
June 27, 2011, 12:06:20 AM
I would run it with strace and see what it's up to before it quits. If you like post the output (last 30-40 lines) and I'll see what I can tell you.
legendary
Activity: 2492
Merit: 1491
LEALANA Bitcoin Grim Reaper
June 26, 2011, 11:58:21 PM
I compile and install pushpoold, but after running it exit and doesnot return any information about error or another. Try use -D and -E keys. Logs not creating.
How I can know why pushpoold not work?
In the latest version 0.5 there is a bug in "util.c" that prevents any output on the CLI when running pushpoold.  See here on how to fix it, then recompile - https://github.com/ius/pushpool/commit/85297905ddc150c46664bd9ad77df6f502d64be1 .  It will probably give you an error when you run it now, similar to "JSON parse failed" like mine was doing.
Update:  A couple of hours ago the author jgarzik posted a slightly different fix: https://github.com/jgarzik/pushpool/commit/385e23fa3a149a650dbbeb5bff8d3a84f949e5bf


On page 8 Phorensic pointed out a bug in .5 that was fixed on github.  You might try and download the latest with the fix and recompile and try.  Default port for mysql is 3306.  Which is what the default server.json has it set as.  If you need to change it edit:  the my.cnf file.  You might also want to try webmin on your linux box it has a lot of features especially for those of us less savy on linux.

I downloaded the most recent version of util.c and recompiled with it. This allowed me to actually see output when I run pushpoold (although it exits immediately after starting it). As far as the MySQL port I think I will leave it as the default. I just am puzzled as to why when I run ./pushpoold -E the output is the following and then exits:

Code:
bitcoinminer2@ubuntu:~/POOLINSTALL/pushpool-0.5$ ./pushpoold -E
bitcoinminer2@ubuntu:~/POOLINSTALL/pushpool-0.5$ [2011-06-26 23:15:47.680372] Listening on host :: port 8342
[2011-06-26 23:15:47.680703] Listening on host :: port 8341
[2011-06-26 23:15:47.680835] Listening on host :: port 8344
[2011-06-26 23:15:47.680934] Listening on host 127.0.0.1 port 8338

I'm still not getting what could be the problem. I've also created rules in iptables to allow the ports specified at the top of server.json to be OPEN.

I'm to the point that I'm willing to offer a $100 worth of bitcoin if someone can help me figure this problem out.

Any takers?
legendary
Activity: 1596
Merit: 1100
June 26, 2011, 11:03:30 PM
So in other words... pushpool isn't capable of testing through testnet until the difficulty is at least 256, is that correct?

Or in other words... pushpool works flawlessly, just not with testnet?

pushpool makes you work harder for your testnet coins Smiley

Patches to implement a full and correct target check are welcome.

newbie
Activity: 28
Merit: 0
June 26, 2011, 10:44:11 PM
I compile and install pushpoold, but after running it exit and doesnot return any information about error or another. Try use -D and -E keys. Logs not creating.
How I can know why pushpoold not work?
In the latest version 0.5 there is a bug in "util.c" that prevents any output on the CLI when running pushpoold.  See here on how to fix it, then recompile - https://github.com/ius/pushpool/commit/85297905ddc150c46664bd9ad77df6f502d64be1 .  It will probably give you an error when you run it now, similar to "JSON parse failed" like mine was doing.
Update:  A couple of hours ago the author jgarzik posted a slightly different fix: https://github.com/jgarzik/pushpool/commit/385e23fa3a149a650dbbeb5bff8d3a84f949e5bf


On page 8 Phorensic pointed out a bug in .5 that was fixed on github.  You might try and download the latest with the fix and recompile and try.  Default port for mysql is 3306.  Which is what the default server.json has it set as.  If you need to change it edit:  the my.cnf file.  You might also want to try webmin on your linux box it has a lot of features especially for those of us less savy on linux.
legendary
Activity: 2492
Merit: 1491
LEALANA Bitcoin Grim Reaper
June 26, 2011, 06:16:30 PM
Are you sure it is not dying right away after it comes up?  I had a lot of initial issues getting pushpoold to even start up and stay started.  Most of the time is was a database issue when pp tried to connect to mysql it was failing and causing pp to stop right away make sure pushpool is started and you should be able to telnet to ur port 8344

Okay I'm trying to figure out what could be stopping pushpool from running. I double checked the database name, username to database, and associated password by logging into mysql via the terminal and then doing a SELECT * FROM pool_worker to see if I could get that far.

I did have one suspicion about the port that is used to connect to the database. Is that port a default port if so how could I change it in mysql if I need to?

Is the method I used of finding the process ID associated with pushpoold a valid way of checking to see if pushpoold is running?

thanks for your help.

What version of pushpool are you trying to run? v0.5 or v0.4.1 Huh

If you are using v0.5 try v0.4.1 ...

To check to see if pushpool is running, simply type ps aux | grep pushpool and you should notice at least two references to pushpool. (One for the search command you just submit, and one for the running pushpoo program).

Also try running pushpool by typing ./pushpool -E

I can't seem to get ./pushpool running by simply running /pushpool but if I add the -E then it seems to work great.

Okay I am running v0.5. I tried running the command ps aux | grep pushpool and this was the result:

Code:
bitcoinminer2@ubuntu:~$ ps aux | grep pushpoold
1000      3004  0.0  0.0  13124  1032 pts/3    S+   15:14   0:00 grep --color=auto pushpoold

this is of course after running:

Code:
bitcoinminer2@ubuntu:~/POOLINSTALL/pushpool-0.5$ ./pushpoold -E
bitcoinminer2@ubuntu:~/POOLINSTALL/pushpool-0.5$ [2011-06-26 23:15:47.680372] Listening on host :: port 8342
[2011-06-26 23:15:47.680703] Listening on host :: port 8341
[2011-06-26 23:15:47.680835] Listening on host :: port 8344
[2011-06-26 23:15:47.680934] Listening on host 127.0.0.1 port 8338

You think it could be the version? what version are you running? Have you had similar problems like this?
sr. member
Activity: 280
Merit: 252
June 26, 2011, 06:11:22 PM
Quote
pushpoold requires 40 bits of zeroes before submitting upstream, not 32.
jgarzik: Oh, thank you! This has finally cleared up the mystery for me and gigabytecoin  Grin What strange little bit of behavior from pushpool.

I have confirmed this. Here's the relevant code (msg.c):

Code:
static int check_hash(const char *remote_host, const char *auth_user,
      const char *data_str, const char **reason_out)
{
...
if (hash32[7] != 0) {
*reason_out = "H-not-zero";
return 0; /* work is invalid */
}
if (hash[27] == 0)
better_hash = true;
...
return better_hash ? 2 : 1; /* work is valid */

So check_hash will return 2 only if the submitted share has a hash with 40 0 bits, as jgarzik pointed out. Now let's see what effect that has:

Code:
static bool submit_work(const char *remote_host, const char *auth_user,
CURL *curl, const char *hexstr, bool *json_result)
{
...
/* validate submitted work */
check_rc = check_hash(remote_host, auth_user, hexstr, &reason);
...
/* if hash is sufficient for share, but not target,
* don't bother submitting to bitcoind
*/
if (srv.easy_target && check_rc == 1) {
*json_result = true;
sharelog(remote_host, auth_user, "Y", NULL, NULL, hexstr);
return true;
}

So if the hash had less than 40 bits of 0s, then it doesn't even try to submit it to bitcoind. I think that corresponds to a difficulty of 256?

I would consider this a bug. pushpoold should already know the target difficulty, so why can't it do a correct check? Also, doing a proper check would reduce the network activity between pushpoold and bitcoind slightly (it would submit less false Proof of Works to bitcoind).

So in other words... pushpool isn't capable of testing through testnet until the difficulty is at least 256, is that correct?

Or in other words... pushpool works flawlessly, just not with testnet?

Thank god, now I can start coding on the "front end" stuff!
sr. member
Activity: 280
Merit: 252
June 26, 2011, 05:56:56 PM
Are you sure it is not dying right away after it comes up?  I had a lot of initial issues getting pushpoold to even start up and stay started.  Most of the time is was a database issue when pp tried to connect to mysql it was failing and causing pp to stop right away make sure pushpool is started and you should be able to telnet to ur port 8344

Okay I'm trying to figure out what could be stopping pushpool from running. I double checked the database name, username to database, and associated password by logging into mysql via the terminal and then doing a SELECT * FROM pool_worker to see if I could get that far.

I did have one suspicion about the port that is used to connect to the database. Is that port a default port if so how could I change it in mysql if I need to?

Is the method I used of finding the process ID associated with pushpoold a valid way of checking to see if pushpoold is running?

thanks for your help.

What version of pushpool are you trying to run? v0.5 or v0.4.1 Huh

If you are using v0.5 try v0.4.1 ...

To check to see if pushpool is running, simply type ps aux | grep pushpool and you should notice at least two references to pushpool. (One for the search command you just submit, and one for the running pushpoo program).

Also try running pushpool by typing ./pushpool -E

I can't seem to get ./pushpool running by simply running /pushpool but if I add the -E then it seems to work great.
hero member
Activity: 560
Merit: 517
June 26, 2011, 05:52:07 PM
Quote
pushpoold requires 40 bits of zeroes before submitting upstream, not 32.
jgarzik: Oh, thank you! This has finally cleared up the mystery for me and gigabytecoin  Grin What strange little bit of behavior from pushpool.

I have confirmed this. Here's the relevant code (msg.c):

Code:
static int check_hash(const char *remote_host, const char *auth_user,
      const char *data_str, const char **reason_out)
{
...
if (hash32[7] != 0) {
*reason_out = "H-not-zero";
return 0; /* work is invalid */
}
if (hash[27] == 0)
better_hash = true;
...
return better_hash ? 2 : 1; /* work is valid */

So check_hash will return 2 only if the submitted share has a hash with 40 0 bits, as jgarzik pointed out. Now let's see what effect that has:

Code:
static bool submit_work(const char *remote_host, const char *auth_user,
CURL *curl, const char *hexstr, bool *json_result)
{
...
/* validate submitted work */
check_rc = check_hash(remote_host, auth_user, hexstr, &reason);
...
/* if hash is sufficient for share, but not target,
* don't bother submitting to bitcoind
*/
if (srv.easy_target && check_rc == 1) {
*json_result = true;
sharelog(remote_host, auth_user, "Y", NULL, NULL, hexstr);
return true;
}

So if the hash had less than 40 bits of 0s, then it doesn't even try to submit it to bitcoind. I think that corresponds to a difficulty of 256?

I would consider this a bug. pushpoold should already know the target difficulty, so why can't it do a correct check? Also, doing a proper check would reduce the network activity between pushpoold and bitcoind slightly (it would submit less false Proof of Works to bitcoind).
legendary
Activity: 2492
Merit: 1491
LEALANA Bitcoin Grim Reaper
June 26, 2011, 05:34:43 PM
Are you sure it is not dying right away after it comes up?  I had a lot of initial issues getting pushpoold to even start up and stay started.  Most of the time is was a database issue when pp tried to connect to mysql it was failing and causing pp to stop right away make sure pushpool is started and you should be able to telnet to ur port 8344

Okay I'm trying to figure out what could be stopping pushpool from running. I double checked the database name, username to database, and associated password by logging into mysql via the terminal and then doing a SELECT * FROM pool_worker to see if I could get that far.

I did have one suspicion about the port that is used to connect to the database. Is that port a default port if so how could I change it in mysql if I need to?

Is the method I used of finding the process ID associated with pushpoold a valid way of checking to see if pushpoold is running?

thanks for your help.
newbie
Activity: 28
Merit: 0
June 26, 2011, 05:27:42 PM
Are you sure it is not dying right away after it comes up?  I had a lot of initial issues getting pushpoold to even start up and stay started.  Most of the time is was a database issue when pp tried to connect to mysql it was failing and causing pp to stop right away make sure pushpool is started and you should be able to telnet to ur port 8344
legendary
Activity: 2492
Merit: 1491
LEALANA Bitcoin Grim Reaper
June 26, 2011, 04:57:34 PM
Is there any reason that when i run pushpool and I try to find the process that is created by running ps aux | grep pushpoold that it doesn't appear to recognize what I ran? When I try it on bitcoind it finds it as "./bitcoind -server -daemon".

I suspect this could possibly be why I can't find any way to connect my phoenix miner to pushpoold.

Any thoughts anyone?
sr. member
Activity: 280
Merit: 252
June 26, 2011, 04:46:19 PM
Quote
pushpoold requires 40 bits of zeroes before submitting upstream, not 32.
Is this the reason for fpgaminer and gigabytecoin's difference between their expected solved blocks and the actual ones they've been able to solve on testnet, as I'm having the same type of discrepancy?

I've been fearing something wrong with my setup but if I understand that quote correctly, effectively pushpoold is setting the difficulty higher than testnet's current actual difficulty? 

I too did not understand Jeff's meaning when he said that.

I have been running 1.4Ghps towards my pushpool running on testnet all night, and 700mhps running directly towards bitcoind testnet all night.

./bitcoind getinfo is now showing 7400 bitcoins generated in my wallet... but apparantly the "shares" MySQL Database only has about 60 "Y" upstream_results in it...

So running 1.4GHps through the pool only found about 60 blocks on testnet... where as running 700mhps through bitcoind directly netted at least 88 blocks and I assume another 120 or so are on their way down the line in forms of a confirmation.

What could be going wrong???

One thing I did notice... when I was mining against pushpoold directly... I seemed to find a block almost immediately and then nothing for a few hours... until I start (simultaneously) mining through bitcoind and then the blocks started to pour in through pushpool. It's as though mining through bitcoind somewhat "helps things along"..?
legendary
Activity: 2492
Merit: 1491
LEALANA Bitcoin Grim Reaper
June 26, 2011, 03:28:54 PM
Okay I'm still not able to connect with my phoenix miner using:

Code:
start /DC:\Phoenix phoenix.exe -u http://NH2LwYuL585o6sgiikAG42sbmAhGwj8Vsd:[email protected]:8344/;askrate=10 -k poclbm VECTORS BFI_INT AGGRESSION=11 WORKSIZE=128 DEVICE=0 FASTLOOP=false

I tried to open up port 8344 as follows (still can't get phoenix to connect to bitcoind). Any help?

Code:
root@ubuntu:/# sudo ufw allow proto tcp from 192.168.1.12 to 192.168.1.13 port 8344
Rule added
root@ubuntu:/# sudo ufw allow proto tcp from 192.168.1.10 to 192.168.1.10 port 8344
Rule added
root@ubuntu:/# sudo ufw --dry-run allow http
*filter
:ufw-user-input - [0:0]
:ufw-user-output - [0:0]
:ufw-user-forward - [0:0]
:ufw-before-logging-input - [0:0]
:ufw-before-logging-output - [0:0]
:ufw-before-logging-forward - [0:0]
:ufw-user-logging-input - [0:0]
:ufw-user-logging-output - [0:0]
:ufw-user-logging-forward - [0:0]
:ufw-after-logging-input - [0:0]
:ufw-after-logging-output - [0:0]
:ufw-after-logging-forward - [0:0]
:ufw-logging-deny - [0:0]
:ufw-logging-allow - [0:0]
:ufw-user-limit - [0:0]
:ufw-user-limit-accept - [0:0]
### RULES ###

### tuple ### allow any 8342 0.0.0.0/0 any 0.0.0.0/0 in
-A ufw-user-input -p tcp --dport 8342 -j ACCEPT
-A ufw-user-input -p udp --dport 8342 -j ACCEPT

### tuple ### allow any 8341 0.0.0.0/0 any 0.0.0.0/0 in
-A ufw-user-input -p tcp --dport 8341 -j ACCEPT
-A ufw-user-input -p udp --dport 8341 -j ACCEPT

### tuple ### allow any 8344 0.0.0.0/0 any 0.0.0.0/0 in
-A ufw-user-input -p tcp --dport 8344 -j ACCEPT
-A ufw-user-input -p udp --dport 8344 -j ACCEPT

### tuple ### allow any 8338 0.0.0.0/0 any 0.0.0.0/0 in
-A ufw-user-input -p tcp --dport 8338 -j ACCEPT
-A ufw-user-input -p udp --dport 8338 -j ACCEPT

### tuple ### allow tcp 8344 192.168.1.13 any 192.168.1.12 in
-A ufw-user-input -p tcp -d 192.168.1.13 --dport 8344 -s 192.168.1.12 -j ACCEPT

### tuple ### allow tcp 8344 192.168.1.10 any 192.168.1.10 in
-A ufw-user-input -p tcp -d 192.168.1.10 --dport 8344 -s 192.168.1.10 -j ACCEPT

### tuple ### allow tcp 80 0.0.0.0/0 any 0.0.0.0/0 in
-A ufw-user-input -p tcp --dport 80 -j ACCEPT

### END RULES ###

### LOGGING ###
-A ufw-after-logging-input -j LOG --log-prefix "[UFW BLOCK] " -m limit --limit 3/min --limit-burst 10
-A ufw-after-logging-forward -j LOG --log-prefix "[UFW BLOCK] " -m limit --limit 3/min --limit-burst 10
-I ufw-logging-deny -m state --state INVALID -j RETURN -m limit --limit 3/min --limit-burst 10
-A ufw-logging-deny -j LOG --log-prefix "[UFW BLOCK] " -m limit --limit 3/min --limit-burst 10
-A ufw-logging-allow -j LOG --log-prefix "[UFW ALLOW] " -m limit --limit 3/min --limit-burst 10
### END LOGGING ###

### RATE LIMITING ###
-A ufw-user-limit -m limit --limit 3/minute -j LOG --log-prefix "[UFW LIMIT BLOCK] "
-A ufw-user-limit -j REJECT
-A ufw-user-limit-accept -j ACCEPT
### END RATE LIMITING ###
COMMIT
Rules updated
root@ubuntu:/#
full member
Activity: 127
Merit: 100
June 26, 2011, 02:21:27 PM
Quote
pushpoold requires 40 bits of zeroes before submitting upstream, not 32.
Is this the reason for fpgaminer and gigabytecoin's difference between their expected solved blocks and the actual ones they've been able to solve on testnet, as I'm having the same type of discrepancy?

I've been fearing something wrong with my setup but if I understand that quote correctly, effectively pushpoold is setting the difficulty higher than testnet's current actual difficulty? 
legendary
Activity: 1596
Merit: 1100
June 26, 2011, 11:13:01 AM
pushpoold requires 40 bits of zeroes before submitting upstream, not 32.
legendary
Activity: 2492
Merit: 1491
LEALANA Bitcoin Grim Reaper
June 26, 2011, 06:18:53 AM
Okay I have verified that bitcoind is running and that all blocks have been downloaded.

Also I have run :
Code:
sudo ufw allow 

...on all of the ports at the top of server.json.

When I try to test the ports with :
Code:
telnet localhost 

...I get a message saying connection failed/rejected for port .

I'm a bit lost at this point. Any help?

Also is there any specific setup I would have to ensure with the port used in connecting to my mysql database? When I setup mysql do I have to specify a port or is that the default?

Any help is much appreciated...


I also tried the following on port 8344 to get it to open:
Code:
sudo iptables -A INPUT -p tcp --dport 8344 -j ACCEPT

I don't this this point really matters but i am connecting in windows 7 with a phoenix miner to ubuntu 11.
legendary
Activity: 2492
Merit: 1491
LEALANA Bitcoin Grim Reaper
June 26, 2011, 05:51:53 AM
Okay I have verified that bitcoind is running and that all blocks have been downloaded.

Also I have run :
Code:
sudo ufw allow 

...on all of the ports at the top of server.json.

When I try to test the ports with :
Code:
telnet localhost 

...I get a message saying connection failed/rejected for port .

I'm a bit lost at this point. Any help?

Also is there any specific setup I would have to ensure with the port used in connecting to my mysql database? When I setup mysql do I have to specify a port or is that the default?

Any help is much appreciated...
hero member
Activity: 560
Merit: 517
June 26, 2011, 12:09:07 AM
Quote
What are "shares" anyways? Are they not simply difficulty 1 proofs? If the difficulty level is at 45 then theoretically shouldn't I find a block every 45 shares created? There are 1200 shares sitting in my MySQL DB so if that was true then I should have about 26 blocks by now, no?
Indeed, a share is a difficulty 1 proof, which has a small percentage chance of also meeting the real difficulty (45 in this case).

You'll find a block every Target Difficulty (45 in this case) shares on average. So yes, as you quoted in my post, I generated 1000 shares, and at difficulty 38 I should have gotten approximately 26 blocks. But I only found 2 blocks. Whereas when I pointed my miners at bitcoind directly I began finding blocks at the expected rate. Obviously something was screwy.
Pages:
Jump to: