Pages:
Author

Topic: [ANN] Eloipool - FAST Python3 pool server software - GBT/stratum/dyntarget/proxy - page 2. (Read 123077 times)

hero member
Activity: 549
Merit: 608
I've setup a local stratum server using eloipool. I'm trying to test the stratum server manually using either telnet or curl as in:

curl --data-binary '{"id": 1, "method": "mining.subscribe", "params": []}'  -H 'content-type:text/plain;' http://myuser:[email protected]:3334/

The connection is closed as soon as the first line of the http headers is sent (usually POST) (curl prints: curl: (52) Empty reply from server)

Any idea of what's happening?

member
Activity: 111
Merit: 10
My avatar is in the shop
Ha! That worked... some massaging but, I got it  Grin
Now to test it  Wink

And on we trudge.
member
Activity: 111
Merit: 10
My avatar is in the shop
Its the Unicode issue, Twisted library is a pain to use in 3.x since python changed default handling.
If I leave out the MerkleTree import, then I can use Python2.7.
Please advise if the MMP absolutely needs the MerkleTree import.  Huh  Huh  Huh

Wait, wait, looked at the code, it says only 1 subchain will work, interesting...
So, really do have a delema here... I have to make 1/2 work in v3 which I have already managed, and 1/2 work in v2 for MMP.

And on we trudge.
member
Activity: 111
Merit: 10
My avatar is in the shop
Ah! I just had to restart after all the installations.
Owh, Wait, But what do we have here.... Another error  Roll Eyes
Communications between the MMP and Eloipool are broken, I think the script has serious issues in Python3.
Its going to take week to sort this out since in know precisely nothing about Python  Sad
Sure, just buy some hardware, plug it in, hash away, and bank some crytpo coins, humff.

I guess what I really need is a working tested Python 3.2 or 3.x version of MMP so I can merge in the changes.
member
Activity: 111
Merit: 10
My avatar is in the shop
MMP uses Twisted library, which seems to be having an issue.
I still keep getting the following when eloipool sends gotwork to the MMP.


  404 - No Such Resource
  
    

No Such Resource


    

No such child resource.


  


Still debugging, any suggestions?
Using Python3.2
Twisted 14.0.2
NOOBS RPI
Not using twistd dont think I need it.

 Huh

And on we trudge.
member
Activity: 111
Merit: 10
My avatar is in the shop
Still working on it... (Looks now like the target was set so high I always find blocks =/ so, no worries)
More clues:

Posting "method": "gotwork" i get:


  404 - No Such Resource
 
   

No Such Resource


   

No such child resource.


 


trying to debug it.
I'm guessing it means I did something odd.
I'm using Python3.2 and a couple of these script seems to have needed a conversion from 2to3 via the 2to3 app.
Perhaps I should do that to all of them...

And on we trudge.
member
Activity: 111
Merit: 10
My avatar is in the shop
I started at the beginning of the forum and found my answer he he he  Grin

I'll go ahead and re-post it here:

Thanks Luke!

client miner <--> eloipool <--> bitcoind
                     |-> merged mining proxy (MMP) <--> namecoind


merged-mining-proxy:
python merged-mining-proxy  -w 8330 -p http://ssecreteloipool:[email protected]:9947/ -x http://namecoinrpc:manecoinrpcpass@localhost:9377/

eloipool config.py:
# Secret username allowed to use setworkaux
SecretUser = "ssecreteloipool"

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

GotWorkURI = "http://mergedproxyuser:[email protected]:8330/"

namecoin config:
rpcuser=namecoinrpc
rpcpassword=manecoinrpcpass
rpcport=9377

and user miner program connect to 9947

Attempting the above, stand by......


member
Activity: 111
Merit: 10
My avatar is in the shop
I managed to get it to work by replacing all INET6 with INET.
I am good at this point.
I have a new error, not sure if it is component configuration related or not...

I found a scrypt version of eloipool and im trying to merge-mine litecoin and dogecoin.
I think the configuration is...


Miner -> Eloipool -> merged-mine-proxy -> litecoin wallet + dogecoin wallet.

Please confirm if I have this conceptually correct.
I think the setworkaux is missing in the wallet, so, I suspect I need to modify the wallet code?
I am confused because I saw setworkaux in some of the pool code to as though my componets above might not be correct.
Please confirm.

                Thank you in advance  Grin

 Shocked
legendary
Activity: 2576
Merit: 1186
Shocked  Shocked  Shocked

I am hopefully on my last error but, since I have not seen any of the errors above this line, I am skeptical this will be the end-all.

Hello, I am seeing a bug, tried changing my hostname already, that was not the cause.

2014-09-21 19:13:26,818 SocketListener  ERROR   ('127.0.0.1', 8338)
Traceback (most recent call last):
  File "/home/pi/eloipool/util.py", line 144, in tryErr
    return func(*a, **kw)
  File "/home/pi/eloipool/networkserver.py", line 262, in setup_socket
    sock = self._makebind(server_address)
  File "/home/pi/eloipool/networkserver.py", line 253, in _makebind
    return self._makebind_py(*a, **ka)
  File "/home/pi/eloipool/networkserver.py", line 229, in _makebind_py
    sock = socket.socket(self.address_family, socket.SOCK_STREAM)
  File "/usr/lib/python3.2/socket.py", line 94, in __init__
    _socket.socket.__init__(self, family, type, proto, fileno)
socket.error: [Errno 97] Address family not supported by protocol

 Huh  Huh  Huh


Eloipool only supports IPv6.
If you want to use obsolete IPv4, you will need an OS that supports IPv4 connections on IPv6 sockets (like Linux) and configure it to bind on the appropriate iPv6 address (as in the example config).
member
Activity: 111
Merit: 10
My avatar is in the shop
Owh, okay I found another version of the pool with slight modifications containing the scripts I need for scrypt.
(pun intended)  Grin
member
Activity: 111
Merit: 10
My avatar is in the shop
Owh, I also had to fix /home/pi/eloipool/bitcoin/node.py for the NET6 issue.

Okay, almost there. I have another error, I think it has to do with configuration (trying to get this to work for LiteCoin).

2014-09-21 20:23:58,032 merkleMaker     CRITICAL        Traceback (most recent call last):
  File "/home/pi/eloipool/merklemaker.py", line 694, in run
    self.merkleMaker_I()
  File "/home/pi/eloipool/merklemaker.py", line 684, in merkleMaker_I
    self.merkleMaker_II()
  File "/home/pi/eloipool/merklemaker.py", line 650, in merkleMaker_II
    return self._updateMerkleTree()
  File "/home/pi/eloipool/merklemaker.py", line 550, in _updateMerkleTree
    self._updateMerkleTree_I()
  File "/home/pi/eloipool/merklemaker.py", line 513, in _updateMerkleTree_I
    r = self._updateMerkleTree_fromTS(TS)
  File "/home/pi/eloipool/merklemaker.py", line 479, in _updateMerkleTree_fromTS
    newMerkleTree = self._ProcessGBT(MP, TS)
  File "/home/pi/eloipool/merklemaker.py", line 379, in _ProcessGBT
    cbtxn = self.makeCoinbaseTxn(MP['coinbasevalue'], prevBlockHex = MP['previousblockhash'])
  File "eloipool.py", line 131, in makeCoinbaseTxn
    pkScript = BitcoinScript.toAddress(config.TrackerAddr)
  File "/home/pi/eloipool/bitcoin/script.py", line 45, in toAddress
    raise ValueError('invalid address version')
ValueError: invalid address version

member
Activity: 111
Merit: 10
My avatar is in the shop
I changed everything in networkserver.py from AF_INET6 to AF_INET.
That error seems to be gone, but my miners cannot connect?!
(yes I also changed the config file removing the ::ffff:)

If there another log I should look at?
The process is indeed running, the miners are saying connection refused.


member
Activity: 111
Merit: 10
My avatar is in the shop
 Shocked  Shocked  Shocked

I am hopefully on my last error but, since I have not seen any of the errors above this line, I am skeptical this will be the end-all.

Hello, I am seeing a bug, tried changing my hostname already, that was not the cause.

2014-09-21 19:13:26,818 SocketListener  ERROR   ('127.0.0.1', 8338)
Traceback (most recent call last):
  File "/home/pi/eloipool/util.py", line 144, in tryErr
    return func(*a, **kw)
  File "/home/pi/eloipool/networkserver.py", line 262, in setup_socket
    sock = self._makebind(server_address)
  File "/home/pi/eloipool/networkserver.py", line 253, in _makebind
    return self._makebind_py(*a, **ka)
  File "/home/pi/eloipool/networkserver.py", line 229, in _makebind_py
    sock = socket.socket(self.address_family, socket.SOCK_STREAM)
  File "/usr/lib/python3.2/socket.py", line 94, in __init__
    _socket.socket.__init__(self, family, type, proto, fileno)
socket.error: [Errno 97] Address family not supported by protocol

 Huh  Huh  Huh

newbie
Activity: 1
Merit: 0
found error in script authproxy.py
Code: (Python)
      authpair = "%s:%s" % (self.__url.username, self.__url.password)
        authpair = authpair.encode('utf8')
        #         authpair = base64.b64encode(authpair) # here return as bytes
        authpair = str(authpair, encoding='utf-8') # convert bytes to str
        # >
        self.__auth_header = "Basic " + authpair
 

and I load directly authproxy:
Code: (Python3.3)
'''import jsonrpc
try:
import jsonrpc.authproxy
jsonrpc.authproxy.USER_AGENT = 'Eloipool/0.1'
except:
from jsonrpclib import jsonrpc
pass
'''
from authproxy import AuthServiceProxy as ServiceProxy, JSONRPCException

and copy client.py from /usr/lib/python3.3/http into my folder with eloipool

BUT!
when call getblocktemplate  from merklemaker.py
Code:
for TC in TCList:
caccess = TC['access'] # =ServiceProxy(uri)
try:
propose = caccess.getblocktemplate(ProposeReq)

rise error in responce:
Quote
2013-08-28 15:11:39,777   makeCoinbaseTxn_responce   ERROR   {'error': {'message': 'Invalid mode', 'code': -8}, 'result': None, 'id': 1}
2013-08-28 15:11:39,780   merkleMaker   CRITICAL   Traceback (most recent call last):
  File "/home/icreator/pools/eloipool-3/merklemaker.py", line 732, in run
    self.merkleMaker_I()
  File "/home/icreator/pools/eloipool-3/merklemaker.py", line 722, in merkleMaker_I
    self.merkleMaker_II()
  File "/home/icreator/pools/eloipool-3/merklemaker.py", line 700, in merkleMaker_II
    return self._updateMerkleTree()
  File "/home/icreator/pools/eloipool-3/merklemaker.py", line 588, in _updateMerkleTree
    self._updateMerkleTree_I()
  File "/home/icreator/pools/eloipool-3/merklemaker.py", line 552, in _updateMerkleTree_I
    r = self._updateMerkleTree_fromTS(TS)
  File "/home/icreator/pools/eloipool-3/merklemaker.py", line 523, in _updateMerkleTree_fromTS
    (AcceptedScore, TotalScore) = self._CheckTemplate(newMerkleTree, TS)
  File "/home/icreator/pools/eloipool-3/merklemaker.py", line 456, in _CheckTemplate
    propose = caccess.getblocktemplate(ProposeReq)
  File "/home/icreator/pools/eloipool-3/authproxy.py", line 135, in __call__
    raise JSONRPCException(response['error'])
authproxy.JSONRPCException


"mode" set here:
Code:
ProposeReq = {
"mode": "proposal",
"data": b2a_hex(data).decode('utf8'),
                        }

BUT if I do:
Code:
ProposeReq = {
"data": b2a_hex(data).decode('utf8'),
                        }

new error:
Code:
2013-08-28 15:35:29,709 merkleMaker ERROR Upstream 'primary' rejected proposed block from 'primary': 0000000000000007d8be81c938a2519ba3b2eb8fe1720ad82210d4f82716a6f7
2013-08-28 15:35:29,710 merkleMaker CRITICAL Traceback (most recent call last):
  File "/home/icreator/pools/eloipool-3/merklemaker.py", line 732, in run
    self.merkleMaker_I()
  File "/home/icreator/pools/eloipool-3/merklemaker.py", line 722, in merkleMaker_I
    self.merkleMaker_II()
  File "/home/icreator/pools/eloipool-3/merklemaker.py", line 688, in merkleMaker_II
    return self._updateMerkleTree()
  File "/home/icreator/pools/eloipool-3/merklemaker.py", line 588, in _updateMerkleTree
    self._updateMerkleTree_I()
  File "/home/icreator/pools/eloipool-3/merklemaker.py", line 574, in _updateMerkleTree_I
    raise RuntimeError('Failed to create usable template')
RuntimeError: Failed to create usable template

and how use  jsonrpc_getblocktemplate.py ?? here may  be right code?

I stuck in the same problem for days. I'm using ubuntu 14.04, I tried both bitcoind v0.9.2.1 and v0.9.3rc1 and nothing is different. Can anybody tell me what should I do. Thank you.
legendary
Activity: 2576
Merit: 1186
Sounds pointless, since addresses should only ever be used once.
hero member
Activity: 532
Merit: 500
Thanks for the info Luke. Smiley
NOMP mining key creates a pubkey/privkey pair that can be used for any coin - the coin's pubkey can be derived from the mining-key pubkey, and likewise for the privkey.

Allows zone117x to collect from coinbase on pretty much every coin folks mine with his solution. And also, this is part of the magic in nomp that allows for multipools - coinswitching ports require mining-keys for usernames, and payment processor pays the coin to the derived coin pubkey

I don't have one running ATM, but raskul has his here: http://eu.centralcavern.uk:8080 the mining key creation web script is here http://eu.centralcavern.uk:8080/key.html - his setup looks pretty stock.
legendary
Activity: 2576
Merit: 1186
Luke-Jr, we've been running eloiopol to connect a pool to eligius, quite successfully (Thanks!) and have a few questions:

1) To connect to an upstream pool (ie eligius) the loop branch is required
The loop branch was never finished and does not work completely.
Use it at your own risk...

- when stratum workers become disconnected, they don't want to reconnect without the human restarting miner software
Be sure miners are using the latest version of BFGMiner.
Unmaintained versions and forks thereof, my have bugs - those are however unrelated to Eloipool.

Well. Maybe one more. I'm sure you've seen nomp's mining keys? What do you think of this idea and code? And, if you think that's a good idea, would that be something you'd have an interest in supporting in eloipool? (maybe a module that figures a pubkey from a miningkey and drops it into config.py?)
Nope, no idea what you're talking about.

I know you're not the biggest altcoin fan, but I can't see any reason you shouldn't earn something from pools using your software to mine them. (forrestv has something similar for --give-author in p2pool I've not seen how this works though)
The sample config file has a Coinbaser example that donates.
hero member
Activity: 532
Merit: 500
Luke-Jr, we've been running eloiopol to connect a pool to eligius, quite successfully (Thanks!) and have a few questions:

1) To connect to an upstream pool (ie eligius) the loop branch is required
    - If I understand everything, I need coinbase/append and submit/coinbase to do this, and those don't appear to be in the main branch, correct?
2) I also need the latest version of your bitcoind, eligius branch? (it's what I am running now)
3) when using this branch, so I need or want "BlockSubsissions" section, or just "UpstreamURI"
    - and if I need/want it, mining on upstream pool like eliguis, whose servers should be here?

- FWIW, we're using your suggested commit for bitcoinrpc, and mostly everything else you suggest, except gentoo (I feel like I might have shot myself in the foot here!) eloipool is running in a fairly stock ubuntu14.04, with python3.2 and setup in virtualenv.

The issues I've seen so far seem common, and mostly above you suggest ignoring most, but

- when stratum workers become disconnected, they don't want to reconnect without the human restarting miner software
- they seem to disconnect when we see a socket timeout connecting to (either eligius or our own bitcoind, this is not clear)

Finally, is there any guidance on the amount of RAM required to run eloipool as a downstream pool? Is this more based on the number of workers connected, the amount of hashrate, or?? I definitely ran a 4GB box out of RAM with just 2THs on it. Bitcoind is running on it's own machine, and we're just logging shares to text for now.

Well. Maybe one more. I'm sure you've seen nomp's mining keys? What do you think of this idea and code? And, if you think that's a good idea, would that be something you'd have an interest in supporting in eloipool? (maybe a module that figures a pubkey from a miningkey and drops it into config.py?)

I know you're not the biggest altcoin fan, but I can't see any reason you shouldn't earn something from pools using your software to mine them. (forrestv has something similar for --give-author in p2pool I've not seen how this works though)

Thanks for your time! (we know where to put some BTC )
legendary
Activity: 1218
Merit: 1001
Hi,Luke. are there any api docs about Eloipool?  Grin
There's no API, so no.

Luke-Jr,

By chance would you know off the top of your head what could be causing my target issue posted a couple above?

Update: Nevermind, found out the var diff part was not in the master that I pulled.  Works like a charm now.  Big thanks to Polyatomic for pointing me in the right direction!
Pages:
Jump to: