Bitcoin Forum
December 09, 2016, 03:39:06 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 2 3 4 5 6 7 8 [9] 10 11 12 13 14 15 16 17 »  All
  Print  
Author Topic: [ANN] Eloipool - FAST Python3 pool server software - GBT/stratum/dyntarget/proxy  (Read 96796 times)
pascal257
Sr. Member
****
Offline Offline

Activity: 469


View Profile
May 27, 2013, 01:33:46 AM
 #161

I'm getting this error:
Code:
Traceback (most recent call last):
  File "/home/coin/eloipool/merklemaker.py", line 513, in _updateMerkleTree_I
    r = self._updateMerkleTree_fromTS(TS)
  File "/home/coin/eloipool/merklemaker.py", line 478, in _updateMerkleTree_fromTS
    MP = self._CallGBT(TS)
  File "/home/coin/eloipool/merklemaker.py", line 328, in _CallGBT
    MP = access.getblocktemplate(self.GBTReq)
  File "/usr/local/lib/python3.2/site-packages/bitcoinrpc/authproxy.py", line 102, in __call__
    response = self._get_response()
  File "/usr/local/lib/python3.2/site-packages/bitcoinrpc/authproxy.py", line 128, in _get_response
    parse_float=decimal.Decimal)
  File "/usr/local/lib/python3.2/json/__init__.py", line 332, in loads
    return cls(**kw).decode(s)
  File "/usr/local/lib/python3.2/json/decoder.py", line 353, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.2/json/decoder.py", line 371, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

Its caused by a failed authorization. I tried to print the AuthHeader and got this as result: "Basic b'dXNlcjpwYXNzd29yZA=='"
If I put the string (without the b') directly into __auth_header it works flawlessy.

I also tried python3.3 with the same result.
1481297946
Hero Member
*
Offline Offline

Posts: 1481297946

View Profile Personal Message (Offline)

Ignore
1481297946
Reply with quote  #2

1481297946
Report to moderator
1481297946
Hero Member
*
Offline Offline

Posts: 1481297946

View Profile Personal Message (Offline)

Ignore
1481297946
Reply with quote  #2

1481297946
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481297946
Hero Member
*
Offline Offline

Posts: 1481297946

View Profile Personal Message (Offline)

Ignore
1481297946
Reply with quote  #2

1481297946
Report to moderator
ppcko
Newbie
*
Offline Offline

Activity: 16



View Profile
May 27, 2013, 08:43:08 PM
 #162

Quick and dirty fix? Works for me.
Add .decode() to the following line (authproxy.py):
Code:
self.__auth_header = "Basic %s" % base64.b64encode(authpair).decode()
kinlo
Sr. Member
****
Offline Offline

Activity: 263


Pool operator of Triplemining.com


View Profile
May 27, 2013, 08:51:36 PM
 #163

The GBT timeout issues are solved with bitcoin 0.8.2, best to upgrade.


Yes 0.8.2 hasn't been released yet.  But all pools have backported the related fix(es) in order to solve this problem already....

Or just use an existing pool Smiley
Luke-Jr
Legendary
*
Offline Offline

Activity: 2100



View Profile
May 27, 2013, 08:52:34 PM
 #164

The GBT timeout issues are solved with bitcoin 0.8.2, best to upgrade.


Yes 0.8.2 hasn't been released yet.  But all pools have backported the related fix(es) in order to solve this problem already....

Or just use an existing pool Smiley
It's better, but far from solved Sad

kinlo
Sr. Member
****
Offline Offline

Activity: 263


Pool operator of Triplemining.com


View Profile
May 27, 2013, 09:58:00 PM
 #165

The GBT timeout issues are solved with bitcoin 0.8.2, best to upgrade.
It's better, but far from solved Sad
Perhaps the root cause hasn't been solved, but the problem is gone for now Smiley
mechkladenets
Newbie
*
Offline Offline

Activity: 19


View Profile
May 30, 2013, 03:09:31 PM
 #166

Hi, i am new to Python, started to learn it recently.
I have got  Eloipool  from  https://gitorious.org/bitcoin/eloipool/commits/master

But there is no instructions on how to setup it on hosting server in README.
Also, does it support Litecoin mining?

What i am supposed to see is the site with frontend like http://eligius.st/~gateway  (i know html/css3, so i need only up and running soft as site on hosting - then i will customize it)
feeleep
Legendary
*
Offline Offline

Activity: 1078


View Profile WWW
June 04, 2013, 05:23:13 PM
 #167

Hi,

I am testing litecoin fork of eloipool and i encountered an error which I can not pass through:

Code:
2013-06-04 19:22:35,781 JSONRPCHandler  ERROR   Error during JSON-RPC call: doJSON_getwork['00000002469d398f8b08c953ea40442e63cb5768340d2c9be18b3b8f0bb56f4a00000000410f80197fdf354663476bd3dd05fc4391661de7f133958bb030363bcd93568851ae22571d01132e00002283000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000']
Traceback (most recent call last):
  File "/root/xxx/eloipool-scrypt/jsonrpcserver.py", line 201, in _doJSON_i
    rv = getattr(self, method)(*params)
  File "/root/xxx/eloipool-scrypt/jsonrpc_getwork.py", line 44, in doJSON_getwork
    return self.doJSON_submitwork(data)
  File "/root/xxx/eloipool-scrypt/jsonrpc_getwork.py", line 81, in doJSON_submitwork
    self.server.receiveShare(share)
  File "eloipool.py", line 559, in receiveShare
    checkShare(share)
  File "eloipool.py", line 436, in checkShare
    blkhash = PoWHash(data)
  File "/root/xxx/eloipool-scrypt/util.py", line 132, in PoWHash
    return getPoWHash(b)
TypeError: function takes exactly 2 arguments (1 given)

Any idea what it can be?

feeleep

Luke-Jr
Legendary
*
Offline Offline

Activity: 2100



View Profile
June 04, 2013, 06:04:31 PM
 #168

FWIW, I don't intend to provide general support for patchsets which haven't even been proposed as merge requests yet (though anyone else is welcome to).
Hopefully this will encourage people to submit their changes upstream Wink

feeleep
Legendary
*
Offline Offline

Activity: 1078


View Profile WWW
June 05, 2013, 07:12:15 AM
 #169

FWIW, I don't intend to provide general support for patchsets which haven't even been proposed as merge requests yet (though anyone else is welcome to).
Hopefully this will encourage people to submit their changes upstream Wink

OK - i got rid of this strange message - it was just problem with python...

Bu i have a general problem with configuration: ShareTarget value is totally unclear for me and I used several calculators and can't get expected results as minimal difficulty. Can anyone help me with this?

feeleep

Luke-Jr
Legendary
*
Offline Offline

Activity: 2100



View Profile
June 05, 2013, 07:51:03 AM
 #170

FWIW, I don't intend to provide general support for patchsets which haven't even been proposed as merge requests yet (though anyone else is welcome to).
Hopefully this will encourage people to submit their changes upstream Wink

OK - i got rid of this strange message - it was just problem with python...

Bu i have a general problem with configuration: ShareTarget value is totally unclear for me and I used several calculators and can't get expected results as minimal difficulty. Can anyone help me with this?

feeleep
For pdifficulty 1, you want 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff; divide this by the desired difficulty for others.
For bdifficulty, it's the same, but based on a truncated value, 0x00000000ffff0000000000000000000000000000000000000000000000000000

If you enable dynamic targetting though, this is just a minimum, so I'd leave it at pdiff 1.

Kiro
Newbie
*
Offline Offline

Activity: 14


View Profile WWW
June 12, 2013, 06:54:48 AM
 #171

I'm trying to setup eloipool to replace my old pushpool install and I'm having a real hard time fixing an error that most ppl seem to have gotten past.

'No JSON object could be decoded'

I've tried 2 different builds of bitcond to connect to with eloipool but it always, always, always tells me that 'No JSON object could be decoded'.

These are the bitcoind builds I have compiled and run without any issues (connected to testnet) all RPC settings are correct and working as far as I can tell (Pushpool connects fine with the same RPC settings)

I've also followed these steps to build the source when all else failed - https://bitcointalk.org/index.php?topic=162788.0
I cant currently get the ubuntu ppa to download correctly so I haven't tried that one yet.

I've tried the few fixes that I have seen posted, like adding .decode() to the end of line 72 in authproxy.py, i've also tried rebuilding each one of the bitcoind's I downloaded and each time it always gives me the same error, I'm going crazy here trying to get eloipool to accept the returned JSON object from bitcoind.

What could the issue be?

Code:
Traceback (most recent call last):
  File "/home/username/eloipool-server/eloipool/merklemaker.py", line 692, in run
    self.merkleMaker_I()
  File "/home/username/eloipool-server/eloipool/merklemaker.py", line 682, in merkleMaker_I
    self.merkleMaker_II()
  File "/home/username/eloipool-server/eloipool/merklemaker.py", line 648, in merkleMaker_II
    return self._updateMerkleTree()
  File "/home/username/eloipool-server/eloipool/merklemaker.py", line 548, in _updateMerkleTree
    self._updateMerkleTree_I()
  File "/home/username/eloipool-server/eloipool/merklemaker.py", line 512, in _updateMerkleTree_I
    r = self._updateMerkleTree_fromTS(TS)
  File "/home/username/eloipool-server/eloipool/merklemaker.py", line 477, in _updateMerkleTree_fromTS
    MP = self._CallGBT(TS)
  File "/home/username/eloipool-server/eloipool/merklemaker.py", line 327, in _CallGBT
    MP = access.getblocktemplate(self.GBTReq)
  File "/home/username/eloipool-server/eloipool/bitcoinrpc/authproxy.py", line 106, in __call__
    response = self._get_response()
  File "/home/username/eloipool-server/eloipool/bitcoinrpc/authproxy.py", line 132, in _get_response
    parse_float=decimal.Decimal)
  File "/usr/lib/python3.2/json/__init__.py", line 322, in loads
    return cls(**kw).decode(s)
  File "/usr/lib/python3.2/json/decoder.py", line 353, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.2/json/decoder.py", line 371, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

Australian Bitcoin Mining Pool -  www.coinstack.io
nemercry
Sr. Member
****
Offline Offline

Activity: 339

Vice versa is not a meal.


View Profile
June 16, 2013, 11:27:58 AM
 #172

Any Updates on this error ?
kinlo
Sr. Member
****
Offline Offline

Activity: 263


Pool operator of Triplemining.com


View Profile
June 20, 2013, 09:29:44 AM
 #173

I have Eloipool up and running on Testnet.

When I find a block I receive this message in the log file:

Code:
2013-05-20 17:21:33,131 blockSubmission DEBUG Upstream 'primary' accepted block
2013-05-20 17:21:33,241 redflag CRITICAL Upstream 'primary' block submission failed: rejected

However, it appears the network has accepted the block.

Any ideas why I'm getting the "redflag" message?



Eloipool tries to submit the block at least three times.  So you *should* get this error.  it is indeed a bit confusing, but that is how it works.
vmart155
Newbie
*
Offline Offline

Activity: 4


View Profile
June 27, 2013, 08:04:16 PM
 #174

Code:
2013-06-27 23:02:34,173 merkleMaker     CRITICAL        Traceback (most recent call last):
  File "/home/mixa/ttt/eloipool/merklemaker.py", line 692, in run
    self.merkleMaker_I()
  File "/home/mixa/ttt/eloipool/merklemaker.py", line 682, in merkleMaker_I
    self.merkleMaker_II()
  File "/home/mixa/ttt/eloipool/merklemaker.py", line 648, in merkleMaker_II
    return self._updateMerkleTree()
  File "/home/mixa/ttt/eloipool/merklemaker.py", line 548, in _updateMerkleTree
    self._updateMerkleTree_I()
  File "/home/mixa/ttt/eloipool/merklemaker.py", line 512, in _updateMerkleTree_I
    r = self._updateMerkleTree_fromTS(TS)
  File "/home/mixa/ttt/eloipool/merklemaker.py", line 477, in _updateMerkleTree_fromTS
    MP = self._CallGBT(TS)
  File "/home/mixa/ttt/eloipool/merklemaker.py", line 327, in _CallGBT
    MP = access.getblocktemplate(self.GBTReq)
  File "/home/mixa/ttt/eloipool/bitcoinrpc/authproxy.py", line 104, in __call__
    'Content-type': 'application/json'})
  File "/usr/lib/python3.2/http/client.py", line 967, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.2/http/client.py", line 995, in _send_request
    self.putrequest(method, url, **skips)
  File "/usr/lib/python3.2/http/client.py", line 850, in putrequest
    raise CannotSendRequest(self.__state)
http.client.CannotSendRequest: Request-sent

Who knows what the problem is?
gr0bi42
Full Member
***
Offline Offline

Activity: 158


View Profile WWW
July 02, 2013, 05:34:20 PM
 #175

Hi Luke,

how do I get the block height into the coinbase? Let's say, CoinbaserCmd is not really "well" documented ;-)

Donations are welcome: 1Btf3BqUegfe5iFdWsgfBf1Ew3YsAvsrLT
Luke-Jr
Legendary
*
Offline Offline

Activity: 2100



View Profile
July 02, 2013, 05:55:50 PM
 #176

Hi Luke,

how do I get the block height into the coinbase? Let's say, CoinbaserCmd is not really "well" documented ;-)
It's always in the coinbase. CoinbaserCmd controls payouts.

arruah
Legendary
*
Offline Offline

Activity: 1148



View Profile WWW
August 01, 2013, 08:27:51 AM
 #177

I'm trying to run the application but I get the error
Code:
kamrenov@pool:~/bin$ ./eloipool.py
2013-08-01 13:39:43,954 jsonrpc_getwork WARNING Error importing 'midstate' module; work will not provide midstates

>>> Traceback (most recent call last):
  File "./eloipool.py", line 862, in <module>
    BitcoinLink(bcnode, dest=config.UpstreamBitcoindNode)
  File "/home/kamrenov/bin/bitcoin/node.py", line 50, in __init__
    sock.connect(dest)
socket.error: [Errno 111] Connection refused

my config.py
Code:
# Please note that config files are Python source code!
# A common mistake is to put an option list (such as TemplateChecks,
# JSONRPCAddresses, etc) excluding the final comma.
# For example (this is WRONG):
#     JSONRPCAddresses = (
#         ('', 8337)  # <-- there must be a comma after EVERY item, even last
#     )
# Without the final comma, should the option list ever have only one item in
# it, Python would interpret the "main" parenthesis as a mere sub-expression
# instead of a list of values. If that occurs, you might get crazy errors, or
# things might just not work correctly. Be careful to not miss the commas.

### Settings relating to server identity

# Name of the server
ServerName = 'My Pool'

### 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 = 2

# 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 = '1P5YMGAzSypskCy1kMr7otjH5bSeD1nP9X'

# 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 servers to get block templates from
# See https://en.bitcoin.it/wiki/BIP_0023#Logical_Services for key details
TemplateSources = (
{
'name': 'primary',
'uri': 'http://ruxAbDxUFs6Y:CZoLZwPxBVp5y5jFBUxVsGWrGefX6F@localhost:8332',
'priority': 0,
'weight': 1,
},
)

# JSON-RPC servers to check block proposals with
# If none provided, and selected source supports proposals, it alone will also
# be used for checking
# NOTE: Any servers listed here MUST support BIP 23 Block Proposals
# NOTE: Mainline bitcoind (as of 0.8) does NOT support this (though the 0.8.0.eligius branch does)
TemplateChecks = (
)

# JSON-RPC servers to submit found blocks to (when they meet the full target)
# The specific TemplateSource that the block was based on will always be sent
# the block first.
# If setting is not specified, or None, full TemplateSources list will be used.
# If an empty list, no extra submissions will be attempted.
# If an empty list, and the block was found on a "clear" merkle root (not based
# on any TemplateSource), the full TemplateSources list will be used.
BlockSubmissions = (
{
'name': 'primary',
'uri': 'http://ruxAbDxUFs6Y:CZoLZwPxBVp5y5jFBUxVsGWrGefX6F@localhost:8332',
},
)

# Templates will not be used unless they have an acceptance ratio above this
# Range: 0.00 - 1.00
MinimumTemplateAcceptanceRatio = 0

# No template with a combined total score below this will be used
MinimumTemplateScore = 1

# Set to True if you want shares meeting the upstream target to wait for a
# response from an upstream server before logging them. Otherwise, for such
# shares, upstreamResult will always be True and upstreamRejectReason will
# always be None. Note that enabling this may cause shares to be logged out of
# order, or with the wrong timestamp (if your share logger uses the log-time
# rather than share-time).
DelayLogForUpstream = True

# Bitcoin p2p server for announcing blocks found
UpstreamBitcoindNode = ('127.0.0.1', 8333)  # testnet

# Network ID for the primary blockchain
# Other known network IDs can be found at:
#     https://en.bitcoin.it/wiki/Protocol_specification#Message_structure
UpstreamNetworkId = b'\xF9\xBE\xB4\xD9'  # 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
# 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

# Addresses to listen on for JSON-RPC GBT/getwork server
JSONRPCAddresses = (
('', 8337),
)

# Addresses to listen on for Stratum mining server
StratumAddresses = (
('', 3334),
)

# Addresses to listen on for Bitcoin node
# Note this will only be used to distribute blocks the pool finds, nothing else
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': 'sql',
                'engine': 'postgres',
                'dbopts': {
                        'host': 'localhost',
                        'database': 'pool_stats',
                        'user': 'root',
                        'password': 'eloipool',
                },
                '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'))",
        },
)

### Settings related to poolserver logging

# By default, significant events will be printed to the interactive console
# You can customize your logging using either simple parameters, or Python's advanced logging framework
# Note that using Python's logging framework will override the default console logging!

# To simply log everything to the system log (syslog) as well:
# LogToSysLog = True

# To make a log file:
LogFile = '/home/eloipool/web_dir/error_log.log'

# For a rotating log file:
LogFile = {
'filename': 'error_log.log',
'when': 'midnight',
'backupCount': 7,
}
# For details, see:
# http://docs.python.org/3/library/logging.handlers.html#logging.handlers.TimedRotatingFileHandler

<a href="http://www.adsoptimal.com/?ss=ref39908"><img src="//s3-us-west-1.amazonaws.com/mobile-monetizer-production-assets/logo_sml.png" border="0" width="100"></a>
hahahafr
Sr. Member
****
Offline Offline

Activity: 241



View Profile
August 07, 2013, 09:38:38 PM
 #178

What I run:
Code:
root@server:~/pool/# ./bitcoind &
root@server:~/pool/# python3 eloipool.py

I'm getting an infinite loop error! The message doesn't stop and blocks the terminal...

Code:
Traceback (most recent call last):
  File "/root/pool/merklemaker.py", line 692, in run
    self.merkleMaker_I()
  File "/root/pool/merklemaker.py", line 682, in merkleMaker_I
    self.merkleMaker_II()
  File "/root/pool/merklemaker.py", line 648, in merkleMaker_II
    return self._updateMerkleTree()
  File "/root/pool/merklemaker.py", line 548, in _updateMerkleTree
    self._updateMerkleTree_I()
  File "/root/pool/merklemaker.py", line 512, in _updateMerkleTree_I
    r = self._updateMerkleTree_fromTS(TS)
  File "/root/pool/merklemaker.py", line 477, in _updateMerkleTree_fromTS
    MP = self._CallGBT(TS)
  File "/root/pool/merklemaker.py", line 327, in _CallGBT
    MP = access.getblocktemplate(self.GBTReq)
  File "/root/pool/bitcoinrpc/authproxy.py", line 106, in __call__
    response = self._get_response()
  File "/root/pool/bitcoinrpc/authproxy.py", line 132, in _get_response
    parse_float=decimal.Decimal)
  File "/usr/lib/python3.2/json/__init__.py", line 322, in loads
    return cls(**kw).decode(s)
  File "/usr/lib/python3.2/json/decoder.py", line 353, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.2/json/decoder.py", line 371, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

2013-08-07 22:57:02,726 merkleMaker     CRITICAL        Traceback (most recent call last):
  File "/usr/lib/python3.2/json/decoder.py", line 369, in raw_decode
    obj, end = self.scan_once(s, idx)
StopIteration

During handling of the above exception, another exception occurred:

And the message repeats...

bitcoind config:
Code:
rpcuser=y
rpcpassword=x
maxconnections=256
daemon=1

eloipool config.py
Code:
# Please note that config files are Python source code!
# A common mistake is to put an option list (such as TemplateChecks,
# JSONRPCAddresses, etc) excluding the final comma.
# For example (this is WRONG):
#     JSONRPCAddresses = (
#         ('', 8337)  # <-- there must be a comma after EVERY item, even last
#     )
# Without the final comma, should the option list ever have only one item in
# it, Python would interpret the "main" parenthesis as a mere sub-expression
# instead of a list of values. If that occurs, you might get crazy errors, or
# things might just not work correctly. Be careful to not miss the commas.

### Settings relating to server identity

# Name of the server
ServerName = 'Private Pool'

### 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 = 2

# 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 = '1BVi5pCdE5c37JDiF5tSur9vX1qB8xBLp9'

# Coinbaser command to control reward delegation
# %d is replaced with the total value of the block reward (in satoshis)
# %p is replaced with the previous block hash in hexadecimal
# 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 servers to get block templates from
# See https://en.bitcoin.it/wiki/BIP_0023#Logical_Services for key details
TemplateSources = (
{
'name': 'primary',
'uri': 'http://y:x@localhost:8332',
'priority': 0,
'weight': 1,
},
# {
# 'name': 'secondary',
# 'uri': 'http://user:pass@localhost:18332',
# 'priority': 1,
# 'weight': 1,
# },
)

# JSON-RPC servers to check block proposals with
# If none provided, and selected source supports proposals, it alone will also
# be used for checking
# NOTE: Any servers listed here MUST support BIP 23 Block Proposals
# NOTE: Mainline bitcoind (as of 0.8) does NOT support this (though the 0.8.0.eligius branch does)
#TemplateChecks = (
# {
# 'name': 'primary',
# 'uri': 'http://user:pass@localhost:8332',
#
# # If 'unanimous' is true, no template will be used if this node
# # rejects it
# 'unanimous': False,
#
# # If check servers disagree on all templates, they will be scored and
# # the highest score will be used; 'weight' can be used to control the
# # scoring per-server
# 'weight': 1.1,
# },
# {
# 'name': 'secondary',
# 'uri': 'http://user:pass@localhost:18332',
# 'unanimous': False,
# 'weight': 1,
# },
#)

# JSON-RPC servers to submit found blocks to (when they meet the full target)
# The specific TemplateSource that the block was based on will always be sent
# the block first.
# If setting is not specified, or None, full TemplateSources list will be used.
# If an empty list, no extra submissions will be attempted.
# If an empty list, and the block was found on a "clear" merkle root (not based
# on any TemplateSource), the full TemplateSources list will be used.
#BlockSubmissions = (
# {
# 'name': 'primary',
# 'uri': 'http://user:pass@localhost:8332',
# },
# {
# 'name': 'secondary',
# 'uri': 'http://user:pass@localhost:18332',
# }
#)

# Templates will not be used unless they have an acceptance ratio above this
# Range: 0.00 - 1.00
MinimumTemplateAcceptanceRatio = 0

# No template with a combined total score below this will be used
MinimumTemplateScore = 1

# Set to True if you want shares meeting the upstream target to wait for a
# response from an upstream server before logging them. Otherwise, for such
# shares, upstreamResult will always be True and upstreamRejectReason will
# always be None. Note that enabling this may cause shares to be logged out of
# order, or with the wrong timestamp (if your share logger uses the log-time
# rather than share-time).
DelayLogForUpstream = False

# Bitcoin p2p server for announcing blocks found
UpstreamBitcoindNode = ('127.0.0.1', 8333)

# Network ID for the primary blockchain
# Other known network IDs can be found at:
#     https://en.bitcoin.it/wiki/Protocol_specification#Message_structure
#UpstreamNetworkId = b'\x0b\x11\x09\x07'  # testnet3
UpstreamNetworkId = b'\xF9\xBE\xB4\xD9'

# 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 = 0

# 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
# 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

# Addresses to listen on for JSON-RPC GBT/getwork server
JSONRPCAddresses = (
('', 8888),
)

# Addresses to listen on for Stratum mining server
StratumAddresses = (
('', 3334),
)

# Addresses to listen on for Bitcoin node
# Note this will only be used to distribute blocks the pool finds, nothing else
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})",
},
)

# Authentication
# There currently are 2 modules.
# - allowall will allow every username/password combination
# - simplefile will use the username/passwords from a file, which contains username<tab>password\n with no \n on the last line.
Authentication =  (
{
'module': 'allowall',
},
# {
# 'module': 'simplefile',
# 'filename': 'userdatabase',
# },
)

### Settings related to poolserver logging

# By default, significant events will be printed to the interactive console
# You can customize your logging using either simple parameters, or Python's advanced logging framework
# Note that using Python's logging framework will override the default console logging!

# To simply log everything to the system log (syslog) as well:
# LogToSysLog = True

# To make a log file:
# LogFile = 'filename.log'

# For a rotating log file:
LogFile = {
'filename': 'eloipool.log',
'when': 'midnight',
'backupCount': 7,
}
# For details, see:
# http://docs.python.org/3/library/logging.handlers.html#logging.handlers.TimedRotatingFileHandler

hahahafr
Sr. Member
****
Offline Offline

Activity: 241



View Profile
August 08, 2013, 03:56:02 AM
 #179

Fixed, had to checkout at commit 770881c8bd9b1f92427290270b37a28751cf9df0 of python-bitcoinrpc.
Is there a way to have the python-bitcoinrpc git updated to the latest commit and still get it to work with eloipool?

Luke-Jr
Legendary
*
Offline Offline

Activity: 2100



View Profile
August 08, 2013, 04:30:14 AM
 #180

Fixed, had to checkout at commit 770881c8bd9b1f92427290270b37a28751cf9df0 of python-bitcoinrpc.
Is there a way to have the python-bitcoinrpc git updated to the latest commit and still get it to work with eloipool?
No, this is a bug in python-bitcoinrpc and has to be fixed there.

Pages: « 1 2 3 4 5 6 7 8 [9] 10 11 12 13 14 15 16 17 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!