Pages:
Author

Topic: [ANN]: cpuminer-opt v3.8.8.1, open source optimized multi-algo CPU miner - page 82. (Read 444043 times)

hero member
Activity: 700
Merit: 500

damn, thanks for looking into it though, most profitable coins for cpu mining are either cryptonight or zoin/zcoin or something else/new


Did you try ccminer-tpruvot? It's coded differently and doesn't have the rpc2-login call in workio_thread.

just tried, it issues the following rpc method:
Code:
[2017-03-20 16:17:33] JSON protocol request:
{"method":"getwork","params":[],"id":0}

which results in
Code:
[2017-03-20 16:17:34] JSON decode failed(1): '[' or '{' expected near 'Requested'
[2017-03-20 16:17:34] Requested url is not found
[2017-03-20 16:17:34] get_work failed, retry after 30 seconds

seems ccminer is not compatible with solo mining as else it has to request the getblocktemplate method (?)
legendary
Activity: 1470
Merit: 1114

damn, thanks for looking into it though, most profitable coins for cpu mining are either cryptonight or zoin/zcoin or something else/new


Did you try ccminer-tpruvot? It's coded differently and doesn't have the rpc2-login call in workio_thread.
full member
Activity: 154
Merit: 100
Same bugs there, zcoin, zcoinc, but you could try gbt since the miner is now fixed.

i have done so, didnt work out sadly
Zcoin dev seems not to be so eager to fix it, and no 64bit release.
hero member
Activity: 700
Merit: 500
Same bugs there, zcoin, zcoinc, but you could try gbt since the miner is now fixed.

i have done so, didnt work out sadly
full member
Activity: 154
Merit: 100

with the workio_login thing commented out i get:
Code:
[2017-03-18 23:28:23] 1 miner threads started, using 'cryptonight' algorithm.
[2017-03-18 23:28:23] Tried to call rpc2 command before authentication
[2017-03-18 23:28:23] getblocktemplate failed, falling back to getwork
[2017-03-18 23:28:23] Tried to call rpc2 command before authentication
[2017-03-18 23:28:23] json_rpc_call failed, retry after 10 seconds

i then commented out line 242 and got the same output as above

i then uncommented the workio_login thingy and it went back to the initial output posted before

rpc2_workio_login is called regardless of gbt or not. The login method isn't recongnized
and skipping it results in no authentication. With no working model and no real understanding of the
protocol I think I'm stuck.

damn, thanks for looking into it though, most profitable coins for cpu mining are either cryptonight or zoin/zcoin or something else/new

as a matter of fact i also tested zcoinclassic over this night but it seems their wallet contains the same bug hexxdev encountered in the imported changes from zcoin which my old wallet hadnt had: zcoin classics avg ttf is 0.6h with my hashrate but no block found over the last 7h, might be the same for zcoin itself (not tested)
Same bugs there, zcoin, zcoinc, but you could try gbt since the miner is now fixed.
full member
Activity: 143
Merit: 100
Guys , anyone know a best pool for mining monero ? i want try with i7 5820k @ 4 ghz , and i5 6600 , im waiting ryzen 1700 .

Anyone ? .

Personally, I use nicehash, which mines XMR direct to your BTC account, and this cpuminer-opt client. This is what you need to use:

Code:
cpuminer-aes-avx2.exe -a cryptonight -o stratum+tcp://cryptonight.eu.nicehash.com:3355 -u -p x

Other interesting pool is MoneroPool:

Code:
cpuminer-aes-avx2.exe -a cryptonight -o stratum+tcp://monerol.com:3333 -u . -p x

If you will use Ryzen, read my guide to maximize profits with Monero in Ryzen some comments above.

legendary
Activity: 1134
Merit: 1001
Guys , anyone know a best pool for mining monero ? i want try with i7 5820k @ 4 ghz , and i5 6600 , im waiting ryzen 1700 .

Anyone ? .
hero member
Activity: 700
Merit: 500

with the workio_login thing commented out i get:
Code:
[2017-03-18 23:28:23] 1 miner threads started, using 'cryptonight' algorithm.
[2017-03-18 23:28:23] Tried to call rpc2 command before authentication
[2017-03-18 23:28:23] getblocktemplate failed, falling back to getwork
[2017-03-18 23:28:23] Tried to call rpc2 command before authentication
[2017-03-18 23:28:23] json_rpc_call failed, retry after 10 seconds

i then commented out line 242 and got the same output as above

i then uncommented the workio_login thingy and it went back to the initial output posted before

rpc2_workio_login is called regardless of gbt or not. The login method isn't recongnized
and skipping it results in no authentication. With no working model and no real understanding of the
protocol I think I'm stuck.

damn, thanks for looking into it though, most profitable coins for cpu mining are either cryptonight or zoin/zcoin or something else/new

as a matter of fact i also tested zcoinclassic over this night but it seems their wallet contains the same bug hexxdev encountered in the imported changes from zcoin which my old wallet hadnt had: zcoin classics avg ttf is 0.6h with my hashrate but no block found over the last 7h, might be the same for zcoin itself (not tested)
legendary
Activity: 1470
Merit: 1114

with the workio_login thing commented out i get:
Code:
[2017-03-18 23:28:23] 1 miner threads started, using 'cryptonight' algorithm.
[2017-03-18 23:28:23] Tried to call rpc2 command before authentication
[2017-03-18 23:28:23] getblocktemplate failed, falling back to getwork
[2017-03-18 23:28:23] Tried to call rpc2 command before authentication
[2017-03-18 23:28:23] json_rpc_call failed, retry after 10 seconds

i then commented out line 242 and got the same output as above

i then uncommented the workio_login thingy and it went back to the initial output posted before

rpc2_workio_login is called regardless of gbt or not. The login method isn't recongnized
and skipping it results in no authentication. With no working model and no real understanding of the
protocol I think I'm stuck.
hero member
Activity: 700
Merit: 500

no matter which features is disable it always uses "login" method it seems (no-stratum, no-getwork, etc)

edit: after taking a look at this (https://github.com/sammy007/monero-stratum/blob/master/go-pool/rpc/rpc.go), im pretty sure for solo mining to work cpuminer(-opt) needs the getblocktemplate support for cryptonight coins integrated first

Yeah, no login method, but I don't think it's GBT related. I found an intereting bit of code

cpu-miner.c line 1264
Code:
        if(jsonrpc_2 && !have_stratum)
                ok = rpc2_workio_login(curl);
        while (ok)
        {

Notice no "else" clause so no login attempt here for other algos. You could try commenting out the login to see what happens.

I also looked at GBT code. I'm not sure now why I defaulted to disable GBT for RPC2. cpuminer-multi doesn't do it. You could try
commenting that out in ago-gate-api.c line 242.

I don't really expect either of these to fix it but it might eliminate some of the noise.

with the workio_login thing commented out i get:
Code:
[2017-03-18 23:28:23] 1 miner threads started, using 'cryptonight' algorithm.
[2017-03-18 23:28:23] Tried to call rpc2 command before authentication
[2017-03-18 23:28:23] getblocktemplate failed, falling back to getwork
[2017-03-18 23:28:23] Tried to call rpc2 command before authentication
[2017-03-18 23:28:23] json_rpc_call failed, retry after 10 seconds

i then commented out line 242 and got the same output as above

i then uncommented the workio_login thingy and it went back to the initial output posted before


legendary
Activity: 1470
Merit: 1114

no matter which features is disable it always uses "login" method it seems (no-stratum, no-getwork, etc)

edit: after taking a look at this (https://github.com/sammy007/monero-stratum/blob/master/go-pool/rpc/rpc.go), im pretty sure for solo mining to work cpuminer(-opt) needs the getblocktemplate support for cryptonight coins integrated first

Yeah, no login method, but I don't think it's GBT related. I found an intereting bit of code

cpu-miner.c line 1264
Code:
        if(jsonrpc_2 && !have_stratum)
                ok = rpc2_workio_login(curl);
        while (ok)
        {

Notice no "else" clause so no login attempt here for other algos. You could try commenting out the login to see what happens.

I also looked at GBT code. I'm not sure now why I defaulted to disable GBT for RPC2. cpuminer-multi doesn't do it. You could try
commenting that out in ago-gate-api.c line 242.

I don't really expect either of these to fix it but it might eliminate some of the noise.
hero member
Activity: 700
Merit: 500
Looks like a problem with longpoll, try --no-longpoll.

edit: also try cpuminer-multi, if it works I can compare.

i have executed it with the --no-longpoll option, same error it seems, also tested with cpuminer-multi with and without --no-longpoll, same result:

Code:
felix@mobile:~/local projects/cpuminer-multi$ ./cpuminer -a cryptonight -t 3  -o http://10.1.1.173:41264 -DP --no-longpoll
** cpuminer-multi 1.3.1 by tpruvot@github **
BTC donation address: 1FhDPLPpw18X4srecguG3MxJYe4a1JsZnd (tpruvot)

[2017-03-18 22:06:50] Using JSON-RPC 2.0
[2017-03-18 22:06:50] CPU Supports AES-NI: YES
[2017-03-18 22:06:50] JSON protocol request:
{"method": "login", "params": {"login": "", "pass": "", "agent": "cpuminer-multi/1.3.1"}, "id": 1}

* Rebuilt URL to: http://10.1.1.173:41264/
*   Trying 10.1.1.173...
* TCP_NODELAY set
[2017-03-18 22:06:50] Binding thread 0 to cpu 0 (mask 1)
[2017-03-18 22:06:50] Binding thread 1 to cpu 1 (mask 2)
[2017-03-18 22:06:50] 3 miner threads started, using 'cryptonight' algorithm.
[2017-03-18 22:06:50] Binding thread 2 to cpu 2 (mask 4)
* Connected to 10.1.1.173 (10.1.1.173) port 41264 (#0)
* Server auth using Basic with user ''
> POST / HTTP/1.1
Host: 10.1.1.173:41264
Authorization: Basic Og==
Accept: */*
Accept-Encoding: deflate, gzip
Content-Type: application/json
Content-Length: 98
User-Agent: cpuminer-multi/1.3.1
X-Mining-Extensions: longpoll reject-reason
Expect: 100-continue

* Done waiting for 100-continue
< HTTP/1.1 200 OK
< Content-Length: 77
< Server: CryptoNote-based HTTP server
<
* Connection #0 to host 10.1.1.173 left intact
[2017-03-18 22:06:51] JSON protocol response:
{
   "error": {
      "code": -32601,
      "message": "Method not found"
   },
   "id": 1,
   "jsonrpc": "2.0"
}
[2017-03-18 22:06:51] JSON-RPC call failed: Method not found
[2017-03-18 22:06:51] ...retry after 10 seconds
^C[2017-03-18 22:06:54] SIGINT received, exiting

i have tested this with the wallet rpc port, with the daemon rpc port i get:
Code:
felix@mobile:~/local projects/cpuminer-multi$ ./cpuminer -a cryptonight -t 3  -o http://10.1.1.173:41263 -DP --no-longpoll
** cpuminer-multi 1.3.1 by tpruvot@github **
BTC donation address: 1FhDPLPpw18X4srecguG3MxJYe4a1JsZnd (tpruvot)

[2017-03-18 22:20:39] Using JSON-RPC 2.0
[2017-03-18 22:20:39] CPU Supports AES-NI: YES
[2017-03-18 22:20:39] JSON protocol request:
{"method": "login", "params": {"login": "", "pass": "", "agent": "cpuminer-multi/1.3.1"}, "id": 1}

* Rebuilt URL to: http://10.1.1.173:41263/
*   Trying 10.1.1.173...
* TCP_NODELAY set
[2017-03-18 22:20:39] Binding thread 0 to cpu 0 (mask 1)
[2017-03-18 22:20:39] 3 miner threads started, using 'cryptonight' algorithm.
[2017-03-18 22:20:39] Binding thread 1 to cpu 1 (mask 2)
[2017-03-18 22:20:39] Binding thread 2 to cpu 2 (mask 4)
* Connected to 10.1.1.173 (10.1.1.173) port 41263 (#0)
* Server auth using Basic with user ''
> POST / HTTP/1.1
Host: 10.1.1.173:41263
Authorization: Basic Og==
Accept: */*
Accept-Encoding: deflate, gzip
Content-Type: application/json
Content-Length: 98
User-Agent: cpuminer-multi/1.3.1
X-Mining-Extensions: longpoll reject-reason
Expect: 100-continue

* Done waiting for 100-continue
< HTTP/1.1 404 Not Found
< Content-Length: 27
< Server: CryptoNote-based HTTP server
* HTTP error before end of send, stop sending
<
* Closing connection 0
[2017-03-18 22:20:40] JSON decode failed(1): '[' or '{' expected near 'Requested'
[2017-03-18 22:20:40] ...retry after 10 seconds
^C[2017-03-18 22:20:41] SIGINT received, exiting

to me it seems the rpc request method is "login" but this only works for pools

afaik one needs to connect to the daemon and use getblocktemplate?
atleast for the wallet there is no mining related method (https://getmonero.org/knowledge-base/developer-guides/wallet-rpc)
whereas the daemon rpc has a getblocktemplate method (https://getmonero.org/knowledge-base/developer-guides/daemon-rpc)

no matter which features is disable it always uses "login" method it seems (no-stratum, no-getwork, etc)

edit: after taking a look at this (https://github.com/sammy007/monero-stratum/blob/master/go-pool/rpc/rpc.go), im pretty sure for solo mining to work cpuminer(-opt) needs the getblocktemplate support for cryptonight coins integrated first
full member
Activity: 143
Merit: 100

After thinking on what I've done, I can safely say that this is a viable Monero mining strategy for Ryzen 7 family of processors (8 cores / 16 threads, divided up into two CCXs of 4 cores / 8 threads each, and 8MB L3 cache each):


I think Ryzen 5 will be an excellent architecture for mining cryptonight due to it's L3 cache size and low price. The extra cores
of the R7 aren't needed for cryptonight. The more compute bound algos may do better with R7, but they also do better with GPU.

You are right. They can be entirely devoted to cryptonight and leave some free cores for other tasks at a reasonable price. The R.O.I. can be interesting to calculate once we have the first units to test. These will be the setups in this case:

  • Ryzen 5 1400 will have 2 + 2 cores and 8 threads with 8MB L3 cache in total (4MB per CCX). This will allow to use "Monero1.bat" with "--cpu-affinity 0x03 -t 2" and "Monero2.bat" with "--cpu-affinity 0x30 -t 2". 4 threads are free to use in other tasks.
  • Ryzen 5 1500X will have the same core and thread count as above, but with 16MB L3 cache, so it will use the "Monero1.bat" with "--cpu-affinity 0x0F -t 4" and "Monero2.bat" with "--cpu-affinity 0xF0 -t 4". The whole CPU will be mining Cryptonight.
  • Ryzen 5 1600 will have 3 + 3 cores and 12 threads with 16MB L3 cache. They must use "Monero1.bat" with "--cpu-affinity 0x00F -t 4" and "Monero2.bat" with "--cpu-affinity 0xF00 -t 4" and still have 4 free threads to use elsewhere. This applies too to Ryzen 5 1600X CPU.
legendary
Activity: 1470
Merit: 1114

After thinking on what I've done, I can safely say that this is a viable Monero mining strategy for Ryzen 7 family of processors (8 cores / 16 threads, divided up into two CCXs of 4 cores / 8 threads each, and 8MB L3 cache each):


I think Ryzen 5 will be an excellent architecture for mining cryptonight due to it's L3 cache size and low price. The extra cores
of the R7 aren't needed for cryptonight. The more compute bound algos may do better with R7, but they also do better with GPU.
full member
Activity: 143
Merit: 100
Sorry! I had not analyzed the full source for your miner  Sad

What I have been doing for some time is testing the capabilities and limits of the miner. I have a simple laptop for my experiments. This is information from your miner:

  • CPU: Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz
  • CPU features: SSE2 AES AVX AVX2

This CPU has only 3MB Level 3 cache, 2 cores and 2 threads per core (4 logical CPUs), so I have tried to maximize my mining capabilities under Windows 8.1. First, I mined XMR using 4 threads for a total of 55 to 60 H/s. After cheking the cache, I got the same value with only 2 threads. Finally, I have settled on using 1 thread at 25 H/s and the other 3 threads for mining Lyra2re2 at a combined total of 250-300 kH/s.

After thinking on what I've done, I can safely say that this is a viable Monero mining strategy for Ryzen 7 family of processors (8 cores / 16 threads, divided up into two CCXs of 4 cores / 8 threads each, and 8MB L3 cache each):

** Monero1.bat
Code:
REM ** USE THE FIRST CCX MAXIMIZING L3-CACHE
cpuminer-aes-avx2.exe -a cryptonight -t 4 --cpu-affinity 0x000F -o -u -p
PAUSE

** Monero2.bat
Code:
REM ** USE THE SECOND CCX MAXIMIZING L3-CACHE
cpuminer-aes-avx2.exe -a cryptonight -t 4 --cpu-affinity 0x0F00 -o -u -p
PAUSE

** OtherCoins.bat
Code:
REM ** USE THE REMAINING THREADS ON THE TWO CCXs DISREGARDING L3-CACHE
cpuminer-aes-avx2.exe -a -t 8 --cpu-affinity 0xF0F0 -o -u -p
PAUSE

** MineAll.bat
Code:
REM ** LAUNCH ALL MINERS AT ONCE
START Monero1.bat
START Monero2.bat
START OtherCoins.bat
PAUSE

Alternatively, you can use only 6 threads on the third file so you can use the remaining two threads to browse the web or do other tasks while mining in the background.
legendary
Activity: 1470
Merit: 1114

What one needs to do is thus adding this new communications protocol to the miner and adjust it accordingly. This way the miner can solo mine this and similar coins without problem.

Thanks but the code already exists in the miner, it just hasn't been tested since I forked it.

i get the following:

Code:
felix@mobile:~/local projects/WebstormProjects/wallet-miner-agent$ bin/cpuminer -a cryptonight -t 3  -o http://10.1.1.173:41264 -DP

         **********  cpuminer-opt 3.6.0  ***********
     A CPU miner with multi algo support and optimized for CPUs
     with AES_NI and AVX extensions.
     BTC donation address: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT
     Forked from TPruvot's cpuminer-multi with credits
     to Lucas Jones, elmad, palmd, djm34, pooler, ig0tik3d,
     Wolf0, Jeff Garzik and Optiminer.

CPU: Intel(R) Core(TM) i3-4005U CPU @ 1.70GHz
CPU features: SSE2 AES AVX AVX2
SW built on Mar 16 2017 with GCC 5.4.0
SW features: SSE2 AES AVX AVX2
Algo features: SSE2 AES
Start mining with SSE2 AES

[2017-03-18 17:40:53] JSON protocol request:
{"method": "login", "params": {"login": "", "pass": "", "agent": "cpuminer-opt/3.6.0"}, "id": 1}

* Rebuilt URL to: http://10.1.1.173:41264/
*   Trying 10.1.1.173...
* TCP_NODELAY set
[2017-03-18 17:40:53] Binding thread 0 to cpu 0 (mask 1)
[2017-03-18 17:40:53] Binding thread 1 to cpu 1 (mask 2)
[2017-03-18 17:40:53] 3 miner threads started, using 'cryptonight' algorithm.
[2017-03-18 17:40:53] Binding thread 2 to cpu 2 (mask 4)
* Connected to 10.1.1.173 (10.1.1.173) port 41264 (#0)
* Server auth using Basic with user ''
> POST / HTTP/1.1
Host: 10.1.1.173:41264
Authorization: Basic Og==
Accept: */*
Accept-Encoding: deflate, gzip
Content-Type: application/json
Content-Length: 96
User-Agent: cpuminer-opt/3.6.0
X-Mining-Extensions: longpoll reject-reason
Expect: 100-continue

* Done waiting for 100-continue
< HTTP/1.1 200 OK
< Content-Length: 77
< Server: CryptoNote-based HTTP server
<
* Connection #0 to host 10.1.1.173 left intact
[2017-03-18 17:40:54] JSON protocol response:
{
   "error": {
      "code": -32601,
      "message": "Method not found"
   },
   "id": 1,
   "jsonrpc": "2.0"
}
[2017-03-18 17:40:54] JSON-RPC call failed: Method not found
[2017-03-18 17:40:54] ...retry after 10 seconds
^C[2017-03-18 17:40:58] SIGINT received, exiting

Looks like a problem with longpoll, try --no-longpoll.

edit: also try cpuminer-multi, if it works I can compare.
hero member
Activity: 700
Merit: 500

What one needs to do is thus adding this new communications protocol to the miner and adjust it accordingly. This way the miner can solo mine this and similar coins without problem.

Thanks but the code already exists in the miner, it just hasn't been tested since I forked it.

i get the following:

Code:
felix@mobile:~/local projects/WebstormProjects/wallet-miner-agent$ bin/cpuminer -a cryptonight -t 3  -o http://10.1.1.173:41264 -DP

         **********  cpuminer-opt 3.6.0  ***********
     A CPU miner with multi algo support and optimized for CPUs
     with AES_NI and AVX extensions.
     BTC donation address: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT
     Forked from TPruvot's cpuminer-multi with credits
     to Lucas Jones, elmad, palmd, djm34, pooler, ig0tik3d,
     Wolf0, Jeff Garzik and Optiminer.

CPU: Intel(R) Core(TM) i3-4005U CPU @ 1.70GHz
CPU features: SSE2 AES AVX AVX2
SW built on Mar 16 2017 with GCC 5.4.0
SW features: SSE2 AES AVX AVX2
Algo features: SSE2 AES
Start mining with SSE2 AES

[2017-03-18 17:40:53] JSON protocol request:
{"method": "login", "params": {"login": "", "pass": "", "agent": "cpuminer-opt/3.6.0"}, "id": 1}

* Rebuilt URL to: http://10.1.1.173:41264/
*   Trying 10.1.1.173...
* TCP_NODELAY set
[2017-03-18 17:40:53] Binding thread 0 to cpu 0 (mask 1)
[2017-03-18 17:40:53] Binding thread 1 to cpu 1 (mask 2)
[2017-03-18 17:40:53] 3 miner threads started, using 'cryptonight' algorithm.
[2017-03-18 17:40:53] Binding thread 2 to cpu 2 (mask 4)
* Connected to 10.1.1.173 (10.1.1.173) port 41264 (#0)
* Server auth using Basic with user ''
> POST / HTTP/1.1
Host: 10.1.1.173:41264
Authorization: Basic Og==
Accept: */*
Accept-Encoding: deflate, gzip
Content-Type: application/json
Content-Length: 96
User-Agent: cpuminer-opt/3.6.0
X-Mining-Extensions: longpoll reject-reason
Expect: 100-continue

* Done waiting for 100-continue
< HTTP/1.1 200 OK
< Content-Length: 77
< Server: CryptoNote-based HTTP server
<
* Connection #0 to host 10.1.1.173 left intact
[2017-03-18 17:40:54] JSON protocol response:
{
   "error": {
      "code": -32601,
      "message": "Method not found"
   },
   "id": 1,
   "jsonrpc": "2.0"
}
[2017-03-18 17:40:54] JSON-RPC call failed: Method not found
[2017-03-18 17:40:54] ...retry after 10 seconds
^C[2017-03-18 17:40:58] SIGINT received, exiting
legendary
Activity: 1470
Merit: 1114

What one needs to do is thus adding this new communications protocol to the miner and adjust it accordingly. This way the miner can solo mine this and similar coins without problem.

Thanks but the code already exists in the miner, it just hasn't been tested since I forked it.
full member
Activity: 143
Merit: 100
This is the code for sending RPC commands to Monero and similar miners. It's written in C++, with classes and overloaded operators, but can be converted to standard C if needed:

Code:
UniValue CallRPC(const string& strMethod, const UniValue& params)
{
    std::string host = GetArg("-rpcconnect", DEFAULT_RPCCONNECT);
    int port = GetArg("-rpcport", BaseParams().RPCPort());

    // Create event base
    struct event_base *base = event_base_new(); // TODO RAII
    if (!base)
        throw runtime_error("cannot create event_base");

    // Synchronously look up hostname
    struct evhttp_connection *evcon = evhttp_connection_base_new(base, NULL, host.c_str(), port); // TODO RAII
    if (evcon == NULL)
        throw runtime_error("create connection failed");
    evhttp_connection_set_timeout(evcon, GetArg("-rpcclienttimeout", DEFAULT_HTTP_CLIENT_TIMEOUT));

    HTTPReply response;
    struct evhttp_request *req = evhttp_request_new(http_request_done, (void*)&response); // TODO RAII
    if (req == NULL)
        throw runtime_error("create http request failed");

    // Get credentials
    std::string strRPCUserColonPass;
    if (mapArgs["-rpcpassword"] == "") {
        // Try fall back to cookie-based authentication if no password is provided
        if (!GetAuthCookie(&strRPCUserColonPass)) {
            throw runtime_error(strprintf(
                _("Could not locate RPC credentials. No authentication cookie could be found, and no rpcpassword is set in the configuration file (%s)"),
                    GetConfigFile().string().c_str()));

        }
    } else {
        strRPCUserColonPass = mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"];
    }

    struct evkeyvalq *output_headers = evhttp_request_get_output_headers(req);
    assert(output_headers);
    evhttp_add_header(output_headers, "Host", host.c_str());
    evhttp_add_header(output_headers, "Connection", "close");
    evhttp_add_header(output_headers, "Authorization", (std::string("Basic ") + EncodeBase64(strRPCUserColonPass)).c_str());

    // Attach request data
    std::string strRequest = JSONRPCRequest(strMethod, params, 1);
    struct evbuffer * output_buffer = evhttp_request_get_output_buffer(req);
    assert(output_buffer);
    evbuffer_add(output_buffer, strRequest.data(), strRequest.size());

    int r = evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/");
    if (r != 0) {
        evhttp_connection_free(evcon);
        event_base_free(base);
        throw CConnectionFailed("send http request failed");
    }

    event_base_dispatch(base);
    evhttp_connection_free(evcon);
    event_base_free(base);

    if (response.status == 0)
        throw CConnectionFailed("couldn't connect to server");
    else if (response.status == HTTP_UNAUTHORIZED)
        throw runtime_error("incorrect rpcuser or rpcpassword (authorization failed)");
    else if (response.status >= 400 && response.status != HTTP_BAD_REQUEST && response.status != HTTP_NOT_FOUND && response.status != HTTP_INTERNAL_SERVER_ERROR)
        throw runtime_error(strprintf("server returned HTTP error %d", response.status));
    else if (response.body.empty())
        throw runtime_error("no response from server");

    // Parse reply
    UniValue valReply(UniValue::VSTR);
    if (!valReply.read(response.body))
        throw runtime_error("couldn't parse reply from server");
    const UniValue& reply = valReply.get_obj();
    if (reply.empty())
        throw runtime_error("expected reply to have result, error and id properties");

    return reply;
}

What one needs to do is thus adding this new communications protocol to the miner and adjust it accordingly. This way the miner can solo mine this and similar coins without problem.
hero member
Activity: 700
Merit: 500
@ Felix

-u mustmatch coin conf
-p as in coin conf too

one of the benefits is with coinbase adr, you dont need to have the wallet started (usually)
try this pls and report us if it works for you

for me i have done so some time ago  and it has worked


Cryptonight uses a different version of RPC and doesn't support GBT. Coinbase addr is not used
for getwork.

i will try to test getwork later today, will report findings
Pages:
Jump to: