Bitcoin Forum
May 04, 2024, 09:01:27 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 4 5 6 7 8 9 10 11  All
  Print  
Author Topic: pushpool - open source pool software  (Read 120157 times)
xf2_org (OP)
Member
**
Offline Offline

Activity: 98
Merit: 13


View Profile
May 17, 2011, 09:02:10 PM
Last edit: June 27, 2011, 06:01:56 PM by xf2_org
Merited by ABCbits (1)
 #1

As people seem to have trouble finding it via its original thread, 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.
1714856487
Hero Member
*
Offline Offline

Posts: 1714856487

View Profile Personal Message (Offline)

Ignore
1714856487
Reply with quote  #2

1714856487
Report to moderator
1714856487
Hero Member
*
Offline Offline

Posts: 1714856487

View Profile Personal Message (Offline)

Ignore
1714856487
Reply with quote  #2

1714856487
Report to moderator
Even if you use Bitcoin through Tor, the way transactions are handled by the network makes anonymity difficult to achieve. Do not expect your transactions to be anonymous unless you really know what you're doing.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
dikidera
Full Member
***
Offline Offline

Activity: 126
Merit: 100


View Profile
May 17, 2011, 09:16:28 PM
 #2

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?
gkolt
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
May 17, 2011, 09:46:08 PM
 #3

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

Activity: 98
Merit: 13


View Profile
May 17, 2011, 10:07:11 PM
 #4

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.

xf2_org (OP)
Member
**
Offline Offline

Activity: 98
Merit: 13


View Profile
May 17, 2011, 10:07:38 PM
 #5

So, what bitcoin server is the best to be used with pushpool ?

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

dikidera
Full Member
***
Offline Offline

Activity: 126
Merit: 100


View Profile
May 17, 2011, 10:08:39 PM
 #6

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

Activity: 98
Merit: 13


View Profile
May 17, 2011, 10:14:58 PM
 #7

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.

dikidera
Full Member
***
Offline Offline

Activity: 126
Merit: 100


View Profile
May 17, 2011, 10:19:36 PM
 #8

Well, for an example.

What should be there instead of the question mark?

Quote
"SELECT password FROM pool_worker WHERE username = ?"
gkolt
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
May 17, 2011, 10:41:15 PM
 #9

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
ryepdx
Hero Member
*****
Offline Offline

Activity: 714
Merit: 500


View Profile
May 17, 2011, 10:56:58 PM
 #10

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.
gkolt
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
May 17, 2011, 11:00:25 PM
 #11

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 ?
xf2_org (OP)
Member
**
Offline Offline

Activity: 98
Merit: 13


View Profile
May 17, 2011, 11:51:17 PM
 #12

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.

xf2_org (OP)
Member
**
Offline Offline

Activity: 98
Merit: 13


View Profile
May 17, 2011, 11:52:45 PM
 #13

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.

gkolt
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
May 18, 2011, 12:35:41 AM
 #14

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.
martok
Full Member
***
Offline Offline

Activity: 140
Merit: 100


View Profile
May 18, 2011, 06:34:35 AM
 #15

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?
xf2_org (OP)
Member
**
Offline Offline

Activity: 98
Merit: 13


View Profile
May 18, 2011, 08:03:56 AM
 #16

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.

xf2_org (OP)
Member
**
Offline Offline

Activity: 98
Merit: 13


View Profile
May 18, 2011, 08:04:18 AM
 #17

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.

gigabytecoin
Sr. Member
****
Offline Offline

Activity: 280
Merit: 252


View Profile
May 18, 2011, 08:51:51 AM
 #18

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?

dikidera
Full Member
***
Offline Offline

Activity: 126
Merit: 100


View Profile
May 18, 2011, 09:30:02 AM
 #19

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

Activity: 98
Merit: 13


View Profile
May 18, 2011, 03:55:41 PM
 #20

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.
Pages: [1] 2 3 4 5 6 7 8 9 10 11  All
  Print  
 
Jump to:  

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