Skip to content

Commit e714132

Browse files
committed
i
i
1 parent dcc021a commit e714132

File tree

132 files changed

+77273
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+77273
-1
lines changed

LICENSE

+339
Large diffs are not rendered by default.

README.md

+723-1
Large diffs are not rendered by default.

config.json

+288
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,288 @@
1+
{
2+
"poolHost": "poolhost",
3+
4+
"coin": "4xBit",
5+
"symbol": "4xBit",
6+
"coinUnits": 100000000,
7+
"coinDecimalPlaces": 8,
8+
"coinDifficultyTarget": 75,
9+
"cnAlgorithm": "cryptonight",
10+
"cnVariant": 0,
11+
"cnBlobType": 2,
12+
13+
"logging": {
14+
"files": {
15+
"level": "info",
16+
"directory": "logs",
17+
"flushInterval": 5
18+
},
19+
"console": {
20+
"level": "info",
21+
"colors": true
22+
}
23+
},
24+
25+
"poolServer": {
26+
"enabled": true,
27+
"clusterForks": "auto",
28+
"poolAddress": "you-address",
29+
"intAddressPrefix": null,
30+
"blockRefreshInterval": 1000,
31+
"minerTimeout": 900,
32+
"sslCert": "./cert.pem",
33+
"sslKey": "./privkey.pem",
34+
"sslCA": "./chain.pem",
35+
"ports": [
36+
{
37+
"port": 3333,
38+
"difficulty": 1000,
39+
"desc": "CPU Rigs"
40+
},
41+
{
42+
"port": 5555,
43+
"difficulty": 50000,
44+
"desc": "GPU Rigs"
45+
},
46+
47+
{
48+
"port": 7777,
49+
"difficulty": 500000,
50+
"desc": "Multiple GPU Rigs over 50KH/s+ or use Fixed Diff"
51+
}
52+
],
53+
"varDiff": {
54+
"minDiff": 100,
55+
"maxDiff": 15000000,
56+
"targetTime": 60,
57+
"retargetTime": 30,
58+
"variancePercent": 30,
59+
"maxJump": 100
60+
},
61+
"paymentId": {
62+
"addressSeparator": "+"
63+
},
64+
"fixedDiff": {
65+
"enabled": true,
66+
"addressSeparator": "."
67+
},
68+
"shareTrust": {
69+
"enabled": true,
70+
"min": 10,
71+
"stepDown": 3,
72+
"threshold": 10,
73+
"penalty": 30
74+
},
75+
"banning": {
76+
"enabled": true,
77+
"time": 600,
78+
"invalidPercent": 25,
79+
"checkThreshold": 30
80+
},
81+
"slushMining": {
82+
"enabled": false,
83+
"weight": 300,
84+
"blockTime": 180,
85+
"lastBlockCheckRate": 1
86+
}
87+
},
88+
89+
"payments": {
90+
"enabled": true,
91+
"interval": 300,
92+
"maxAddresses": 40,
93+
"mixin": 0,
94+
"priority": 0,
95+
"transferFee": 10100000000,
96+
"dynamicTransferFee": false,
97+
"minerPayFee" : false,
98+
"minPayment": 100000000000,
99+
"maxTransactionAmount": 1000000000000000,
100+
"denomination": 100000000000
101+
},
102+
103+
"blockUnlocker": {
104+
"enabled": true,
105+
"interval": 30,
106+
"depth": 30,
107+
"poolFee": 0.5,
108+
"devDonation": 0.0,
109+
"networkFee": 0.0
110+
},
111+
112+
"api": {
113+
"enabled": true,
114+
"hashrateWindow": 600,
115+
"updateInterval": 5,
116+
"bindIp": "0.0.0.0",
117+
"port": 8117,
118+
"blocks": 30,
119+
"payments": 30,
120+
"password": "",
121+
"ssl": false,
122+
"sslPort": 8119,
123+
"sslCert": "./cert.pem",
124+
"sslKey": "./privkey.pem",
125+
"sslCA": "./chain.pem",
126+
"trustProxyIP": true
127+
},
128+
129+
"daemon": {
130+
"host": "127.0.0.1",
131+
"port": 41194
132+
},
133+
134+
"wallet": {
135+
"host": "127.0.0.1",
136+
"port": 82080
137+
},
138+
139+
"redis": {
140+
"host": "127.0.0.1",
141+
"port": 6379,
142+
"auth": null,
143+
"db": 0,
144+
"cleanupInterval": 15
145+
},
146+
147+
"notifications": {
148+
"emailTemplate": "email_templates/default.txt",
149+
"emailSubject": {
150+
"emailAdded": "Your email was registered",
151+
"workerConnected": "Worker %WORKER_NAME% connected",
152+
"workerTimeout": "Worker %WORKER_NAME% stopped hashing",
153+
"workerBanned": "Worker %WORKER_NAME% banned",
154+
"blockFound": "Block %HEIGHT% found !",
155+
"blockUnlocked": "Block %HEIGHT% unlocked !",
156+
"blockOrphaned": "Block %HEIGHT% orphaned !",
157+
"payment": "We sent you a payment !"
158+
},
159+
"emailMessage": {
160+
"emailAdded": "Your email has been registered to receive pool notifications.",
161+
"workerConnected": "Your worker %WORKER_NAME% for address %MINER% is now connected from ip %IP%.",
162+
"workerTimeout": "Your worker %WORKER_NAME% for address %MINER% has stopped submitting hashes on %LAST_HASH%.",
163+
"workerBanned": "Your worker %WORKER_NAME% for address %MINER% has been banned.",
164+
"blockFound": "Block found at height %HEIGHT% by miner %MINER% on %TIME%. Waiting maturity.",
165+
"blockUnlocked": "Block mined at height %HEIGHT% with %REWARD% and %EFFORT% effort on %TIME%.",
166+
"blockOrphaned": "Block orphaned at height %HEIGHT% :(",
167+
"payment": "A payment of %AMOUNT% has been sent to %ADDRESS% wallet."
168+
},
169+
"telegramMessage": {
170+
"workerConnected": "Your worker _%WORKER_NAME%_ for address _%MINER%_ is now connected from ip _%IP%_.",
171+
"workerTimeout": "Your worker _%WORKER_NAME%_ for address _%MINER%_ has stopped submitting hashes on _%LAST_HASH%_.",
172+
"workerBanned": "Your worker _%WORKER_NAME%_ for address _%MINER%_ has been banned.",
173+
"blockFound": "*Block found at height* _%HEIGHT%_ *by miner* _%MINER%_*! Waiting maturity.*",
174+
"blockUnlocked": "*Block mined at height* _%HEIGHT%_ *with* _%REWARD%_ *and* _%EFFORT%_ *effort on* _%TIME%_*.*",
175+
"blockOrphaned": "*Block orphaned at height* _%HEIGHT%_ *:(*",
176+
"payment": "A payment of _%AMOUNT%_ has been sent."
177+
}
178+
},
179+
180+
"email": {
181+
"enabled": false,
182+
"fromAddress": "[email protected]",
183+
"transport": "mailgun",
184+
"sendmail": {
185+
"path": "/usr/sbin/sendmail"
186+
},
187+
"smtp": {
188+
"host": "smtp.example.com",
189+
"port": 587,
190+
"secure": false,
191+
"auth": {
192+
"user": "username",
193+
"pass": "password"
194+
},
195+
"tls": {
196+
"rejectUnauthorized": false
197+
}
198+
},
199+
"mailgun": {
200+
"key": "key-fBLAH",
201+
"domain": "mg.vpnsolid.me"
202+
}
203+
},
204+
205+
"telegram": {
206+
"enabled": false,
207+
"botName": "AlloyCryptoBot",
208+
"token": "453871640:BLAH",
209+
"channel": "AlloyCryptonightMining",
210+
"channelStats": {
211+
"enabled": true,
212+
"interval": 30
213+
},
214+
"botCommands": {
215+
"stats": "/stats",
216+
"enable": "/enable",
217+
"disable": "/disable"
218+
}
219+
},
220+
221+
"monitoring": {
222+
"daemon": {
223+
"checkInterval": 60,
224+
"rpcMethod": "getblockcount"
225+
},
226+
"wallet": {
227+
"checkInterval": 60,
228+
"rpcMethod": "getbalance"
229+
}
230+
},
231+
232+
"prices": {
233+
"source": "tradeogre",
234+
"currency": "USD"
235+
},
236+
237+
"charts": {
238+
"pool": {
239+
"hashrate": {
240+
"enabled": true,
241+
"updateInterval": 60,
242+
"stepInterval": 1800,
243+
"maximumPeriod": 86400
244+
},
245+
"miners": {
246+
"enabled": true,
247+
"updateInterval": 60,
248+
"stepInterval": 1800,
249+
"maximumPeriod": 86400
250+
},
251+
"workers": {
252+
"enabled": true,
253+
"updateInterval": 60,
254+
"stepInterval": 1800,
255+
"maximumPeriod": 86400
256+
},
257+
"difficulty": {
258+
"enabled": true,
259+
"updateInterval": 1800,
260+
"stepInterval": 10800,
261+
"maximumPeriod": 604800
262+
},
263+
"price": {
264+
"enabled": true,
265+
"updateInterval": 1800,
266+
"stepInterval": 10800,
267+
"maximumPeriod": 604800
268+
},
269+
"profit": {
270+
"enabled": true,
271+
"updateInterval": 1800,
272+
"stepInterval": 10800,
273+
"maximumPeriod": 604800
274+
}
275+
},
276+
"user": {
277+
"hashrate": {
278+
"enabled": true,
279+
"updateInterval": 180,
280+
"stepInterval": 1800,
281+
"maximumPeriod": 86400
282+
},
283+
"payments": {
284+
"enabled": true
285+
}
286+
}
287+
}
288+
}

deployment/coin-daemon.service

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[Unit]
2+
Description=Coin Daemon
3+
After=network.target
4+
5+
[Service]
6+
Type=forking
7+
GuessMainPID=no
8+
Restart=always
9+
10+
# Change this line to set the location of your coin daemon
11+
ExecStart=/path/to/coin/coind --rpc-bind-ip 0.0.0.0 --confirm-external-bind --detach
12+
13+
# Change this line to the user that will run your coin daemon
14+
User=pool-user
15+
16+
[Install]
17+
WantedBy=multi-user.target

deployment/coin-wallet-rpc.service

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[Unit]
2+
Description=Wallet RPC Daemon
3+
After=network.target
4+
5+
[Service]
6+
Type=simple
7+
Restart=always
8+
9+
# Change this line to set the location of your coin wallet RPC daemon and set the RPC port you want to use
10+
ExecStart=/path/to/coin/wallet-rpc --rpc-bind-ip=127.0.0.1 --rpc-bind-port=5432 --wallet=/path/to/wallet --password=your.wallet.password!
11+
12+
# Change this line to the user that will run your wallet RPC daemon
13+
User=pool-user
14+
15+
[Install]
16+
WantedBy=multi-user.target
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[Unit]
2+
Description=Mining Pool Service
3+
After=network.target
4+
5+
[Service]
6+
Type=simple
7+
Restart=always
8+
SyslogIdentifier=cryptonote-nodejs-pool
9+
ExecStart=/usr/bin/node init.js
10+
11+
# Change to the location of cryptonote-node-js-pool
12+
WorkingDirectory=/path/to/your/cryptonote-nodejs-pool/pool
13+
14+
# Set user and group that will run the pool
15+
User=pool-user
16+
Group=pool-user
17+
18+
[Install]
19+
WantedBy=multi-user.target

deployment/logrotate

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/path/to/pool/logs/*.log {
2+
daily
3+
rotate 7
4+
missingok
5+
compress
6+
create
7+
}

deployment/nginx-ssl-example.conf

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# HTTP — redirect all traffic to HTTPS
2+
server {
3+
listen 80;
4+
listen [::]:80 ipv6only=on;
5+
server_name YOURDOMAIN;
6+
return 301 https://$host$request_uri;
7+
}
8+
9+
# HTTPS — proxy all requests to the pool app
10+
server {
11+
# Enable HTTP/2
12+
listen 443 ssl http2;
13+
listen [::]:443 ssl http2;
14+
server_name YOURDOMAIN;
15+
16+
# Use the Let’s Encrypt certificates
17+
ssl_certificate /etc/letsencrypt/live/YOURDOMAIN/fullchain.pem;
18+
ssl_certificate_key /etc/letsencrypt/live/YOURDOMAIN/privkey.pem;
19+
20+
include /etc/letsencrypt/options-ssl-nginx.conf;
21+
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
22+
23+
# Set files location
24+
root /path/to/pool/website/;
25+
index index.html;
26+
27+
location / {
28+
try_files $uri $uri/ =404;
29+
}
30+
31+
# Set API proxy
32+
location ~ ^/api/(.*) {
33+
proxy_pass http://127.0.0.1:8117/$1$is_args$args;
34+
proxy_set_header Host $http_host;
35+
proxy_set_header X-Real-IP $remote_addr;
36+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
37+
proxy_set_header X-Forwarded-Proto $scheme;
38+
}
39+
}

0 commit comments

Comments
 (0)