1 # Please note that config files are Python source code!
2 # A common mistake is to put an option list (such as TemplateChecks,
3 # JSONRPCAddresses, etc) excluding the final comma.
4 # For example (this is WRONG):
6 # ('', 8337) # <-- there must be a comma after EVERY item, even last
8 # Without the final comma, should the option list ever have only one item in
9 # it, Python would interpret the "main" parenthesis as a mere sub-expression
10 # instead of a list of values. If that occurs, you might get crazy errors, or
11 # things might just not work correctly. Be careful to not miss the commas.
13 ### Settings relating to server identity
16 ServerName = 'Private Eloipool'
18 ### Settings relating to server scaling/load
20 # Share hashes must be below this to be valid shares
21 # If dynamic targetting is enabled, this is a minimum
22 ShareTarget = 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
24 # Automatically adjust targets per username
26 # 1 = arbitrary targets
27 # 2 = power of two difficulties (zero bit counts)
30 # How many shares per minute to try to achieve on average
33 # Number of seconds hashrate is measured over
34 DynamicTargetWindow = 120
36 # Minimum and maximum of merkle roots to keep queued
37 WorkQueueSizeRegular = (0x100, 0x1000)
39 # Minimum and maximum of BLANK merkle roots to keep queued
40 # (used if we run out of populated ones)
41 WorkQueueSizeClear = (0x1000, 0x2000)
43 # Minimum and maximum of BLANK merkle roots to keep queued, one height up
44 # (used for longpolls)
45 WorkQueueSizeLongpoll = (0x1000, 0x2000)
47 # How long to wait between getmemorypool updates normally
48 MinimumTxnUpdateWait = 5
50 # How long to wait between retries if getmemorypool fails
51 TxnUpdateRetryWait = 1
53 # How long to sleep in idle loops (temporary!)
56 ### Settings relating to reward generation
58 # Address to generate rewards to
59 TrackerAddr = 'mrsP7M31efGkQHXb7nRiWLDjfV2M8oakf2' # testnet
61 # Coinbaser command to control reward delegation
62 # NOTE: This example donates 1% of block rewards to Luke-Jr for Eloipool development
63 CoinbaserCmd = 'echo -e "1\\n$((%d / 100))\\n1579aXhdwvKZEMrAKoCZhzGuqMa8EonuXU"'
65 ### Settings relating to upstream data providers
67 # JSON-RPC servers to get block templates from
68 # See https://en.bitcoin.it/wiki/BIP_0023#Logical_Services for key details
72 'uri': 'http://user:pass@localhost:8332',
78 'uri': 'http://user:pass@localhost:18332',
84 # JSON-RPC servers to check block proposals with
85 # If none provided, and selected source supports proposals, it alone will also
86 # be used for checking
87 # NOTE: Any servers listed here MUST support BIP 23 Block Proposals
88 # NOTE: Mainline bitcoind (as of 0.8) does NOT support this (though the 0.8.0.eligius branch does)
92 'uri': 'http://user:pass@localhost:8332',
94 # If 'unanimous' is true, no template will be used if this node
98 # If check servers disagree on all templates, they will be scored and
99 # the highest score will be used; 'weight' can be used to control the
105 'uri': 'http://user:pass@localhost:18332',
111 # JSON-RPC servers to submit found blocks to (when they meet the full target)
112 # The specific TemplateSource that the block was based on will always be sent
114 # If setting is not specified, or None, full TemplateSources list will be used.
115 # If an empty list, no extra submissions will be attempted.
116 # If an empty list, and the block was found on a "clear" merkle root (not based
117 # on any TemplateSource), the full TemplateSources list will be used.
121 'uri': 'http://user:pass@localhost:8332',
125 'uri': 'http://user:pass@localhost:18332',
129 # Templates will not be used unless they have an acceptance ratio above this
131 MinimumTemplateAcceptanceRatio = 0
133 # No template with a combined total score below this will be used
134 MinimumTemplateScore = 1
136 # Set to True if you want shares meeting the upstream target to wait for a
137 # response from an upstream server before logging them. Otherwise, for such
138 # shares, upstreamResult will always be True and upstreamRejectReason will
139 # always be None. Note that enabling this may cause shares to be logged out of
140 # order, or with the wrong timestamp (if your share logger uses the log-time
141 # rather than share-time).
142 DelayLogForUpstream = False
144 # Bitcoin p2p server for announcing blocks found
145 UpstreamBitcoindNode = ('127.0.0.1', 18333) # testnet
147 # Network ID for the primary blockchain
148 # Other known network IDs can be found at:
149 # https://en.bitcoin.it/wiki/Protocol_specification#Message_structure
150 UpstreamNetworkId = b'\x0b\x11\x09\x07' # testnet3
152 # Secret username allowed to use setworkaux
155 # URI to send gotwork with info for every share submission
158 # Share hashes must be below this to be submitted to gotwork
159 GotWorkTarget = 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
161 # Aim to produce blocks with transaction counts that are a power of two
162 # This helps avoid any chance of someone abusing CVE-2012-2459 with them
163 # 1 = cut out feeless transactions; 2 = cut out even fee-included transactions (if possible)
166 # Avoid mining feeless transactions except to satisfy POT
167 # Note this only works if POT is in fact enabled in the first place
170 ### Settings relating to network services
171 # Note that Eloipool only supports IPv6 sockets, and if you want to bind to an
172 # IPv4 address you will need to prepend it with ::ffff: eg ::ffff:192.168.1.2
174 # Addresses to listen on for JSON-RPC GBT/getwork server
179 # Addresses to listen on for Stratum mining server
184 # Addresses to listen on for Bitcoin node
185 # Note this will only be used to distribute blocks the pool finds, nothing else
186 BitcoinNodeAddresses = (
190 # Addresses that are allowed to "spoof" from address with the X-Forwarded-For header
191 TrustedForwarders = ('::ffff:127.0.0.1',)
198 'filename': 'share-logfile',
199 'format': "{time} {Q(remoteHost)} {username} {YN(not(rejectReason))} {dash(YN(upstreamResult))} {dash(rejectReason)} {solution}\n",
203 'engine': 'postgres',
206 'database': 'pooldb',
208 'password': 'somethingsecret',
210 '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'))",
219 'password': 'somethingsecret',
221 '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}))",
227 'database': 'share.db',
229 'statement': "insert into shares (remoteHost, username, rejectReason, upstreamResult, solution) values ({remoteHost}, {username}, {rejectReason}, {upstreamResult}, {solution})",
234 # There currently are 2 modules.
235 # - allowall will allow every username/password combination
236 # - simplefile will use the username/passwords from a file, which contains username<tab>password\n with no \n on the last line.
239 'module': 'allowall',
242 # 'module': 'simplefile',
243 # 'filename': 'userdatabase',
247 ### Settings related to poolserver logging
249 # By default, significant events will be printed to the interactive console
250 # You can customize your logging using either simple parameters, or Python's advanced logging framework
251 # Note that using Python's logging framework will override the default console logging!
253 # To simply log everything to the system log (syslog) as well:
256 # To make a log file:
257 # LogFile = 'filename.log'
259 # For a rotating log file:
261 'filename': 'filename.log',
266 # http://docs.python.org/3/library/logging.handlers.html#logging.handlers.TimedRotatingFileHandler