This repository has been archived by the owner on Jun 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 71
/
config.example.yml
609 lines (486 loc) · 18.1 KB
/
config.example.yml
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
# -----------------------------------------
# PowerPool configuration file
# -----------------------------------------
# Each item in the list is a discreet component in powerpool that will get
# created Type specifies the fully qualified python path to the module. A basic
# powerpool server will contain one of each of the following:
#
# * PowerPool: handles starting/stopping + configuring everything
# * Jobmanager: creates jobs to be sent to miners and submits solved blocks
# * StratumServer: Accepts stratum connections and sends jobs to users, accepts
# shares, etc
# * Reporter: records submitted shares and solved blocks
# * Manager: Manages logging, starting and stopping the server, and stats
# collection
#
# Optional modules:
# * ServerMonitor: Exposes and HTTP port to view system health and connected
# worker information
#
---
######################################
# Core PowerPool
######################################
####### Core PowerPool Overview #######
#PP:
#type: powerpool.main.PowerPool
# The name of the powerpool process on the system. Useful for quickly
# identifying pid with grep and ps
#procname: powerpool
# Grace period before outright terminating the process after termination is
# requested
#term_timeout: 10
# server side size extranonce size. synonymous with worker id internally, used
# to give a unique extranonce to each connection
#extranonce_serv_size: 4
# size that clients will generate in bytes
#extranonce_size: 4
# The log level default for all submodules. Can be overridden in any
# specific Component's logger with log_level attribute
#default_component_log_level: INFO
# Configures standard python loggers. type must be a logging handler provided
# by python std lib
#loggers:
# - type: 'StreamHandler'
# level: 'NOTSET'
# A list of modules and hashing algorithms that you'd like to attempt to
# load on startup.
#algorithms:
#x11:
#module: drk_hash.getPoWHash
#hashes_per_share: 4294967296
#scrypt:
#module: ltc_scrypt.getPoWHash
#hashes_per_share: 65536
#scryptn:
#module: vtc_scrypt.getPoWHash
#hashes_per_share: 65536
#sha256:
#module: cryptokit.sha256d
#hashes_per_share: 4294967296
#blake256:
#module: blake_hash.getPoWHash
#hashes_per_share: 65536
# This is actually an offset number - If it's set it'll offset each stratum,
# monitor, and PPAgent port by this amount. Basically - its handy for
# quickly setting up multiple PowerPool instances (its pretty confusing atm)
# Leave it out if you're configuring each port by hand
#server_number: 0
# This will push out events to something like StatSite for easy analysis
#events:
# enabled: False
# port: 8125
# host: "127.0.0.1"
# This is required to be set to True to catch UDP pushblock notifications
#datagram:
# enabled: False
# port: 6855
# host: "127.0.0.1"
####### Core PowerPool example #######
# This is a basic setup for the core PowerPool process.
PP:
type: powerpool.main.PowerPool
######################################
# Reporters
######################################
# These do the grunt work on how shares are submitted + to where.
#### Reporter Overview####
#redis_overview:
# type: powerpool.reporters.RedisReporter
# A list of users/workers to report pool shares
#pool_report_configs:
# - worker_format_string: "{chain}"
# user: "pool"
# - worker_format_string: "{currency}"
# user: "pool_currency"
# report_merge: True
# Can be provided to format the worker string for the pool_report_configs
#attrs:
#chain: "[LTC, VTC, DRK, etc]"
# Used directly to configured redis-py redis instance. Read redis py docs
# for more information
#redis:
# port: 6380
# Shares can be submitted to redis on independent share "chains" to allow
# cooperatively solving blocks between many payout types. Should be different
# for each different payout type...
#chain: 1
#### Example Scrypt Redis Reporter ####
redis_scrypt:
type: powerpool.reporters.RedisReporter
pool_report_configs:
- worker_format_string: "{chain}"
user: "pool"
- worker_format_string: "{currency}"
user: "pool_currency"
report_merge: True
attrs:
chain: "LTC"
redis:
port: 6379
chain: 1
#### Example X11 Reporter ####
#redis_x11:
# type: powerpool.reporters.RedisReporter
# pool_report_configs:
# - worker_format_string: "{chain}"
# user: "pool"
# - worker_format_string: "{currency}"
# user: "pool_currency"
# report_merge: False
# attrs:
# chain: "DRK"
# redis:
# port: 6379
# chain: 2
#### Example Scrypt-N Reporter ####
#redis_scrypt:
# type: powerpool.reporters.RedisReporter
# pool_report_configs:
# - worker_format_string: "{chain}"
# user: "pool"
# - worker_format_string: "{currency}"
# user: "pool_currency"
# report_merge: True
# attrs:
# chain: "VTC"
# redis:
# port: 6379
# chain: 3
################################################
# Job managers
################################################
#### Job managers Overview ####
# Key here is used to identify this jobmanager elsewhere
#LTC:
# A mainchain coin uses the 'MonitorNetwork' built-in
#type: powerpool.jobmanagers.MonitorNetwork
# Algo should be one that is enabled in the PP module above
#algo: REQUIRED. STR algo "scrypt", "x11", etc..
# Currency code of the network being managed here
#currency: REQUIRED. STR currency code "VTC", "LTC", etc
# This is the address which any solved blocks will go to
#pool_address: ''
# This is a list of connection information which configures PowerPool to
# use the coin daemons via the RPC Port. It uses the RPC to get block
# templates from and submit complete blocks to.
#coinservs: REQUIRED. Expects []
# - port: 20001
# address: 127.0.0.1
# username: admin1
# password: 123
# #Higher priority is primary
# poll_priority: 200
#### Optional configs ####
# If you have push block notifications setup you should disable polling.
# Read about setting up UDP push block notifications in the docs
#poll: None
# You can setup PowerPool to catch + use system signals as a push block
# notification. This is undocumented, but follows the same idea as UDP
#signal: None. Expects INT
# This is a tuple of coins to merge mine with this currency. Make sure each
# one of these is configured!
#merged: ()
# Should the proof of work algorithm be used to produce the block hash, or
# sha256. Most coins use sha256, but X11 coins and some others use the POW algo
#pow_block_hash: False
# the definition of a target of difficulty 1. 4 zeroes for scrypt, 8 for
# sha...
#diff1: 0x0000FFFF0000000000000000000000000000000000000000000000000000
# The number of hashes a single diff1 share takes on average to compute
# 0xFFFFFFFF for sha256 and dark diff, 0xFFFF for scrypt. Used for showing
# hashrate
#hashes_per_share: 0xFFFFFFFF
# time between checking live rpc for new blocks... lower means less orphan
# blocks... Unused if using push block signals/UDP datagrams
#block_poll: 0.2
# block polls between generating a new job for workers (running gbt, etc)
#job_refresh: 15
# Time between pinging rpc_servers that are down
#rpc_ping_int: 2
# Pay out Darkcoin masternodes if True. If False it check GBT response to
# see if enforcement is turned on. If it is not, MN are not paid out,
# otherwise they are. !Blocks may be rejected if False!
#payout_drk_mn: True
# Now we'll look at a merge mining job manager
#DOGE:
# Merge mined coins use the 'MonitorAuxNetwork' module.
#type: powerpool.jobmanagers.MonitorAuxNetwork
# How often to check the RPC for new Aux jobs (add in network transactions)
#work_interval: 1
# By default when new work for a merge mined coin is pushed out to miners it
# will not tell them to flush their old work. This causes less stale shares
# on the main chain. But causes more stale AuxBlocks (some poorly
# designed miners won't update their work if it isn't a flushing update)
# This may be worth setting to True for high value, or slower AuxChains
#flush: False
# Sends GBT result to the reporter
#send: True
# Algo should be one that is enabled in the PP module above
#algo: REQUIRED. STR algo "scrypt", "x11", etc..
# Currency code of the network being managed here
#currency: REQUIRED. STR currency code "DOGE", "SYS", etc
# This is a list of connection information which configures PowerPool to
# use the coin daemons via the RPC Port. It uses the RPC to get block
# templates from and submit complete blocks to.
#coinservs: REQUIRED. Expects []
# - port: 20001
# address: 127.0.0.1
# username: admin1
# password: 123
# #Higher priority is primary
# poll_priority: 200
# You can setup PowerPool to catch + use system signals as a push block
# notification. This is undocumented, but follows the same idea as UDP
#signal: None. Expects INT
# Time between pinging rpc_servers that are down
#rpc_ping_int: 2
# Now we'll look at a profit switching job manager. The switching job manager
# is a layer on top of the other jobmanagers. It expects to find a key in redis
# for each currency which represents a profit 'score' for that currency. A
# naive score can be something like the current price of that currency.
# The switcher will compare the scores & factor in each coin's difficulty &
# block reward to determine which coin to currently mine. The code actually
# recalculates after every new block, which allows for high speed switching
# redis key format: SET [currency_code]_profit "1.0"
#SWITCH:
# Use the correct jobmanger module
#type: powerpool.jobmanagers.switching_jobmanager.MonitorNetworkMulti
# Algo should be one that is enabled in the PP module above
#algo: REQUIRED. STR algo "scrypt", "x11", etc..
# How often to poll redis for a profit score
#profit_poll_int: 15
# Push new work to miners if profit difference is greater than this
# multiplier - otherwise update at next job flush
#margin_switch: 1.25
# A list of jobmanagers to switch between
#jobmanagers: REQUIRED. Expects []
##### Example main chain jobmanager ####
# A typical setup for a main chain coin. They use the
# jobmanagers.MonitorNetwork module.
LTC:
type: powerpool.jobmanagers.MonitorNetwork
algo: scrypt
currency: LTC
pool_address: LYExXWEPs5oWjScR1fYzwSuo8DcQWNcHpF
coinservs:
- port: 20001
address: 127.0.0.1
username: admin1
password: 123
poll_priority: 200
- port: 20002
address: 127.0.0.1
username: admin1
password: 123
poll_priority: 100
merged:
- DOGE
- SYS
# Here is a simple example for how you might do a X11 main chain coin
DRK:
type: powerpool.jobmanagers.MonitorNetwork
algo: x11
currency: DRK
pool_address: XbmTRsE7sDNfQMuEe7X59hGs31yLA8ETxz
pow_block_hash: True
diff1: 0x00000000FFFF0000000000000000000000000000000000000000000000000000
coinservs:
- port: 40003
address: 127.0.0.1
username: un
password: pw
poll_priority: 100
# Here is a simple example for how you might do a Scrypt-N main chain coin
VTC:
type: powerpool.jobmanagers.MonitorNetwork
algo: lyra2re
currency: VTC
pool_address: Vp2nkmREFef7RPKZ5yxHZgfsXNnUxiA5sn
diff1: 0x0000007FFFFF0000000000000000000000000000000000000000000000000000
coinservs:
- port: 40005
address: 127.0.0.1
username: un
password: pw
##### Example aux chain jobmanager ####
# A typical setup for a merge mined coin. They use the
# jobmanagers.MonitorAuxNetwork module. If you have multiple merge mined coins
# you'll need to setup one of these blocks for each coin
DOGE:
type: powerpool.jobmanagers.MonitorAuxNetwork
work_interval: 10
flush: True
algo: scrypt
currency: DOGE
coinservs:
- port: 19001
address: 127.0.0.1
username: admin1
password: 123
poll_priority: 100
#### Example profit switching jobmanager ####
# A typical setup for a profit switching manager. Make sure you are setting
# a redis key for each currency
SWITCH:
type: powerpool.jobmanagers.switching_jobmanager.MonitorNetworkMulti
algo: scrypt
jobmanagers:
- LTC
- MEC
- WDC
log_level: DEBUG
################################################
# Stratum servers
################################################
# This module configures how the Stratum Server will behave
#### Stratum server Overview ####
# Note: The key used for the stratum is important to the SCM frontend. It is
# used as a part of the URL for the 'monitor_address'. So if your stratum key
# is like the one below your SCM endpoint will need to be something like
# 'http://localhost:3855/scrypt_STRAT'
#scrypt_STRAT:
#type: powerpool.stratum_server.StratumServer
# Tell stratum which algo its using
#algo: REQUIRED. STR algo "scrypt", "x11", etc..
# Tell the server which jobmanager to use
# Note that this is using the 'LTC' job manager which we defined earlier
#jobmanager: None. Expects STR jobmanager key "LTC", "DRK", etc..
# Tell the server which reporter to send share data to
# Note that this is using the reporter 'redis_scrypt' which we defined earlier
#reporter: None. Expects STR reporter key such as "redis_scrypt"
########### Connection/User Auth settings ##############
# Stratum IP address
#address: 0.0.0.0
# What port to run on
#port: 3333
# A list of valid address versions for this stratum port. Use for user Auth
#valid_address_versions: []
# How often to push jobs if a client hasn't submitted a share
# used to make sure clients connections stay active (keepalive)
#push_job_interval: 30
# How long between share submissions before considerand a worker idle (in seconds)
#idle_worker_threshold: 300
# How long before disconnecting idle workers (in seconds)
#idle_worker_disconnect_threshold: 3600
# Alias specific worker names to an address
#aliases: {}
# Donation alias
#donate_key: "donate"
############# Difficulty settings ##################
# The difficulty to start people out when they connect. Will be the
# fixed difficulty if vardiff is disabled
#start_difficulty: 128
# Configuration that each vardiff enabled interface will use
#vardiff:
# whether our this port will be vardiff enabled
#enabled: False
# the overal shares per minute we're targeting
#spm_target: 20
# time between checks triggered from share submission in seconds
#interval: 30
# the available difficulty tiers. Will adjust to one of these
#tiers:
# - 8
# - 16
# - 32
# - 64
# - 96
# - 128
# - 192
# - 256
# - 512
# Minimum difficulty settable by users. Vardiff will still adjust lower if
# appropriate
#minimum_manual_diff: 64
################# PPAgent settings #################
# PPAgent config
# agent:
# enabled: False
# The port offset.
# port_diff: 1111
# Connection timeout (in seconds)
# timeout: 120
# Data types to accept
# accepted_types:
# - 'temp'
# - 'status'
# - 'hashrate'
# - 'thresholds'
###### Fixed difficulty Scrypt port example ######
scrypt_STRAT_fixed:
type: powerpool.stratum_server.StratumServer
algo: scrypt
jobmanager: LTC
reporter: redis_scrypt
start_difficulty: 4096
port: 3333
####### VARDIFF Scrypt port example #######
scrypt_STRAT:
type: powerpool.stratum_server.StratumServer
algo: scrypt
jobmanager: LTC
reporter: redis_scrypt
start_difficulty: 64
port: 3334
vardiff:
# whether our this port will be vardiff enabled
enabled: True
# the overal shares per minute we're targeting
spm_target: 30
# time between checks triggered from share submission in seconds
interval: 10
# the available difficulty tiers. Will adjust to one of these
tiers:
- 8
- 16
- 32
- 64
- 96
- 128
- 192
- 256
- 512
- 1024
- 2048
- 4096
- 8192
####### Auto switching port example #######
Profit_STRAT:
type: powerpool.stratum_server.StratumServer
algo: scrypt
jobmanager: SWITCH
reporter: redis_ps_scrypt
port: 3433
# As you can see we used a different reporter for the PS port, because it is on
# a different payout chain. We'll need to create that reporter
redis_ps_scrypt:
type: powerpool.reporters.RedisReporter
pool_report_configs:
- worker_format_string: "{chain}"
user: "pool"
- worker_format_string: "{currency}"
user: "pool_currency"
report_merge: True
attrs:
chain: "PS Scrypt"
redis:
port: 6379
chain: 2
################################################
# Monitor network
################################################
# Which ServerMonitor module to use for the Stratum introspection endpoints
####### Monitor Overview #######
#MON:
#address: "127.0.0.1"
# Default port. This gets ofset
#port: 3855
# Whether or not to sort + pretty print the JSON output.
#JSON_SORT_KEYS: False
#JSONIFY_PRETTYPRINT_REGULAR: False
# Use DEBUG output
#DEBUG: False
####### Monitor config example #######
MON:
type: powerpool.monitor.ServerMonitor