moopless / stratum-mining-litecoin

This fork is no longer maintained. Please use https://github.com/ahmedbodi/stratum-mining
Other
38 stars 35 forks source link

not working on p2pool ltc #50

Closed nberesnev83 closed 11 years ago

nberesnev83 commented 11 years ago

python mining_proxy.py --pow-algo scrypt --host 127.0.0.1 --port 9327 --stratum-port 3333 --getwork-port 9999 --no-midstate --real-target --custom-user pool --custom-password x --verbose 2013-07-31 21:44:08,350 DEBUG stats logger.get_logger # Logging initialized 2013-07-31 21:44:08,360 DEBUG protocol logger.get_logger # Logging initialized 2013-07-31 21:44:08,360 DEBUG socket_transport logger.get_logger # Logging initialized 2013-07-31 21:44:08,415 DEBUG proxy logger.get_logger # Logging initialized 2013-07-31 21:44:08,415 DEBUG proxy logger.get_logger # Logging initialized 2013-07-31 21:44:08,433 WARNING proxy jobs. # C extension for midstate not available. Using default implementation instead. 2013-07-31 21:44:08,433 DEBUG proxy logger.get_logger # Logging initialized 2013-07-31 21:44:08,434 DEBUG proxy logger.get_logger # Logging initialized 2013-07-31 21:44:08,435 DEBUG proxy logger.get_logger # Logging initialized 2013-07-31 21:44:08,435 DEBUG proxy logger.get_logger # Logging initialized 2013-07-31 21:44:08,436 DEBUG proxy logger.get_logger # Logging initialized 2013-07-31 21:44:08,436 DEBUG proxy logger.get_logger # Logging initialized 2013-07-31 21:44:08,438 ERROR proxy mining_proxy.main # Stratum host/port autodetection failed Traceback (most recent call last): File "mining_proxy.py", line 155, in main new_host = (yield utils.detect_stratum(args.host, args.port)) AttributeError: 'module' object has no attribute '_parse' 2013-07-31 21:44:08,439 INFO proxy mining_proxy.main # Stratum proxy version: 1.3.0 2013-07-31 21:44:08,439 INFO proxy mining_proxy.main # Trying to connect to Stratum pool at 127.0.0.1:9327 2013-07-31 21:44:08,440 INFO proxy mining_proxy.main # Setting PoW algo: scrypt 2013-07-31 21:44:08,441 INFO stats stats.print_stats # 1 peers connected, state changed 1 times 2013-07-31 21:44:08,441 DEBUG protocol protocol.connectionMade # Connected 127.0.0.1 2013-07-31 21:44:08,441 DEBUG protocol protocol.connectionMade # Resuming connection: [] 2013-07-31 21:44:08,441 INFO proxy mining_proxy.on_connect # Connected to Stratum pool at 127.0.0.1:9327 2013-07-31 21:44:08,441 INFO proxy mining_proxy.on_connect # Authorizing custom user pool, password x 2013-07-31 21:44:08,442 DEBUG protocol protocol.writeJsonRequest # < {"params": ["pool", "x"], "id": 1, "method": "mining.authorize"} 2013-07-31 21:44:08,442 INFO proxy mining_proxy.on_connect # Subscribing for mining jobs 2013-07-31 21:44:08,442 DEBUG protocol protocol.writeJsonRequest # < {"params": [], "id": 2, "method": "mining.subscribe"} 2013-07-31 21:44:08,461 DEBUG protocol protocol.lineReceived # > {u'result': None, u'jsonrpc': u'2.0', u'id': 1, u'error': None} 2013-07-31 21:44:08,461 DEBUG protocol protocol.lineReceived # > {u'result': [[u'mining.notify', u'ae6812eb4cd7735a302a8a9dd95cf71f'], u'', 2], u'jsonrpc': u'2.0', u'id': 2, u'error': None} 2013-07-31 21:44:08,464 INFO proxy mining_proxy.main # ----------------------------------------------------------------------- 2013-07-31 21:44:08,464 INFO proxy mining_proxy.main # PROXY IS LISTENING ON ALL IPs ON PORT 3333 (stratum) AND 9999 (getwork) 2013-07-31 21:44:08,464 INFO proxy mining_proxy.main # ----------------------------------------------------------------------- 2013-07-31 21:44:08,465 DEBUG protocol protocol.lineReceived # > {u'jsonrpc': u'2.0', u'params': [14.52613027417101], u'method': u'mining.set_difficulty', u'id': 940918514} 2013-07-31 21:44:08,465 INFO proxy client_service.handle_event # Setting new difficulty: 14.5261302742 2013-07-31 21:44:08,465 DEBUG protocol protocol.writeJsonResponse # < {"error": null, "id": 940918514, "result": null} /usr/lib/python2.6/site-packages/stratum-0.2.13-py2.6.egg/stratum/protocol.py:201: DeprecationWarning: Returning a value other than None from stratum.protocol.ClientProtocol.dataReceived is deprecated since Twisted 11.0.0. return self.lineLengthExceeded(self._buffer) 2013-07-31 21:44:08,489 INFO proxy mining_proxy.on_disconnect # Disconnected from Stratum pool at 127.0.0.1:9327 2013-07-31 21:44:08,489 INFO stats stats.print_stats # 0 peers connected, state changed 1 times 2013-07-31 21:44:08,489 DEBUG socket_transport socket_transport.clientConnectionLost # [Failure instance: Traceback (failure with no frames): : Connection to the other side was lost in a non-clean fashion. ] 2013-07-31 21:44:11,332 INFO stats stats.print_stats # 1 peers connected, state changed 1 times 2013-07-31 21:44:11,332 DEBUG protocol protocol.connectionMade # Connected 127.0.0.1 2013-07-31 21:44:11,332 DEBUG protocol protocol.connectionMade # Resuming connection: [] 2013-07-31 21:44:11,332 INFO proxy mining_proxy.on_connect # Connected to Stratum pool at 127.0.0.1:9327 2013-07-31 21:44:11,333 INFO proxy mining_proxy.on_connect # Authorizing custom user pool, password x 2013-07-31 21:44:11,333 DEBUG protocol protocol.writeJsonRequest # < {"params": ["pool", "x"], "id": 1, "method": "mining.authorize"} 2013-07-31 21:44:11,333 INFO proxy mining_proxy.on_connect # Subscribing for mining jobs 2013-07-31 21:44:11,333 DEBUG protocol protocol.writeJsonRequest # < {"params": [], "id": 2, "method": "mining.subscribe"} 2013-07-31 21:44:11,337 DEBUG protocol protocol.lineReceived # > {u'result': None, u'jsonrpc': u'2.0', u'id': 1, u'error': None} 2013-07-31 21:44:11,338 DEBUG protocol protocol.lineReceived # > {u'result': [[u'mining.notify', u'ae6812eb4cd7735a302a8a9dd95cf71f'], u'', 2], u'jsonrpc': u'2.0', u'id': 2, u'error': None} 2013-07-31 21:44:11,338 DEBUG protocol protocol.lineReceived # > {u'jsonrpc': u'2.0', u'params': [14.52613027417101], u'method': u'mining.set_difficulty', u'id': 512789334} 2013-07-31 21:44:11,339 INFO proxy client_service.handle_event # Setting new difficulty: 14.5261302742 2013-07-31 21:44:11,339 DEBUG protocol protocol.writeJsonResponse # < {"error": null, "id": 512789334, "result": null} 2013-07-31 21:44:11,340 INFO proxy mining_proxy.on_disconnect # Disconnected from Stratum pool at 127.0.0.1:9327 2013-07-31 21:44:11,340 INFO stats stats.print_stats # 0 peers connected, state changed 1 times 2013-07-31 21:44:11,340 DEBUG socket_transport socket_transport.clientConnectionLost # [Failure instance: Traceback (failure with no frames): : Connection to the other side was lost in a non-clean fashion.

moopless commented 11 years ago

@zarethernet This may have been filed under the wrong products. This repo is for the stratum-mining-litecoin server service. From the logs and description it looks like you are looking for the stratum-proxy and p2pool. I will close this as a third party issue.

nberesnev83 commented 11 years ago

I beg your pardon, it is a string starting stratum-minin-litecoin with a slightly modified structure. If you run a stratum-mining-litecoin on the readme that he is trying to connect but can not. Is it possible to launch stratum-mining-litecoin connecting to p2pool?

moopless commented 11 years ago

@zarethernet stratum-mining-litecoin is not the stratum-mining-proxy, but rather a service that does the work distribution, share collection similar, and block submitting similar to what p2pool does.

From the logs we can see that he is using the stratum-mining-proxy. Please reach out to someone who works with the proxy. He is probably using this fork https://github.com/mooc0w/stratum-mining-proxy or a fork from it.

I would suggest starting with the versions based on the messages below.

2013-07-31 21:44:08,465 DEBUG protocol protocol.writeJsonResponse # < {"error": null, "id": 940918514, "result": null}
/usr/lib/python2.6/site-packages/stratum-0.2.13-py2.6.egg/stratum/protocol.py:201: DeprecationWarning:     Returning a value other than None from stratum.protocol.ClientProtocol.dataReceived is deprecated since Twisted 11.0.0.
return self.lineLengthExceeded(self._buffer)
nberesnev83 commented 11 years ago

I will try to contact the developer stratum-mining-proxy, I hope to answer. Thanks anyway.

moopless commented 11 years ago

If you can't get any help over there let me know. We can take a look at it. I just haven't used the mining proxy, so I would have to look through the code.

nberesnev83 commented 11 years ago

Maybe off topic but I ask, I've been studying your code, I want it to do for other Coin. Where can I get information such as the (convert difficulty to target diff1 in template_registry.py) and the parameters in the hash (Now let's do the hard work) in the same file.