JayDDee / cpuminer-opt

Optimized multi algo CPU miner
Other
775 stars 545 forks source link

Miner doesn't work for solo mining via RPC #198

Closed minkcrypto-zz closed 5 years ago

minkcrypto-zz commented 5 years ago

Gives me error:

[2019-07-09 01:30:06] Binding process to cpu mask f
[2019-07-09 01:30:06] Binding thread 0 to cpu mask f
[2019-07-09 01:30:06] 4 miner threads started, using 'cpupower' algorithm.
[2019-07-09 01:30:06] Binding thread 1 to cpu mask f
[2019-07-09 01:30:06] Binding thread 3 to cpu mask f
[2019-07-09 01:30:06] Binding thread 2 to cpu mask f
[2019-07-09 01:30:06] enter gbt_work_decode
[2019-07-09 01:30:06] Current block is 2469
[2019-07-09 01:30:06] Long-polling on http://127.0.0.1:19707
[2019-07-09 01:30:06] JSON-RPC call failed: Method not found
[2019-07-09 01:30:06] enter gbt_work_decode
[2019-07-09 01:30:06] Current block is 2469
[2019-07-09 01:30:06] enter gbt_work_decode
[2019-07-09 01:30:06] Current block is 2469
[2019-07-09 01:30:06] enter gbt_work_decode
[2019-07-09 01:30:06] Current block is 2469
[2019-07-09 01:30:21] CPU #2: 4096 H, 286.57 H/s
[2019-07-09 01:30:21] CPU #1: 4096 H, 284.48 H/s
[2019-07-09 01:30:21] CPU #0: 4096 H, 281.81 H/s
[2019-07-09 01:30:21] CPU #3: 4096 H, 274.95 H/s
[2019-07-09 01:31:39] 127.0.0.1:19707 detected new block, diff 0.003, target 0.000
minkcrypto-zz commented 5 years ago

Connection itself works, getblocktemplate works on wallet however it doesn't work with miner

minkcrypto-zz commented 5 years ago

Ok, I think I am almost close to this issue

[2019-07-09 01:36:42]< JSON-RPC call failed: Method not found
D[2019-07-09 01:36:42]ate: Mon, 08 Jul 2019 16:36:42 GMT
 JSON protocol request:
{"method": "getblocktemplate", "params": [{"capabilities": ["coinbasetxn", "coinbasevalue", "longpoll", "workid"], "longpollid": "00000089ceb1f47296bca123ba1721fdfa3d2fb09bd2e5a32a8aa1af4de1ad0118"}], "id":0}

<

log from miner

{
  "capabilities": [
    "proposal"
  ],
  "version": 536870912,
  "rules": [
    "csv",
    "segwit"
  ],
  "vbavailable": {
  },
  "vbrequired": 0,
  "previousblockhash": "00000089ceb1f47296bca123ba1721fdfa3d2fb09bd2e5a32a8aa1af4de1ad01",
  "transactions": [
  ],
  "coinbaseaux": {
    "flags": ""
  },
  "coinbasevalue": 5000000000,
  "longpollid": "00000089ceb1f47296bca123ba1721fdfa3d2fb09bd2e5a32a8aa1af4de1ad0118",
  "target": "0000013c01000000000000000000000000000000000000000000000000000000",
  "mintime": 1562603499,
  "mutable": [
    "time",
    "transactions",
    "prevblock"
  ],
  "noncerange": "00000000ffffffff",
  "sigoplimit": 80000000,
  "sizelimit": 4000000000,
  "weightlimit": 4000000000,
  "curtime": 1562603790,
  "bits": "1e013c01",
  "height": 2476
}

on cli

JayDDee commented 5 years ago

I'm not sure I understand the problem. It looks like it failed once but subsequently succeeded. It even received a new block after the initial error. What happens if you let it continue?

minkcrypto-zz commented 5 years ago

I don't think miner will work normally but I will try.

JayDDee commented 5 years ago

Why close, Does it work?

minkcrypto-zz commented 5 years ago

I haven't seen the miner submitting the share but I believe it may work.

JayDDee commented 5 years ago

I'm still curious about the intitial error message. I don't know if it happens with other coins/algos. Reopen if there's anything I should follow up.

The new output format hasn't been tested with gbt and some parts are enabled only for stratum. I may enable for gbt next release. You can follow https://github.com/JayDDee/cpuminer-opt/issues/190 to raise any issues with the output when using gbt.