Closed ivoras closed 7 years ago
Hi
Stratum uses GetBlockTemplate to communicate with bitcoind. Older versions of stratum mining did support getwork mining but its been deprecated a long time ago on our end.
Ahmed
hi,
I'm not writing this ticket because I want to use getwork, I'm writing it because I've checked out stratum-mining yesterday and followed the instructions in the wiki, and it reports the following in the logs:
2015-04-17 07:24:27,286 INFO block_updater block_updater.run # Checking for new block.
2015-04-17 07:24:27,287 ERROR block_updater block_updater.run # UpdateWatchdog.run failed
Traceback (most recent call last):
File "/srv/stratum/stratum-mining/lib/block_updater.py", line 49, in run
prevhash = util.reverse_hash((yield self.bitcoin_rpc.prevhash()))
Error: 404 Not Found
2015-04-17 07:24:27,288 DEBUG block_updater block_updater.schedule # Next prevhash update in 4.994 sec
I've attached tcpdump and seen that the "404" is returned by bitcoind for "method not found" in response to the getwork json-rpc call.
So I'm asking you for verification: is my conclusion that I need to be running bitcoind 0.9 with stratum-mining correct?
stratum mining does not use getwork anywhere. So you are mistaken.
I could be mistaken, but the log output I've quoted is not.
Can you help me sort this out then? I have the latest version of https://github.com/Crypto-Expert/stratum-mining :
commit b9f2bcea36faea27c81a980565f56733a30035b9
Author: ahmedbodi <ahmed_bodi@msn.com>
Date: Thu Jun 26 22:35:41 2014 +0100
... and in externals/stratum, by following the instructions from the wiki at https://github.com/Crypto-Expert/stratum-mining/wiki/Getting-Started-With-Stratum , I have:
commit 8ba1b5fd8a802b981f31dace4cf920cfb4a3907c
Author: slush <info@bitcoin.cz>
Date: Sat Mar 30 22:49:10 2013 +0100
Are these not the latest versions?
Grepping for "getwork" in the stratum-mining root shows that getwork is used in the prevhash() method in lib/bitcoin_rpc.py:
142 @defer.inlineCallbacks
143 def prevhash(self):
144 resp = (yield self._call('getwork', []))
145 try:
146 defer.returnValue(json.loads(resp)['result']['data'][8:72])
147 except Exception as e:
148 log.exception("Cannot decode prevhash %s" % str(e))
149 raise
... which is the source of the exception I'm seeing in logs.
Ah. I was under the impression that you meant getwork for mining. I would then assume that you have to use a BTC base of > 0.10 then im afraid. I will try finishing my cleaned up fork when i get the chance with a fix for getwork.
Ahmed
Have you found a solution?
Hi, No, stratum-mining simply doesn't support recent bitcoind versions. We have not investigated further.
I know of a solution. I shall attempt to get it implemented as soon as i get some free time. However, if anyone wants to contribute a bounty to get it further up in my todo list. my donation adress is: 19A7fSEUmv4RaMYq8gmQMB3SDLFZDsQyws
Ahmed
import pkg_resources
Unhandled Error
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 642, in run
runApp(config)
File "/usr/lib/python2.7/dist-packages/twisted/scripts/twistd.py", line 23, in runApp
_SomeApplicationRunner(config).run()
File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 376, in run
self.application = self.createOrGetApplication()
File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 441, in createOrGetApplication
application = getApplication(self.config, passphrase)
---
Failed to load application: expected an indented block (bitcoin_rpc.py, line 151)
need help)
@ahmedbodi I am still getting the same errors in regards to getwork not being supported. Any plans on deploying your fix for this? (or if anyone else has any ideas for that matter....)
im now getting a similar issue with stratum on dash ...
is there a workaround that we are missing here? ...
Your best bet is to run something like UNOMP for dash to be honest. I'd say its much more supported
OK this should finally be fixed. i got round to it eventually lol
I'm using bitcoind 0.10 and it looks like the getwork RPC is removed:
The getblocktemplate RPC still works.
However, it looks like stratum-mining uses getwork, and so cannot be used with the latest version of bitcoind - is this correct?