Closed Qwertylex closed 6 years ago
As far as I know hodl doesn't support getwork. As I recall there was a bounty to implement it but it was never done. Do you know something I don't?
Did you know optiminer's hodlminer-wolf works just fine with hodlcoind? If it isn't using getwork, what is it using? https://github.com/Optiminer/hodlminer-wolf
hodlminer-wolf]$ sudo ./hodlminer --debug --coinbase-addr=HQ3X<redacted> -u <redacted> -p <redacted> -o http://127.0.0.1:11989/
[2018-02-04 10:47:49] Binding thread 0 to cpu 0
[2018-02-04 10:47:49] Binding thread 1 to cpu 1
[2018-02-04 10:47:49] Binding thread 2 to cpu 2
[2018-02-04 10:47:49] 4 miner threads started, using 'hodl' algorithm.
[2018-02-04 10:47:49] Binding thread 3 to cpu 3
[2018-02-04 10:47:49] DEBUG: got new work in 1 ms
[2018-02-04 10:47:49] Long-polling activated for http://127.0.0.1:11989/
Time for GenRandomGarbage: 0.491309
Time for GenRandomGarbage: 0.493384
Time for GenRandomGarbage: 0.494199
Time for GenRandomGarbage: 0.495679
[2018-02-04 10:47:51] thread 2: 261 hashes, 120.63 hash/s
[2018-02-04 10:47:51] thread 1: 237 hashes, 109.13 hash/s
[2018-02-04 10:47:51] thread 3: 272 hashes, 125.23 hash/s
[2018-02-04 10:47:51] thread 0: 252 hashes, 115.15 hash/s
[2018-02-04 10:47:51] DEBUG: got new work in 1 ms
Time for GenRandomGarbage: 0.474922
Time for GenRandomGarbage: 0.475046
Time for GenRandomGarbage: 0.476204
Time for GenRandomGarbage: 0.477965
Thanks for the info. I'll look into it but it may take a while.
I may have found the problem but I need your help testing it, I hope you compile from source. I can't test myself and the fix may not work or may break existing alogs so I can't just release it.
It looks like hodl uses a new GBT block version number and the version test is failing causing the miner to switch to getwork which apparently isn't supported in the wallet.
I didn't see any obvious other effects of the new version (just a quick scan) so simply increasing the supported version may fix it.
If you can please make the following change to file cpu-miner.c at line 435, compile and restest:
old: #define BLOCK_VERSION_CURRENT 3 new: #define BLOCK_VERSION_CURRENT 4
Let me know how it goes.
now I get:
[2018-02-07 23:21:40] Current block is 393506
[2018-02-07 23:21:42] CPU #2: 244 H, 137.91 H/s
[2018-02-07 23:21:42] CPU #3: 228 H, 128.86 H/s
[2018-02-07 23:21:42] CPU #1: 264 H, 149.18 H/s
[2018-02-07 23:21:42] CPU #0: 251 H, 141.68 H/s
[2018-02-07 23:21:43] Current block is 393506
[2018-02-07 23:21:44] Current block is 393506
[2018-02-07 23:21:44] 127.0.0.1:11989/ detected new block, diff 0.008, target 0.000
[2018-02-07 23:21:45] JSON-RPC call failed: Method not found
[2018-02-07 23:21:46] Current block is 393506
[2018-02-07 23:21:46] CPU #2: 250 H, 145.78 H/s
[2018-02-07 23:21:49] CPU #3: 260 H, 146.87 H/s
Thanks for testing. I guess it wasn't as simple as I hoped. It looks like an improvement, it didn't switch to getwork and detected a new block. I'll have to find the missing methods and port them from wolf.
Have you done any more testing? I've done some code analysis and it appears cpuminer-opt is masking a RPC call that hodlminer-wolf does not. It's not a stretch to assume that's the one causing the error. It also appears to have no consequences, which supports my initial speculation that the hashing was a good sign.
It would be good if you did another test and let it run. Please include -D for debug logs
I haven't tested further, but now I am. I'll give it a day or two and see if I get any blocks.
I didn't find any blocks in 24 straight hours of mining + 24 non-continuous hours of mining. I can try longer if you want, but I usually get 1 to 3 blocks in 24h I'm going back to https://github.com/Optiminer/hodlminer-wolf for now.
If there were no other errors it appears like it never attempted to submit a block. We know it hashes correctly so it looks like it never found a solution. Unfortunately there are no debug logs comparing hash to target. I'm preparing a new release with the change in block version support. I can also add some debug logs.
cpuminer-opt-3.8.3 is released. Added support for gbt block version 4, fixed method not found error, added debug log to display hash target.
Thanks for all your testing. It would be nice to get confirmation one way or another. If it never hits the target and tries to submit a solution it's inconclusive. It could be a targetting issue or just bad luck.
You're absolutely right, it could be bad luck. I'll test again with your new version in a couple of days.
The GBT changes I made in v3.8.3 broke getwork so I had to back them out, including the block version change, although I don't think it contributed to the problem. I have to take a good look at the data to figure out what was going on before I can move forward with GBT.
It's probably more productive for you to just use Optiminer/Wolf until then.
There may still be value in testing v3.8.3.1. Another user posted some data mining nist5 using gbt and there was no sign of the method not found error. This indicates a clear difference between hodl and other algos using GBT. Although v3.8.3.1 broke getwork and GBT for other algos it may have been good for Hodl.
Nevermind, I found some code differences in hodl gbt I need to fix.
Stay tuned for a limited release with support for hodl gbt. I think I've found all the differences.
Give it a try when you can.
https://github.com/JayDDee/cpuminer-opt/releases/tag/v3.8.3.3
Have you done any testing with 3.8.3.3? I'd like to address any issues before releasing 3.8.4.
The lack of any updates indicates a loss of interest. I will assume it now works.