Bitcoin Forum
November 25, 2017, 10:04:38 AM *
News: Latest stable version of Bitcoin Core: 0.15.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 18 19 [20] 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 »
  Print  
Author Topic: [ANN] Stratum mining protocol - ASIC ready  (Read 143702 times)
joshstandalone
Newbie
*
Offline Offline

Activity: 22


View Profile
December 18, 2012, 04:33:46 PM
 #381

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?
1511604278
Hero Member
*
Offline Offline

Posts: 1511604278

View Profile Personal Message (Offline)

Ignore
1511604278
Reply with quote  #2

1511604278
Report to moderator
Join ICO Now Coinlancer is Disrupting the Freelance marketplace!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
lenny_
Legendary
*
Offline Offline

Activity: 1050


DARKNETMARKETS.COM


View Profile WWW
December 18, 2012, 06:56:13 PM
 #382

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

DARKNET MARKETS >> https://DARKNETMARKETS.COM
lenny_
Legendary
*
Offline Offline

Activity: 1050


DARKNETMARKETS.COM


View Profile WWW
December 18, 2012, 10:09:51 PM
 #383

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.<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?

DARKNET MARKETS >> https://DARKNETMARKETS.COM
slush
Legendary
*
Offline Offline

Activity: 1372



View Profile WWW
December 18, 2012, 11:28:12 PM
 #384

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 Offline

Activity: 2268



View Profile
December 18, 2012, 11:39:51 PM
 #385

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.

generalfault
Newbie
*
Offline Offline

Activity: 24


View Profile WWW
December 19, 2012, 12:19:49 AM
 #386

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.


Did I help you? Tiny Donations always welcome : 15Zk7DoFYJ7hESpZzmix1WLkomTMGW81c2
slush
Legendary
*
Offline Offline

Activity: 1372



View Profile WWW
December 19, 2012, 12:35:00 AM
 #387

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.

shad
Full Member
***
Offline Offline

Activity: 148


View Profile
December 20, 2012, 07:04:44 PM
 #388

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?

15dUzJEUkxgjrtcvDSdsEDkXu7E7RCbNN3
slush
Legendary
*
Offline Offline

Activity: 1372



View Profile WWW
December 20, 2012, 11:04:02 PM
 #389

You need to install python-dev, which will install gcc as well. It is mentioned in installation howto.

joshstandalone
Newbie
*
Offline Offline

Activity: 22


View Profile
December 21, 2012, 03:12:55 AM
 #390

i have this problem
http://pastebin.com/Rn8pEkP9
slush
Legendary
*
Offline Offline

Activity: 1372



View Profile WWW
December 21, 2012, 03:37:48 AM
 #391

i have this problem
http://pastebin.com/Rn8pEkP9

It just means that client is talking to the server with HTTP protocol, instead of Stratum.

joshstandalone
Newbie
*
Offline Offline

Activity: 22


View Profile
December 21, 2012, 04:05:16 AM
 #392

You did not read all
http://pastebin.com/dpgyvsX0
check this out
why rotocolException ? there is some problem with twisted version?
joshstandalone
Newbie
*
Offline Offline

Activity: 22


View Profile
December 21, 2012, 04:34:26 AM
 #393

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
shad
Full Member
***
Offline Offline

Activity: 148


View Profile
December 21, 2012, 06:57:58 AM
 #394

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
Hero Member
*****
Offline Offline

Activity: 615


INS Ecosystem


View Profile
December 21, 2012, 07:50:11 AM
 #395

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.


███ █ █
███ █ █
███ █ █
███ █ █
███ █ █
███ █ █
███ █ █
███ █ █
███ █ █
███ █ █
███ █ █
███ █ █
███ █ █

█ █ ███
█ █ ███
█ █ ███
█ █ ███
█ █ ███
█ █ ███
█ █ ███
█ █ ███
█ █ ███
█ █ ███
█ █ ███
█ █ ███
█ █ ███
●  Whitepaper
●  ANN Thread
●  Reddit
●  Telegram
●  Twitter
●  Facebook

███
███
███
███
███
███
███
███
███
███
███
███
███
joshstandalone
Newbie
*
Offline Offline

Activity: 22


View Profile
December 22, 2012, 03:39:47 AM
 #396

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
Hero Member
*****
Offline Offline

Activity: 488


Immersionist


View Profile
December 22, 2012, 03:55:23 AM
 #397

Yesterday I had what seemed to be an unlimited loop of the following in my (proxy) log. Restart solved the issue.

Code:
--- <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 Offline

Activity: 24


View Profile WWW
December 22, 2012, 01:44:14 PM
 #398

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.)

Did I help you? Tiny Donations always welcome : 15Zk7DoFYJ7hESpZzmix1WLkomTMGW81c2
antirack
Hero Member
*****
Offline Offline

Activity: 488


Immersionist


View Profile
December 22, 2012, 02:20:59 PM
 #399

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'

Code:
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 Offline

Activity: 24


View Profile WWW
December 22, 2012, 02:47:45 PM
 #400

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'

Code:
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...  Grin

Did I help you? Tiny Donations always welcome : 15Zk7DoFYJ7hESpZzmix1WLkomTMGW81c2
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 [20] 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 »
  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!