forked from jgarzik/pushpool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample-cfg.json
122 lines (87 loc) · 3.13 KB
/
example-cfg.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
{
# 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 (time,rem_host, username, our_result, upstream_result, reason, solution) VALUES (UNIX_TIMESTAMP(NOW()),?, ?, ?, ?, ?, ?)"
# ... or ...
"engine" : "postgresql",
"host" : "db.example.com",
"port" : 5432,
"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 = $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" : "myusername",
"rpc.pass" : "mypassword",
# rewrite returned 'target' to difficulty-1?
"rpc.target.rewrite" : true
}