Author Topic: Stratum Proxy LTC Mining on OSX?  (Read 3600 times)

Offline emunebtk

  • Jr. Member
  • **
  • Posts: 111
Stratum Proxy LTC Mining on OSX?
« on: May 14, 2013, 12:04:20 PM »
Has anyone had any luck with LTC mining on Lion or Mountain Lion with a stratum based pool? semi-noob but have tried several things on both machines and sadly no luck. While i am at it what is the best LTC mining for osx with or without stratum? Much appreciated as I would love to start LTC mining on these Mac Pro's but can only get BTC mining to work. Thanks!

Offline Chuck Finley

  • Sr. Member
  • ****
  • Posts: 612
Re: Stratum Proxy LTC Mining on OSX?
« Reply #1 on: May 14, 2013, 12:07:31 PM »
As long as you can get a mining client that supports stratum on OSX (I'd wager you can but I'm not positive) you can  stratum mine.

I think you should be able to get cgminer working in osx and that supports stratum.
LTC: LchuckfK3g2tHrdAv8CDTUSJpZjbBSk66m

Offline emunebtk

  • Jr. Member
  • **
  • Posts: 111
Re: Stratum Proxy LTC Mining on OSX?
« Reply #2 on: May 14, 2013, 07:42:31 PM »
I have been working on getting cgminer to work in osx but atlas no such luck and was hoping someone could help with a step-step guide on making it happen or at least what software actually works. LTC mining so far on osx brings in a lot of stale rates when in guiminer so hoping to find a beter solution.

Offline 9to5_ragequit

  • Newbie
  • *
  • Posts: 19
Re: Stratum Proxy LTC Mining on OSX?
« Reply #3 on: May 15, 2013, 06:37:39 AM »
I'm attempting to CPU mine with pooler's cpuminer and mining_proxy, and mining_proxy constantly returns a 401.  I think pooler's cpuminer is trying to talk JSON to it and it expects something else.

My main reason for this is I'm trying to switch from P2Pool to a traditional mining pool.  I chose Coinotron because a couple of people I know are on it, but they're using GPU miners and I have a flock of machines all running pooler's cpuminer.

Suggestions would be great, either for getting the proxy working or not needing the proxy.

Config:

Code: [Select]
mining_proxy.py -nm -pa scrypt -o coinotron.com -p 3334
minerd config:

Code: [Select]
{
    "url" : "http://127.0.0.1:8332",
    "user" : "username.workername",
    "pass" : "password",
    "quiet" : true,
    "threads" : "4"
}

mining_proxy connects to Coinotron fine, but then returns a 401 the instant minerd tries to connect to it.  What gives?

Offline emunebtk

  • Jr. Member
  • **
  • Posts: 111
Re: Stratum Proxy LTC Mining on OSX?
« Reply #4 on: May 15, 2013, 08:30:12 AM »
Sadly I have not found a Stratum work around so have had to use pools that offer a different port for non-stratum users:
Currently using Guiminer : https://github.com/downloads/pletoss/poclbm/guiminer-poclbm-macosx.dmg 
With that I can mine LTC using either GPU or CPU and seems to be working correctly :

2013-05-15 01:11:40: Listener for "mining.usa.dallas.hypernova.pw": mining.usa.dallas.hypernova.pw:9332 15/05/2013 01:11:40, long poll: new block 07abd815d81fb840
2013-05-15 01:12:24: Listener for "mining.usa.dallas.hypernova.pw": mining.usa.dallas.hypernova.pw:9332 15/05/2013 01:12:24, long poll: new block 118641cda2bf1b10
2013-05-15 01:13:04: Listener for "mining.usa.dallas.hypernova.pw": mining.usa.dallas.hypernova.pw:9332 15/05/2013 01:13:04, long poll: new block 3c1a2d075dc28d58
2013-05-15 01:21:59: Listener for "mining.usa.dallas.hypernova.pw": mining.usa.dallas.hypernova.pw:9332 15/05/2013 01:21:59, long poll: new block 86029dfcae9ab97e


The Miner is showing shares accepted which makes me believe it is working for the time being..

For just CPU i have found the actualy LiteCoin-QT app to work when in the same folder as minerd. Still working on constantly improving but for now it seems to be functioning. Lets just hope our macs can hold out
« Last Edit: May 15, 2013, 08:33:41 AM by emunebtk »

Offline 9to5_ragequit

  • Newbie
  • *
  • Posts: 19
Re: Stratum Proxy LTC Mining on OSX?
« Reply #5 on: May 16, 2013, 02:22:18 AM »
I'm told cgminer can be built with CPU mining support - does it have similar hand-coded optimizations for x86 and amd64 chips as pooler's cpuminer?

Offline 9to5_ragequit

  • Newbie
  • *
  • Posts: 19
Re: Stratum Proxy LTC Mining on OSX?
« Reply #6 on: May 16, 2013, 02:42:28 AM »
Here's what's happening with me.  This is intermixed output from mining_proxy and cpuminer, as I run mining_proxy in the background and both are connected to the terminal.

Code: [Select]
$ mining_proxy.py -nm -pa scrypt -o coinotron.com -p 3334 &
[1] 78967
2013-05-15 19:35:14,342 WARNING proxy jobs.<module> # C extension for midstate not available. Using default implementation instead.
2013-05-15 19:35:14,698 INFO proxy mining_proxy.main # Stratum proxy version: 1.3.0
2013-05-15 19:35:14,699 INFO proxy mining_proxy.main # Trying to connect to Stratum pool at coinotron.com:3334
2013-05-15 19:35:14,699 INFO proxy mining_proxy.main # Setting PoW algo: scrypt
2013-05-15 19:35:14,876 INFO stats stats.print_stats # 1 peers connected, state changed 1 times
2013-05-15 19:35:14,876 INFO proxy mining_proxy.on_connect # Connected to Stratum pool at coinotron.com:3334
2013-05-15 19:35:14,876 INFO proxy mining_proxy.on_connect # Subscribing for mining jobs
2013-05-15 19:35:15,054 INFO proxy mining_proxy.main # -----------------------------------------------------------------------
2013-05-15 19:35:15,054 INFO proxy mining_proxy.main # PROXY IS LISTENING ON ALL IPs ON PORT 3333 (stratum) AND 8332 (getwork)
2013-05-15 19:35:15,054 INFO proxy mining_proxy.main # -----------------------------------------------------------------------
2013-05-15 19:35:15,229 INFO proxy client_service.handle_event # New job 588 for prevhash cbf7af6f, clean_jobs=True
2013-05-15 19:35:15,233 INFO proxy client_service.handle_event # Setting new difficulty: 192

$ nice -n 18 ./minerd -c coinotron.json -P
[2013-05-15 19:35:39] 4 miner threads started, using 'scrypt' algorithm.
[2013-05-15 19:35:39] JSON protocol request:
{"method": "getwork", "params": [], "id":0}


* About to connect() to 127.0.0.1 port 8332 (#0)
*   Trying 127.0.0.1... * TCP_NODELAY set
* connected
* Connected to 127.0.0.1 (127.0.0.1) port 8332 (#0)
* Server auth using Basic with user 'username.workername'
> POST / HTTP/1.1
Authorization: Basic [REDACTED]
Host: 127.0.0.1:8332
Accept-Encoding: deflate, gzip
Content-Type: application/json
Content-Length: 45
User-Agent: cpuminer 2.2.3
X-Mining-Extensions: midstate

* HTTP 1.0, assume close after body
< HTTP/1.0 401 Authorization Required
< Date: Thu, 16 May 2013 02:35:39 +0000
< Server: bitcoin-json-rpc/v0.8.0-beta
* Authentication problem. Ignoring this.
< WWW-Authenticate: Basic realm="jsonrpc"
< Content-Type: text/html
< Content-Length: 296
* The requested URL returned error: 401
* Closing connection #0
[2013-05-15 19:35:39] HTTP request failed: The requested URL returned error: 401
[2013-05-15 19:35:39] json_rpc_call failed, retry after 30 seconds

It really appears that minerd is having some kind of auth problem talking to mining_proxy on 127.0.0.1:8332.

Once again, my coinotron.json config file for minerd:

Code: [Select]
{
    "url" : "http://127.0.0.1:8332",
    "user" : "username.workername",
    "pass" : "password",
    "quiet" : true,
    "threads" : "4"
}

I've seen scattered threads that indicate that (some versions of) cpuminer can talk to (some versions of) mining_proxy... so what's going on here?  Any ideas?

I'd prefer to use pooler's cpuminer for CPU mining if possible because I can already build it easily on OS X and Linux, and it works better than another CPU miner I originally tried.  I'm uncertain if cgminer would perform as well for CPU mining, as I know pooler's miner contains some hand-coded optimizations.