Here are some instructions for creating one’s own private pushpool for any of the scrypt coins (the examples will be for feather coin)
Pushpool and pool software in general, is really designed around Linux and as such the instructions are for Linux,
1. Download (Git clone) Art Forz branch of Pushpool.
https://github.com/ArtForz/pushpool2. Run the “autogen.sh” and then run “./configure”. Take note of the dependencies it finds missing and install those dependencies. Continue to run configure until all Dependencies are met.
From the ReadME:
Dependencies:
libmysql++-dev
libevent
libmemcached
pthreads
zlib
jansson
OpenSSL's libcrypto
libcurl
(The postgressql C libraries, I do not remember the name off hand)
3. Run the make command. The pushpoold executable should now be available.
4. Set up a database. You can download a SQL template from:
https://github.com/simplecoin/simplecoin/tree/master/sqlUsing mysql :
mysql -u root -p
create database pool (or whatever you want to name it);
When successful , quit mysql
To import the database : mysql -u root -p pool < simplecoin-v5.sql
Enter password again and if you receive no error you should be ok.
Restart mysql prompt (mysql -u root –p)
Use pool; (or whatever you named the database)
INSERT INTO pool_worker (username ,password) VALUES(<”any username you want”>,<”whatever password you want”>);
Note your username and password in the values section needs to be in quotes.
Example: INSERT INTO pool_worker (username ,password) VALUES("iamuser", ”iampassword”);
For more information on using the mysql command line visit:
http://www.pantz.org/software/mysql/mysqlcommands.htmlYou should get an ok, then exit mysql
Create your server.json file:
Example:
{
# 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" : 8339, "protocol" : "http-json",
"proxy" : "xxx.xxx.xxx.xxx" },
# binary protocol, localhost-only port 8338
{ "host" : "127.0.0.1", "port" : 8338, "protocol" : "binary" }
],
# database settings
"database" : {
"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" : "pool",
"username" : "root",
"password" : “
",
"stmt.pwdb" :
"SELECT password FROM pool_worker WHERE username = ?",
"stmt.sharelog":"INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution) VALUES (?, ?, ?, ?, ?, ?)"
},
# 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:yyyy/",
"rpc.user" : "",
"rpc.pass" : "",
# rewrite returned 'target' to given number of zero bits, 32 equals difficulty-1
#"rpc.target.bits" : 32,
# how long before work expires?
"work.expire" : 120,
# allow clients to update the ntime field of their work
"roll.ntime.disable" : false
}
Some notes: Although I used the mysql root account to access the database, it can be a security risk if you network is exposed to the public (not such a large deal for a home network). One can set a user account and give it permission to access the pool database if desired.
xxx.xxx.xxx.xxx = what the IP address of the computer (server) you are running the pool .
yyyy = The rpc port the coin daemon is listening to (either you set (which I normally do) or the default)
I also comment out the Difficulty statement as there is no need to difficulty change on a solo pool since you are not paying out shares. This means the pool difficulty will equal the real difficulty.
I have also removed the share logs statement as there is no need to keep logs in a solo pool.
Next we are going to set-up a little script for tripping long polls:
I name mine blocknotify.sh:
#!/usr/bin/env python
import sys
import os
os.system("killall -s SIGUSR1 pushpoold")
Place it in your pushpool directory, and chmod +x blocknotify.sh to make it executable.
Also place a copy of your coin daemon in your Pushpool directory, and when it comes time to start it, start it from there. This saves some hassle.
In your coins.conf file (feathercoin.conf) add the line:
blocknotify=" /blocknotify.sh"
Example: blocknotify="/home/robert/pushpool/blocknotify.sh"
Ok, you should be all set up.
1. Start your daemon (if using the command line version you will see a bunch of “cannot fins pushpoold.pid” type errors ,ignore them as you do not have Pushpool running yet.
The daemon is tripping the blocknotify script as it catches up and the script cannot find the Pushpool PID. This is harmless.
2. Start Pushpool:
./pushpoold –E –F --debug=2
The switches are optional, but I highly recommend them.
3. You should see something like:
2013-04-17 19:41:5.676817] Debug output enabled
[2013-04-17 19:41:5.681610] Listening on host :: port 8336
[2013-04-17 19:41:5.681763] Listening on host :: port 8337
[2013-04-17 19:41:5.681842] Listening on host :: port 8339
[2013-04-17 19:41:5.681901] Listening on host 127.0.0.1 port 8338
[2013-04-17 19:41:5.686288] initialized
4 . Point your miners to the server @ port 8339 and you should be mining away using long poll.
The reason going through this to use long poll, is that long poll will switch your miners almost instantly when a new block is on the network.
With getwork, what you are using when connecting your miners to the daemon, your mining software checks for new blocks at certain intervals.
If a new block comes on the network just after your miner does a getwork, your miner will be working on a stale block until it checks again.
I know there will be many questions, but a review of this thread first, can help answer many of them:
https://bitcointalksearch.org/topic/pushpool-tech-support-10321