joshstandalone
Newbie
Offline
Activity: 22
Merit: 0
|
|
December 18, 2012, 04:33:46 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?
|
|
|
|
|
|
|
|
Be very wary of relying on JavaScript for security on crypto sites. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
|
|
lenny_
Legendary
Offline
Activity: 1036
Merit: 1000
DARKNETMARKETS.COM
|
|
December 18, 2012, 06:56:13 PM Last edit: December 18, 2012, 10:09:40 PM by lenny_ |
|
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
|
|
|
|
lenny_
Legendary
Offline
Activity: 1036
Merit: 1000
DARKNETMARKETS.COM
|
|
December 18, 2012, 10:09:51 PM |
|
I tried to compile ~/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 $ python --version Python 2.6.6 $ 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: 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 As you see here: 2012-12-18 20:58:50,564 INFO proxy jobs.<module> # 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?
|
|
|
|
slush (OP)
Legendary
Offline
Activity: 1386
Merit: 1097
|
|
December 18, 2012, 11: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 :-)
|
|
|
|
Luke-Jr
Legendary
Offline
Activity: 2576
Merit: 1186
|
|
December 18, 2012, 11:39:51 PM |
|
Note that the python midstate module is from http://gitorious.org/midstate/midstateIt would be nice if fixes/improvements were submitted to the main codebase rather than just a fork.
|
|
|
|
generalfault
Newbie
Offline
Activity: 26
Merit: 0
|
|
December 19, 2012, 12:19:49 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?
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-miningIf you are looking to connect non-stratum aware miners to a stratum pool then use the proxy.
|
|
|
|
slush (OP)
Legendary
Offline
Activity: 1386
Merit: 1097
|
|
December 19, 2012, 12:35:00 AM |
|
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.
|
|
|
|
shad
|
|
December 20, 2012, 07:04:44 PM Last edit: December 20, 2012, 08:49:46 PM by shad |
|
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 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?
|
15dUzJEUkxgjrtcvDSdsEDkXu7E7RCbNN3
|
|
|
slush (OP)
Legendary
Offline
Activity: 1386
Merit: 1097
|
|
December 20, 2012, 11:04:02 PM |
|
You need to install python-dev, which will install gcc as well. It is mentioned in installation howto.
|
|
|
|
joshstandalone
Newbie
Offline
Activity: 22
Merit: 0
|
|
December 21, 2012, 03:12:55 AM |
|
|
|
|
|
slush (OP)
Legendary
Offline
Activity: 1386
Merit: 1097
|
|
December 21, 2012, 03:37:48 AM |
|
It just means that client is talking to the server with HTTP protocol, instead of Stratum.
|
|
|
|
joshstandalone
Newbie
Offline
Activity: 22
Merit: 0
|
|
December 21, 2012, 04:05:16 AM |
|
You did not read all http://pastebin.com/dpgyvsX0check this out why rotocolException ? there is some problem with twisted version?
|
|
|
|
joshstandalone
Newbie
Offline
Activity: 22
Merit: 0
|
|
December 21, 2012, 04:34:26 AM |
|
i also did completly reinstall python + twisted in meanwhile while i was waiting for respond now i even have this problem http://pastebin.com/mH9hkgm7but it is not problem with simplejson since i have it i dont have idea what is problem
|
|
|
|
shad
|
|
December 21, 2012, 06: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
|
15dUzJEUkxgjrtcvDSdsEDkXu7E7RCbNN3
|
|
|
Askit2
|
|
December 21, 2012, 07: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.
|
|
|
|
joshstandalone
Newbie
Offline
Activity: 22
Merit: 0
|
|
December 22, 2012, 03:39:47 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
|
|
|
|
antirack
|
|
December 22, 2012, 03:55:23 AM |
|
Yesterday I had what seemed to be an unlimited loop of the following in my (proxy) log. Restart solved the issue. --- <exception caught here> --- 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) --- <exception caught here> ---
|
|
|
|
generalfault
Newbie
Offline
Activity: 26
Merit: 0
|
|
December 22, 2012, 01:44:14 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
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:3333and it should be: stratum+tcp://yourhost.somewhere:3333 and stratum doesn't understand http (nor should it.)
|
|
|
|
antirack
|
|
December 22, 2012, 02:20:59 PM |
|
I have been trying to get the Pool from generalfault to work, unfortunately I haven't been successful. Failed to load application: 'module' object has no attribute 'DB_USERCACHE_TIME' worker@hp1:~/stratum-mining$ twistd -ny launcher.tac -l - 2012-12-22 22:13:30,526 DEBUG example logger.get_logger # Logging initialized 2012-12-22 22:13:30,533 DEBUG interfaces logger.get_logger # Logging initialized 2012-12-22 22:13:30,535 DEBUG DBInterface logger.get_logger # Logging initialized 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/application/app.py", line 652, in run runApp(config) File "/usr/local/lib/python2.7/dist-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/scripts/twistd.py", line 23, in runApp _SomeApplicationRunner(config).run() File "/usr/local/lib/python2.7/dist-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/application/app.py", line 386, in run self.application = self.createOrGetApplication() File "/usr/local/lib/python2.7/dist-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/application/app.py", line 451, in createOrGetApplication application = getApplication(self.config, passphrase) --- <exception caught here> --- File "/usr/local/lib/python2.7/dist-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/application/app.py", line 462, in getApplication application = service.loadApplication(filename, style, passphrase) File "/usr/local/lib/python2.7/dist-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/application/service.py", line 405, in loadApplication application = sob.loadValueFromFile(filename, 'application', passphrase) File "/usr/local/lib/python2.7/dist-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/persisted/sob.py", line 210, in loadValueFromFile exec fileObj in d, d File "launcher.tac", line 19, in <module> import mining File "/home/worker/stratum-mining/mining/__init__.py", line 1, in <module> from service import MiningService File "/home/worker/stratum-mining/mining/service.py", line 7, in <module> from interfaces import Interfaces File "/home/worker/stratum-mining/mining/interfaces.py", line 14, in <module> dbi = DBInterface.DBInterface() File "/home/worker/stratum-mining/mining/DBInterface.py", line 16, in __init__ self.clearusercache() File "/home/worker/stratum-mining/mining/DBInterface.py", line 53, in clearusercache self.usercacheclock = reactor.callLater( settings.DB_USERCACHE_TIME , self.clearusercache) exceptions.AttributeError: 'module' object has no attribute 'DB_USERCACHE_TIME'
Failed to load application: 'module' object has no attribute 'DB_USERCACHE_TIME'
|
|
|
|
generalfault
Newbie
Offline
Activity: 26
Merit: 0
|
|
December 22, 2012, 02:47:45 PM |
|
I have been trying to get the Pool from generalfault to work, unfortunately I haven't been successful. Failed to load application: 'module' object has no attribute 'DB_USERCACHE_TIME' worker@hp1:~/stratum-mining$ twistd -ny launcher.tac -l - 2012-12-22 22:13:30,526 DEBUG example logger.get_logger # Logging initialized 2012-12-22 22:13:30,533 DEBUG interfaces logger.get_logger # Logging initialized 2012-12-22 22:13:30,535 DEBUG DBInterface logger.get_logger # Logging initialized 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/application/app.py", line 652, in run runApp(config) File "/usr/local/lib/python2.7/dist-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/scripts/twistd.py", line 23, in runApp _SomeApplicationRunner(config).run() File "/usr/local/lib/python2.7/dist-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/application/app.py", line 386, in run self.application = self.createOrGetApplication() File "/usr/local/lib/python2.7/dist-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/application/app.py", line 451, in createOrGetApplication application = getApplication(self.config, passphrase) --- <exception caught here> --- File "/usr/local/lib/python2.7/dist-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/application/app.py", line 462, in getApplication application = service.loadApplication(filename, style, passphrase) File "/usr/local/lib/python2.7/dist-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/application/service.py", line 405, in loadApplication application = sob.loadValueFromFile(filename, 'application', passphrase) File "/usr/local/lib/python2.7/dist-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/persisted/sob.py", line 210, in loadValueFromFile exec fileObj in d, d File "launcher.tac", line 19, in <module> import mining File "/home/worker/stratum-mining/mining/__init__.py", line 1, in <module> from service import MiningService File "/home/worker/stratum-mining/mining/service.py", line 7, in <module> from interfaces import Interfaces File "/home/worker/stratum-mining/mining/interfaces.py", line 14, in <module> dbi = DBInterface.DBInterface() File "/home/worker/stratum-mining/mining/DBInterface.py", line 16, in __init__ self.clearusercache() File "/home/worker/stratum-mining/mining/DBInterface.py", line 53, in clearusercache self.usercacheclock = reactor.callLater( settings.DB_USERCACHE_TIME , self.clearusercache) exceptions.AttributeError: 'module' object has no attribute 'DB_USERCACHE_TIME'
Failed to load application: 'module' object has no attribute 'DB_USERCACHE_TIME' Your config.py is not complete (a setting is missing.) Please read the INSTALL file and follow the instructions. (Step 3 in particular is what you didn't do ... or messed up) read manual.... manual good...
|
|
|
|
|