Coder Social home page Coder Social logo

yoryan / nuxhash Goto Github PK

View Code? Open in Web Editor NEW
260.0 24.0 162.0 996 KB

A NiceHash cryptocurrency mining client for Linux.

License: GNU General Public License v3.0

Python 75.42% Shell 0.54% C# 10.57% Java 9.39% JavaScript 4.08%
mining linux nicehash nvidia gpu-mining gui desktop-application

nuxhash's Introduction

logo

nuxhash is a NiceHash cryptocurrency mining client for Linux. nuxhash consists of a headless daemon and an optional wxPython-based GUI. It is currently in beta.

Donations: bc1q2ne5zqa6k5egd82p4rv0rn44tpc35gv3afu52n

Features

  • Miner downloader
  • Profit-switching
  • Nvidia graphics cards
  • NiceHash's proprietary excavator miner
  • Command-line and (optional) GUI interfaces

GUI screenshot

nuxhashd initial setup
Wallet address: 3DJBpNcgP3Pihw45p9544PK6TbbYeMcnk7
Worker name: nuxhash
Region (eu/usa/hk/jp/in/br): usa

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   617    0   617    0     0   1402      0 --:--:-- --:--:-- --:--:--  1402
100 5618k  100 5618k    0     0  1283k      0  0:00:04  0:00:04 --:--:-- 1554k

CUDA device: GeForce GTX 1060 6GB (GPU-452679f3-ba2b-2cfe-4aff-5a50c4a32efb)
  excavator_equihash  .  287.41  H/s (warming up, 23 s)

Dependencies

  • Python 3.6 or later
  • Nvidia's proprietary graphics driver for Linux, version 387.xx or later
  • curl

Optionally, for the GUI interface:

  • wxPython 4 for Python 3

Quick Start

Install the following dependencies (this list is for Ubuntu 18.04 LTS):

Optionally, install this package to enable the GUI interface:

  • python3-wxgtk4.0

Then, install nuxhash.

$ sudo pip3 install git+https://github.com/YoRyan/nuxhash

To start the daemon, run nuxhashd. To start the graphical interface, run nuxhash-gui.

Donation Fee

nuxhash will donate 0.5% of its mining time to me. If you don't like this, you may opt out by setting the flag in the configuration file (located by default at ~/.config/nuxhash/settings.conf). Currently, there are no penalties if you do so, but please consider sending me a one-time donation.

Roadmap

  • Daemon with basic mining logic
  • Automatic miner downloads and integrity checking
  • Finish wx-based GUI
  • Implement other miners
  • Support AMD devices

I have no plans to implement direct overclocking or fan control.

nuxhash's People

Contributors

jackm avatar yoryan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nuxhash's Issues

CUDA error DRIVER

First time user - getting this error.

nuxhashd -v --show-mining
2019-09-26 16:43:17,560 INFO: Querying NiceHash for miner connection information...
2019-09-26 16:43:17,900 DEBUG: =========================== www.nicehash.com =========================
2019-09-26 16:43:17,900 DEBUG: Excavator v1.5.14a GPU Miner for NiceHash.
2019-09-26 16:43:17,900 DEBUG: Copyright (C) 2018 NiceHash. All rights reserved.
2019-09-26 16:43:17,900 DEBUG: =========================== www.nicehash.com =========================
2019-09-26 16:43:17,900 DEBUG: Build time: 2018-12-07 10:21:06+01:00
2019-09-26 16:43:17,900 DEBUG: Build number: 3897564716
2019-09-26 16:43:17,900 DEBUG: [16:43:17][0x00007fab4a665740][info] Log started
2019-09-26 16:43:17,931 DEBUG: [16:43:17][0x00007fab4a665740][info] core | Found CUDA device: GeForce RTX 2070
2019-09-26 16:43:18,001 DEBUG: [16:43:18][0x00007fab4a665740][info] api | Listening on 127.0.0.1:54871
2019-09-26 16:43:18,002 DEBUG: [16:43:18][0x00007fab4a665740][info] core | Initialized!
2019-09-26 16:43:18,197 DEBUG: [16:43:18][0x00007fab45acf700][info] Connected to nhmp.usa.nicehash.com:3200
2019-09-26 16:43:18,281 INFO: Assigning nvidia_GPU-c00cfaaf-3b3e-8187-24b6-146b141e771c to excavator_equihash (0.000 mBTC/day)
2019-09-26 16:43:18,281 DEBUG: [16:43:18][0x00007fab4a665740][info] nhmp | Subscribed
2019-09-26 16:43:18,365 DEBUG: [16:43:18][0x00007fab45acf700][info] nhmp | equihash | add success
2019-09-26 16:43:18,370 DEBUG: [16:43:18][0x00007fab38ed0700][fatal] wrkr0-0 | CUDA error DRIVER: '300' in func 'kernel_launcher' line 332
2019-09-26 16:43:18,370 DEBUG: [16:43:18][0x00007fab4a665740][info] Shutting down
2019-09-26 16:43:18,371 DEBUG: [16:43:18][0x00007fab4a665740][info] api | Closing

Thanks for your help

Allow setting excavator to a fixed port

I noticed you randomized the port. I have two desktop PC's, one running Linux. I rarely switch my KVM to this PC because I mostly use X11 forwarding and SSH, but I do mine on it, as it has a 1070 TI. With a fixed port and IP, I can monitor what I'm doing remotely.

Please allow a method to specify an IP and PORT for excavator.

FileNotFoundError

Hi,

Nice project btw, but I can't run nuxhashd for some reason. I tried to install the project a couple of times. Any thoughts?

image

Cannot find setting

Traceback (most recent call last):
  File "/usr/local/bin/nuxhashd", line 9, in <module>
    load_entry_point('nuxhash==1.0.0b2', 'console_scripts', 'nuxhashd')()
  File "/usr/local/lib/python3.5/dist-packages/nuxhash/__init__.py", line 3, in nuxhashd
    main()
  File "/usr/local/lib/python3.5/dist-packages/nuxhash/daemon.py", line 74, in main
    nx_settings = settings.load_settings(config_dir)
  File "/usr/local/lib/python3.5/dist-packages/nuxhash/settings.py", line 108, in load_settings
    with open(config_dir/SETTINGS_FILENAME, 'r') as settings_fd:
TypeError: invalid file: PosixPath('/home/jason/.config/nuxhash/settings.conf')
2019-05-14 18:03:02,158 CRITICAL: Crash! Killing all miners.

CRITICAL: Crash! Killing all miners

When attempting to run nuxhash for the first time, the following crash occurs:

Traceback (most recent call last):
File "/usr/local/bin/nuxhashd", line 11, in
load_entry_point('nuxhash==1.0.0b0', 'console_scripts', 'nuxhashd')()
File "/usr/local/lib/python3.6/dist-packages/nuxhash/init.py", line 3, in nuxhashd
main()
File "/usr/local/lib/python3.6/dist-packages/nuxhash/daemon.py", line 106, in main
nx_miners, nx_settings, all_devices, nx_benchmarks)
File "/usr/local/lib/python3.6/dist-packages/nuxhash/daemon.py", line 146, in run_missing_benchmarks
miner.load()
File "/usr/local/lib/python3.6/dist-packages/nuxhash/miners/excavator.py", line 398, in load
self.server.start()
File "/usr/local/lib/python3.6/dist-packages/nuxhash/miners/excavator.py", line 125, in start
raise miner.MinerStartFailed
nuxhash.miners.miner.MinerStartFailed
2018-11-02 23:01:58,584 CRITICAL: Crash! Killing all miners.
Killed

This crash happens on both my desktop (KDE Neon) and my headless server (Ubuntu 18.04)

Current rig profitability goes near/to 0

image

As you see, I have 3 rigs with GTX1060-6gb, and from time to time they go near/to 0 profitability.

Is this normal? How can I check if my rig is really mining, and not halting from time to time?

ConnectionRefusedError: [Errno 111] Connection refused

I'm trying to get this to function on a minimal headless Centos 7 server, but it seems to fail in various ways. ConnectionRefusedError on initial start up with no settings.conf. If I run nuxhashd again, putting in my info, it just hangs, CPU at 100%. I've tried various arguments, -v and --show-mining, but I can't figure out why the program fails. (I've run Claymore ETH miner on this before without an issue, and now I want to try other algorithms)

$ nuxhashd
nuxhashd initial setup
Wallet address: 3QtrjJpp9HYcgkJf7omZFMJZ6s3ELuxbot
Worker name: drew
Region (eu/usa/hk/jp/in/br): usa

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 617 0 617 0 0 1577 0 --:--:-- --:--:-- --:--:-- 1582
100 5830k 100 5830k 0 0 3190k 0 0:00:01 0:00:01 --:--:-- 4360k
Traceback (most recent call last):
File "/opt/rh/rh-python36/root/usr/bin/nuxhashd", line 11, in
load_entry_point('nuxhash==1.0.0b2', 'console_scripts', 'nuxhashd')()
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/nuxhash/init.py", line 3, in nuxhashd
main()
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/nuxhash/daemon.py", line 105, in main
nx_miners, nx_settings, all_devices, nx_benchmarks)
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/nuxhash/daemon.py", line 145, in run_missing_benchmarks
miner.load()
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/nuxhash/miners/excavator.py", line 380, in load
self.server.start()
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/nuxhash/miners/excavator.py", line 127, in start
self._read_devices()
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/nuxhash/miners/excavator.py", line 209, in _read_devices
response = self.send_command('device.list', [])
File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/nuxhash/miners/excavator.py", line 167, in send_command
with socket.create_connection(self._address, self.TIMEOUT) as s:
File "/opt/rh/rh-python36/root/usr/lib64/python3.6/socket.py", line 724, in create_connection
raise err
File "/opt/rh/rh-python36/root/usr/lib64/python3.6/socket.py", line 713, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
2019-03-31 22:44:54,203 CRITICAL: Crash! Killing all miners.
Killed
[drew@drewshbag ~]$ nuxhashd --show-mining
nuxhashd initial setup
Wallet address: 3QtrjJpp9HYcgkJf7omZFMJZ6s3ELuxbot
Worker name: drew
Region (eu/usa/hk/jp/in/br): usa

Since Centos 7 only has python 2.7, I had to install python 3.6.3 with a Software Collection (https://linuxize.com/post/how-to-install-python-3-on-centos-7/), hopefully that isn't causing an issue.
$ python -V Python 3.6.3

After looking through the Issues, I added a settings.conf with a [nicehash] section. I ran nuxhashd a few more times, failing or hanging. Then I checked my settings.conf and nuxhashd had written a few more sections: (I added the listen address and port)
My .config/nuxhash/settings.conf:
`[nicehash]
wallet = 3QtrjJpp9HYcgkJf7omZFMJZ6s3ELuxbot
workername = nuxhash
region = usa

[switching]
interval = 60
threshold = 0.1

[gui]
units = mBTC

[donate]
optout = False

[excavator_miner]
listen = 127.0.0.1:4000
args =`

I don't know if nicehash broke something on their end, but I can't get nicehash to mine on my setup. Any help?

Having error downloading

sudo pip3 install git+https://github.com/YoRyan/nuxhash
The directory '/home/jason/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/jason/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

Cannot run 'nuxhashd' or 'nuxhash-gui' Ubuntu 16.04.5 LTS

When running nuxhashd:

dsfcom@PI3:~$ nuxhashd Traceback (most recent call last): File "/usr/local/bin/nuxhashd", line 9, in <module> load_entry_point('nuxhash==1.0.0b2', 'console_scripts', 'nuxhashd')() File "/usr/local/lib/python3.5/dist-packages/nuxhash/__init__.py", line 3, in nuxhashd main() File "/usr/local/lib/python3.5/dist-packages/nuxhash/daemon.py", line 74, in main nx_settings = settings.load_settings(config_dir) File "/usr/local/lib/python3.5/dist-packages/nuxhash/settings.py", line 109, in load_settings with open(config_dir/SETTINGS_FILENAME, 'r') as settings_fd: TypeError: invalid file: PosixPath('/home/dsfcom/.config/nuxhash/settings.conf') 2019-10-05 13:24:06,881 CRITICAL: Crash! Killing all miners. Killed

When running nuxhash-gui

dsfcom@PI3:~$ nuxhash-gui Traceback (most recent call last): File "/usr/local/bin/nuxhash-gui", line 9, in <module> load_entry_point('nuxhash==1.0.0b2', 'console_scripts', 'nuxhash-gui')() File "/usr/local/lib/python3.5/dist-packages/nuxhash/__init__.py", line 6, in nuxhash_gui from nuxhash.gui.main import main File "/usr/local/lib/python3.5/dist-packages/nuxhash/gui/main.py", line 9, in <module> import wx ImportError: No module named 'wx'

nuxhash.miners.miner.MinerNotRunning: could not connect to excavator

Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.6/dist-packages/nuxhash/gui/mining.py", line 342, in run
self._scheduler.run()
File "/usr/lib/python3.6/sched.py", line 154, in run
action(*argument, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/nuxhash/gui/mining.py", line 405, in _read_status
for algorithm in running_algorithms}
File "/usr/local/lib/python3.6/dist-packages/nuxhash/gui/mining.py", line 405, in
for algorithm in running_algorithms}
File "/usr/local/lib/python3.6/dist-packages/nuxhash/miners/miner.py", line 108, in wrapper
return method(self, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/nuxhash/miners/excavator.py", line 358, in current_speeds
raise miner.MinerNotRunning('could not connect to excavator')
nuxhash.miners.miner.MinerNotRunning: could not connect to excavator

Also it is saying api keys required even though I have api keys in settings

Is Nuxhash broken for just me or has it stopped working for everyone?

Is nicehash blocking nuxhash?

File "/usr/lib/python3.6/socket.py", line 713, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.6/dist-packages/nuxhash/gui/mining.py", line 342, in run
self._scheduler.run()
File "/usr/lib/python3.6/sched.py", line 154, in run
action(*argument, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/nuxhash/gui/mining.py", line 405, in _read_status
for algorithm in running_algorithms}
File "/usr/local/lib/python3.6/dist-packages/nuxhash/gui/mining.py", line 405, in
for algorithm in running_algorithms}
File "/usr/local/lib/python3.6/dist-packages/nuxhash/miners/miner.py", line 108, in wrapper
return method(self, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/nuxhash/miners/excavator.py", line 358, in current_speeds
raise miner.MinerNotRunning('could not connect to excavator')
nuxhash.miners.miner.MinerNotRunning: could not connect to excavator

Can't run on Debian 9.9.0

Hello, I'm trying to run the miner but something went wrong. Here's the output I get.

root@xxx:/home/dell# nuxhashd
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/nuxhash/settings.py", line 108, in load_settings
with open(config_dir/SETTINGS_FILENAME, 'r') as settings_fd:
FileNotFoundError: [Errno 2] No such file or directory: '/root/.config/nuxhash/settings.conf'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/nuxhashd", line 10, in
sys.exit(nuxhashd())
File "/usr/local/lib/python3.7/dist-packages/nuxhash/init.py", line 3, in nuxhashd
main()
File "/usr/local/lib/python3.7/dist-packages/nuxhash/daemon.py", line 74, in main
nx_settings = settings.load_settings(config_dir)
File "/usr/local/lib/python3.7/dist-packages/nuxhash/settings.py", line 111, in load_settings
if err.errno != os.errno.ENOENT:
AttributeError: module 'os' has no attribute 'errno'
2019-05-24 11:16:46,594 CRITICAL: Crash! Killing all miners.
Killed

After updating nuxhash doesn't work anymore.

Nuxhash has stopped working for me. Please help
nuxhash-gui
/home/steve/.local/lib/python3.6/site-packages/wx/lib/pubsub/init.py:25: wxPyDeprecationWarning: wx.lib.pubsub has been deprecated, plese migrate your code to use pypubsub, available on PyPI.
wx.wxPyDeprecationWarning)
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

(nuxhash-gui:5113): Gtk-CRITICAL **: 13:55:33.684: gtk_widget_get_preferred_width_for_height: assertion 'height >= 0' failed

(nuxhash-gui:5113): Gtk-WARNING **: 13:55:33.684: gtk_widget_size_allocate(): attempt to allocate widget with width 12 and height -12

(nuxhash-gui:5113): Gtk-CRITICAL **: 13:55:33.684: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

(nuxhash-gui:5113): Gtk-CRITICAL **: 13:55:33.687: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

(nuxhash-gui:5113): Gtk-WARNING **: 13:55:33.687: Negative content width -13 (allocation 1, extents 7x7) while allocating gadget (node button, owner GtkButton)

(nuxhash-gui:5113): Gtk-WARNING **: 13:55:33.687: Negative content height -11 (allocation 1, extents 6x6) while allocating gadget (node button, owner GtkButton)

(nuxhash-gui:5113): Gtk-WARNING **: 13:55:33.687: Negative content width -13 (allocation 1, extents 7x7) while allocating gadget (node button, owner GtkButton)

(nuxhash-gui:5113): Gtk-WARNING **: 13:55:33.687: Negative content height -11 (allocation 1, extents 6x6) while allocating gadget (node button, owner GtkButton)

(nuxhash-gui:5113): Gtk-WARNING **: 13:55:33.687: Negative content width -13 (allocation 1, extents 7x7) while allocating gadget (node button, owner GtkButton)

(nuxhash-gui:5113): Gtk-WARNING **: 13:55:33.687: Negative content height -11 (allocation 1, extents 6x6) while allocating gadget (node button, owner GtkButton)

(nuxhash-gui:5113): Gtk-WARNING **: 13:55:33.696: Negative content width -15 (allocation 1, extents 8x8) while allocating gadget (node entry, owner GtkEntry)

(nuxhash-gui:5113): Gtk-WARNING **: 13:55:33.708: Negative content height -11 (allocation 1, extents 6x6) while allocating gadget (node button, owner GtkButton)

(nuxhash-gui:5113): Gtk-WARNING **: 13:55:33.708: Negative content height -11 (allocation 1, extents 6x6) while allocating gadget (node button, owner GtkButton)
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.6/dist-packages/nuxhash/gui/mining.py", line 138, in request
balance = unpaid_balance(address)
File "/usr/local/lib/python3.6/dist-packages/nuxhash/nicehash.py", line 47, in unpaid_balance
result = api_call('stats.provider', { 'addr': address })
File "/usr/local/lib/python3.6/dist-packages/nuxhash/nicehash.py", line 34, in api_call
% urlencode(get_data), timeout=TIMEOUT) as request:
File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.6/urllib/request.py", line 526, in open
response = self._open(req, data)
File "/usr/lib/python3.6/urllib/request.py", line 544, in _open
'_open', req)
File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib/python3.6/urllib/request.py", line 1361, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/lib/python3.6/urllib/request.py", line 1321, in do_open
r = h.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1346, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 307, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 268, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.6/ssl.py", line 1012, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.6/ssl.py", line 874, in read
return self._sslobj.read(len, buffer)
File "/usr/lib/python3.6/ssl.py", line 631, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

NiceHash platform transition changes

NiceHash has announced their transition to a new platform:
https://www.nicehash.com/news/important-transition-to-a-new-nicehash-platform

Does this require any changes to the Nuxhash miner? Item #9 mentions changes to their API calls:

If you are using any API calls, please make sure you update your settings according to our new API documentation. Buyers, please note that USA hash-power marketplace on the new platform and EU hash-power marketplace on the current platform have a different API!

crash when internet is out

Hey man, it crashes when the internet drops for a few minutes. Anyway to fix this? Maybe set some kind of incremental backoff retry in the code?

 % urlencode(get_data), timeout=TIMEOUT) as request:
  File "/home/gold/anaconda3/lib/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/home/gold/anaconda3/lib/python3.6/urllib/request.py", line 526, in open
    response = self._open(req, data)
  File "/home/gold/anaconda3/lib/python3.6/urllib/request.py", line 544, in _open
    '_open', req)
  File "/home/gold/anaconda3/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/home/gold/anaconda3/lib/python3.6/urllib/request.py", line 1361, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/home/gold/anaconda3/lib/python3.6/urllib/request.py", line 1320, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -2] Name or service not known>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/gold/anaconda3/bin/nuxhashd", line 11, in <module>
    sys.exit(nuxhashd())
  File "/home/gold/anaconda3/lib/python3.6/site-packages/nuxhash/__init__.py", line 3, in nuxhashd
    main()
  File "/home/gold/anaconda3/lib/python3.6/site-packages/nuxhash/daemon.py", line 108, in main
    session.run()
  File "/home/gold/anaconda3/lib/python3.6/site-packages/nuxhash/daemon.py", line 267, in run
    self._scheduler.run()
  File "/home/gold/anaconda3/lib/python3.6/sched.py", line 154, in run
    action(*argument, **kwargs)
  File "/home/gold/anaconda3/lib/python3.6/site-packages/nuxhash/daemon.py", line 279, in _switch_algos
    except (os.ConnectionError, socket.error,
AttributeError: module 'os' has no attribute 'ConnectionError'
2018-11-14 00:01:47,856 CRITICAL: Crash! Killing all miners.
Killed

Nuxhash fails to decode JSON object and freezes, has to be manually restarted

This happens about once a day for me.

Traceback (most recent call last):
  File "./nuxhashd.py", line 258, in <module>
    main()
  File "./nuxhashd.py", line 88, in main
    do_mining(nx_miners, nx_settings, nx_benchmarks, all_devices)
  File "./nuxhashd.py", line 237, in do_mining
    algorithm.parent.reload()
  File "/home/thefeeltrain/nuxhash/miners/excavator.py", line 318, in reload
    self.server.restart()
  File "/home/thefeeltrain/nuxhash/miners/excavator.py", line 100, in restart
    self.start()
  File "/home/thefeeltrain/nuxhash/miners/excavator.py", line 70, in start
    while not self._test_connection():
  File "/home/thefeeltrain/nuxhash/miners/excavator.py", line 162, in _test_connection
    self.send_command('info', [])
  File "/home/thefeeltrain/nuxhash/miners/excavator.py", line 154, in send_command
    response_data = json.loads(response)
  File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")

Some dual algo benchmarking scrolls screen for each result

Benchmarking for other algorithms print results on single line
for daggerhashimoto_pascal and daggerhashimoto_decred algorithms results printing scroll to few hundred lines.

example 1:
excavator_daggerhashimoto_pascal . 7.47 MH/s, 418.22 MH/s (sampling, 11 s) excavator_daggerhashimoto_pascal . 7.47 MH/s, 418.21 MH/s (sampling, 10 s) excavator_daggerhashimoto_pascal . 7.47 MH/s, 418.30 MH/s (sampling, 9 s) excavator_daggerhashimoto_pascal . 7.47 MH/s, 418.38 MH/s (sampling, 8 s) excavator_daggerhashimoto_pascal . 7.47 MH/s, 418.38 MH/s (sampling, 7 s)
example 2:
excavator_daggerhashimoto_decred . 14.27 MH/s, 513.88 MH/s (warming up, 3:1 excavator_daggerhashimoto_decred . 14.43 MH/s, 519.38 MH/s (warming up, 3:1 excavator_daggerhashimoto_decred . 14.51 MH/s, 522.32 MH/s (warming up, 3:1 excavator_daggerhashimoto_decred . 14.59 MH/s, 525.14 MH/s (warming up, 3:1 excavator_daggerhashimoto_decred . 14.66 MH/s, 527.83 MH/s (warming up, 3:1

nuxhash-gui not working

Whenever I run nuxhash-gui, I get the following error:

Traceback (most recent call last):
  File "/usr/local/bin/nuxhash-gui", line 11, in <module>
    load_entry_point('nuxhash==1.0.0b2', 'console_scripts', 'nuxhash-gui')()
  File "/usr/local/lib/python3.6/dist-packages/nuxhash/__init__.py", line 6, in nuxhash_gui
    from nuxhash.gui.main import main
  File "/usr/local/lib/python3.6/dist-packages/nuxhash/gui/main.py", line 9, in <module>
    import wx
  File "/home/titan/.local/lib/python3.6/site-packages/wx/__init__.py", line 17, in <module>
    from wx.core import *
  File "/home/titan/.local/lib/python3.6/site-packages/wx/core.py", line 12, in <module>
    from ._core import *
ImportError: libpng12.so.0: cannot open shared object file: No such file or directory

And yes, nuxhashd works fine.
I am on KDE Neon (I believe it is built in Ubuntu 18?), and using Python 3.6.9.

Anyone know how to fix this?

Won't Benchmark

I'm actually trying to run this in Arch Linux. When I try to execute the program, either the gui or cli, I can't benchmark. It just freezes and when I exit, I see where there is a socket timeout. Is there anything else I need to set up? In my settings.conf, there is a section on excavator that is blank. I'm not sure what to do with that. Also, I set up an api key on nicehash website, but am not sure what to do with it here. When I run nuxhashd --list-devices, my 2 GPUs show up, so it is detecting them.
error.txt

NiceHash "New Site" Update Has Stopped NuxHash From Showing Account Info

Hi,

NiceHash have recently migrated to a new system/site. This has required users' new login. While previously mined Sats seem to be correct, the update has forced a NiceHash wallet address change.

I have updated this new "working wallet" in NuxHash settings, NuxHash seems to be mining, but "Daily Revenue" and "Address Balance" are "0.00000000". Will there be a way to assure that NuxHash is still performing as expected with this new NiceHash system?

Thanks!

Limit mining intensity

Hi,

is there a way to limit the intensity of mining with custom parameters?
Id like to reduce intensity on the main gpu, so that browsing etc is still nice and smooth.

Cheers,
Maxim

api keys required (0.00000 mBTC)

Hi,

I'm a mining newbie and just downloaded nuxhash to run it on my Arch rig. I've set up an account with nicehash.com and have entered my wallet hash under settings -> Wallet address: I then went to the MIning tab and hit the Start MIning button on the bottom when I saw the message "api keys required (0.00000 mBTC)" being displayed next to it. What am I missing here to start my mining adventure? I don't see anything happening in the dialogue box above and I've let it sit for quite a few hours now....

Shortcuts!

I think that it would be nice if nuxhash-gui can be created shortcuts (.desktop file) which will be work with different DE such Gnome-shell, KDE, etc...
At the moment each user need to create shell-script himself, but it's inconvenient.

NiceHash stats: The read operation timed out,

Hi @YoRyan !

I completed the initial setup and benchmark, but when I run nuxhasd it never connects.

All I get is this:

nuxhashd -v --show-mining
2019-10-17 21:34:46,447 INFO: Querying NiceHash for miner connection information...
2019-10-17 21:35:07,088 WARNING: NiceHash stats: The read operation timed out, retrying in 5 seconds
2019-10-17 21:35:32,734 WARNING: NiceHash stats: The read operation timed out, retrying in 5 seconds
2019-10-17 21:35:58,388 WARNING: NiceHash stats: The read operation timed out, retrying in 5 seconds
.
.
.
Tried all servers. I was using nuxhash in the old platform without problem.

Any ideas? Thanks for your great work.

CUDA error 'out of memory' in func 'run' line 768

Hi. I have cuda error when I want to try all variants of daggerhashimoto algorithms.
Fedora 30, GTX 1050Ti, 32 Gb Ram, About 100 Gb free on disk.

$ nuxhashd --show-mining
2019-10-29 16:49:14,535 INFO: Querying NiceHash for miner connection information...
2019-10-29 16:49:14,538 DEBUG: Starting new HTTPS connection (1): api2.nicehash.com:443
2019-10-29 16:49:14,726 DEBUG: https://api2.nicehash.com:443 "GET /main/api/v2/public/simplemultialgo/info/ HTTP/1.1" 200 None
2019-10-29 16:49:14,729 DEBUG: Starting new HTTPS connection (1): api2.nicehash.com:443
2019-10-29 16:49:14,834 DEBUG: https://api2.nicehash.com:443 "GET /main/api/v2/mining/algorithms/ HTTP/1.1" 200 None
2019-10-29 16:49:14,848 DEBUG: =========================== www.nicehash.com =========================
2019-10-29 16:49:14,848 DEBUG: Excavator v1.5.14a GPU Miner for NiceHash.
2019-10-29 16:49:14,848 DEBUG: Copyright (C) 2018 NiceHash. All rights reserved.
2019-10-29 16:49:14,848 DEBUG: =========================== www.nicehash.com =========================
2019-10-29 16:49:14,848 DEBUG: Build time: 2018-12-07 10:21:06+01:00
2019-10-29 16:49:14,848 DEBUG: Build number: 3897564716
2019-10-29 16:49:14,848 DEBUG: [16:49:14][0x00007f74a825cc00][info] Log started
2019-10-29 16:49:14,850 DEBUG: [16:49:14][0x00007f74a825cc00][info] core | Found CUDA device: GeForce GTX 1050 Ti
2019-10-29 16:49:14,922 DEBUG: [16:49:14][0x00007f74a825cc00][info] api | Listening on 127.0.0.1:34599
2019-10-29 16:49:14,922 DEBUG: [16:49:14][0x00007f74a825cc00][info] core | Initialized!
2019-10-29 16:49:14,924 DEBUG: Starting new HTTPS connection (1): api2.nicehash.com:443
2019-10-29 16:49:15,005 DEBUG: [16:49:15][0x00007f74a825cc00][info] Connected to nhmp.eu.nicehash.com:3200
2019-10-29 16:49:15,044 DEBUG: [16:49:15][0x00007f74a122f700][info] nhmp | Subscribed
2019-10-29 16:49:15,133 DEBUG: https://api2.nicehash.com:443 "GET /main/api/v2/public/simplemultialgo/info/ HTTP/1.1" 200 None
2019-10-29 16:49:15,135 INFO: Assigning nvidia_GPU-4b28e028-129d-86f1-0e25-56207fadd686 to excavator_daggerhashimoto_decred (0.0 mBTC/day)
2019-10-29 16:49:15,174 DEBUG: [16:49:15][0x00007f74a122f700][info] nhmp | daggerhashimoto | add success
2019-10-29 16:49:15,208 DEBUG: [16:49:15][0x00007f74a122f700][info] net | daggerhashimoto | New job '000000002883f2ce', diff=2
2019-10-29 16:49:15,235 DEBUG: [16:49:15][0x00007f746ffff700][info] wrkr0-0 | Algorithm: CUDA-daggerhashimoto_decred parameters: R_0:R_1=8:2,P=0
2019-10-29 16:49:15,236 DEBUG: [16:49:15][0x00007f746ffff700][info] wrkr0-0 | Mining with high intensity
2019-10-29 16:49:15,283 DEBUG: [16:49:15][0x00007f74a122f700][info] nhmp | decred | add success
2019-10-29 16:49:15,283 DEBUG: [16:49:15][0x00007f74a122f700][info] net | decred | New job '00000000a3b51e57', diff=4
2019-10-29 16:49:15,288 DEBUG: [16:49:15][0x00007f746ffff700][info] job-daggerhashimoto | Generating DAG cache (0d96b89b2001e463)...
2019-10-29 16:49:19,641 DEBUG: [16:49:19][0x00007f746ffff700][info] job-daggerhashimoto | DAG cache (0d96b89b2001e463) generation completed (4341ms)
2019-10-29 16:49:19,703 DEBUG: [16:49:19][0x00007f746ffff700][fatal] wrkr0-0 | CUDA error 'out of memory' in func 'run' line 768
2019-10-29 16:49:19,703 DEBUG: [16:49:19][0x00007f74a825cc00][info] Shutting down
2019-10-29 16:49:19,703 DEBUG: [16:49:19][0x00007f74a825cc00][info] api | Closing

AttributeError: 'NvidiaDevice' object has no attribute 'cuda_index'

After running $ ./nuxhashd.py --benchmark-all I get the following

  File "./nuxhashd.py", line 143, in run_all_benchmarks
    print '\nCUDA device %d: %s' % (device.cuda_index, device.name)
AttributeError: 'NvidiaDevice' object has no attribute 'cuda_index'

I made a temporary fix changing all instances of cuda_index to pci_bus.

Out of memory crash

2018-04-30 14:11:53,150 DEBUG: [14:11:53][0x00007f77174bf700][info] net | sia | New job '00000060efe0c20e', diff=2
2018-04-30 14:11:53,229 DEBUG: [14:11:53][0x00007f771b798140][info] net | sia | Share #42 accepted
2018-04-30 14:11:53,589 DEBUG: [14:11:53][0x00007f77174bf700][info] net | daggerhashimoto | New job '0000003ddaf88b8a', diff=0.25
2018-04-30 14:11:57,824 DEBUG: [14:11:57][0x00007f771b798140][info] net | daggerhashimoto | New job '0000003ddaf89e29', diff=0.25
2018-04-30 14:12:01,977 DEBUG: [14:12:01][0x00007f77174bf700][info] net | daggerhashimoto | New job '0000003ddaf8b75d', diff=0.25
2018-04-30 14:12:02,959 DEBUG: [14:12:02][0x00007f771b798140][info] net | daggerhashimoto | New job '0000003ddaf95502', diff=0.25
2018-04-30 14:12:10,193 DEBUG: [14:12:10][0x00007f77174bf700][info] net | daggerhashimoto | New job '0000003ddafa268c', diff=0.25
2018-04-30 14:12:13,113 DEBUG: [14:12:13][0x00007f77174bf700][info] net | sia | Share #43 accepted
2018-04-30 14:12:14,606 DEBUG: [14:12:14][0x00007f771b798140][info] net | daggerhashimoto | New job '0000003ddafa3a0f', diff=0.25
2018-04-30 14:12:15,464 DEBUG: [14:12:15][0x00007f77174bf700][info] net | daggerhashimoto | New job '0000003ddafa4214', diff=0.25
2018-04-30 14:12:15,576 DEBUG: [14:12:15][0x00007f7709dff700][fatal] wrkr0-0 | CUDA error 'out of memory' in func 'run' line 695
2018-04-30 14:12:15,577 DEBUG: [14:12:15][0x00007f771b798140][info] Shutting down
2018-04-30 14:12:15,578 DEBUG: [14:12:15][0x00007f771b798140][info] api | Closing
2018-04-30 14:12:15,683 DEBUG: 
2018-04-30 14:14:17,319 INFO: Switching nvidia_GPU-4719bfd3-10d6-e79e-3dd1-092d3774e3dc from excavator_daggerhashimoto_sia to excavator_lyra2rev2 (0.096 -> 0.106 mBTC/day)
Traceback (most recent call last):
  File "./nuxhashd.py", line 259, in <module>
    main()
  File "./nuxhashd.py", line 77, in main
    do_mining(nx_settings, nx_benchmarks, all_devices)
  File "./nuxhashd.py", line 236, in do_mining
    algorithm.set_devices(my_devices)
  File "/home/florens/nuxhash/miners/excavator.py", line 213, in set_devices
    self._attach_device(device)
  File "/home/florens/nuxhash/miners/excavator.py", line 219, in _attach_device
    raise miner.MinerNotRunning('could not connect to excavator')
miners.miner.MinerNotRunning

The script had been running flawlessly on a 6GB GTX 1060 for over 24 hours until this happened. Could be a memory leak or just an issue with CUDA? I'm running the latest CUDA on Arch linux. Maybe someting should be implemented to restart if CUDA runs out of memory instead of shutting down the excavator and crashing to program as a result.

Error when doing nuxhashd

Here is the error

Traceback (most recent call last):
  File "/usr/local/bin/nuxhashd", line 11, in <module>
    load_entry_point('nuxhash==1.0.0b2', 'console_scripts', 'nuxhashd')()
  File "/usr/local/lib/python3.6/dist-packages/nuxhash/__init__.py", line 3, in                         nuxhashd
    main()
  File "/usr/local/lib/python3.6/dist-packages/nuxhash/daemon.py", line 73, in m                        ain
    all_devices = nvidia_devices()
  File "/usr/local/lib/python3.6/dist-packages/nuxhash/devices/nvidia.py", line                         26, in enumerate_devices
    raw = subprocess.check_output(['nvidia-smi', '--query', '--xml-format'])
  File "/usr/lib/python3.6/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['nvidia-smi', '--query', '--xml-format'                        ]' returned non-zero exit status 9.
2019-04-08 12:37:55,635 CRITICAL: Crash! Killing all miners.
Killed

GPU issue

Hello,

Are you requiring to have and use GPU in your code? What if I want to use CPU only?

I'm getting the following error when running 'nuxhashd':

Traceback (most recent call last):
  File "/opt/rh/rh-python36/root/usr/bin/nuxhashd", line 8, in <module>
    sys.exit(nuxhashd())
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/nuxhash/__init__.py", line 3, in nuxhashd
    main()
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/nuxhash/daemon.py", line 104, in main
    nx_miners, nx_settings, all_devices, nx_benchmarks)
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/nuxhash/daemon.py", line 155, in run_missing_benchmarks
    miner.load()
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/nuxhash/miners/excavator.py", line 378, in load
    self.server.start()
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/nuxhash/miners/excavator.py", line 124, in start
    raise miner.MinerStartFailed
nuxhash.miners.miner.MinerStartFailed
2020-05-26 19:23:14,885 CRITICAL: Crash! Killing all miners.
Killed

And when running ' ~/.config/nuxhash/excavator/excavator -i 127.0.0.1 -p 5001',I get the following error:

/root/.config/nuxhash/excavator/excavator: error while loading shared libraries: libcuda.so.1: cannot open shared object file: No such file or directory

I think this error is related to GPU driver.

What do you think is the issue, and how should it be fixed?

Benchmark Failing on Ubuntu 18.04 with Python 3.6

The actual benchmark of the cards works fine, but the writing of the benchmarks to the file causes a TypeError: 'map' object is not subscriptable error in the python script

Full error message:

Traceback (most recent call last):
  File "/usr/local/bin/nuxhashd", line 11, in <module>
    load_entry_point('nuxhash==1.0.0a0', 'console_scripts', 'nuxhashd')()
  File "/usr/local/lib/python3.6/dist-packages/nuxhash-1.0.0a0-py3.6.egg/nuxhash/__init__.py", line 3, in nuxhashd
    main()
  File "/usr/local/lib/python3.6/dist-packages/nuxhash-1.0.0a0-py3.6.egg/nuxhash/daemon.py", line 93, in main
    session.run()
  File "/usr/local/lib/python3.6/dist-packages/nuxhash-1.0.0a0-py3.6.egg/nuxhash/daemon.py", line 233, in run
    self._scheduler.run()
  File "/usr/lib/python3.6/sched.py", line 154, in run
    action(*argument, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/nuxhash-1.0.0a0-py3.6.egg/nuxhash/daemon.py", line 262, in _switch_algos
    for device in self._devices}
  File "/usr/local/lib/python3.6/dist-packages/nuxhash-1.0.0a0-py3.6.egg/nuxhash/daemon.py", line 262, in <dictcomp>
    for device in self._devices}
  File "/usr/local/lib/python3.6/dist-packages/nuxhash-1.0.0a0-py3.6.egg/nuxhash/daemon.py", line 261, in <dictcomp>
    for algorithm in self._algorithms}
  File "/usr/local/lib/python3.6/dist-packages/nuxhash-1.0.0a0-py3.6.egg/nuxhash/daemon.py", line 257, in revenue
    for i in range(len(algorithm.algorithms))])
  File "/usr/local/lib/python3.6/dist-packages/nuxhash-1.0.0a0-py3.6.egg/nuxhash/daemon.py", line 257, in <listcomp>
    for i in range(len(algorithm.algorithms))])
TypeError: 'map' object is not subscriptable

nuxhash install errors

Errors installing when attempting to run the command below; all dependencies have been installed/upgraded. One error appears to be about Python being out of date but when the update is executed the system reports already upgraded. Ubuntu 16.04.5 LTS.

$ sudo pip3 install git+https://github.com/YoRyan/nuxhash The directory '/home/user/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/user/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Collecting git+https://github.com/YoRyan/nuxhash Cloning https://github.com/YoRyan/nuxhash to /tmp/pip-rlcrxmbq-build Error [Errno 2] No such file or directory: 'git' while executing command git clone -q https://github.com/YoRyan/nuxhash /tmp/pip-rlcrxmbq-build Cannot find command 'git' You are using pip version 8.1.1, however version 19.2.3 is available. You should consider upgrading via the 'pip install --upgrade pip' command.

hanging after "WARNING:root:This interval will be donation time."

After running a while, I get the message:

WARNING:root:This interval will be donation time.
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.6/dist-packages/nuxhash/gui/mining.py", line 337, in run
    self._scheduler.run()
  File "/usr/lib/python3.6/sched.py", line 154, in run
    action(*argument, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/nuxhash/gui/mining.py", line 387, in _switch_algos
    miner.settings = donate_settings
  File "/usr/local/lib/python3.6/dist-packages/nuxhash/miners/excavator.py", line 352, in settings
    self.server.settings = v
  File "/usr/local/lib/python3.6/dist-packages/nuxhash/miners/excavator.py", line 83, in settings
    self._subscribe()
  File "/usr/local/lib/python3.6/dist-packages/nuxhash/miners/excavator.py", line 119, in _subscribe
    self._auth])
  File "/usr/local/lib/python3.6/dist-packages/nuxhash/miners/excavator.py", line 152, in send_command
    with socket.create_connection(self._address, self.TIMEOUT) as s:
  File "/usr/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

At that point, I have to search out the process and kill it. Using the "Stop Mining" button doesn't actually stop it then. Nor does closing the gui. After manually killing the process, I can start everything up normally again

Thank you

matching gpu names, IDs and algos

Hi there,

First of all, stellar work.

I have a small rig with 7 cards. I added the following (draft) code to your do_mining to check the mining stats per card:

               if current_revenue != 0 and maximum_revenue/current_revenue >= min_factor:
                   logging.info('Switching %s from %s to %s (%.3f -> %.3f mBTC/day)' %
                                (device, current.name, maximum.name,
                                 current_revenue, maximum_revenue))
                   current_algorithm[device] = maximum

           # Check per card mining stats
           if isinstance(device, devices.nvidia.NvidiaDevice):
               if current is None:
                   logging.info('CUDA device %d (%s) %s: %.3f mBTC/day (%s)' % (device.cuda_index,
                   device.uuid, device.name,
                   mbtc_per_day(maximum), maximum.name ))
               else:
                   logging.info('CUDA device %d (%s) %s: %.3f mBTC/day (%s)' % (device.cuda_index,
                   device.uuid, device.name,
                   mbtc_per_day(current), current.name ))

       # attach devices to respective algorithms atomically
       for algorithm in algorithms:
           my_devices = [d for d, a in current_algorithm.items() if a == algorithm]
           algorithm.set_devices(my_devices)

After some 15 minutes of running I get the following results

2018-05-05 20:27:18,773 INFO: CUDA device 0 (GPU-f9e91651-f73e-eab9-3f0d-1c09c76336b4) GeForce GTX 1070: 0.249 mBTC/day (excavator_equihash)
2018-05-05 20:27:18,773 INFO: CUDA device 1 (GPU-0d084c58-d6a1-f9bb-b113-edc7c7cb5638) GeForce GTX 1070: 0.170 mBTC/day (excavator_neoscrypt)
2018-05-05 20:27:18,773 INFO: CUDA device 2 (GPU-a75c541b-faa1-741a-1c4d-74ae6fd506f2) GeForce GTX 1080 Ti: 0.162 mBTC/day (excavator_neoscrypt)
2018-05-05 20:27:18,773 INFO: CUDA device 3 (GPU-d3c3ec52-8dd9-1071-7391-5bdd0e9ebcfc) GeForce GTX 1070: 0.159 mBTC/day (excavator_equihash)
2018-05-05 20:27:18,773 INFO: CUDA device 4 (GPU-7ad23033-c01a-04dd-c5b0-e47fcc2de618) GeForce GTX 1070: 0.159 mBTC/day (excavator_equihash)
2018-05-05 20:27:18,773 INFO: CUDA device 5 (GPU-e21736e6-0db6-22e7-4b7d-499510eb128f) GeForce GTX 1070: 0.156 mBTC/day (excavator_equihash)
2018-05-05 20:27:18,774 INFO: CUDA device 6 (GPU-af3d4145-1d62-91fb-4f69-10d0d6339695) GeForce GTX 1080: 0.181 mBTC/day (excavator_lyra2rev2)

I am suspecting that at some place there is a mismatch between card id and mining results. It looks like the numbers do not add up. I checked that IDs do match with the names.

Any idea what could be happening?

Needs update to API 0.1.2

Hey there! Nuxhash is throwing the following for me after first card benchmark completes:
[m@desktop nuxhash]$ ./nuxhashd.py --benchmark-all
Querying NiceHash for miner connection information...

CUDA device 2: GeForce GTX 1080 Ti
excavator_equihash: 766.31 H/s
excavator_pascal: 2.02 GH/s
excavator_decred: 5.21 GH/s
excavator_sia: 3.23 GH/s
excavator_lbry: 510.06 MH/s )
excavator_blake2s: 7.49 GH/s
excavator_daggerhashimoto: 31.14 MH/s
excavator_lyra2rev2: 77.01 MH/s
excavator_daggerhashimoto_decred: 31.58 MH/s, 2.22 GH/s
excavator_daggerhashimoto_sia: 31.39 MH/s, 1.79 GH/s
excavator_daggerhashimoto_pascal: 30.30 MH/s, 848.52 MH/s
Traceback (most recent call last):
File "./nuxhashd.py", line 259, in
main()
File "./nuxhashd.py", line 71, in main
new_benchmarks = run_all_benchmarks(nx_settings, all_devices)
File "./nuxhashd.py", line 164, in run_all_benchmarks
sample_callback=report_speeds)
File "/home//Downloads/nuxhash/utils.py", line 45, in run_benchmark
algorithm.set_devices([device])
File "/home/Downloads/nuxhash/miners/excavator.py", line 213, in set_devices
self._attach_device(device)
File "/home/Downloads/nuxhash/miners/excavator.py", line 217, in _attach_device
self.parent.server.start_work(self.excavator_algorithm, device)
File "/home/Downloads/nuxhash/miners/excavator.py", line 138, in start_work
self.running_algorithms[multialgorithm].grab()
File "/home/Downloads/nuxhash/miners/excavator.py", line 170, in grab
self._create()
File "/home/Downloads/nuxhash/miners/excavator.py", line 192, in _create
self.server.send_command('algorithm.add', self.params)
File "/home/Downloads/nuxhash/miners/excavator.py", line 124, in send_command
raise ExcavatorAPIError(response_data)
miners.excavator.ExcavatorAPIError

Thank you for your work! :)

Crash on MacOS

/usr/local/lib/python3.7/site-packages/nuxhash/download/downloadables/excavator.sh: line 8: sha256sum: command not found
/usr/local/lib/python3.7/site-packages/nuxhash/download/downloadables/excavator.sh: line 8: [: =: unary operator expected
2019-12-14 18:58:30,820 INFO: Downloading NiceHash excavator
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 617 0 617 0 0 1904 0 --:--:-- --:--:-- --:--:-- 1898
100 5830k 100 5830k 0 0 2602k 0 0:00:02 0:00:02 --:--:-- 5803k
Traceback (most recent call last):
File "/usr/local/bin/nuxhashd", line 8, in
sys.exit(nuxhashd())
File "/usr/local/lib/python3.7/site-packages/nuxhash/init.py", line 3, in nuxhashd
main()
File "/usr/local/lib/python3.7/site-packages/nuxhash/daemon.py", line 104, in main
nx_miners, nx_settings, all_devices, nx_benchmarks)
File "/usr/local/lib/python3.7/site-packages/nuxhash/daemon.py", line 155, in run_missing_benchmarks
miner.load()
File "/usr/local/lib/python3.7/site-packages/nuxhash/miners/excavator.py", line 378, in load
self.server.start()
File "/usr/local/lib/python3.7/site-packages/nuxhash/miners/excavator.py", line 114, in start
stdin=subprocess.DEVNULL, stderr=subprocess.STDOUT, stdout=subprocess.PIPE)
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 800, in init
restore_signals, start_new_session)
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: PosixPath('/Users/julianstanev/.config/nuxhash/excavator/excavator')
2019-12-14 18:58:33,809 CRITICAL: Crash! Killing all miners.
Killed: 9

excavator fails with dual algos and mixed 3GB and 6GB cards

my "rig" has one 1060 6GB card and two 1060GB cards currently. Mining seems to stop when algo is switched to dual algos. I managed to prevent that by editing benchmark results to low number like 1.99.
In this example card with uuid starting with a562ebac is 6GB others are 3GB.

2018-04-16 21:40:04,526 DEBUG: [21:40:04][0x00007efc477fa700][info] net | equihash | Share #278 accepted
2018-04-16 21:40:05,823 DEBUG: [21:40:05][0x00007efc4ba54740][info] net | equihash | Share #279 accepted
2018-04-16 21:40:08,398 INFO: Switching nvidia_GPU-50f755f1-xxxxxx from excavator_equihash to excavator_daggerhashimoto_decred (0.070 -> 0.078 mBTC/day)
2018-04-16 21:40:08,406 DEBUG: [21:40:08][0x00007efc463ff700][fatal] wrkr1-2 | 3GB or more memory is needed!
2018-04-16 21:40:08,406 DEBUG: [21:40:08][0x00007efc4ba54740][info] Shutting down
2018-04-16 21:40:08,407 DEBUG: [21:40:08][0x00007efc4ba54740][info] api | Closing
2018-04-16 21:40:13,163 DEBUG:
2018-04-16 21:45:08,827 INFO: Switching nvidia_GPU-a562ebac-yyyyyyyyyy from excavator_equihash to excavator_neoscrypt (0.075 -> 0.087 mBTC/day)
2018-04-16 21:45:08,827 INFO: Switching nvidia_GPU-a787fb06-zzzzzzzzz from excavator_equihash to excavator_neoscrypt (0.073 -> 0.086 mBTC/day)
Traceback (most recent call last):
File "./nuxhashd.py", line 259, in
main()
File "./nuxhashd.py", line 77, in main
do_mining(nx_settings, nx_benchmarks, all_devices)
File "./nuxhashd.py", line 236, in do_mining
algorithm.set_devices(my_devices)
File "/home/harry/nicehash/nuxhash/miners/excavator.py", line 211, in set_devices
self._detach_device(device)
File "/home/harry/nicehash/nuxhash/miners/excavator.py", line 227, in _detach_device
raise miner.MinerNotRunning('could not connect to excavator')
miners.miner.MinerNotRunning

Cannot find wx on Manjaro 5.3.6.1

Install works flawless unfortunately nuxhash-gui cannot find the wx module, probably because the package name is wxpython in pacman instead of python-wxtools. Hint on resultion is much appreciated.

Doesn't work on Python 3.7 (I think)

Running nuxhashd results in this:

[vdavid003@DavidArch ~]$ nuxhashd
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nuxhash/settings.py", line 108, in load_settings
    with open(config_dir/SETTINGS_FILENAME, 'r') as settings_fd:
FileNotFoundError: [Errno 2] No such file or directory: '/home/vdavid003/.config/nuxhash/settings.conf'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/nuxhashd", line 11, in <module>
    load_entry_point('nuxhash==1.0.0b2', 'console_scripts', 'nuxhashd')()
  File "/usr/lib/python3.7/site-packages/nuxhash/__init__.py", line 3, in nuxhashd
    main()
  File "/usr/lib/python3.7/site-packages/nuxhash/daemon.py", line 74, in main
    nx_settings = settings.load_settings(config_dir)
  File "/usr/lib/python3.7/site-packages/nuxhash/settings.py", line 111, in load_settings
    if err.errno != os.errno.ENOENT:
AttributeError: module 'os' has no attribute 'errno'
2019-07-16 02:45:56,806 CRITICAL: Crash! Killing all miners.
Killed

From the AttributeError: module 'os' has no attribute 'errno', I think the problem is Python 3.7, since... well, google.

change to excavator api 1.5

Hello,

Is the project still alive? The code won't work with new excavator api.

Traceback (most recent call last):
File "./nuxhashd.py", line 255, in
main()
File "./nuxhashd.py", line 70, in main
new_benchmarks = run_all_benchmarks(nx_settings, devices)
File "./nuxhashd.py", line 163, in run_all_benchmarks
sample_callback=report_speeds)
File "/home/alex/bt/nux/nuxhash-master/utils.py", line 45, in run_benchmark
algorithm.attach_device(device)
File "/home/alex/bt/nux/nuxhash-master/miners/excavator.py", line 171, in attach_device
self.parent.server.dispatch_device('_'.join(self.algorithms), device)
File "/home/alex/bt/nux/nuxhash-master/miners/excavator.py", line 111, in dispatch_device
response = self.send_command('algorithm.add', add_params)
File "/home/alex/bt/nux/nuxhash-master/miners/excavator.py", line 95, in send_command
raise ExcavatorAPIError(response_data)
miners.excavator.ExcavatorAPIError

crash when nicehash api not available

Hey Ryan, with the latest version from master, it still crashes but this time when the nicehash api is not available. If you could implement a retry with an exponential backoff, it would become more robust, and keep on mining when the api comes back online. Most online services have downtimes, it's normal. I really do not code python, otherwise I would have tried implementing it myself. Thanks!

2018-12-03 13:33:45,548 DEBUG: [13:33:45][0x00007fef010ff700][info] net | x16r | New job '00000136a1ec6ee6', diff=0.03125
2018-12-03 13:33:46,537 WARNING: NiceHash stats: HTTP Error 404: Not Found
2018-12-03 13:33:47,928 DEBUG: [13:33:47][0x00007fef056e6780][info] net | x16r | Share #86 accepted
2018-12-03 13:34:00,552 DEBUG: [13:34:00][0x00007fef010ff700][info] net | x16r | Share #87 accepted
2018-12-03 13:34:05,981 DEBUG: [13:34:05][0x00007fef056e6780][info] net | x16r | Share #88 accepted
2018-12-03 13:34:10,027 DEBUG: [13:34:10][0x00007fef010ff700][info] net | x16r | Share #89 accepted
2018-12-03 13:34:24,539 DEBUG: [13:34:24][0x00007fef056e6780][info] net | x16r | Share #90 accepted
2018-12-03 13:34:32,217 DEBUG: [13:34:32][0x00007fef010ff700][info] net | x16r | Share #91 accepted
2018-12-03 13:34:43,319 DEBUG: [13:34:43][0x00007fef056e6780][info] net | x16r | Share #92 accepted
2018-12-03 13:34:45,692 DEBUG: [13:34:45][0x00007fef010ff700][info] net | x16r | Share #93 accepted
Traceback (most recent call last):
  File "/usr/bin/nuxhashd", line 11, in <module>
    load_entry_point('nuxhash==1.0.0b2', 'console_scripts', 'nuxhashd')()
  File "/usr/lib/python3.6/site-packages/nuxhash/__init__.py", line 3, in nuxhashd
    main()
  File "/usr/lib/python3.6/site-packages/nuxhash/daemon.py", line 108, in main
    session.run()
  File "/usr/lib/python3.6/site-packages/nuxhash/daemon.py", line 266, in run
    self._scheduler.run()
  File "/usr/lib64/python3.6/sched.py", line 154, in run
    action(*argument, **kwargs)
  File "/usr/lib/python3.6/site-packages/nuxhash/daemon.py", line 275, in _switch_algos
    ret_payrates, stratums = nicehash.simplemultialgo_info(self._settings)
  File "/usr/lib/python3.6/site-packages/nuxhash/nicehash.py", line 45, in simplemultialgo_info
    response = api_call('simplemultialgo.info', [])
  File "/usr/lib/python3.6/site-packages/nuxhash/nicehash.py", line 33, in api_call
    raise NicehashAPIError(result)
nuxhash.nicehash.NicehashAPIError: {'error': 'Not ready yet.'}
2018-12-03 13:34:46,801 CRITICAL: Crash! Killing all miners.
Killed

Disable GPU on high temps

This is keeping me from using nuxhash in the Dallas area. It's a mite warm, fellas. Using Claymore's miner I tag out cards that reach 70ÂēC until they go to 64

Excavator starting every few seconds

Since Monero Mining isn't really working anymore I found Nicehash for my 8 3GB Nvidia GTXX 1060s.
Sadly I couldn't configure NicehashOS at all and I don't receive any information about errors that happen so I tried your miner because I am using Linux for mining.

The idea sounds amazing but I can't manage to get it to work. I would be very thankful if you could help me.
After finishing the benchmark in the GUI version of the miner i can try to run it and run into two issues:
The first was that the miner could not be started which I fixed for now by removing GPUs reducing the amount to 5.
Now the miner starts, ist running sometimes and shown on Nicehash but it restarts every few seconds. Is that how it is supposed to work? Also I read that excavator was closed down so does Nuxhash still work for mining on Linux?

Doesn't work on my 18.04

Hi,
Ubuntu 18.04 for me too and doesn't work:
Traceback (most recent call last): File "/usr/local/bin/nuxhashd", line 11, in <module> load_entry_point('nuxhash==1.0.0b2', 'console_scripts', 'nuxhashd')() File "/usr/local/lib/python3.6/dist-packages/nuxhash/__init__.py", line 3, in nuxhashd main() File "/usr/local/lib/python3.6/dist-packages/nuxhash/daemon.py", line 105, in main nx_miners, nx_settings, all_devices, nx_benchmarks) File "/usr/local/lib/python3.6/dist-packages/nuxhash/daemon.py", line 156, in run_missing_benchmarks miner.load() File "/usr/local/lib/python3.6/dist-packages/nuxhash/miners/excavator.py", line 379, in load self.server.start() File "/usr/local/lib/python3.6/dist-packages/nuxhash/miners/excavator.py", line 124, in start raise miner.MinerStartFailed nuxhash.miners.miner.MinerStartFailed 2019-10-09 13:01:26,465 CRITICAL: Crash! Killing all miners.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.