Bitcoin Forum

Bitcoin => Mining => Topic started by: xf2_org on May 17, 2011, 09:02:10 PM



Title: pushpool - open source pool software
Post by: xf2_org on May 17, 2011, 09:02:10 PM
As people seem to have trouble finding it via its original thread (http://forum.bitcoin.org/?topic=3493.0), let's start a new thread for pushpool.

pushpool is an open source mining pool server.  A mining pool server is an HTTP JSON-RPC proxy to backend bitcoind processes.

Git repo (experts/devs only): https://github.com/jgarzik/pushpool
Latest release: http://yyz.us/bitcoin/pushpool-0.5.1.tar.gz

pushpool intentionally does not include "front end" code:  website, payouts, etc. must all be created by the pool operator.  Each pool operator may choose to differentiate themselves in a different way, while all sharing the underlying pushpool backend.


Title: Re: pushpool - open source pool software
Post by: dikidera on May 17, 2011, 09:16:28 PM
My thread was exactly for this, but oh well.

When users earn btc...where to they come from when they request payout? If it's a wait for 100 blocks confirmation thing or when it's instant.
How does one define the formula where the earned 50btc are split between users?


Title: Re: pushpool - open source pool software
Post by: gkolt on May 17, 2011, 09:46:08 PM
So, what bitcoin server is the best to be used with pushpool ?

I had problems compiling pushpool on Debian, but it's working ok on CentOS.


Title: Re: pushpool - open source pool software
Post by: xf2_org on May 17, 2011, 10:07:11 PM
When users earn btc...where to they come from when they request payout? If it's a wait for 100 blocks confirmation thing or when it's instant.

Up to the pool operator.  The bitcoin network requires 120 confirmations, before payout of a generated block.

Quote
How does one define the formula where the earned 50btc are split between users?

Up to the pool operator.



Title: Re: pushpool - open source pool software
Post by: xf2_org on May 17, 2011, 10:07:38 PM
So, what bitcoin server is the best to be used with pushpool ?

There is only one:  bitcoind, the official bitcoin client.



Title: Re: pushpool - open source pool software
Post by: dikidera on May 17, 2011, 10:08:39 PM
Then let us start with configuring.

Quote
{
   # network ports
   "listen" : [
      # binary protocol (default), port 8336
      { "port" : 8336 },

      # HTTP JSON-RPC protocol, port 8337
      { "port" : 8337, "protocol" : "http-json" },

      # HTTP JSON-RPC protocol, port 8339,
      # with trusted proxy appserver.example.com forwarding
      # requests to us
      { "port" : 8337, "protocol" : "http-json",
        "proxy" : "appserver.example.com" },

      # binary protocol, localhost-only port 8338
      { "host" : "127.0.0.1", "port" : 8338, "protocol" : "binary" }
   ],

   # database settings
   "database" : {
      "engine" : "sqlite3",
      "name" : "/tmp/data.sqlite",
      "stmt.pwdb" :
        "SELECT password FROM pool_worker WHERE username = ?"

      # ... or ...

      "engine" : "mysql",

      # 'host' defaults to localhost, if not specified
      "host" : "mysql.example.com",

      # 'port' uses proper default port for the DB engine,
      # if not specified
      "port" : 12121,

      "name" : "mydatabasename",
      "username" : "myuser",
      "password" : "mypass",

      "stmt.pwdb" :
        "SELECT password FROM pool_worker WHERE username = ?"

      # ... or ...

      "engine" : "postgresql",

      "host" : "db.example.com",

      "port" : 12121,

      "name" : "mydatabasename",
      "username" : "myuser",
      "password" : "mypass",

      "stmt.pwdb" :
        "SELECT password FROM pool_worker WHERE username = $1"
   },

   # cache settings
   "memcached" : {
      "servers" : [
         { "host" : "127.0.0.1", "port" : 11211 }
      ]
   },

   "pid" : "/tmp/pushpoold.pid",

   # overrides local hostname detection
   "forcehost" : "localhost.localdomain",

   "log.requests" : "/tmp/request.log",
   "log.shares" : "/tmp/shares.log",

   # the server assumes longpolling (w/ SIGUSR1 called for each blk)
   "longpoll.disable" : false,

   # length of time to cache username/password credentials, in seconds
   "auth.cred_cache.expire" : 75,

   # RPC settings
   "rpc.url" : "http://127.0.0.1:8332/",
   "rpc.user" : "myusername",
   "rpc.pass" : "mypassword",

   # rewrite returned 'target' to difficulty-1?
   "rpc.target.rewrite" : true
}

Any idea what to write here? Lots of stuff and i am still banging my head on the listening part

EDIT: If someone has a working config file, do share.


Title: Re: pushpool - open source pool software
Post by: xf2_org on May 17, 2011, 10:14:58 PM
Any idea what to write here? Lots of stuff and i am still banging my head on the listening part

The question is too vague.  It depends entirely on your needs.

More generally, if you are unaware of the role of bitcoind and how block generation works, you should review many pages on the wiki before running a pool server.



Title: Re: pushpool - open source pool software
Post by: dikidera on May 17, 2011, 10:19:36 PM
Well, for an example.

What should be there instead of the question mark?

Quote
"SELECT password FROM pool_worker WHERE username = ?"


Title: Re: pushpool - open source pool software
Post by: gkolt on May 17, 2011, 10:41:15 PM
So, what bitcoin server is the best to be used with pushpool ?

There is only one:  bitcoind, the official bitcoin client.


What about this one: http://forum.bitcoin.org/index.php?topic=1458.0


Title: Re: pushpool - open source pool software
Post by: ryepdx on May 17, 2011, 10:56:58 PM
Well, for an example.

What should be there instead of the question mark?

Quote
"SELECT password FROM pool_worker WHERE username = ?"

I can't say for sure because I only found out about pushpool something like five seconds ago, but I'm guessing you don't have to mess with that line. The question mark is just a marker for a variable in a prepared statement.


Title: Re: pushpool - open source pool software
Post by: gkolt on May 17, 2011, 11:00:25 PM
On bitcoin.conf (where my bitcoind server runs), do I need gen=0 or 1 ?

I guess generate should be 0 on server, right ?
Because I don't need the server to be generating coins, just 'serving' blocks.

Another Q:

# ./minerd -a sse2_64 -t 20 --url http://my.pushpool.server:8337 --userpass test:test
[2011-05-17 16:58:32] JSON-RPC call failed: {
   "message": "upstream RPC error",
   "code": -2
}
[2011-05-17 16:58:32] Long-polling activated for http://my.pushpool.server:8337/LP
[2011-05-17 16:58:32] json_rpc_call failed, retry after 30 seconds

Any idea why's that happening ?


Title: Re: pushpool - open source pool software
Post by: xf2_org on May 17, 2011, 11:51:17 PM
There is only one:  bitcoind, the official bitcoin client.
What about this one: http://forum.bitcoin.org/index.php?topic=1458.0

That's an unmaintained fork of the official client, using a wholly non-standard and not-supported-anywhere-but-there protocol.



Title: Re: pushpool - open source pool software
Post by: xf2_org on May 17, 2011, 11:52:45 PM
On bitcoin.conf (where my bitcoind server runs), do I need gen=0 or 1 ?

I guess generate should be 0 on server, right ?

Generation on bitcoind should be disabled.  That is the slow CPU mining.

Quote
# ./minerd -a sse2_64 -t 20 --url http://my.pushpool.server:8337 --userpass test:test
[2011-05-17 16:58:32] JSON-RPC call failed: {
   "message": "upstream RPC error",
   "code": -2
}

bitcoind is your upstream.  pushpool is having trouble communicating with bitcoind.



Title: Re: pushpool - open source pool software
Post by: gkolt on May 18, 2011, 12:35:41 AM
On bitcoin.conf (where my bitcoind server runs), do I need gen=0 or 1 ?

I guess generate should be 0 on server, right ?

Generation on bitcoind should be disabled.  That is the slow CPU mining.

Quote
# ./minerd -a sse2_64 -t 20 --url http://my.pushpool.server:8337 --userpass test:test
[2011-05-17 16:58:32] JSON-RPC call failed: {
   "message": "upstream RPC error",
   "code": -2
}

bitcoind is your upstream.  pushpool is having trouble communicating with bitcoind.


Ok, I managed to get it to work.

Another question, how can I see the total hash per sec that my pool is doing ?
bitcoind getinfo returns 0 hashespersec, even when I have two CPU mining @ 40Mhash/s at the same time.


Title: Re: pushpool - open source pool software
Post by: martok on May 18, 2011, 06:34:35 AM
I'm curious as to what you intend for the push binary protocol. It hasn't really gotten much traction though it looks like a fine implementation. Since Phoenix now supports MMP (Multiminer), would you consider patches that added MMP support to Pushpool?


Title: Re: pushpool - open source pool software
Post by: xf2_org on May 18, 2011, 08:03:56 AM
Another question, how can I see the total hash per sec that my pool is doing ?

Look at your share log, for the rate of incoming solutions.



Title: Re: pushpool - open source pool software
Post by: xf2_org on May 18, 2011, 08:04:18 AM
I'm curious as to what you intend for the push binary protocol. It hasn't really gotten much traction though it looks like a fine implementation. Since Phoenix now supports MMP (Multiminer), would you consider patches that added MMP support to Pushpool?

Patches welcome, it's an open source project.



Title: Re: pushpool - open source pool software
Post by: gigabytecoin on May 18, 2011, 08:51:51 AM
So let me get this straight...

pushpool is simply a backend software that determines how many blocks a certain username has mined and stores that information on a mysql database?

Can you show me an example of what the mysql database structure is you are working with in pushpool? What values is it keeping track of exactly?



Title: Re: pushpool - open source pool software
Post by: dikidera on May 18, 2011, 09:30:02 AM
Xf2, i am constantly getting json_rpc_call failed on cpu-miner...i don't have even the slightest idea where the problem is.

On pushpool i get an error HTTP request failed: The requested URL returner error 401. I assume 401 means wrong username and pass? But they are correct lol.


Title: Re: pushpool - open source pool software
Post by: xf2_org on May 18, 2011, 03:55:41 PM
So let me get this straight...

pushpool is simply a backend software that determines how many blocks a certain username has mined and stores that information on a mysql database?

pushpool proxies between bitcoind and the mining clients.  It gets work from bitcoind, and passes it to mining clients.  Mining clients submit solutions.  pushpool checks the solutions, credits the client if correct, logs the solution, and passes the solution on to bitcoind if it is of sufficient difficulty.

Quote
Can you show me an example of what the mysql database structure is you are working with in pushpool? What values is it keeping track of exactly?

These are the two default mysql statements used.  You may change these in the config file via "stmt.pwdb" and "stmt.sharelog":
Code:
#define DEFAULT_STMT_PWDB \
        "SELECT password FROM pool_worker WHERE username = ?"
#define DEFAULT_STMT_SHARELOG \
        "INSERT INTO shares (rem_host, username, our_result, "          \
        "                    upstream_result, reason, solution) "       \
        "VALUES(?,?,?,?,?,?)"

It is up to the pool operator to design their own database, and hook it into pushpool.  pushpool is intentionally very flexible about this.


Title: Re: pushpool - open source pool software
Post by: itsagas on May 18, 2011, 10:15:37 PM
As I think I read in the other thread, there are no clients for pushpool yet.  Is this correct? 

Or can existing clients be easily modified to connect?

Thanks


Title: Re: pushpool - open source pool software
Post by: xf2_org on May 18, 2011, 10:37:20 PM
As I think I read in the other thread, there are no clients for pushpool yet.  Is this correct? 

Or can existing clients be easily modified to connect?

pushpool supports HTTP JSON-RPC, which all mining clients support.

Existing clients, and future binary protocol clients, are both supported.



Title: Re: pushpool - open source pool software
Post by: xf2_org on May 19, 2011, 02:33:19 AM
Version 0.4.1 released.


Title: Re: pushpool - open source pool software
Post by: metonymous on May 19, 2011, 10:36:55 AM
As difficult as it can be to get the software compiled and working, I'd like to extend my thanks and gratitude to jgarzik for open sourcing pushpool and the cpu miner.

You may cop a lot of flack for it not being "easy" to setup, but the community is strides further than it would have been had you not stuck by the OSS philosophy to such an extent.

Anyway, thanks again :)


Title: Re: pushpool - open source pool software
Post by: eleuthria on May 19, 2011, 03:21:49 PM
As difficult as it can be to get the software compiled and working, I'd like to extend my thanks and gratitude to jgarzik for open sourcing pushpool and the cpu miner.

You may cop a lot of flack for it not being "easy" to setup, but the community is strides further than it would have been had you not stuck by the OSS philosophy to such an extent.

Anyway, thanks again :)

I'd also like to express my gratitude.  It was a chore setting my pool up due to the lack of documentation, but it certainly gives a great framework to build off of, rather than locking you into a very basic system.


Title: Re: pushpool - open source pool software
Post by: why on May 19, 2011, 03:52:11 PM
Anyone have luck getting this working on BSD?


Title: Re: pushpool - open source pool software
Post by: metonymous on May 19, 2011, 04:19:52 PM
Anyone have luck getting this working on BSD?
Does OS X count as BSD?

I'll be publishing my efforts to get it to compile on OS X soonish. Frick'n hell OS X makes it difficult. Gnulib, endian problems, aye aye aye. Anyway, I managed to get it down to 4 linking problems, but no idea if the binary would have run...


Title: Re: pushpool - open source pool software
Post by: why on May 19, 2011, 04:38:40 PM
Anyone have luck getting this working on BSD?
Does OS X count as BSD?

I'll be publishing my efforts to get it to compile on OS X soonish. Frick'n hell OS X makes it difficult. Gnulib, endian problems, aye aye aye. Anyway, I managed to get it down to 4 linking problems, but no idea if the binary would have run...

Was aiming towards a freebsd system.

On a side note are you using macports on OS X? Would probably be as easier solution if you are not doing that.


Title: Re: pushpool - open source pool software
Post by: why on May 19, 2011, 09:55:50 PM
I keep getting "configure: error: Missing required libevent" in bsd. It's installed though.


Title: Re: pushpool - open source pool software
Post by: xf2_org on May 19, 2011, 11:59:23 PM
I keep getting "configure: error: Missing required libevent" in bsd. It's installed though.

You need full libevent devel package setup, not just the library.



Title: Re: pushpool - open source pool software
Post by: why on May 20, 2011, 01:57:48 AM
Testing it out in a linux vm before I run it on the bsd box anyway. Stuck here now:

Quote
checking whether libcurl is usable... no
configure: error: Missing required libcurl >= 7.10.1
why@amadeus:~/pushpool-0.4.1$ curl --version
curl 7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.5


Title: Re: pushpool - open source pool software
Post by: xf2_org on May 20, 2011, 02:39:58 AM
Testing it out in a linux vm before I run it on the bsd box anyway. Stuck here now:

Quote
checking whether libcurl is usable... no
configure: error: Missing required libcurl >= 7.10.1
why@amadeus:~/pushpool-0.4.1$ curl --version
curl 7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.5

The presence of the 'curl' binary doesn't mean you have a working curl-config, curl headers and curl devel libs.



Title: Re: pushpool - open source pool software
Post by: why on May 20, 2011, 04:20:45 AM
Ah, okay, thanks.  seems like ./configure works fine now, however when I try to make I get:

Quote
server.c:106:2: error: #error ("No valid database engines defined")
make[1]: *** [server.o] Error 1

Sorry for so many questions, I am not very good at this stuff!


Title: Re: pushpool - open source pool software
Post by: Remember remember the 5th of November on May 20, 2011, 09:12:29 AM
I've installed pushpoold it's working, it's accepting shares according to GUiMiner, however the shares table is not being populated. Any reason to this? I use mysql, but it didn't work with Sqlite either.

Only file shares.log is being populated afaik.

EDIT: After updating the db-mysql.c file to 0.4.1 it says it fails at step execute. Why does it fail there?


Title: Re: pushpool - open source pool software
Post by: xf2_org on May 20, 2011, 12:56:54 PM
Ah, okay, thanks.  seems like ./configure works fine now, however when I try to make I get:

Quote
server.c:106:2: error: #error ("No valid database engines defined")
make[1]: *** [server.o] Error 1

That means there are no devel libs for any database (postgres, mysql, sqlite) on your system, that configure can find.



Title: Re: pushpool - open source pool software
Post by: xf2_org on May 20, 2011, 12:57:24 PM
I've installed pushpoold it's working, it's accepting shares according to GUiMiner, however the shares table is not being populated. Any reason to this? I use mysql, but it didn't work with Sqlite either.

Only file shares.log is being populated afaik.

EDIT: After updating the db-mysql.c file to 0.4.1 it says it fails at step execute. Why does it fail there?

Something to do with your database setup.



Title: Re: pushpool - open source pool software
Post by: Remember remember the 5th of November on May 20, 2011, 01:14:12 PM
Yes, i got it working somehow.

My other question is this one: How will pushpool insert in the DB that the pool found a block and the date it found it at? Does blkmond help with this...or? And after the front end has been set up how do i pay the users after confirming blocks? I assume it's via the bitcoind commandline.


Title: Re: pushpool - open source pool software
Post by: at0m on May 20, 2011, 06:12:31 PM
That was a bit of effort. I may have to write up a doc for this... or perhaps even a chef recipe :o

Now to work out what it's actually doing beyond multiple users and being a proxy to my wallet. :P

Ubuntu 10.04, by the way.


Title: Re: pushpool - open source pool software
Post by: oVPN on May 21, 2011, 11:25:46 PM
i try compiling pushpool on CentOS 5.6 32bit, but make fails with some erros

http://nopaste.me/raw/18499477874dd849c76e47e.txt

any ideas? :(



Title: Re: pushpool - open source pool software
Post by: error on May 22, 2011, 01:31:02 AM
i try compiling pushpool on CentOS 5.6 32bit, but make fails with some erros

http://nopaste.me/raw/18499477874dd849c76e47e.txt

any ideas? :(

Install sqlite-devel.


Title: Re: pushpool - open source pool software
Post by: oVPN on May 22, 2011, 04:02:12 AM
thanks did not solve the problem, something is stupid with centos but i compiled it with opensuse 11.4 x86_64 (openvz)

some notes, bit mixed up with centOS, but i think this should help others, im going to sleep now

Code:
# http://ivan.kartik.sk/static/48/ # How to install and setup Yum in OpenSUSE 11
#yum groupinstall "Development Tools" -y
zypper install -t pattern devel_C_C++
#yum install -y openssl-devel.x86_64 mysql-devel.x86_64 curl-devel.x86_64 sqlite-devel.x86_64 postgresql-devel.x86_64 zlib-devel.x86_64 libevent-devel.x86_64
wget http://www.digip.org/jansson/releases/jansson-2.0.1.tar.gz; tar xfvz jansson-2.0.1.tar.gz; cd jansson-2.0.1/; ./configure && make && make install; cd ~
#wget http://centos.alt.ru/repository/centos/5/x86_64/libmemcached-0.40-1.el5.x86_64.rpm; rpm -i libmemcached-0.40-1.el5.x86_64.rpm; cd ~
#wget http://centos.alt.ru/repository/centos/5/x86_64/libmemcached-devel-0.40-1.el5.x86_64.rpm; rpm -i libmemcached-devel-0.40-1.el5.x86_64.rpm; cd ~
yum install libmemcached.x86_64 libmemcached-devel.x86_64 libcurl-devel.x86_64

useradd -m pushpool
cd /home/pushpool
wget http://yyz.us/bitcoin/pushpool-0.4.1.tar.gz; tar xfvz pushpool-0.4.1.tar.gz; cd pushpool-0.4.1/;
./configure --prefix=/home/pushpool/ && make
make install
chown pushpool /home/pushpool -R; cd /home/pushpool



Title: Re: pushpool - open source pool software
Post by: timmmay on May 22, 2011, 04:30:44 AM
i try compiling pushpool on CentOS 5.6 32bit, but make fails with some erros

http://nopaste.me/raw/18499477874dd849c76e47e.txt

any ideas? :(

Install sqlite-devel.

I have the same problem.  I installed sqlite-devel but didn't fix.  I'll keep researching!

EDIT: In db-sqlite.c,  SQLITE_OPEN_READWRITE is not defined, nor is it defined in any of the includes, which is why Make is throwing a hissy fit.  I wonder why this isn't causing a problem on other Distro's?

EDIT 2: It seems this is a common problem with sqlite dependant apps on CentOS.  I'm running up OpenSUSE 11.4 now to try my luck with that!


Title: Re: pushpool - open source pool software
Post by: oVPN on May 22, 2011, 02:26:28 PM
seems like pushpool will NOT run on bsd, debian or centos, but opensuse 11.4 compiled fine for me.

but anyhow there is a lack of documentation, isnt it?


Title: Re: pushpool - open source pool software
Post by: Jine on May 22, 2011, 02:48:56 PM
You're wrong. I'm running (and compiling) Pushpool successfully on Debian 6 (32bit)
For all others, i added a template mysql-database and some stuff at my fork @ github:
https://github.com/jine/pushpool

Also requested a pull to original author, we'll see if he merges.
Until then, a .sql file can be found above.

Also modified example-cfg.json file.


Title: Re: pushpool - open source pool software
Post by: oVPN on May 22, 2011, 03:03:41 PM
ok i tried on debian 5 lenny 32bit and that did not work for me, because libevent was not found, but it was installed ;)
but i did not try deb6, maybe thats another hook.


Title: Re: pushpool - open source pool software
Post by: Jine on May 22, 2011, 03:39:03 PM
This is my setup:


jine@bitcoins:~$ dpkg -l | grep libevent
ii  libevent-1.4-2                           1.4.13-stable-1              An asynchronous event notification library
ii  libevent-core-1.4-2                      1.4.13-stable-1              An asynchronous event notification library (core)
ii  libevent-dev                             1.4.13-stable-1              Development libraries, header files and docs for libevent
ii  libevent-extra-1.4-2                     1.4.13-stable-1              An asynchronous event notification library (extra)

jine@bitcoins:~$ dpkg -l | grep crypto
ii  libcrypto++-dev                          5.6.0-6                      General purpose cryptographic library - C++ development
ii  libcrypto++8                             5.6.0-6                      General purpose cryptographic library - shared library
ii  libk5crypto3                             1.8.3+dfsg-4                 MIT Kerberos runtime libraries - Crypto Library
ii  openssl                                  0.9.8o-4squeeze1             Secure Socket Layer (SSL) binary and related cryptographic tools
ii  python-crypto                            2.1.0-2                      cryptographic algorithms and protocols for Python

jine@bitcoins:~$ dpkg -l | grep curl
ii  curl                                     7.21.0-1                     Get a file from an HTTP, HTTPS or FTP server
ii  libcurl3                                 7.21.0-1                     Multi-protocol file transfer library (OpenSSL)
ii  libcurl3-gnutls                          7.21.0-1                     Multi-protocol file transfer library (GnuTLS)
ii  libcurl4-openssl-dev                     7.21.0-1                     Development files and documentation for libcurl (OpenSSL)
ii  python-pycurl                            7.19.0-3+b1                  Python bindings to libcurl


Are you sure you got the -dev packages installed?


Title: Re: pushpool - open source pool software
Post by: oVPN on May 22, 2011, 05:21:29 PM
yes i`m sure that i installed dev packages on debian lenny 5 but there was a silly error on make.
but compiling works finde with opensuse 11.4 (64bit), i will try debian 6 later


Title: Re: pushpool - open source pool software
Post by: Jine on May 22, 2011, 05:23:49 PM
Could you please provide the makeerror you got?
I can try to find a fix for it & push it to my fork of pushpool.

Gonna setup a deb 5 later today/tomorrow and try it out by my self.


Title: Re: pushpool - open source pool software
Post by: Dusty on May 22, 2011, 06:34:31 PM
I'm sorry to ask something just only vaguely related but I'm unable to find any documentation about it and I need to understand better.

The miner programs connects to the pool server using an HTTP request but I'm unable to understand which kind of request it is. Is it a standard http web request?
If yes, how are the json parameters passed?

In other words, how to decode the request using for example PHP, JSP or a similar scripting language?

Thanks in advance for any help on the subject.


Title: Re: pushpool - open source pool software
Post by: Remember remember the 5th of November on May 22, 2011, 07:23:43 PM
The pool uses cURL to send it's data to Bitcoin. I think it should be through the HTTP protocol.


Title: Re: pushpool - open source pool software
Post by: Dusty on May 22, 2011, 07:33:35 PM
The pool uses cURL to send it's data to Bitcoin. I think it should be through the HTTP protocol.
Thanks for the reply, mcfe.
I've problems on the server side, not client side, I know the request is being made with curl.

Anyway I think I'm understanding how to do it, I just need to access the request body, in java there is the method ServletRequest.getInputStream() (http://download.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html#getInputStream()) and that should do it (still testing).


Title: Re: pushpool - open source pool software
Post by: oVPN on May 22, 2011, 10:02:18 PM
Could you please provide the makeerror you got?
...

i think it was this one http://nopaste.me/raw/18499477874dd849c76e47e.txt

if i added a ./configure --without-sqlite , it ran into another error with `htole32`, i found no solution for that on deb5lenny32


Title: Re: pushpool - open source pool software
Post by: Jine on May 22, 2011, 10:07:31 PM
The pool uses cURL to send it's data to Bitcoin. I think it should be through the HTTP protocol.
Thanks for the reply, mcfe.
I've problems on the server side, not client side, I know the request is being made with curl.

Anyway I think I'm understanding how to do it, I just need to access the request body, in java there is the method ServletRequest.getInputStream() (http://download.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html#getInputStream()) and that should do it (still testing).

I think the serverside uses CURL & JSON-RPC to.
You can see the API-ref here, https://en.bitcoin.it/wiki/API_reference_%28JSON-RPC%29



Title: Re: pushpool - open source pool software
Post by: Jine on May 22, 2011, 10:13:42 PM
The pool uses cURL to send it's data to Bitcoin. I think it should be through the HTTP protocol.
Thanks for the reply, mcfe.
I've problems on the server side, not client side, I know the request is being made with curl.

Anyway I think I'm understanding how to do it, I just need to access the request body, in java there is the method ServletRequest.getInputStream() (http://download.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html#getInputStream()) and that should do it (still testing).

I think the serverside uses CURL & JSON-RPC to.
You can see the API-ref here, https://en.bitcoin.it/wiki/API_reference_%28JSON-RPC%29



Could be some error with --no-sqlite flag to configure.
I'll look into it tomorrow.

Regards, Jim


Title: Re: pushpool - open source pool software
Post by: kjj on May 23, 2011, 03:02:46 AM
Could you please provide the makeerror you got?
...

i think it was this one http://nopaste.me/raw/18499477874dd849c76e47e.txt

if i added a ./configure --without-sqlite , it ran into another error with `htole32`, i found no solution for that on deb5lenny32

htole32 and friends are the newfangled way of changing byte orders.  They are only in glibc 2.9 or higher.

To get around this, open up server.c and msg.c, and paste this in below the long block of #includes

Quote from: patch for old glibc
#include <byteswap.h>
#define htole32(x)      (bswap_32(htonl(x)))
#define le32toh(x)      (ntohl(bswap_32(x)))

Note that I haven't tested it beyond getting pushpool to compile.  I'm only about 90% sure I got the ordering right.


Title: Re: pushpool - open source pool software
Post by: oVPN on May 23, 2011, 11:23:23 AM
....
htole32 and friends are the newfangled way of changing byte orders.  They are only in glibc 2.9 or higher.
...

thanks for information, now we know why compile fails on deb5lenny and centos5.6. they have much older glibc


Title: Re: pushpool - open source pool software
Post by: redhatzero on May 23, 2011, 10:14:03 PM
Heya,

I'm also thinking about building a pool with pushpool. Here are some questions from my side (maybe not all so much pushpool related):

About the shares table:
* our_result - If pushpool accepts the hash from the miner, this is Y... else N
* reason - If pushpool doesn't accept the hash, this is the reason (so.. mostly 'stale' I guess)
* upstream_result - If pushpool accepted the hash, it gets forwarded to bitcoind, if it's not accepted it's N, if it's a success it's Y (and a new block is born?)...

I've got a couple of "our_result=Y; upstream_result=N" what does that mean? (Is it related to rpc.target.rewrite?)

About pool speed:
Quote
Look at your share log, for the rate of incoming solutions.
How can I calculate the speed from that? Sometimes I'm sending a hash every 2 seconds, sometimes it takes minutes?


Thanks :)


Title: Re: pushpool - open source pool software
Post by: grue on May 23, 2011, 10:15:16 PM
super noob question from windows user:
Can this be compiled on windows? by using cygwin or something?


Title: Re: pushpool - open source pool software
Post by: error on May 23, 2011, 10:40:28 PM
super noob question from windows user:
Can this be compiled on windows? by using cygwin or something?

Probably, but you aren't going to run a pool on Windows.


Title: Re: pushpool - open source pool software
Post by: xf2_org on May 23, 2011, 10:42:55 PM
About the shares table:
* our_result - If pushpool accepts the hash from the miner, this is Y... else N
* reason - If pushpool doesn't accept the hash, this is the reason (so.. mostly 'stale' I guess)
* upstream_result - If pushpool accepted the hash, it gets forwarded to bitcoind, if it's not accepted it's N, if it's a success it's Y (and a new block is born?)...

I've got a couple of "our_result=Y; upstream_result=N" what does that mean? (Is it related to rpc.target.rewrite?)

For easy-target pools, pushpool does not submit all H==0 solutions to upstream bitcoind.  That would be a lot of solutions with zero chance of being a valid mainnet block hash.

pushpool requires 8 additional zero bits, before it submits to upstream.  Therefore, you will see (Y, NULL) for most shares, (Y, N) for uncommon shares that are just a bit closer to the target, and (Y, Y) for valid, full-target mainnet block hash accepted by upstream.  Only the latter (Y, Y) pays you 50 BTC, and generates a block w/ transactions.

Quote
About pool speed:
Quote
Look at your share log, for the rate of incoming solutions.
How can I calculate the speed from that? Sometimes I'm sending a hash every 2 seconds, sometimes it takes minutes?

If you are difficulty 1 pool, then each share represents 2**32 hashes.  Divide over time to get hashes/second.



Title: Re: pushpool - open source pool software
Post by: kjj on May 24, 2011, 05:53:20 PM
Is there a trick to getting debugging output from the database operations?

I'm not getting anything in the shares table, and I can't figure out why.  I made the table with the fields in the default statement, but still get nothing.

It looks like applog() should be writing the mysql error somewhere, but I can't find it in any logs or on the console (STDERR/STDOUT).


Title: Re: pushpool - open source pool software
Post by: kardus on May 24, 2011, 05:58:05 PM
Is there a trick to getting debugging output from the database operations?

I'm not getting anything in the shares table, and I can't figure out why.  I made the table with the fields in the default statement, but still get nothing.

It looks like applog() should be writing the mysql error somewhere, but I can't find it in any logs or on the console (STDERR/STDOUT).

        "database" : {
                "sharelog" : true,


Title: Re: pushpool - open source pool software
Post by: Jine on May 24, 2011, 06:06:42 PM
Please check my fork of pushpool for modified example-config and example db:
https://github.com/jine/pushpool

:)

Regards, Jim


Title: Re: pushpool - open source pool software
Post by: freeborn on May 24, 2011, 07:14:32 PM
btw, just wanted to point out that there is a 130btc bounty for a pushpool web front end (managing users, payouts, graphing)

http://forum.bitcoin.org/index.php?topic=8760.0



Title: Re: pushpool - open source pool software
Post by: Cdecker on May 25, 2011, 11:29:07 AM
Are there plans to piggyback the longpoll update to changed midstates or will we always be needing an external monitor to trigger longpolls?


Title: Re: pushpool - open source pool software
Post by: martok on May 25, 2011, 07:18:46 PM
Wondering if there is a way to get the generation transaction id from the solution logged to SQL where the upstream result is true. That is, we find a block but I then need a handle to the transaction so I can monitor whether it gets the 120 confirmations.


Title: Re: pushpool - open source pool software
Post by: Xenland on May 25, 2011, 07:35:08 PM
This is the error i got when i ran "Make" after downloading the Master pool.
Quote
gcc -DHAVE_CONFIG_H -I. -fno-strict-aliasing -pthread     -g -O2 -MT config.o -MD -MP -MF .deps/config.Tpo -c -o config.o config.c
config.c: In function ‘read_config’:
config.c:305:2: warning: passing argument 2 of ‘json_loads’ makes integer from pointer without a cast
/usr/local/include/jansson.h:219:9: note: expected ‘size_t’ but argument is of type ‘struct json_error_t *’
config.c:305:2: error: too few arguments to function ‘json_loads’
/usr/local/include/jansson.h:219:9: note: declared here
make[1]: *** [config.o] Error 1
make[1]: Leaving directory `/home/xenland/Downloads/bitcoin-pushpool'
make: *** [all] Error 2

I manually installed jannson-2.0.1

Any suggestions?


Title: Re: pushpool - open source pool software
Post by: kardus on May 25, 2011, 07:40:57 PM
Quote

I manually installed jannson-2.0.1

Any suggestions?


I did as well without problems...were you able to './configure;make;make install' without any problems (assuming linux)?


Title: Re: pushpool - open source pool software
Post by: eleuthria on May 25, 2011, 07:42:14 PM
Wondering if there is a way to get the generation transaction id from the solution logged to SQL where the upstream result is true. That is, we find a block but I then need a handle to the transaction so I can monitor whether it gets the 120 confirmations.

If you're using a PHP frontend, you can do what I've done with my pool:

Changes to pushpool:
  1) On startup of pushpoold, run a query on a new table [found_blocks for example], which contains an ID# for each block that has been found, auto increment.  Get the highest ID#, increase it by one, store it as a global variable in pushpool.
  2) Change the sharelog query to include an ID# in the shares table.
  3) When it checks a share and finds upstream_result='Y', increment the block ID counter in pushpool.

PHP Frontend:
  1) Cron script executing your PHP script every minute (or 5 mintues, 30, your preference), which polls bitcoind for a list of block generations (listtransactions, search for category: "generate".
  2) Get the transaction ID from the most recent block generations, and check if those transaction IDs are in the found_blocks table.
  3) If they aren't, create a new entry in the found_blocks table, and include the transaction ID from bitcoind for that block.  You can now associate all the shares from that block with the transaction ID because they will use the same block_id as your found_blocks table does.
  4) Have a confirmations field on your found_blocks table, that gets updated when the script executes.

  Obviously this is just the quick and dirty implementation to get you started, you'll need to add security checks for invalids (category: "orphan"), and make sure it doesn't have a hiccup if two blocks are found between the checks.


Title: Re: pushpool - open source pool software
Post by: xf2_org on May 25, 2011, 07:43:05 PM
Are there plans to piggyback the longpoll update to changed midstates or will we always be needing an external monitor to trigger longpolls?

Patches welcome :)



Title: Re: pushpool - open source pool software
Post by: xf2_org on May 25, 2011, 07:43:56 PM
Wondering if there is a way to get the generation transaction id from the solution logged to SQL where the upstream result is true. That is, we find a block but I then need a handle to the transaction so I can monitor whether it gets the 120 confirmations.

Not trivially, but it's doable.  The solution logged gives you prevhash, which allows you to locate block-1.



Title: Re: pushpool - open source pool software
Post by: Xenland on May 25, 2011, 07:45:29 PM
Quote

I manually installed jannson-2.0.1

Any suggestions?


I did as well without problems...were you able to './configure;make;make install' without any problems (assuming linux)?

Yes Jannson ./configure;make;make check; make install flawlessly


Title: Re: pushpool - open source pool software
Post by: dikidera on May 25, 2011, 07:50:42 PM
Please check my fork of pushpool for modified example-config and example db:
https://github.com/jine/pushpool

:)

Regards, Jim
In order to optimize. our_result and upstream_result must be enum 'y','n'.


Title: Re: pushpool - open source pool software
Post by: Xenland on May 25, 2011, 08:05:48 PM
Quote

I manually installed jannson-2.0.1

Any suggestions?


I did as well without problems...were you able to './configure;make;make install' without any problems (assuming linux)?

Yes Jannson ./configure;make;make check; make install flawlessly

So I guess i was using the git file and not the tarball so i got the tarball and now im experiencing this error after executing "make install"

Quote
make[1]: Entering directory `/home/shane/Downloads/pushpool-0.4.1'
test -z "/usr/local/sbin" || /bin/mkdir -p "/usr/local/sbin"
  /usr/bin/install -c pushpoold '/usr/local/sbin'
test -z "/usr/local/sbin" || /bin/mkdir -p "/usr/local/sbin"
 /usr/bin/install -c blkmond '/usr/local/sbin'
make[1]: Nothing to be done for `install-data-am'.
make[1]: Leaving directory `/home/shane/Downloads/pushpool-0.4.1'
[/quote]


Title: Re: pushpool - open source pool software
Post by: error on May 25, 2011, 09:41:39 PM
That isn't an error.


Title: Re: pushpool - open source pool software
Post by: nzbtc on May 25, 2011, 10:29:56 PM
PushPool looks interesting... Gonna get a VPS tonight and try it out.

I take it that push pool works on Ubuntu?


Title: Re: pushpool - open source pool software
Post by: Xenland on May 26, 2011, 04:08:43 AM
That isn't an error.

Thanks, I got it running. The only problem is when anyone try's to connect it comes up as Wrong Username & Password so I started trollin the IRC chat all day trying to convince anyone that i am typing in the wrong username and password. So it obviously isn't the wrong username and password if i copy and paste. It was a simple username and password like --user=a --pass=b that was it, theres no way you can type that in wrong.

 Any suggestions as to why my miner is having trouble connecting even tho pushpool will report "[382983464] Initialized"?


Title: Re: pushpool - open source pool software
Post by: dikidera on May 26, 2011, 06:00:36 AM
Depending on the database. Are you using mysql? If so, is it on? Since pushpoold need's to get the workers from somewhere.


Title: Re: pushpool - open source pool software
Post by: darbsllim on May 26, 2011, 09:11:17 AM
subscribed! Any pushpool experts want to consult with helping someone start a pool?


Title: Re: pushpool - open source pool software
Post by: kardus on May 26, 2011, 09:23:43 AM
subscribed! Any pushpool experts want to consult with helping someone start a pool?

Pushpool itself isn't that intricate; it does most of the work by itself. You mostly need someone that knows their way around php/mysql (or the other databases used) to create a web frontend.


Title: Re: pushpool - open source pool software
Post by: nzbtc on May 26, 2011, 10:06:55 AM
Ive had ago at installing this in ubuntu 10.04 on my vps. Can't get it to install libmemcached.

Would be very nice with a decent install guide! (I would write one if I got it install and working..)
Or can anyone elaborate on how they managed to install it?


Title: Re: pushpool - open source pool software
Post by: Xenland on May 26, 2011, 04:02:31 PM
After 18hours of attempting to get pushpool working ive ran into just about everyproblem. Ill be writing an install guide right after i finish the front end interface for pushpool.

Any one know why when i enable sharelog:true, that it would send the shares as questions marks.

Heres mysql query: "stmt.sharelog":"INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution) VALUES (?, ?, ?, ?, ?, ?)"


Title: Re: pushpool - open source pool software
Post by: nzbtc on May 26, 2011, 06:36:09 PM
After 18hours of attempting to get pushpool working ive ran into just about everyproblem. Ill be writing an install guide right after i finish the front end interface for pushpool.

Any one know why when i enable sharelog:true, that it would send the shares as questions marks.

Heres mysql query: "stmt.sharelog":"INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution) VALUES (?, ?, ?, ?, ?, ?)"


Perfection! Can't wait!


Title: Re: pushpool - open source pool software
Post by: redshark1802 on May 26, 2011, 08:46:05 PM
Hello,


i get the following error when running ./configure:"
./configure: line 5431: syntax error near unexpected token `,'
./configure: line 5431: `LIBCURL_CHECK_CONFIG(, 7.10.1, ,'
"

I have libcurl installed but I'm stuck for about 3hrs now -.-.
please could someone help me.




Title: Re: pushpool - open source pool software
Post by: oVPN on May 26, 2011, 08:53:38 PM
....
I have libcurl installed but I'm stuck for about 3hrs now -.-.
please could someone help me.

whats your OS?


Title: Re: pushpool - open source pool software
Post by: xf2_org on May 26, 2011, 08:54:45 PM
i get the following error when running ./configure:"
./configure: line 5431: syntax error near unexpected token `,'
./configure: line 5431: `LIBCURL_CHECK_CONFIG(, 7.10.1, ,'
"

You built the configure script incorrectly.

Do not use the git repo, that's for experts.  Download and run the tarball (see first post).



Title: Re: pushpool - open source pool software
Post by: redshark1802 on May 26, 2011, 09:01:52 PM
It actually was the tarball dude.
I have solved it. I reinstalled all libcurl stuff and installed i via source.


Title: Re: pushpool - open source pool software
Post by: dds on June 01, 2011, 06:10:37 AM
Could anyone tell how to configure pushpool long-polling with poclbm miner?
Looks like it doesn't work. Miner reports "long poll exception" and "invalid or stale" shares from time to time.
I have "longpoll.disable" : false in pushpool config.


Title: Re: pushpool - open source pool software
Post by: Xenland on June 01, 2011, 07:05:42 AM
Could anyone tell how to configure pushpool long-polling with poclbm miner?
Looks like it doesn't work. Miner reports "long poll exception" and "invalid or stale" shares from time to time.
I have "longpoll.disable" : false in pushpool config.

Well in my experience I'm using poclbm and i rarely get invalid and i think i got long pool exception


Title: Re: pushpool - open source pool software
Post by: dds on June 01, 2011, 09:03:22 AM
Well in my experience I'm using poclbm and i rarely get invalid and i think i got long pool exception
What exactly rarely mean?  :)
I have about 4% of stale shares in my pushpool DB.
btw, how many MH/s do you have on your pushpool instance?


Title: Re: pushpool - open source pool software
Post by: Xenland on June 01, 2011, 09:50:06 AM
Well in my experience I'm using poclbm and i rarely get invalid and i think i got long pool exception
What exactly rarely mean?  :)
I have about 4% of stale shares in my pushpool DB.
btw, how many MH/s do you have on your pushpool instance?

Rarly as in probubly around 1 in 100 shares, 4% dosent sound bad or alarming but maybe your packets are being dropped by a firewall. I get about the same MH/s as i do with other pools which is 85-90 range.


Title: Re: pushpool - open source pool software
Post by: davout on June 01, 2011, 01:17:59 PM
Could anyone tell how to configure pushpool long-polling with poclbm miner?
Looks like it doesn't work. Miner reports "long poll exception" and "invalid or stale" shares from time to time.
I have "longpoll.disable" : false in pushpool config.
From my understanding you'd need to active blkmon so it monitors new blocks.
It should then send SIGUSR1 to the pushpoold to notify it


Title: Re: pushpool - open source pool software
Post by: Xenland on June 02, 2011, 12:22:03 AM
Could anyone tell how to configure pushpool long-polling with poclbm miner?
Looks like it doesn't work. Miner reports "long poll exception" and "invalid or stale" shares from time to time.
I have "longpoll.disable" : false in pushpool config.
From my understanding you'd need to active blkmon so it monitors new blocks.
It should then send SIGUSR1 to the pushpoold to notify it

Dude, Is that what that does? I could never get it started.... but Im having a bit of an issue geting pushpoold started on my VPS it reports that its listening on 127.0.0.1 but it shuts down immediately right after it reports this any solutions?


Title: Re: pushpool - open source pool software
Post by: davout on June 02, 2011, 06:27:54 AM
Could anyone tell how to configure pushpool long-polling with poclbm miner?
Looks like it doesn't work. Miner reports "long poll exception" and "invalid or stale" shares from time to time.
I have "longpoll.disable" : false in pushpool config.
From my understanding you'd need to active blkmon so it monitors new blocks.
It should then send SIGUSR1 to the pushpoold to notify it

Dude, Is that what that does? I could never get it started.... but Im having a bit of an issue geting pushpoold started on my VPS it reports that its listening on 127.0.0.1 but it shuts down immediately right after it reports this any solutions?
Yes, you need it only for long polling tho


Title: Re: pushpool - open source pool software
Post by: turlando on June 02, 2011, 09:23:54 AM
Hello,
I'm a newbie here and this is my first post.

I'm trying to set up a pushpool server using PostgreSQL as SQL server but I have some troubles: I compiled the daemon, I modified the configuration file in order to use postgresql and I adapted the mysql query that I found here (https://forum.bitcoin.org/index.php?topic=10321.0) for pgsql, but when I try to connect to the server, the daemon prints out this error:
Code:
[1307005729.968275] pg_pwdb_lookup query failed: ERROR:  syntax error at end of input
LINE 1: SELECT password FROM pool_worker WHERE username = ?

In PostgreSQL the object of the WHERE clause have to be in quotes, as you can see:
Code:
pushpool=# SELECT password FROM pool_worker WHERE username = test;
ERROR:  column "test" does not exist
LINE 1: SELECT password FROM pool_worker WHERE username = test;
                                                          ^
pushpool=# SELECT password FROM pool_worker WHERE username = 'test';
             password            
----------------------------------
      /* password in md5 */
(1 row)

So I modified the configuration file to:
Code:
"stmt.pwdb" : "SELECT password FROM pool_worker WHERE username = '?'",
but I get:
Code:
[1307006155.225905] pg_pwdb_lookup query failed: ERROR:  bind message supplies 1 parameters, but prepared statement "" requires 0

I'm doing wrong something or is a bug?

Sorry for my very bad English.
Tancredi.


Title: Re: pushpool - open source pool software
Post by: kjj on June 02, 2011, 10:40:05 AM
The syntax is different.  Try this (lifted straight out of db-postgresql.c):

Code:
"SELECT password FROM pool_worker WHERE username = $1"


Title: Re: pushpool - open source pool software
Post by: Jine on June 02, 2011, 10:59:27 AM
Take a loot at my fork of pushpoold.
Which includes a much better configuration file, with examples.

(For postgres to)

https://github.com/jine/pushpool


Title: Re: pushpool - open source pool software
Post by: turlando on June 02, 2011, 01:48:28 PM
Right, I compiled jine-pushpool; it connects to the PostgreSQL server, but now I get these errors:
on the client ↓
Code:
% ./minerd --url http://192.168.1.99:8337/ --user test --pass test
[2011-06-02 14:35:18] HTTP request failed: The requested URL returned error: 403
[2011-06-02 14:35:18] json_rpc_call failed, retry after 30 seconds
on the server ↓
Code:
% ./pushpoold -E -D 2 --config=config.json
[1307021446.964664] Debug output enabled
[1307021446.977801] Listening on host :: port 8336
[1307021446.978053] Listening on host :: port 8337
[1307021446.978140] Listening on host 127.0.0.1 port 8338
[1307021447.003793] initialized
[1307021594.453532] client host ::ffff:192.168.1.210 port 45973 connected
[1307021594.453781] client ::ffff:192.168.1.210 ended

This is the configuration file:
Code:
% cat config.json
{
# network ports
"listen" : [
# binary protocol (default), port 8336
{ "port" : 8336 },

# HTTP JSON-RPC protocol, port 8337
{ "port" : 8337, "protocol" : "http-json" },

# HTTP JSON-RPC protocol, port 8339,
# with trusted proxy appserver.example.com forwarding
# requests to us
#
# comment out if not using multiple servers
#{ "port" : 8337, "protocol" : "http-json",
#  "proxy" : "appserver.example.com" },

# binary protocol, localhost-only port 8338
{ "host" : "127.0.0.1", "port" : 8338, "protocol" : "binary" }
],

# database settings
"database" : {

##
# select one database engine and remove the other ones.
##

# "engine" : "sqlite3",
# "name" : "/tmp/data.sqlite",

# set to true to enable logging of shares to db
# "sharelog" : true,

# edit queries to match your database structure if necessary
# "stmt.pwdb" :
#  "SELECT password FROM pool_worker WHERE username = ?",

        #        "stmt.sharelog" :
        #          "INSERT INTO shares (time, rem_host, username, our_result, upstream_result, reason, solution) VALUES (?,?,?,?,?,?,?)"

# ... or ...

# "engine" : "mysql",

# 'host' defaults to localhost, if not specified
# "host" : "mysql.example.com",

# 'port' uses proper default port for the DB engine,
# if not specified
# "port" : 3306,

# "name" : "mydatabasename",
# "username" : "myuser",
# "password" : "mypass",

# set to true to enable logging of shares to db
# "sharelog" : true,

# edit queries to match your database structure if necessary
# "stmt.pwdb" :
#  "SELECT password FROM pool_worker WHERE username = ?",

        #       "stmt.sharelog" :
        #          "INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution) VALUES (?,?,?,?,?,?)"


# ... or ...

"engine" : "postgresql",

"host" : "127.0.0.1",

"port" : 5432,

"name" : "dbname",
"username" : "dbusername",
"password" : "dbpassword",

# set to true to enable logging of shares to db
"sharelog" : true,

# edit queries to match your database structure if necessary
"stmt.pwdb" :
 "SELECT password FROM pool_worker WHERE username = $1",

                "stmt.sharelog" :
                  "INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution) VALUES ($1, $2, $3, $4, $5, decode($6, 'hex'))"

},

# cache settings
# comment out to disable memcache - NOT RECOMMENDED
"memcached" : {
"servers" : [
{ "host" : "127.0.0.1", "port" : 11211 }
]
},

"pid" : "/tmp/pushpoold.pid",

# overrides local hostname detection
#"forcehost" : "localhost.localdomain",

# logfiles for requests and shares
"log.requests" : "/tmp/request.log",
"log.shares" : "/tmp/shares.log",

# the server assumes longpolling (w/ SIGUSR1 called for each blk)
"longpoll.disable" : false,

# length of time to cache username/password credentials, in seconds
"auth.cred_cache.expire" : 75,

# RPC settings to bitcoind upstream server (same as bitcoin.conf if using original client)
"rpc.url" : "http://127.0.0.1:8332/",
"rpc.user" : "username",
"rpc.pass" : "password",

# rewrite returned 'target' to difficulty-1?
"rpc.target.rewrite" : true
}


Title: Re: pushpool - open source pool software
Post by: Jine on June 02, 2011, 02:15:37 PM
Have you changed the dbname/dbuser/dbpass vars in your own config?
And also, is your table actually named pool_worker and has at least to fields - username & password?

Aka. check your config, that it actually can read those tables & try again.

My version isn't any diffrent from the original, only better config & commenting.


Title: Re: pushpool - open source pool software
Post by: turlando on June 02, 2011, 02:22:07 PM
Have you changed the dbname/dbuser/dbpass vars in your own config?
Obviously.

And also, is your table actually named pool_worker and has at least to fields - username & password?
Yes.

The password have to be in plain text, isn't it?
Would you like a database dump?

P.S.: Thanks for the support :)


Title: Re: pushpool - open source pool software
Post by: Jine on June 02, 2011, 02:43:20 PM
Strange, look in syslog if pushpoold is outputted something regarding your db.
And memcache is up and running? (Just comment it out otherwise)


Title: Re: pushpool - open source pool software
Post by: turlando on June 02, 2011, 03:32:09 PM
I found this log:
Code:
% tail /tmp/request.log
[2011-06-02 13:48:43.821358] ::ffff:192.168.1.210 - "/"
[2011-06-02 13:49:13.826827] ::ffff:192.168.1.210 - "/"
[2011-06-02 13:49:43.833494] ::ffff:192.168.1.210 - "/"
[2011-06-02 13:50:13.838898] ::ffff:192.168.1.210 - "/"
[2011-06-02 13:50:43.844413] ::ffff:192.168.1.210 - "/"
[2011-06-02 13:51:13.851388] ::ffff:192.168.1.210 - "/"
[2011-06-02 13:51:43.856926] ::ffff:192.168.1.210 - "/"
[2011-06-02 14:07:14.385247] ::ffff:192.168.1.210 - "/"
[2011-06-02 14:07:31.446938] ::ffff:192.168.1.210 - "/"
[2011-06-02 15:16:10.756269] ::ffff:192.168.1.210 - "/"

memcached is running properly:
Code:
% rc.d restart memcached
:: Stopping memcached                                                                                                               [DONE]
:: Starting memcached                                                                                                               [DONE]

I also added to /etc/hosts.allow:
Code:
pushpoold: ALL


Title: Re: pushpool - open source pool software
Post by: Jine on June 03, 2011, 01:57:26 AM
I'm personally having scalability issues (i think?) with Deb+pushpoold.

We're serving ~200 workers over at Bitcoins.lc, and I'm getting errors like this all the time.
Quote
[2011-06-03 03:55:36] thread 2: 97416096 hashes, 1618.00 khash/sec
[2011-06-03 03:55:36] JSON-RPC call failed: {
   "code": -2,
   "message": "upstream RPC error"
}
[2011-06-03 03:55:36] json_rpc_call failed, retry after 30 seconds
[2011-06-03 03:55:37] thread 3: 97416096 hashes, 1624.76 khash/sec

Why is "bitcoind" refusing to give out work sometimes?
Hosted on a 8 CPU VPS with lots of ram.

Any suggestions?
Bounty for solving this problem is a couple of BTC, easily.

EDIT: Also:
Quote
Jun  3 03:57:01 bitcoins pushpoold[9380]: HTTP request failed: couldn't connect to host
Jun  3 03:57:01 bitcoins pushpoold[9380]: HTTP request failed: couldn't connect to host
Jun  3 03:57:01 bitcoins pushpoold[9380]: HTTP request failed: couldn't connect to host


Title: Re: pushpool - open source pool software
Post by: Jine on June 03, 2011, 02:03:52 AM
I'm also seeing shitload of TIME_WAIT connections between the upstream and pushpoold:

Quote
tcp        0      0 127.0.0.1:8332          127.0.0.1:14446         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14412         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14276         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14233         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:15052         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14314         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14667         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14726         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14822         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14548         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14499         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14335         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14677         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:13976         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14348         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14320         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14949         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:13990         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14439         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:15063         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14371         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14618         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:13959         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14995         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14513         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14593         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14952         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14322         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14563         TIME_WAIT   -
tcp        0      0 127.0.0.1:8332          127.0.0.1:14355         TIME_WAIT   -
Quote
root@bitcoins:/usr/src/pushpool# netstat -anp | grep 8332 | wc -l
1508


Title: Re: pushpool - open source pool software
Post by: xf2_org on June 03, 2011, 02:06:29 AM
See comments in the other thread by BTCguild pool operator (elethuria(sp??)).


Title: Re: pushpool - open source pool software
Post by: Jine on June 03, 2011, 02:22:24 AM
Going through his posts as we speak, could you point me in any more specific direction?
Only thing i can thinks of is amount of opened files (ulimit -n)


Title: Re: pushpool - open source pool software
Post by: MyFarm on June 07, 2011, 07:21:18 AM
Has anyone been able to get pushpool working on an CentOS system?


Title: Re: pushpool - open source pool software
Post by: FreddyE on June 07, 2011, 09:28:10 AM
Is it possibly to compile this for windows? I got visual studio but how would I go about all those dependencies?


Title: Re: pushpool - open source pool software
Post by: error on June 07, 2011, 09:46:11 AM
Has anyone been able to get pushpool working on an CentOS system?

Yes. Are you having a specific issue?

Is it possibly to compile this for windows? I got visual studio but how would I go about all those dependencies?

No. Even if you could compile it, you don't even want to THINK about running anything serious like this on Windows.


Title: Re: pushpool - open source pool software
Post by: davout on June 07, 2011, 09:57:57 AM
Is it possibly to compile this for windows? I got visual studio but how would I go about all those dependencies?
Why, do you want to run it on your windows mobile phone ? :D


Title: Re: pushpool - open source pool software
Post by: FreddyE on June 07, 2011, 11:39:29 AM
No, but I have a webserver running on windows.


Title: Re: pushpool - open source pool software
Post by: FreddyE on June 07, 2011, 11:42:49 AM

No. Even if you could compile it, you don't even want to THINK about running anything serious like this on Windows.

What a strange thing to say...
Who says you can´t run anything serious on Windows?


Title: Re: pushpool - open source pool software
Post by: davout on June 07, 2011, 12:11:41 PM
What a strange thing to say...
Who says you can´t run anything serious on Windows?
You can successfully run serious stuff on windows, but if you try to run open source software that was built on and runs on linux you're on your own, nobody wants to deal with the CLR... Do you hear a lot from the Mono project ? I don't :)

I managed to install a full Ruby on Rails stack on windows, but god that was painful at some times, especially when you need some special extension that automagically gets compiled on linux but not on windows...


Title: Re: pushpool - open source pool software
Post by: FreddyE on June 08, 2011, 05:25:53 AM
Yeah....manually clearing all dependencies is the issue. Oh well...seems I´m just going to install Ubuntu on a second partition.


Title: Re: pushpool - open source pool software
Post by: CubedRoot on June 08, 2011, 05:07:39 PM
Right now I have my own IBM xSeries 346 with 8 gig ram and dual Xeon 3.8's running on a raid 5  with 6 scsi ultra 320's (15k RPM) array that has almost 750 gig available storage.  I have it colocated in a nice datacenter and have 13 IP's available for use on it.  It is connected to the network by 2 100meg circuits, which I have nic bonding setup for.

I am running Centos 5.6 on it right now, and I also run DirectAdmin on it and host about 38 sites on the machine. I currently have almost no load on the box with these accounts.  I also have 1.5 TB of transfer free in my SLA with the datacenter.

I am wanting to start a semi private pool for me and a few friends and possibly some more folks later on. I have been looking at pushpool for the backend, and a good friend of mine is a damn good php and sql programmer by trade.  He has agreed to do the webfrontend and DB side of things.  Is there any documentation on setting up pushpool on Centos 5.6 that I can read up on to learn about it?  


Title: Re: pushpool - open source pool software
Post by: Jine on June 08, 2011, 05:12:32 PM
I'm having a hard time figuring out why my bitcoind+pushpoold setup is resulting in about 5-6% stale/duplicated.
Any ideas - anyone?!


Title: Re: pushpool - open source pool software
Post by: dikidera on June 08, 2011, 05:17:30 PM
I'm having a hard time figuring out why my bitcoind+pushpoold setup is resulting in about 5-6% stale/duplicated.
Any ideas - anyone?!
You said "Finally a usable bitcoin pool" Seems that may not be the case.


Title: Re: pushpool - open source pool software
Post by: davout on June 08, 2011, 05:43:06 PM
You said "Finally a usable bitcoin pool" Seems that may not be the case.
The intended audience are developers, and it's perfectly usable for developers :)


Title: Re: pushpool - open source pool software
Post by: genewitch on June 11, 2011, 03:27:05 AM
Pushpool on gentoo won't compile, make log below:

http://paste.pocoo.org/show/404358/

damn, remove --as-needed, run make clean && make, let it fail copy the line that says gcc and take out the ,-O1 -W1, part. the commas were breaking the command. is this gentoo's make's fault or some other script that is breaking?


gcc  -g -O2 -pthread -Wl,-O1 -Wl,-rdynamic -L/usr/lib64/mysql -lmysqlclient -L/usr/lib64 -lz -lcrypt -lnsl -lm -L/usr/lib64/ -lssl -lcrypto  -o pushpoold hist.o htab.o anet.o config.o msg.o server.o util.o db-sqlite.o db-mysql.o db-postgresql.o -lcurl -lssl -lcrypto -lrt -lssl -lcrypto -ldl -lz -lz -levent -lpthread -ljansson -lcrypto -lz -lmemcached

becomes
 gcc  -g -O2 -pthread -Wl -rdynamic -L/usr/lib64/mysql -lmysqlclient -L/usr/lib64 -lz -lcrypt -lnsl -lm -L/usr/lib64/ -lssl -lcrypto  -o pushpoold hist.o htab.o anet.o config.o msg.o server.o util.o db-sqlite.o db-mysql.o db-postgresql.o -lcurl -lssl -lcrypto -lrt -lssl -lcrypto -ldl -lz -lz -levent -lpthread -ljansson -lcrypto -lz -lmemcached

testing it now.


Title: Re: pushpool - open source pool software
Post by: itsagas on June 13, 2011, 11:06:50 PM
what is the best way to scale pushpool and make it distributed. 

for example, multiple pushpools and multiple bitcoind?  multiple pushpools and one bitcoind?  other? 

if for example we wanted one server in EU, one in USA and the users to share the work and the pool acts like one big pool with common accounts / workers database.


Title: Re: pushpool - open source pool software
Post by: kjj on June 13, 2011, 11:13:00 PM
Run bitcoind on each server, alongside pushpoold. 


Title: Re: pushpool - open source pool software
Post by: jgarzik on June 13, 2011, 11:21:38 PM
for example, multiple pushpools and multiple bitcoind?  multiple pushpools and one bitcoind?  other? 

Multiple pushpoold's and multiple bitcoind's.  The only question is about database scaling...



Title: Re: pushpool - open source pool software
Post by: jgarzik on June 14, 2011, 06:33:17 AM
Version 0.5 released.

Changes:

Jeff Garzik (2):
      applog: fix memory leak; check asprintf() return value
      Version 0.5.

Joerie de Gram (1):
      Make ntime rolling support configurable

Luke Dashjr (1):
      Bugfix: libraries must be in LDADD, not LDFLAGS

MtRed (1):
      memcached_get & memcached_set key length is off by 1. Double null make get

Shane Wegner (1):
      Output times on STDERR in human readable format.



Title: Re: pushpool - open source pool software
Post by: Wuked on June 15, 2011, 04:03:32 PM
Just to warn you that the 0.5 build in the .tar.gz file doesn't work correctly.

Ius has a fix, I think it's been pushed to github but I'm not 100% sure.


Title: Re: pushpool - open source pool software
Post by: ius on June 15, 2011, 05:05:22 PM
To clarify; the standard error logging option (-E) is broken in 0.5 Trivial fix is submitted as a pull request: https://github.com/jgarzik/pushpool/pull/27


Title: Re: pushpool - open source pool software
Post by: Crs on June 15, 2011, 06:33:17 PM
question:does pushpool work with the namecoin chain ?


Title: Re: pushpool - open source pool software
Post by: redhatzero on June 17, 2011, 10:08:17 AM
Hi, is it possible that even if upstream_result is Y, that it's an invalid share?

I have such a case, that upstream_result is Y but nothing shows up in listtransactions :/


Title: Re: pushpool - open source pool software
Post by: davout on June 17, 2011, 10:45:38 AM
Hi, is it possible that even if upstream_result is Y, that it's an invalid share?

I have such a case, that upstream_result is Y but nothing shows up in listtransactions :/
I suggest to not rely on listtransactions to monitor generated blocks.

The approach I use is the following :
 - track shares with upstream_result = 'Y'
 - calculate block hash directly from the share result (block header)
 - use the getblockbyhash RPC call to do the tracking and validate there's actually a block that has been generated

I think it's a much cleaner approach


Title: Re: pushpool - open source pool software
Post by: redhatzero on June 17, 2011, 10:47:41 AM
thanks davout, i'll give that a try


Title: Re: pushpool - open source pool software
Post by: eleuthria on June 17, 2011, 04:14:45 PM
Just to help anybody out there who is struggling with pushpool scaling like BTC Guild has:

The major bottleneck that you'll run into assuming your hardware is good is going to be the communications between bitcoind and pushpoold.  Every getwork and sendresult request is opening a new local socket for the communication, eventually running the server out of open sockets due to a huge number of TIME_WAITs.  Around 300-400 GH/sec, depending on the server TCP settings, you will hit a point where there are no ports available to open a new local socket.

Changing your servers tcp settings in /proc/sys/net/ipv4/ to the following can help, but its only a bandaid fix, you'll still run into issues:
  tcp_fin_timeout   - Changing this to a much lower value, such as 5.
  ip_local_port_range  -  Changing this to a setting such as 10000 65000

My C/C++ skills for networking are pretty rusty, so I haven't yet been able to come up with a fix to get pushpoold/bitcoind to reuse sockets rather than open new ones yet.


Title: Re: pushpool - open source pool software
Post by: kripz on June 18, 2011, 02:28:03 AM
Is it possible to set up a local server to connect to an existing pool? I'll then connect my miners to the local server, Dial up is a bitch...


Title: Re: pushpool - open source pool software
Post by: redhatzero on June 18, 2011, 05:33:36 PM
more or less replying to eleuthria:

before I've updated to 0.5 I didn't have problems with the connections. But since I've updated, I'm running into these problems :( (With about the same GHash rate...)


Title: Re: pushpool - open source pool software
Post by: somebadger on June 20, 2011, 01:51:49 PM
question:does pushpool work with the namecoin chain ?

yes it does, just interface with namecoind rpc :)


Title: Re: pushpool - open source pool software
Post by: nodemaster on June 20, 2011, 08:11:35 PM
Hi all,

I have no problem with TIME_WAITs at the moment. But I have a massive problem with CLOSE_WAITs from pushpoold:

http://www.nodemaster.de/files/btc/image.png

If I restart pushpoold they vanish. I never saw the amount decreasing during normal operations. I'm using the current git Version. Does anybody know how to mitigate this issue?


Title: Re: pushpool - open source pool software
Post by: Inaba on June 20, 2011, 09:04:37 PM
blkmond will close those.  It's not a great design decision that it requires blckmond to close the tcp due to the SIG USR1 it receives when there's an LP.  If blkmond fails you will eventually have too many open connections.



Title: Re: pushpool - open source pool software
Post by: nodemaster on June 20, 2011, 09:54:45 PM
blkmond will close those.  It's not a great design decision that it requires blckmond to close the tcp due to the SIG USR1 it receives when there's an LP.  If blkmond fails you will eventually have too many open connections.



Thank you for your answer. This explains a bit ;D BTW I have blkmond running by fire and forget. I just start it with the configuration file as parameter and send it to the background using the job control, pipeing its output to the bit bucket. Is this the correct usage? I feel it should be a daemon which need to be restartet every time pushpoold is restartet (as it need to know the new PID)?! Or is it reading the PID from the file each loop?  However embedding it into a init-Skript is not that easy (due to the output) und thus I feel it is not intended to be startet as deamon. Am I right?


Title: Re: pushpool - open source pool software
Post by: Inaba on June 20, 2011, 09:59:26 PM
Umm, I can't recall for sure, but I'm 99% positive it needs to be restarted when PP is restarted and gets a new PID.


Title: Re: pushpool - open source pool software
Post by: MrSam on June 22, 2011, 09:47:16 AM
Please check my fork of pushpool for modified example-config and example db:
https://github.com/jine/pushpool

:)

Regards, Jim

I changed you insert to delayed inserts


Title: Re: pushpool - open source pool software
Post by: d3c0n808 on June 25, 2011, 01:57:08 AM
I've been running pushpoold on my box for sometime and about every 12 hours of running or so it begins to error the error log says WARN too many open files anyone else run into any similar issues?


Title: Re: pushpool - open source pool software
Post by: Jine on June 25, 2011, 02:23:55 AM
Modifiy ulimit -n


Title: Re: pushpool - open source pool software
Post by: Vladimir on June 25, 2011, 08:48:01 AM
Anyone got it to compile on freebsd yet? Any pointers?


Title: Re: pushpool - open source pool software
Post by: Vladimir on June 25, 2011, 08:51:34 AM
I keep getting "configure: error: Missing required libevent" in bsd. It's installed though.

You need full libevent devel package setup, not just the library.




Jeff some more help on this one. I have no idea what you mean by "You need full libevent devel package setup, not just the library." Please explain.


Title: Re: pushpool - open source pool software
Post by: Xenland on June 26, 2011, 08:48:12 AM
I keep getting "configure: error: Missing required libevent" in bsd. It's installed though.

You need full libevent devel package setup, not just the library.




Jeff some more help on this one. I have no idea what you mean by "You need full libevent devel package setup, not just the library." Please explain.

I think he means you need the development package as well as the binary package ;)


Title: Re: pushpool - open source pool software
Post by: Vladimir on June 27, 2011, 02:37:29 PM
I've been running pushpoold on my box for sometime and about every 12 hours of running or so it begins to error the error log says WARN too many open files anyone else run into any similar issues?

Yep same issue. On my volumes it lives for not more than 5 minutes than this. My software detects this within 2 seconds, cleans it up, kill/restarts pushpool. ulimit -n is 32k. Not helping much...

The best I got with it is 5% of stales which is not acceptable. Back to older ways it is than, for now at least. Will see if I can find time to reimplement it with Erlang.



Title: Re: pushpool - open source pool software
Post by: Inaba on June 27, 2011, 02:45:26 PM
blkmond is what cleans up the open files (actually connections).

It's not a great solution, but it's the way pushpoold was designed.


Title: Re: pushpool - open source pool software
Post by: Vladimir on June 27, 2011, 02:51:16 PM
blkmond is what cleans up the open files (actually connections).

It's not a great solution, but it's the way pushpoold was designed.

blkmod just sends USR1, is that correct? Or does it do something else? I do not use it, but I ahve some other software sending USR1 to pushpoold when a block is solved.

Have I messed up something badly here?


actually I used this (thought that a handful of lines in perl is better than a handful of pages of python):

Quote
#!/usr/bin/perl

use common::sense ;
use File::Tail ;

my $bitcoinLog = File::Tail->new("/s/bitcoind/db/debug.log");

while ( defined ( my $line =  $bitcoinLog->read ) ) {
    $line =~ /ACCEPT/ or next ;
    foreach( split ( /\n/ , `ps aux | grep pushpoold | grep -v grep` ) ) {
        /^.*?(\d+)/ and $1 and say "sent SIGUSR1 to process $1" and `kill -USR1 $1` ;
    }
}

It took me much less time to write the above code than even skim over blkmond's code.


Title: Re: pushpool - open source pool software
Post by: Inaba on June 27, 2011, 03:04:30 PM
As far as I know, I think that is all it does. I haven't looked too closely at it.  So you are doing that already and still having the files issue?

Have you changed your hard and soft file limits?


Title: Re: pushpool - open source pool software
Post by: Vladimir on June 27, 2011, 03:12:44 PM
As far as I know, I think that is all it does. I haven't looked too closely at it.  So you are doing that already and still having the files issue?

Have you changed your hard and soft file limits?

/etc/security/limits.conf:
Quote
root     soft    nofile      34096
root     hard    nofile      34096

Once I point lots of Ghps to this it does not live much longer than 5 minutes, perhaps simply not enough time between solved blocks.


Title: Re: pushpool - open source pool software
Post by: Inaba on June 27, 2011, 03:32:20 PM
How much is a lot?  It should be able to handle ~450 GH/s before buckling.

I have my notes at a home on things that need to be changed in addition to hard and soft file limits.  I'm trying to recall them from memory but I'm drawing a blank.

Oh, it's also very dependant on the speed of the backend DB.  If your backend db server is slow or over a slow link, it will start getting backed up and eventually never catch up.


Title: Re: pushpool - open source pool software
Post by: Vladimir on June 27, 2011, 03:41:32 PM
Oh, it's also very dependant on the speed of the backend DB.  If your backend db server is slow or over a slow link, it will start getting backed up and eventually never catch up.

Good idea, will change the code to cut db backend balls out. I am happy with just using log files.


Title: Re: pushpool - open source pool software
Post by: Inaba on June 27, 2011, 03:46:46 PM
I rewrote pretty much all of the DB code in my implementation of PP.  The stock implementation is atrocious and unusable/unmaintainable.


Title: Re: pushpool - open source pool software
Post by: jgarzik on June 27, 2011, 06:03:39 PM
Version 0.5.1 released.

This is a bug fix release, with two minor bug fixes:

- fix stderr logging
- better configure script host detection



Title: Re: pushpool - open source pool software
Post by: phorensic on June 28, 2011, 04:09:25 AM
All the new ideas and coding on the github site in the last two weeks and that's all we get in the official fork?  Gahhh!!!  ETA for v0.6?  "When it's ready" amirite?


Title: Re: pushpool - open source pool software
Post by: jgarzik on June 28, 2011, 04:31:21 AM
All the new ideas and coding on the github site in the last two weeks and that's all we get in the official fork?  Gahhh!!!  ETA for v0.6?  "When it's ready" amirite?

The pull queue is basically empty, so I'm not sure what you're talking about.



Title: Re: pushpool - open source pool software
Post by: DaMan on June 28, 2011, 08:44:12 AM
is there a tutorial for Centos 5 out there? I can't get it to work.


Title: Re: pushpool - open source pool software
Post by: asper on June 28, 2011, 01:24:55 PM
I keep getting "configure: error: Missing required libevent" in bsd. It's installed though.

You need full libevent devel package setup, not just the library.




Jeff some more help on this one. I have no idea what you mean by "You need full libevent devel package setup, not just the library." Please explain.

Yes, the same problem - i've installed libevent (cd /usr/ports/devel/libevent && make install clean), but there's no use for pushpool to compile, the configure script stops, saying:

Quote
checking for event_base_new in -levent... no
configure: error: Missing required libevent

Can somebody tell me, where can I get this "full libevent devel package setup" ?


Title: Re: pushpool - open source pool software
Post by: Vladimir on June 28, 2011, 04:07:36 PM
you could try to compile pushpool on 32bit linux and than run it in binary linux emulation mode on freebsd. One option is to use statify on it to avoid messing with linux libs on freebsd. I have not tried yet since all my linuxes are 64bit and just did not have time to get this sorted. Theoretically it might just work.
Let me know how it goes if you try it.


Title: Re: pushpool - open source pool software
Post by: jgarzik on June 28, 2011, 05:41:17 PM
Jeff some more help on this one. I have no idea what you mean by "You need full libevent devel package setup, not just the library." Please explain.

Yes, the same problem - i've installed libevent (cd /usr/ports/devel/libevent && make install clean), but there's no use for pushpool to compile, the configure script stops, saying:

Quote
checking for event_base_new in -levent... no
configure: error: Missing required libevent

Can somebody tell me, where can I get this "full libevent devel package setup" ?

Sounds like user error.  INSTALL file covers the basics of how to use a standard GNU autotools configure script.  A script cannot magically detect site-specific directories for software installation.

If you have a bunch of stuff installed into non-standard directory /usr/local -- common on FreeBSD -- then you want something like

Code:
CFLAGS="-O2 -Wall -g -I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure



Title: Re: pushpool - open source pool software
Post by: Vladimir on June 28, 2011, 05:54:04 PM
not everyone is c developer and familiar with autotools and it is not "site specific" it is OS specific BTW


Title: Re: pushpool - open source pool software
Post by: martok on June 29, 2011, 02:22:40 AM
Yep same issue. On my volumes it lives for not more than 5 minutes than this. My software detects this within 2 seconds, cleans it up, kill/restarts pushpool. ulimit -n is 32k. Not helping much...

The best I got with it is 5% of stales which is not acceptable. Back to older ways it is than, for now at least. Will see if I can find time to reimplement it with Erlang.


You're getting the stales because you're killing pushpoold. Pp keeps a log of what work it has issued and when a miner submits work to a newly restarted pushpoold, it won't accept the share because it is not in the pp log.


Title: Re: pushpool - open source pool software
Post by: martok on June 29, 2011, 02:24:04 AM
Have you changed your hard and soft file limits?

/etc/security/limits.conf:
Quote
root     soft    nofile      34096
root     hard    nofile      34096

Once I point lots of Ghps to this it does not live much longer than 5 minutes, perhaps simply not enough time between solved blocks.
Well that changes the limit for root. But you are not running pushpool as root right? :)


Title: Re: pushpool - open source pool software
Post by: Vladimir on June 29, 2011, 03:35:49 AM
Yes I am actually running it as root.

...

preparing to hear a patronizing lecture on how it is bad to run things as root....




Title: Re: pushpool - open source pool software
Post by: Inaba on June 29, 2011, 03:41:26 AM
Add this as well:

   /etc/sysctl.conf
      fs.file-max = 200000
      net.ipv4.tcp_fin_timeout = 10
      net.ipv4.ip_local_port_range = 10000 65000


Title: Re: pushpool - open source pool software
Post by: sergio on June 29, 2011, 11:22:40 AM

Under Centos 5.5 when compiling pushpool 0.5 I get this errrors:

/root/pushpool05/pushpool-0.5/msg.c:562: undefined reference to `htole32'
server.o: In function `cli_send_hdronly':
/root/pushpool05/pushpool-0.5/server.c:328: undefined reference to `htole32'
server.o: In function `cjson_encode':
/root/pushpool05/pushpool-0.5/server.c:231: undefined reference to `htole32'
/root/pushpool05/pushpool-0.5/server.c:234: undefined reference to `htole32'
server.o: In function `cjson_decode':
/root/pushpool05/pushpool-0.5/server.c:167: undefined reference to `le32toh'
server.o: In function `cli_read_hdr':
/root/pushpool05/pushpool-0.5/server.c:468: undefined reference to `le32toh'
collect2: ld returned 1 exit status
make[1]: *** [pushpoold] Error 1

Can someone define htole32 and le32toh since they are not part of ansi C, and therefore fail to compile under Centos 5.5 using gcc 4.1.2

Thanks




Title: Re: pushpool - open source pool software
Post by: kjj on June 29, 2011, 11:34:45 AM
Under Centos 5.5 when compiling pushpool 0.5 I get this errrors:

/root/pushpool05/pushpool-0.5/msg.c:562: undefined reference to `htole32'
server.o: In function `cli_send_hdronly':
/root/pushpool05/pushpool-0.5/server.c:328: undefined reference to `htole32'
server.o: In function `cjson_encode':
/root/pushpool05/pushpool-0.5/server.c:231: undefined reference to `htole32'
/root/pushpool05/pushpool-0.5/server.c:234: undefined reference to `htole32'
server.o: In function `cjson_decode':
/root/pushpool05/pushpool-0.5/server.c:167: undefined reference to `le32toh'
server.o: In function `cli_read_hdr':
/root/pushpool05/pushpool-0.5/server.c:468: undefined reference to `le32toh'
collect2: ld returned 1 exit status
make[1]: *** [pushpoold] Error 1

Can someone define htole32 and le32toh since they are not part of ansi C, and therefore fail to compile under Centos 5.5 using gcc 4.1.2

The answer is way back on page 3 (http://forum.bitcoin.org/index.php?topic=8707.msg136199#msg136199).


Title: Re: pushpool - open source pool software
Post by: AndyRossy on July 03, 2011, 12:26:58 AM
Hey

trying to compile pushpoold on 64bit debian


kokade:~/bc/pushpool-0.5.1# make
make  all-am
make[1]: Entering directory `/root/bc/pushpool-0.5.1'
gcc  -O2 -Wall -g -I/usr/local/include -pthread -L/usr/local/lib -o pushpoold hist.o htab.o anet.o config.o msg.o server.o util.o db-sqlite.o db-mysql.o db-postgresql.o -lcurl -levent -lpthread -ljansson -lcrypto -lz -lmemcached -L/usr/lib -lpq
msg.o: In function `cli_op_work_get':
/root/bc/pushpool-0.5.1/msg.c:562: undefined reference to `htole32'
server.o: In function `cjson_decode':
/root/bc/pushpool-0.5.1/server.c:167: undefined reference to `le32toh'
server.o: In function `cli_send_hdronly':
/root/bc/pushpool-0.5.1/server.c:328: undefined reference to `htole32'
server.o: In function `cjson_encode':
/root/bc/pushpool-0.5.1/server.c:231: undefined reference to `htole32'
/root/bc/pushpool-0.5.1/server.c:234: undefined reference to `htole32'
server.o: In function `cli_read_hdr':
/root/bc/pushpool-0.5.1/server.c:468: undefined reference to `le32toh'
collect2: ld returned 1 exit status
make[1]: *** [pushpoold] Error 1
make[1]: Leaving directory `/root/bc/pushpool-0.5.1'
make: *** [all] Error 2
kokade:~/bc/pushpool-0.5.1#


Any ideas?  endian.h exists, is it to do with it being 64bit arch?


Title: Re: pushpool - open source pool software
Post by: dikidera on July 03, 2011, 02:53:57 AM
Hey

trying to compile pushpoold on 64bit debian


kokade:~/bc/pushpool-0.5.1# make
make  all-am
make[1]: Entering directory `/root/bc/pushpool-0.5.1'
gcc  -O2 -Wall -g -I/usr/local/include -pthread -L/usr/local/lib -o pushpoold hist.o htab.o anet.o config.o msg.o server.o util.o db-sqlite.o db-mysql.o db-postgresql.o -lcurl -levent -lpthread -ljansson -lcrypto -lz -lmemcached -L/usr/lib -lpq
msg.o: In function `cli_op_work_get':
/root/bc/pushpool-0.5.1/msg.c:562: undefined reference to `htole32'
server.o: In function `cjson_decode':
/root/bc/pushpool-0.5.1/server.c:167: undefined reference to `le32toh'
server.o: In function `cli_send_hdronly':
/root/bc/pushpool-0.5.1/server.c:328: undefined reference to `htole32'
server.o: In function `cjson_encode':
/root/bc/pushpool-0.5.1/server.c:231: undefined reference to `htole32'
/root/bc/pushpool-0.5.1/server.c:234: undefined reference to `htole32'
server.o: In function `cli_read_hdr':
/root/bc/pushpool-0.5.1/server.c:468: undefined reference to `le32toh'
collect2: ld returned 1 exit status
make[1]: *** [pushpoold] Error 1
make[1]: Leaving directory `/root/bc/pushpool-0.5.1'
make: *** [all] Error 2
kokade:~/bc/pushpool-0.5.1#


Any ideas?  endian.h exists, is it to do with it being 64bit arch?
You dont deserve any help if you failed to read the previous post.


Title: Re: pushpool - open source pool software
Post by: AndyRossy on July 03, 2011, 08:19:51 AM
oops, true this.  I thought it was to do with endian.h - which seems to exist and be included. Mucho apologies.

doing the fix mentioned earlier (some macro + another include) seems to have made it compile, but, not tested it out yet.

For reference, also on Lenny debian.

kokade:~/bc/pushpool-0.5.1# cat /proc/version
Linux version 2.6.26-2-amd64 (Debian 2.6.26-26lenny2) (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Tue Jan 25 05:59:43 UTC 2011




Title: Re: pushpool - open source pool software
Post by: zapnap on July 04, 2011, 03:56:20 PM
I patched pushpool awhile back so it would compile on OS X but I still seem to have some issues getting clients to talk to it. Is anyone else having any level of success on OS X or *BSD platforms with the endian fixes?


Title: Re: pushpool - open source pool software
Post by: AndyRossy on July 04, 2011, 04:07:22 PM
No, but the debian fixes should work fine on BSD. 


Title: Re: pushpool - open source pool software
Post by: zapnap on July 04, 2011, 07:49:56 PM
Actually it looks like the issues I'm seeing on OS X have nothing at all to do with the endianness. Content-length seems to be incorrect here for some reason. Investigating now. If anyone else is trying to run pushpool on OS X, please drop me a note. Would love to compare notes / sanity check.

Update: the problem had to do with strndup on OS X. Fixed and pushed to my fork at http://github.com/zapnap/pushpool. If someone else is using OS X I'd love to hear from you :).


Title: Re: pushpool - open source pool software
Post by: LehmanSister on July 07, 2011, 03:04:27 AM
Feature Request:

I'd like to be able to do have a status() call to go along with getwork() by default.

Currently, what I do is try to connect to the pool before launching a miner on it, authorize appropriately, then GET /, to see if i get a 400 code. I'd rather be able to get back a dict with information like:

"next_scheduled_downtime"
"switch_to_this_pool_server"
"load"
"administrator_note"

Ratelimiting status() would be fine as well, as saying "we're up, but we don't know you well enough to let you use status() yet".

I also don't want my bad requests to make the system think I'm attacking it.


Title: Re: pushpool - open source pool software
Post by: Xenland on July 07, 2011, 05:11:07 AM
Feature Request:

I'd like to be able to do have a status() call to go along with getwork() by default.

Currently, what I do is try to connect to the pool before launching a miner on it, authorize appropriately, then GET /, to see if i get a 400 code. I'd rather be able to get back a dict with information like:

"next_scheduled_downtime"
"switch_to_this_pool_server"
"load"
"administrator_note"

Ratelimiting status() would be fine as well, as saying "we're up, but we don't know you well enough to let you use status() yet".

I also don't want my bad requests to make the system think I'm attacking it.
1+

Great idea this would help alot of confusion with many users and debugging setups


Title: Re: pushpool - open source pool software
Post by: nexus on July 11, 2011, 01:55:05 PM
Would be cool if we got a windows build


Title: Re: pushpool - open source pool software
Post by: Inaba on July 17, 2011, 05:20:42 AM
Would be cool if we got a windows build

I can't imagine this ever working under windows; the tweaks you'd have to do would be ... incredibly time consuming.


Title: Re: pushpool - open source pool software
Post by: gigabytecoin on July 18, 2011, 05:49:24 PM
Does anybody see any potential problems with this upcoming namecoin/bitcoin merged mining addon? (http://forum.bitcoin.org/index.php?topic=29074.0;all)


Title: Re: pushpool - open source pool software
Post by: Furyan on July 19, 2011, 10:13:23 PM
Would be cool if we got a windows build

I can't imagine this ever working under windows; the tweaks you'd have to do would be ... incredibly time consuming.


Would make much more sense to build one natively for windows.

I will be doing that at some point. Someone else has already started but it isn't very far along.


Title: Re: pushpool - open source pool software
Post by: DavinciJ15 on August 04, 2011, 03:29:17 PM
I am not sure if I got blkmon running correctly on my pool at nmcbit.com
I would run it and it would connect and disconnect like this...

Code:
Connecting
connected
close
close

I looked at the source code and I looks like its looking to see if a new block is found and killing the pushpoold I jjust did not find where it starts it up again.  Anyhow I switch the port that was set in blkmond.conf file to the RPC port and it stayed connected but it's not doing anything.

My problem is pushpoold stops working a while after it finds a block.

Can anyone help?


Title: Re: pushpool - open source pool software
Post by: shads on August 05, 2011, 10:06:28 AM
Would be cool if we got a windows build

I can't imagine this ever working under windows; the tweaks you'd have to do would be ... incredibly time consuming.


Would make much more sense to build one natively for windows.

I will be doing that at some point. Someone else has already started but it isn't very far along.

PoolserverJ will run under windows as a service.


Title: Re: pushpool - open source pool software
Post by: Furyan on August 09, 2011, 09:26:31 PM
Would be cool if we got a windows build

I can't imagine this ever working under windows; the tweaks you'd have to do would be ... incredibly time consuming.


Would make much more sense to build one natively for windows.

I will be doing that at some point. Someone else has already started but it isn't very far along.

PoolserverJ will run under windows as a service.

Yep - I've posted in your PoolServerJ thread - I'm very very interested in this project.


Title: Re: pushpool - open source pool software
Post by: pantherqs on August 31, 2011, 08:05:23 AM
Howdy, trying to get pushpoold setup on CentOS, searched around but couldn't seem to find a solution for it short of switching OS'.  Anyone have any idea what could be wrong here?  sqlite-devel is installed, at least I think it is.

Error on make:

Code:
make  all-am
make[1]: Entering directory `/home/pushpool/pushpool-0.4.1'
gcc -DHAVE_CONFIG_H -I. -fno-strict-aliasing -pthread -I/usr/include/mysql  -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64     -g -O2 -MT db-sqlite.o -MD -MP -MF .deps/db-sqlite.Tpo -c -o db-sqlite.o db-sqlite.c
db-sqlite.c: In function 'sql_open':
db-sqlite.c:137: error: 'SQLITE_OPEN_READWRITE' undeclared (first use in this function)
db-sqlite.c:137: error: (Each undeclared identifier is reported only once
db-sqlite.c:137: error: for each function it appears in.)
make[1]: *** [db-sqlite.o] Error 1
make[1]: Leaving directory `/home/pushpool/pushpool-0.4.1'
make: *** [all] Error 2

Thanks!


Title: Re: pushpool - open source pool software
Post by: pantherqs on August 31, 2011, 08:35:46 PM
For those on centos, downloading sqlite, and doing  ./configure --prefix=/usr/local then make/make install got me one step to getting the thing running.

stuck on this now

http://pastebin.com/7D5JL3fY


Title: Re: pushpool - open source pool software
Post by: Keninishna on September 26, 2011, 06:34:06 AM
anyone having trouble compiling the newest source? Ive compiled pushpool before but im getting the following:
Code:
/server.c:742: undefined reference to `evbuffer_get_length'
/pushpool/server.c:744: undefined reference to `evbuffer_pullup'
collect2: ld returned 1 exit status
make[1]: *** [pushpoold] Error 1


Title: Re: pushpool - open source pool software
Post by: Furyan on September 26, 2011, 11:54:14 PM
anyone having trouble compiling the newest source? Ive compiled pushpool before but im getting the following:
Code:
/server.c:742: undefined reference to `evbuffer_get_length'
/pushpool/server.c:744: undefined reference to `evbuffer_pullup'
collect2: ld returned 1 exit status
make[1]: *** [pushpoold] Error 1

No problems compiling here... you may need to upgrade your libevent version and/or make sure you have the libevent-devel package installed.


Title: Re: pushpool - open source pool software
Post by: Keninishna on September 27, 2011, 12:35:38 AM
yeah I had to update libevent, from what I understand ./configure shuold of failed though.


Title: Re: pushpool - open source pool software
Post by: sareea on September 27, 2011, 07:57:45 PM
does it support the new bitcoin version ? 0.4 ?


Title: Re: pushpool - open source pool software
Post by: jgarzik on September 29, 2011, 10:26:22 PM
does it support the new bitcoin version ? 0.4 ?

Yes.  0.4 does not introduce any breaking changes for pushpool.



Title: Re: pushpool - open source pool software
Post by: mrx on October 13, 2011, 04:23:48 PM
Trying to fire up a pool on Ubuntu Server 10.04.3. Using libmysqld-dev. configure and make run fine, but I can't start pushpoold. There are no outputs.

How to get it running?


Title: Re: pushpool - open source pool software
Post by: lituar on November 08, 2011, 10:18:14 PM
Code:
gcc -DHAVE_CONFIG_H -I. -fno-strict-aliasing -pthread     -g -O2 -MT server.o -MD -MP -MF .deps/server.Tpo -c -o server.o server.c
server.c:106:2: erro: #error ("No valid database engines defined")
make[1]: ** [server.o] Error 1
make[1]: Saindo do diretório `/home/****/Pool'
make: ** [all] Erro 2

I follow all the steps. But keep returning this error. What can i do?


Title: Re: pushpool - open source pool software
Post by: jgarzik on November 09, 2011, 01:15:49 AM
Code:
gcc -DHAVE_CONFIG_H -I. -fno-strict-aliasing -pthread     -g -O2 -MT server.o -MD -MP -MF .deps/server.Tpo -c -o server.o server.c
server.c:106:2: erro: #error ("No valid database engines defined")
make[1]: ** [server.o] Error 1
make[1]: Saindo do diretório `/home/****/Pool'
make: ** [all] Erro 2

I follow all the steps. But keep returning this error. What can i do?

You need to install postgresql, mysql and/or sqlite development libraries.



Title: Re: pushpool - open source pool software
Post by: arruah on May 15, 2012, 05:47:23 AM
I have created a pool http://alvarez.sfek.kz based on pushpool. Everything works fine but for some reason a lot of prevhash-stale and duplicate stale errors. How can I fix these errors to have been less? The rate of the pool until 2 may be necessary to add memory or remove support for memcached?


Title: Re: pushpool - open source pool software
Post by: fireduck on July 13, 2012, 08:18:02 PM
Is there a way to configure the difficulty of the work units issued to miners?

My understanding (please correct me if wrong) that pretty much all mining pools (exception of p2pool) use a difficulty of 1 for work units.  I'm concerned with the ASICs coming down the line that will be too many work units and create trouble for mining pools and miners.

With my two BFL singles I see a work unit every few seconds.  With an ASIC 40GH/s single I would expect to see many per second which seems to be unnecessary network chatter and unnecessary DB work for the pool.


Title: Re: pushpool - open source pool software
Post by: jgarzik on July 13, 2012, 09:50:06 PM
Absolutely, the diff can be changed.  Just a couple constants, and an additional check.


Title: Re: pushpool - open source pool software
Post by: Lotus on September 19, 2012, 03:31:49 AM
What are the performance limits of PushPool?
In particular: How many concurrent workers can be connected concurrently? And how much bandwidth/disk space/ram is needed per worker?


Title: Re: pushpool - open source pool software
Post by: Inaba on September 19, 2012, 03:32:31 AM
It will not scale past a few hundred GH/s. 


Title: Re: pushpool - open source pool software
Post by: Lotus on September 19, 2012, 05:03:20 AM
Thanks.
I am not interested in hashing power (yet), but more in the number of workers that it can handle and how it can scale against with their increase. What would the bottleneck be? Software bounds, ram, etc... ?


Title: Re: pushpool - open source pool software
Post by: Inaba on September 19, 2012, 12:42:36 PM
Software bounds and back end share storage.


Title: Re: pushpool - open source pool software
Post by: Lotus on September 21, 2012, 04:17:35 AM
I see. So does it require increasingly more space as workers are added to the pool or is that mostly by the size of the blockchain computed so far?


Title: Re: pushpool - open source pool software
Post by: Inaba on September 21, 2012, 04:38:24 AM
Neither, it just simply can't scale and gets behind and eventually fails completely.


Title: Re: pushpool - open source pool software
Post by: jgarzik on September 21, 2012, 06:11:25 AM
Neither, it just simply can't scale and gets behind and eventually fails completely.

Do you have any more technical details?

Does this apply with the 0.7 bitcoind upstream, with vastly revamped RPC?



Title: Re: pushpool - open source pool software
Post by: Inaba on September 21, 2012, 07:23:50 PM
I've not tried on .7.  I had to move on to other software quite awhile ago when I could no loner get Pushpool to scale past about 400 GH/s, and even that was with multiple servers running. 

It's entirely possible the new .7 release would solve some of the problems, but the lack of threading for database access is a real problem for large scale operations.


Title: Re: pushpool - open source pool software
Post by: Lotus on September 23, 2012, 11:38:36 PM
Can any of the devs provide any technical insights on where these limits are coming from?

I've not tried on .7.  I had to move on to other software quite awhile ago when I could no loner get Pushpool to scale past about 400 GH/s, and even that was with multiple servers running. 
Which software did you find more reliable/scalable? P2Pool?


Title: Re: pushpool - open source pool software
Post by: jgarzik on September 24, 2012, 12:53:02 AM
Can any of the devs provide any technical insights on where these limits are coming from?

Inaba is correct about the database access needing multi-threading, or to be more technically correct, database access needs more than one database client connection running in parallel.

Ditto for downstream bitcoind access -- pushpool should probably contact a farm of bitcoind's, not just one.



Title: Re: pushpool - open source pool software
Post by: Inaba on September 24, 2012, 01:30:04 AM
Really, the only way around it is to do internal work generation, GBT or Stratum now a days.  The getwork protocol can not and will not scale to ASIC speeds, so it's kind of immaterial anyway. 

I use Eloipool now, which is written in Python3.  I would really like to have one written in C so I can work on it, I just haven't had much time to poke at Python. 



Title: Re: pushpool - open source pool software
Post by: Lotus on September 29, 2012, 07:08:55 AM
Interesting stuff. I have considered writing own pool, but experimenting with 50 BTCs per block doesn't sound very tempting. I guess a quick approach would be running multiple instances of pushpool in multiple virtual machines until a more reliable pool shows up.


Title: Re: pushpool - open source pool software
Post by: jgarzik on September 29, 2012, 07:42:17 AM
Interesting stuff. I have considered writing own pool, but experimenting with 50 BTCs per block doesn't sound very tempting. I guess a quick approach would be running multiple instances of pushpool in multiple virtual machines until a more reliable pool shows up.

You could experiment on testnet, or use testnet-in-a-box.



Title: Re: pushpool - open source pool software
Post by: Lotus on September 29, 2012, 05:59:53 PM
Good idea, I didn't know about testnet. That will come in handy, thanks.


Title: Re: pushpool - open source pool software
Post by: c4n10 on January 22, 2013, 08:11:26 PM
what are minimum and recommended server requirements (cpu, ram, monthly bandwidth, etc...) are necessary for running a successful pool...?


Title: Re: pushpool - open source pool software
Post by: QualitySeeds on February 01, 2013, 09:03:48 PM
what are minimum and recommended server requirements (cpu, ram, monthly bandwidth, etc...) are necessary for running a successful pool...?
Good quastion i do not know hope somebody can tell this do Ill believe the bandwidth should be pretty high


Title: Re: pushpool - open source pool software
Post by: Wolf0 on April 02, 2013, 07:09:19 AM
The test for libmemcached fails for me because it's not adding -lpthread for its test. I had to add LDFLAGS=-lpthread to get it to pass.


Title: Re: pushpool - open source pool software
Post by: gateway on May 01, 2013, 08:43:20 PM
does pushpool and bitcoind work on the same server?

Im getting this when trying to start pushpool

netcom@u12:/opt/pushpool$ sbin/pushpoold -E -F
[2013-05-01 21:46:3.812277] Listening on host :: port 8336
[2013-05-01 21:46:3.814084] Listening on host :: port 8337
[2013-05-01 21:46:3.814468] tcp bind: Address already in use

any updates, progress or other alternatives ? :P


Title: Re: pushpool - open source pool software
Post by: zvs on May 02, 2013, 05:05:50 PM
does pushpool and bitcoind work on the same server?

Im getting this when trying to start pushpool

netcom@u12:/opt/pushpool$ sbin/pushpoold -E -F
[2013-05-01 21:46:3.812277] Listening on host :: port 8336
[2013-05-01 21:46:3.814084] Listening on host :: port 8337
[2013-05-01 21:46:3.814468] tcp bind: Address already in use

any updates, progress or other alternatives ? :P

ah, netcom.   that was first commercial internet provider in DFW area outside of the crap hourly stuff like compuserve....    but back then in 1990 or so, you could still freeload off of 1/2 the universities anyway, or at least telnet out from their login interface (have some friend at a uni give you a shell acct or something).   there were a few exceptions,  like at the superconducting supercollider, you could log on directly to their VAX (sscvx1.ssc.gov) with a guest account

for the question

did you change your pushpool "requests to us" to the same port that bitcoin uses?  if so, you shouldnt have. 




Title: Re: pushpool - open source pool software
Post by: kevinmyers80 on May 03, 2013, 03:35:48 PM
does it support the version  0.4 ?


Title: Re: pushpool - open source pool software
Post by: gateway on May 03, 2013, 05:09:42 PM
does pushpool and bitcoind work on the same server?

Im getting this when trying to start pushpool

netcom@u12:/opt/pushpool$ sbin/pushpoold -E -F
[2013-05-01 21:46:3.812277] Listening on host :: port 8336
[2013-05-01 21:46:3.814084] Listening on host :: port 8337
[2013-05-01 21:46:3.814468] tcp bind: Address already in use

any updates, progress or other alternatives ? :P

ah, netcom.   that was first commercial internet provider in DFW area outside of the crap hourly stuff like compuserve....    but back then in 1990 or so, you could still freeload off of 1/2 the universities anyway, or at least telnet out from their login interface (have some friend at a uni give you a shell acct or something).   there were a few exceptions,  like at the superconducting supercollider, you could log on directly to their VAX (sscvx1.ssc.gov) with a guest account

for the question

did you change your pushpool "requests to us" to the same port that bitcoin uses?  if so, you shouldnt have. 




I remember netcom, I actually was living in Dallas at the time working in the video game industry.. but yea thats not what im using :)

I was able to figure it out because in the server.json their are two binding addresses for JSON-RPC.. if you leave them both in you get that issue, it wasnt really clear to me at first and nothing in the docs talk about it from what I could read :)



Title: Re: pushpool - open source pool software
Post by: Vikerus on May 16, 2013, 08:48:20 PM
I'm dedicated to figuring out how to run a secure pool, but before I jump in can anyone confirm that you can use different currencies with Pushpool?


For instance I'm wanting to set up a legit PPS Pool for GLDcoin, but not sure if I'll be wasting my time learning how to set up pushpool for this.


Title: Re: pushpool - open source pool software
Post by: mat5x on June 04, 2013, 06:59:39 AM
where do i report a bug in pushpool?

all 3 pools for ELC are having weird reporting bugs. shares are being paid out but reporting is off. no blocks since a difficulty retarget have been reported, and yet there are blocks being found according to elacoind debug log.

stats output:

Paid Shares [All submitted shares from previous rounds which are already accounted and paid for.]
Your Valid: 214843
Invalid: 137

Unpaid Shares [Total of all shares yet to be paid since the last confirmed block until now.]
Your Valid: 1281
Pool Valid: 20961

Current Round Shares [Total shares since last found block]
Pool Valid: -129270

Estimated Per Payout
0.05989123 ELC

Account Balance
2.4865372800000016 ELC

seems wrong. And this affects all 3 pools. The coin has a different retargetting interval to fix a botcher release sky high difficulty (like all altcoins yay!), but now we have this new issue.

ideas?


Title: Re: pushpool - open source pool software
Post by: jgarzik on June 04, 2013, 03:53:53 PM
where do i report a bug in pushpool?

Sounds like you are using a modified version of pushpool.  Report bugs to the developer who modified it.

Quote
all 3 pools for ELC are having weird reporting bugs. shares are being paid out but reporting is off. no blocks since a difficulty retarget have been reported, and yet there are blocks being found according to elacoind debug log.

That's an issue outside bitcoind / pushpool, in the pool software.



Title: Re: pushpool - open source pool software
Post by: rpgreseller on July 18, 2013, 07:23:01 AM
Hi Jeff,

I read the thread, and saw mention that pushpool doesn't work for pools beyond several hundred GH. This is related to open connections.
Stratum was mentioned as a solution. I believe that stratum is pretty much the only way people connect anymore.
One developer mentioned leaving Pushpool, but several highly respected pool owners have been quite active in this thread.
The last comments on original dev and Jine's fork are both at 8 months ago.

1. Is the limitation still there?
2. Is anyone still actively developing pushpool? If not, I'd love recommendations.


TL;DR: Is pushpool currently dead? If so, what do you recommend?


Title: Re: pushpool - open source pool software
Post by: wuzamarine on January 16, 2014, 08:38:37 PM
 I am trying to make a pool using https://bitcointalk.org/index.php?topic=10321.0 but when I fire up pushpoold I get an error that the port is already in use, which it is, by bitcoind. aren't they supposed to connect via rpc?


Title: Re: pushpool - open source pool software
Post by: jgarzik on January 17, 2014, 02:42:07 AM
pushpool cannot keep up with the bitcoin main network anymore, so it is not really being maintained.


Title: Re: pushpool - open source pool software
Post by: NginUS on September 24, 2015, 11:14:43 AM
First question: does this work with the new bitcoinxt?

Next question: how do I configure & run it?

I didn't see anyone post a working cfg file.

I want to use it with https://github.com/neofutur/simplecoin

Any help is appreciated.

Thanks.


Title: Re: pushpool - open source pool software
Post by: bitsolutions on September 24, 2015, 04:40:33 PM
First question: does this work with the new bitcoinxt?

Next question: how do I configure & run it?

I didn't see anyone post a working cfg file.

I want to use it with https://github.com/neofutur/simplecoin

Any help is appreciated.

Thanks.
Pushpool can't be used with bitcoin mining anymore since it doesn't support the stratum mining protocol. For a number of reasons bitcoinxt should not be run on a mining pool.