litecoincash-project / cpuminer-multi

Features the Minotaur and MinotaurX hash algorithms, and segwit support, for Ring [RNG] and Litecoin Cash [LCC].
Other
42 stars 32 forks source link

[Fix] getblocktemplate parameters for MinotaurX algorithm #5

Closed OBTfx closed 3 years ago

OBTfx commented 3 years ago

Proposal for #4

With a flag, it is evaluated whether or not to add the parameters to the GBT method to call the correct template for the MinotaurX algorithm. #

**CPUMINER - Algo MinotaurX***

./cpuminer -a minotaurx -o http://127.0.0.1:62455 -O user:pass -t 1 --coinbase-addr=t9dJdqruJ7XybguxLMTR3JK5yu2hgqZAFn --coinbase-sig=OBTfx_MTX_NX --api-bind 127.0.0.1:4049 -R 5 --no-longpoll --cpu-affinity 2 -PD

** cpuminer-multi 1.5 by Tanner^LCC **
LCC donation address: CashCFfv8CmdWo6wyMGQWtmQnaToyhgsWr

[2021-05-23 05:25:16] Binding process to cpu mask 2
[2021-05-23 05:25:16] 1 miner threads started, using 'minotaurx' algorithm.
[2021-05-23 05:25:16] Binding thread 0 to cpu mask 2
[2021-05-23 05:25:16] JSON protocol request:
{"method": "getblocktemplate", "params": [{"powalgo": "minotaurx", "capabilities": ["coinbasetxn", "coinbasevalue", "longpoll", "workid"], "rules": ["segwit"]}], "id":0}

* Rebuilt URL to: http://127.0.0.1:62455/
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 62455 (#0)
* Server auth using Basic with user 'user'
> POST / HTTP/1.1
Host: 127.0.0.1:62455
Authorization: Basic dXNlcjpwYXNz
Accept: */*
Accept-Encoding: deflate, gzip
Content-Type: application/json
Content-Length: 171
User-Agent: cpuminer-multi/1.5
X-Mining-Extensions: longpoll reject-reason
Expect: 100-continue

< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
< Content-Type: application/json
< Date: Sun, 23 May 2021 03:25:16 GMT
< Content-Length: 802
< 
* Connection #0 to host 127.0.0.1 left intact
[2021-05-23 05:25:16] JSON protocol response:
{
   "result": {
      "capabilities": [
         "proposal"
      ],
      "version": 65536,
      "rules": [
         "csv",
         "segwit",
         "hive",
         "hive_1_1",
         "minotaurx"
      ],
      "vbavailable": {},
      "vbrequired": 0,
      "previousblockhash": "89d01709b57f5666322cb886242321e0f03e133f760133e506080d7e6715559b",
      "transactions": [],
      "coinbaseaux": {
         "flags": ""
      },
      "coinbasevalue": 5000000000,
      "longpollid": "89d01709b57f5666322cb886242321e0f03e133f760133e506080d7e6715559b25",
      "target": "000000a916000000000000000000000000000000000000000000000000000000",
      "mintime": 1621735574,
      "mutable": [
         "time",
         "transactions",
         "prevblock"
      ],
      "noncerange": "00000000ffffffff",
      "sigoplimit": 80000,
      "sizelimit": 4000000,
      "weightlimit": 4000000,
      "curtime": 1621740316,
      "bits": "1e00a916",
      "height": 2324,
      "default_witness_commitment": "6a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf9"
   },
   "error": null,
   "id": 0
}
[2021-05-23 05:25:16] Current block is 2324
[2021-05-23 05:25:16] got new work in 13.59 ms

#

**CPUMINER - Algo SHA-256d***

./cpuminer -a sha256d -o http://127.0.0.1:62455 -O user:pass -t 1 --coinbase-addr=t7vGHuMvy18cXSaXngCDcj6sVyaL643kQZ --coinbase-sig=OBTfx_SHA_NX --api-bind 127.0.0.1:4050 -R 5 --no-longpoll --cpu-affinity 8 -PD

** cpuminer-multi 1.5 by Tanner^LCC **
LCC donation address: CashCFfv8CmdWo6wyMGQWtmQnaToyhgsWr

[2021-05-23 05:25:12] Binding process to cpu mask 8
[2021-05-23 05:25:12] 1 miner threads started, using 'sha256d' algorithm.
[2021-05-23 05:25:12] Binding thread 0 to cpu mask 8
[2021-05-23 05:25:12] JSON protocol request:
{"method": "getblocktemplate", "params": [{"capabilities": ["coinbasetxn", "coinbasevalue", "longpoll", "workid"], "rules": ["segwit"]}], "id":0}

* Rebuilt URL to: http://127.0.0.1:62455/
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 62455 (#0)
* Server auth using Basic with user 'user'
> POST / HTTP/1.1
Host: 127.0.0.1:62455
Authorization: Basic dXNlcjpwYXNz
Accept: */*
Accept-Encoding: deflate, gzip
Content-Type: application/json
Content-Length: 147
User-Agent: cpuminer-multi/1.5
X-Mining-Extensions: longpoll reject-reason
Expect: 100-continue

< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
< Content-Type: application/json
< Date: Sun, 23 May 2021 03:25:12 GMT
< Content-Length: 798
< 
* Connection #0 to host 127.0.0.1 left intact
[2021-05-23 05:25:12] JSON protocol response:
{
   "result": {
      "capabilities": [
         "proposal"
      ],
      "version": 0,
      "rules": [
         "csv",
         "segwit",
         "hive",
         "hive_1_1",
         "minotaurx"
      ],
      "vbavailable": {},
      "vbrequired": 0,
      "previousblockhash": "89d01709b57f5666322cb886242321e0f03e133f760133e506080d7e6715559b",
      "transactions": [],
      "coinbaseaux": {
         "flags": ""
      },
      "coinbasevalue": 5000000000,
      "longpollid": "89d01709b57f5666322cb886242321e0f03e133f760133e506080d7e6715559b25",
      "target": "0000000031046400000000000000000000000000000000000000000000000000",
      "mintime": 1621735574,
      "mutable": [
         "time",
         "transactions",
         "prevblock"
      ],
      "noncerange": "00000000ffffffff",
      "sigoplimit": 80000,
      "sizelimit": 4000000,
      "weightlimit": 4000000,
      "curtime": 1621740312,
      "bits": "1c310464",
      "height": 2324,
      "default_witness_commitment": "6a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf9"
   },
   "error": null,
   "id": 0
}
[2021-05-23 05:25:12] Current block is 2324
[2021-05-23 05:25:12] got new work in 1.46 ms