forked from zofuthan/eloipool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py.example
140 lines (109 loc) · 4.46 KB
/
config.py.example
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
### Settings relating to server identity
# Name of the server
ServerName = 'Private Eloipool'
### Settings relating to server scaling/load
# Share hashes must be below this to be valid shares
# If dynamic targetting is enabled, this is a minimum
ShareTarget = 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
# Automatically adjust targets per username
# 0 = disabled
# 1 = arbitrary targets
# 2 = power of two difficulties (zero bit counts)
DynamicTargetting = 0
# How many shares per minute to try to achieve on average
DynamicTargetGoal = 8
# Number of seconds hashrate is measured over
DynamicTargetWindow = 120
# Minimum and maximum of merkle roots to keep queued
WorkQueueSizeRegular = (0x100, 0x1000)
# Minimum and maximum of BLANK merkle roots to keep queued
# (used if we run out of populated ones)
WorkQueueSizeClear = (0x1000, 0x2000)
# Minimum and maximum of BLANK merkle roots to keep queued, one height up
# (used for longpolls)
WorkQueueSizeLongpoll = (0x1000, 0x2000)
# How long to wait between getmemorypool updates normally
MinimumTxnUpdateWait = 5
# How long to wait between retries if getmemorypool fails
TxnUpdateRetryWait = 1
# How long to sleep in idle loops (temporary!)
IdleSleepTime = 0.1
### Settings relating to reward generation
# Address to generate rewards to
TrackerAddr = 'mrsP7M31efGkQHXb7nRiWLDjfV2M8oakf2' # testnet
# Coinbaser command to control reward delegation
# NOTE: This example donates 1% of block rewards to Luke-Jr for Eloipool development
CoinbaserCmd = 'echo -e "1\\n$((%d / 100))\\n1579aXhdwvKZEMrAKoCZhzGuqMa8EonuXU"'
### Settings relating to upstream data providers
# JSON-RPC server for getmemorypool
UpstreamURI = 'http://user:pass@localhost:18332'
# Bitcoin p2p server for announcing blocks found
UpstreamBitcoindNode = ('127.0.0.1', 18333) # testnet
# Network ID for the primary blockchain
UpstreamNetworkId = b'\xFA\xBF\xB5\xDA' # testnet
# Secret username allowed to use setworkaux
#SecretUser = ""
# URI to send gotwork with info for every share submission
#GotWorkURI = ''
# Share hashes must be below this to be submitted to gotwork
GotWorkTarget = 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
# Aim to produce blocks with transaction counts that are a power of two
# This helps avoid any chance of someone abusing CVE-2012-2459 with them
# 1 = cut out feeless transactions; 2 = cut out even fee-included transactions (if possible)
POT = 2
# Avoid mining feeless transactions except to satisfy POT
# Note this only works if POT is in fact enabled in the first place
Greedy = False
### Settings relating to network services
# Addresses to listen on for JSON-RPC getwork server
# Note that Eloipool only supports IPv6 sockets, and if you want to bind to an
# IPv4 address you will need to prepend it with ::ffff: eg ::ffff:192.168.1.2
JSONRPCAddresses = (
('', 8337),
)
# Addresses to listen on for Bitcoin node
# Note that Eloipool only supports IPv6 sockets, and if you want to bind to an
# IPv4 address you will need to prepend it with ::ffff: eg ::ffff:192.168.1.2
BitcoinNodeAddresses = (
('', 8338),
)
# Addresses that are allowed to "spoof" from address with the X-Forwarded-For header
TrustedForwarders = ('::ffff:127.0.0.1',)
# Logging of shares:
ShareLogging = (
{
'type': 'logfile',
'filename': 'share-logfile',
'format': "{time} {Q(remoteHost)} {username} {YN(not(rejectReason))} {dash(YN(upstreamResult))} {dash(rejectReason)} {solution}\n",
},
{
'type': 'sql',
'engine': 'postgres',
'dbopts': {
'host': 'localhost',
'database': 'pooldb',
'user': 'eloipool',
'password': 'somethingsecret',
},
'statement': "insert into shares (rem_host, username, our_result, upstream_result, reason, solution) values ({Q(remoteHost)}, {username}, {YN(not(rejectReason))}, {YN(upstreamResult)}, {rejectReason}, decode({solution}, 'hex'))",
},
{
'type': 'sql',
'engine': 'mysql',
'dbopts': {
'host': 'localhost',
'db': 'pooldb',
'user': 'eloipool',
'password': 'somethingsecret',
},
'statement': "insert into shares (rem_host, username, our_result, upstream_result, reason, solution) values ({Q(remoteHost)}, {username}, {YN(not(rejectReason))}, {YN(upstreamResult)}, {rejectReason}, unhex({solution}))",
},
{
'type': 'sql',
'engine': 'sqlite',
'dbopts': {
'database': 'share.db',
},
'statement': "insert into shares (remoteHost, username, rejectReason, upstreamResult, solution) values ({remoteHost}, {username}, {rejectReason}, {upstreamResult}, {solution})",
},
)