Pages:
Author

Topic: [ANN] Stratum mining protocol - ASIC ready - page 16. (Read 146166 times)

newbie
Activity: 26
Merit: 0
December 22, 2012, 08:44:14 AM
Can please someone take a look on this, i did manually install python 2.7 and twisted 12.2 and still facing same problem

2012-12-22 04:25:24,738 ERROR protocol protocol.dataReceived # Processing of message failed
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/stratum-0.2.11-py2.7.egg/stratum/protocol.py", line 181, in dataReceived
    self.lineReceived(line, request_counter)
  File "/usr/local/lib/python2.7/site-packages/stratum-0.2.11-py2.7.egg/stratum/protocol.py", line 212, in lineReceived
    raise custom_exceptions.ProtocolException("Cannot decode message '%s'" % line)
'rotocolException: Cannot decode message 'POST / HTTP/1.1


As slush said above, your client is talking http to a stratum/json port. you most likly have the pool specified on your client as:
http://yourhost.somewhere:3333
and it should be:
stratum+tcp://yourhost.somewhere:3333

and stratum doesn't understand http (nor should it.)
hero member
Activity: 489
Merit: 500
Immersionist
December 21, 2012, 10:55:23 PM
Yesterday I had what seemed to be an unlimited loop of the following in my (proxy) log. Restart solved the issue.

Code:
---  ---
  File "/usr/local/lib/python2.7/dist-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 134, in maybeDeferred
    result = f(*args, **kw)
  File "/home/worker/stratum-mining-proxy/mining_libs/worker_registry.py", line 37, in authorize
    d = self.f.rpc('mining.authorize', [worker_name, password])
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.11-py2.7.egg/stratum/socket_transport.py", line 89, in rpc
    raise custom_exceptions.TransportException("Not connected")
stratum.custom_exceptions.TransportException: Not connected
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/web/server.py", line 156, in process
    self.render(resrc)
  File "/usr/local/lib/python2.7/dist-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/web/server.py", line 191, in render
    body = resrc.render(self)
  File "/usr/local/lib/python2.7/dist-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/web/resource.py", line 216, in render
    return m(request)
  File "/home/worker/stratum-mining-proxy/mining_libs/getwork_listener.py", line 164, in render_POST
    d = defer.maybeDeferred(self.workers.authorize, worker_name, password)
--- ---
newbie
Activity: 22
Merit: 0
December 21, 2012, 10:39:47 PM
Can please someone take a look on this, i did manually install python 2.7 and twisted 12.2 and still facing same problem

2012-12-22 04:25:24,738 ERROR protocol protocol.dataReceived # Processing of message failed
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/stratum-0.2.11-py2.7.egg/stratum/protocol.py", line 181, in dataReceived
    self.lineReceived(line, request_counter)
  File "/usr/local/lib/python2.7/site-packages/stratum-0.2.11-py2.7.egg/stratum/protocol.py", line 212, in lineReceived
    raise custom_exceptions.ProtocolException("Cannot decode message '%s'" % line)
'rotocolException: Cannot decode message 'POST / HTTP/1.1
hero member
Activity: 981
Merit: 500
DIV - Your "Virtual Life" Secured and Decentralize
December 21, 2012, 02:50:11 AM
Didn't someone have instructions to actually compile CGMiner  to run on openWRT?
It would both run stratum and usb devices solving your probem if I am right.
full member
Activity: 148
Merit: 100
December 21, 2012, 01:57:58 AM
there is no python-dev for openWrt and i will not cross compile anything, so my fpga will keep mining with getwork :-/

should i ever get my asic i will use the raspberry, i guess it shouldn't be a problem running stratum on it
newbie
Activity: 22
Merit: 0
December 20, 2012, 11:34:26 PM
i also did completly reinstall python + twisted in meanwhile while i was waiting for respond
now i even have this problem
http://pastebin.com/mH9hkgm7
but it is not problem with simplejson since i have it
i dont have idea what is problem
newbie
Activity: 22
Merit: 0
December 20, 2012, 11:05:16 PM
You did not read all
http://pastebin.com/dpgyvsX0
check this out
why rotocolException ? there is some problem with twisted version?
legendary
Activity: 1386
Merit: 1097
December 20, 2012, 10:37:48 PM
i have this problem
http://pastebin.com/Rn8pEkP9

It just means that client is talking to the server with HTTP protocol, instead of Stratum.
newbie
Activity: 22
Merit: 0
December 20, 2012, 10:12:55 PM
i have this problem
http://pastebin.com/Rn8pEkP9
legendary
Activity: 1386
Merit: 1097
December 20, 2012, 06:04:02 PM
You need to install python-dev, which will install gcc as well. It is mentioned in installation howto.
full member
Activity: 148
Merit: 100
December 20, 2012, 02:04:44 PM
Quote
Best match: Twisted 12.2.0
Downloading http://pypi.python.org/packages/source/T/Twisted/Twisted-12.2.0.tar.bz2#md5=9a321b904d01efd695079f8484b37861
Processing Twisted-12.2.0.tar.bz2
error: Not a recognized archive type: /tmp/easy_install-BSz0mi/Twisted-12.2.0.tar.bz2
root@OpenWrt:~/slush0-stratum-mining-proxy-27e8dce#

OS is OpenWrt
i tried git clone and the tarball
i installed bzip2

any ideas?

update:
downloaded twisted-12.2.0 and tried to install it
Quote
ccache_cc -fno-strict-aliasing -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -DNDEBUG -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -fPIC -I/usr/include/python2.7 -c twisted/test/raiser.c -o build/temp.linux-mips-2.7/twisted/test/raiser.o
unable to execute ccache_cc: No such file or directory
error: command 'ccache_cc' failed with exit status 1
so i guess that means no stratum without gcc?
legendary
Activity: 1386
Merit: 1097
December 18, 2012, 07:35:00 PM
Note that the python midstate module is from http://gitorious.org/midstate/midstate
It would be nice if fixes/improvements were submitted to the main codebase rather than just a fork.

Yes, the original version is for python3 only. Unfortunately source requires some changes to make it compatible with python2x and making patch for upstream is out of my C skills.
newbie
Activity: 26
Merit: 0
December 18, 2012, 07:19:49 PM
For stratum mining pool i dont understant one think
I should first have this proxy runned or it can work normaly without it ?
since no much documenation about mining pool(for proxy yes i tryed proxy for other pool and it works) i dont understand how stratum mining pool works, i downloaded it and i only have config file, dont understand even how to turn it on, so i would like to ask here?

Josh,

If you are just looking to connect to a pool with stratum then just use cgminer (It supports it internally, so no extra steps.)

If you are looking to run your own solo pool:
Slush's stratum pool is kept very simple and is for pool software writers. I've forked it and made it a little more suitable for fulltime use (added things like db support, stats page, basic install instructions, etc...) it's at: https://github.com/generalfault/stratum-mining

If you are looking to connect non-stratum aware miners to a stratum pool then use the proxy.

legendary
Activity: 2576
Merit: 1186
December 18, 2012, 06:39:51 PM
Note that the python midstate module is from http://gitorious.org/midstate/midstate
It would be nice if fixes/improvements were submitted to the main codebase rather than just a fork.
legendary
Activity: 1386
Merit: 1097
December 18, 2012, 06:28:12 PM
Could python version be automatically detected?

I made this to fill my needs, but auto-detecting would be nice. Patches are welcome :-)
legendary
Activity: 1036
Merit: 1000
DARKNETMARKETS.COM
December 18, 2012, 05:09:51 PM
I tried to compile
Code:
~/stratum-mining-proxy/midstatec$ make
gcc -march=native -Wall -funroll-all-loops -O3 -fstrict-aliasing -Wall -std=c99 -I/usr/include/python2.7  midstatemodule.c -o test -Wl,-O1 -Wl,--as-needed -lpython2.7
midstatemodule.c:5:20: error: Python.h: No such file or directory
midstatemodule.c:96: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
midstatemodule.c:138: error: array type has incomplete element type
midstatemodule.c:139: error: âmidstate_helperâ undeclared here (not in a function)
midstatemodule.c:139: error: âMETH_Oâ undeclared here (not in a function)
midstatemodule.c:164: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âinitmidstateâ
make: *** [test] Error 1
Code:
$ python --version
Python 2.6.6
Code:
$ apt-cache policy python
python:
  Installed: 2.6.6-3+squeeze7
  Candidate: 2.6.6-3+squeeze7
Is python2.7 really needed? On my Debian I have version 2.6. I changed 2 lines in Makefile:
Code:
CFLAGS = -march=native -Wall -funroll-all-loops -O3 -fstrict-aliasing -Wall -std=c99 -I/usr/include/python2.6
LDFLAGS = -Wl,-O1 -Wl,--as-needed -lpython2.6
And it compiled without problems Smiley As you see here:
Code:
2012-12-18 20:58:50,564 INFO proxy jobs. # Using C extension for midstate speedup. Good!
2012-12-18 20:58:50,872 WARNING proxy mining_proxy.main # Stratum proxy version: 1.3.0
Could python version be automatically detected?
legendary
Activity: 1036
Merit: 1000
DARKNETMARKETS.COM
December 18, 2012, 01:56:13 PM
Today I switched my unsupported Ztex BTCMiner to use local Stratum proxy on BitMinter mining pool. Everything is working flawless. Now I can see, how often my miner is asking for more work and how often reporting shares (Diff 1 share theoretically is found every 0.5sec; thanks to Stratum and var-diff now I have Diff 8 shares).
From now on everything is in my local network, saving bandwidth, resources and decreasing amount of stale shares.
Marek, thank you for designing and supporting such a great protocol Smiley
newbie
Activity: 22
Merit: 0
December 18, 2012, 11:33:46 AM
For stratum mining pool i dont understant one think
I should first have this proxy runned or it can work normaly without it ?
since no much documenation about mining pool(for proxy yes i tryed proxy for other pool and it works) i dont understand how stratum mining pool works, i downloaded it and i only have config file, dont understand even how to turn it on, so i would like to ask here?
hero member
Activity: 489
Merit: 500
Immersionist
December 14, 2012, 04:13:49 AM
No worries, I commented it out in the source and restarted the proxy already.
legendary
Activity: 1386
Merit: 1097
December 13, 2012, 09:53:15 PM
print '!!!', self.stratum_port

Oh, sorry! Please update, I just fixed it.
Pages:
Jump to: