Merge branch 'bugfix_txn_isCoinbase'
[bitcoin:eloipool.git] / config.py.example
1 ### Settings relating to server identity
2
3 # Name of the server
4 ServerName = 'Private Eloipool'
5
6 ### Settings relating to server scaling/load
7
8 # Minimum and maximum of merkle roots to keep queued
9 WorkQueueSizeRegular = (0x100, 0x1000)
10
11 # Minimum and maximum of BLANK merkle roots to keep queued
12 # (used if we run out of populated ones, usually after a block is found)
13 WorkQueueSizeLongpoll = (0x1000, 0x2000)
14
15 # How long to wait between getmemorypool updates normally
16 MinimumTxnUpdateWait = 5
17
18 # How long to wait between retries if getmemorypool fails
19 TxnUpdateRetryWait = 1
20
21 # How long to sleep in idle loops (temporary!)
22 IdleSleepTime = 0.1
23
24 ### Settings relating to reward generation
25
26 # Address to generate rewards to
27 TrackerAddr = 'mrsP7M31efGkQHXb7nRiWLDjfV2M8oakf2'  # testnet
28
29 # Coinbaser command to control reward delegation
30 # NOTE: This example donates 1% of block rewards to Luke-Jr for Eloipool development
31 CoinbaserCmd = 'echo "1\\n$((%d / 100))\\n1579aXhdwvKZEMrAKoCZhzGuqMa8EonuXU\\n"'
32
33 ### Settings relating to upstream data providers
34
35 # JSON-RPC server for getmemorypool
36 UpstreamURI = 'http://user:pass@localhost:18332'
37
38 # Bitcoin p2p server for announcing blocks found
39 UpstreamBitcoindNode = ('127.0.0.1', 18333)  # testnet
40
41 # Network ID for the primary blockchain
42 UpstreamNetworkId = b'\xFA\xBF\xB5\xDA'  # testnet
43
44 # Secret username allowed to use setworkaux
45 #SecretUser = ""
46
47 # URI to send gotwork with info for every share submission
48 #GotWorkURI = ''
49
50 # Share hashes must be below this to be submitted to gotwork
51 GotWorkTarget = 0x000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
52
53 ### Settings relating to network services
54
55 # Addresses to listen on for JSON-RPC getwork server
56 # Note that Eloipool only supports IPv6 sockets, and if you want to bind to an
57 # IPv4 address you will need to prepend it with ::ffff: eg ::ffff:192.168.1.2
58 JSONRPCAddresses = (
59         ('', 8337),
60 )
61
62 # Addresses to listen on for Bitcoin node
63 # Note that Eloipool only supports IPv6 sockets, and if you want to bind to an
64 # IPv4 address you will need to prepend it with ::ffff: eg ::ffff:192.168.1.2
65 BitcoinNodeAddresses = (
66         ('', 8338),
67 )
68
69 # Addresses that are allowed to "spoof" from address with the X-Forwarded-For header
70 TrustedForwarders = ('::ffff:127.0.0.1',)
71
72
73 # Logging of shares:
74 ShareLogging = (
75         {
76                 'type': 'logfile',
77                 'filename': 'share-logfile',
78                 'format': "{time} {Q(remoteHost)} {username} {YN(not(rejectReason))} {dash(YN(upstreamResult))} {dash(rejectReason)} {solution}\n",
79         },
80         {
81                 'type': 'sql',
82                 'engine': 'postgres',
83                 'dbopts': {
84                         'host': 'localhost',
85                         'database': 'pooldb',
86                         'user': 'eloipool',
87                         'password': 'somethingsecret',
88                 },
89                 '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'))",
90         },
91         {
92                 'type': 'sql',
93                 'engine': 'mysql',
94                 'dbopts': {
95                         'host': 'localhost',
96                         'db': 'pooldb',
97                         'user': 'eloipool',
98                         'password': 'somethingsecret',
99                 },
100                 '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}))",
101         },
102         {
103                 'type': 'sql',
104                 'engine': 'sqlite',
105                 'dbopts': {
106                         'database': 'share.db',
107                 },
108                 'statement': "insert into shares (remoteHost, username, rejectReason, upstreamResult, solution) values ({remoteHost}, {username}, {rejectReason}, {upstreamResult}, {solution})",
109         },
110 )
111