Skip to content

Commit 9f8482b

Browse files
finishing touches
1 parent ec75785 commit 9f8482b

File tree

3 files changed

+70
-64
lines changed

3 files changed

+70
-64
lines changed

README.md

Lines changed: 67 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,81 @@
11
## MVis-ethminer
22

3-
This is a fork of Genoil's ethminer-0.9.41-genoil-1.x.x, which was a fork of the Ethereum Foundation ethminer. It is part of the [Mining Visualizer](https://github.com/mining-visualizer/Mining-Visualizer) suite of programs, and as such the main emphasis is on solo mining. Pool mining is currently not supported.
43

5-
This page describes the miner for **0xBitcoin**. For regular ethereum miner, [click here](https://github.com/mining-visualizer/MVis-ethminer).
4+
This page describes the miner for **0xBitcoin**. For the regular ethereum miner, [click here](https://github.com/mining-visualizer/MVis-ethminer).
65

7-
**Platform support** : Windows, Linux
6+
This is a fork of my MVis-ethminer program, which was a fork of Genoil's ethminer-0.9.41-genoil-1.x.x.
87

9-
#### NEW!! - 0xBitcoin mining support
8+
* This miner is for AMD gpu's only.
9+
* Source code is on the **0xbitcoin** branch. The version number series for binaries is 2.x
10+
* The **Master** branch is for Ethereum mining. The version number series is 1.x
11+
* Windows binaries can be downloaded from the [Releases](https://github.com/mining-visualizer/MVis-ethminer/releases) page, or you can build from source (see below).
12+
* Linux support is limited. The original MVis-ethminer worked well on Linux, so I see no reason why this shouldn't as well, but I haven't tried building or running it under Linux. You can try building from source and see if it works.
13+
* Currently only solo mining is supported. That means you either need to run your own node, or use a public one, like Infura.
14+
* Pool mining support will hopefully be added soon.
1015

11-
* Source code is on the **0xbitcoin** branch. The version number series is 2.x
12-
* The Master branch is for **Ethereum** mining. The version number series is 1.x
13-
* Windows binaries can be downloaded from the [Releases](https://github.com/mining-visualizer/MVis-ethminer/releases) page.
14-
* Installation & operation instructions can be found on the relevant wiki page.
1516

17+
### Installation
1618

19+
* Unzip the [download package](https://github.com/mining-visualizer/MVis-ethminer/releases) anywhere you like.
20+
* Move `ethminer.ini` to `%LocalAppData%/ethminer` on Windows, or `$HOME/.config/ethminer` on Linux. If that folder path does not exist, you will need to create it manually.
21+
* Various settings need to be specified in the `.ini` file. They are fairly well commented. Have a look at them.
22+
* Input an Ethereum account and associated private key. Yah, I know ... that sucks! A PK in plain text format on your hard drive! Make sure it is a 'throw away' account with only the bare minimum amount of money. I might get around to implementing a proper, secure vault someday, although if someone wants to submit a PR, I'd be happy to merge it in.
23+
* You can specify the address of your node in the `.ini` file, or on the command line.
24+
* You can enable gas price bidding. (see comments in the file). Note that enabling this feature does not guarantee that you will win every bid. Network latency will sometimes result in failed transactions, even if you 'out-bid' the other transaction.
25+
* Windows Only: download and install **both** the [VC 2013 Redistributable](https://www.microsoft.com/en-ca/download/details.aspx?id=40784) and the [VC 2015 Redistributable](https://www.microsoft.com/en-ca/download/details.aspx?id=48145)
26+
* Run `ethminer.exe --list-devices -G`. Verify your GPU's are recognized. Pay special attention to the PlatformID. If it is anything other than 0, you will need to add `--opencl-platform <n>` to your command line.
27+
* Start mining with `ethminer.exe -G -N 127.0.0.1:8545`. This assumes the node is on the same machine as the miner.
1728

18-
### Download
29+
#### Configuration Details ####
1930

20-
Binaries are are available for Windows and Linux. Please visit the [Release page](https://github.com/mining-visualizer/MVis-ethminer/releases) for the latest binary downloads
31+
*MVis-ethminer* is partially configured via command line parameters, and partially by settings in `ethminer.ini`. Run `ethminer --help` to see which settings are available on the command line. Have a look inside the .ini file to see what settings can be configured there. (It is fairly well commented). Some settings can *only* be set on the command line (legacy ones mostly), some settings can *only* be set in the .ini file (newer ones mostly), and some can be set in both. For the last group, command line settings take precedence over the .ini file settings.
2132

22-
### Documentation
33+
#### Command Line Options ####
2334

24-
Please visit the [Miner page](https://github.com/mining-visualizer/Mining-Visualizer/wiki/Miner) of the [MVis wiki](https://github.com/mining-visualizer/Mining-Visualizer/wiki) for full documentation.
25-
26-
#### Limitations
27-
28-
* CUDA mining is broken. The old code from Genoil is still there, but I don't have an NVidia device so I have not been able to modify the CUDA code to support some of the new features I have added to the miner. Hopefully I will be able to address this in the near future, or better yet, maybe an experienced CUDA dev will step up and volunteer for this effort. :smiley:
29-
* Pool mining is broken. Many of the features I have added don't really make any sense with pool mining, so it is unlikely I will expend any effort on this issue. If someone wants to submit a PR though, I would be happy to look at it.
30-
* GPU temperatures and fan speeds are unavailable when running under Linux. Hopefully support for this can be added soon.
35+
```
36+
Node configuration:
37+
-N, --node <host:rpc_port> Host address and RPC port of your node.
38+
(default: 127.0.0.1:8545)
39+
-I, --polling-interval <n> If using getWork (polling) to obtain work packages, check
40+
for new work every <n> milliseconds (default: 200). Does not apply to stratum
41+
mode (-S).
42+
43+
Benchmarking mode:
44+
-M [<n>],--benchmark [<n>] Benchmark for mining and exit; Optionally specify block
45+
number to benchmark against specific DAG.
46+
--benchmark-warmup <seconds> Set the duration of warmup for the benchmark tests
47+
(default: 8).
48+
--benchmark-trial <seconds> Set the duration for each trial for the benchmark tests
49+
(default: 3).
50+
--benchmark-trials <n> Set the number of benchmark tests (default: 5).
51+
52+
Mining configuration:
53+
-C,--cpu CPU mining
54+
-G,--opencl When mining use the GPU via OpenCL.
55+
--cl-local-work <n> Set the OpenCL local work size. Default is 128
56+
--cl-work-multiplier <n> This value multiplied by the cl-local-work value equals
57+
the number of hashes computed per kernel run (ie. global work size). (Default: 8192)
58+
--opencl-platform <n> When mining using -G/--opencl use OpenCL platform n (default: 0).
59+
--opencl-device <n> When mining using -G/--opencl use OpenCL device n (default: 0).
60+
--opencl-devices <0 1 ..n> Select which OpenCL devices to mine on. Default: all
61+
-t, --mining-threads <n> Limit number of CPU/GPU miners to n (default: all)
62+
--allow-opencl-cpu Allows CPU to be considered as an OpenCL device if
63+
the OpenCL platform supports it.
64+
--list-devices List the detected OpenCL/CUDA devices and exit. Should be
65+
combined with -G or -U flag
66+
--cl-extragpu-mem <n> Set the memory (in MB) you believe your GPU requires
67+
for stuff other than mining. default: 0
68+
69+
Miscellaneous Options:
70+
--config <FileSpec> - Full path to an INI file containing program options.
71+
Windows default: %LocalAppData%/ethminer/ethminer.ini.
72+
Linux default: $HOME/.config/ethminer/ethminer.ini. If this option is
73+
specified, it must appear before all others.
74+
75+
General Options:
76+
-V,--version Show the version and exit.
77+
-h,--help Show this help message and exit.
78+
```
3179

3280

3381
### Building on Windows
@@ -51,8 +99,6 @@ cmake -G "Visual Studio 12 2013 Win64" ..
5199
- Set `ethminer` as the startup project by right-clicking on it in the project pane.
52100
- Build. Run
53101

54-
Note: if any devs want to help update this project and build process to something more modern (that uses the VS2015 toolset) I would gladly accept submissions.
55-
56102

57103
### Building on Ubuntu
58104

@@ -82,9 +128,4 @@ You can then find the executable in the `build/ethminer` subfolder
82128

83129
### Donations
84130

85-
Donations will be gratefully accepted at the following addresses:
86-
```
87-
- mining-visualizer.eth
88-
- 0xA804e933301AA2C919D3a9834082Cddda877C205 (ETH)
89-
- 0x29224Be72851D7Bad619f64c2E51E8Ca5Ba1094b (ETC)
90-
```
131+
Please consider a donation to `mining-visualizer.eth (0xA804e933301AA2C919D3a9834082Cddda877C205)`

ethminer/MinerAux.h

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -558,18 +558,7 @@ class MinerCLI
558558
_out
559559
<< " Node configuration:" << endl
560560
<< " -N, --node <host:rpc_port> Host address and RPC port of your node. (default: 127.0.0.1:8545)" << endl
561-
<< " -S, --stratum-port <port> Stratum port of your node (default: disabled). Setting this option" << endl
562-
<< " implicitly enables stratum mode, otherwise polling method is used to obtain work packages (ie. getWork)" << endl
563-
<< " -P, --stratum-pwd <string> Stratum password (default: disabled)" << endl
564-
<< " -N2, --node2 <host:rpc_port> Failover node (default: disabled)" << endl
565-
<< " -S2, --stratum-port2 <port> Stratum port of failover node (default: disabled)" << endl
566-
<< " -P2, --stratum-pwd2 <string> Stratum password of failover node (default: disabled)" << endl
567-
<< " -I, --polling-interval <n> If using getWork (polling) to obtain work packages, check for new work" << endl
568-
<< " every <n> milliseconds (default: 200). Does not apply to stratum mode (-S)." << endl
569-
<< " --work-timeout <n> In stratum mode, if more than <n> seconds go by with no new work package, attempt" << endl
570-
<< " to reconnect, or, if a failover node is available, switch to the failover. Defaults to 180. Don't" << endl
571-
<< " set lower than max. avg. block time" << endl
572-
<< " -R, --farm-retries <n> Number of retries until switch to failover (default: 4)" << endl
561+
<< " -I, --polling-interval <n> Check for new work every <n> milliseconds (default: 200). " << endl
573562
<< endl
574563
<< " Benchmarking mode:" << endl
575564
<< " -M [<n>],--benchmark [<n>] Benchmark for mining and exit; Optionally specify block number to benchmark" << endl
@@ -584,37 +573,15 @@ class MinerCLI
584573
<< " --cl-local-work <n> Set the OpenCL local work size. Default is " << toString(ethash_cl_miner::c_defaultLocalWorkSize) << endl
585574
<< " --cl-work-multiplier <n> This value multiplied by the cl-local-work value equals the number of hashes computed per kernel " << endl
586575
<< " run (ie. global work size). (Default: " << toString(ethash_cl_miner::c_defaultWorkSizeMultiplier) << ")" << endl
587-
#if ETH_ETHASHCUDA
588-
<< " -U,--cuda When mining use the GPU via CUDA." << endl
589-
<< " -X,--cuda-opencl Use OpenCL + CUDA in a system with mixed AMD/Nvidia cards. May require setting --opencl-platform 1" << endl
590-
#endif
591576
<< " --opencl-platform <n> When mining using -G/--opencl use OpenCL platform n (default: 0)." << endl
592577
<< " --opencl-device <n> When mining using -G/--opencl use OpenCL device n (default: 0)." << endl
593578
<< " --opencl-devices <0 1 ..n> Select which OpenCL devices to mine on. Default is to use all" << endl
594579
<< " -t, --mining-threads <n> Limit number of CPU/GPU miners to n (default: use everything available on selected platform)" << endl
595580
<< " --allow-opencl-cpu Allows CPU to be considered as an OpenCL device if the OpenCL platform supports it." << endl
596581
<< " --list-devices List the detected OpenCL/CUDA devices and exit. Should be combined with -G or -U flag" << endl
597-
<< " -L, --dag-load-mode <mode> DAG generation mode." << endl
598-
<< " parallel - load DAG on all GPUs at the same time (default)" << endl
599-
<< " sequential - load DAG on GPUs one after another. Use this when the miner crashes during DAG generation" << endl
600-
<< " single <n> - generate DAG on device n, then copy to other devices" << endl
601582
<< " --cl-extragpu-mem <n> Set the memory (in MB) you believe your GPU requires for stuff other than mining. default: 0" << endl
602-
#if ETH_ETHASHCUDA
603-
<< " --cuda-extragpu-mem Set the memory (in MB) you believe your GPU requires for stuff other than mining. Windows rendering e.t.c.." << endl
604-
<< " --cuda-block-size Set the CUDA block work size. Default is " << toString(ethash_cuda_miner::c_defaultBlockSize) << endl
605-
<< " --cuda-grid-size Set the CUDA grid size. Default is " << toString(ethash_cuda_miner::c_defaultGridSize) << endl
606-
<< " --cuda-streams Set the number of CUDA streams. Default is " << toString(ethash_cuda_miner::c_defaultNumStreams) << endl
607-
<< " --cuda-schedule <mode> Set the schedule mode for CUDA threads waiting for CUDA devices to finish work. Default is 'sync'. Possible values are:" << endl
608-
<< " auto - Uses a heuristic based on the number of active CUDA contexts in the process C and the number of logical processors in the system P. If C > P, then yield else spin." << endl
609-
<< " spin - Instruct CUDA to actively spin when waiting for results from the device." << endl
610-
<< " yield - Instruct CUDA to yield its thread when waiting for results from the device." << endl
611-
<< " sync - Instruct CUDA to block the CPU thread on a synchronization primitive when waiting for the results from the device." << endl
612-
<< " --cuda-devices <0 1 ..n> Select which CUDA GPUs to mine on. Default is to use all" << endl
613-
#endif
614583
<< endl
615584
<< " Miscellaneous Options:" << endl
616-
<< " --export-dag <n> - Generate DAG for block <n> and save as file in executable folder " << endl
617-
<< " --verify-dag - Spot check DAG entries " << endl
618585
<< " --config <FileSpec> - Full path to an INI file containing program options. Windows default: %LocalAppData%/ethminer/ethminer.ini " << endl
619586
<< " Linux default: $HOME/.config/ethminer/ethminer.ini. If this option is specified, it must appear before " << endl
620587
<< " all others." << endl
@@ -991,7 +958,7 @@ class MinerCLI
991958
std::vector<node_t> m_nodes;
992959

993960
unsigned m_maxFarmRetries = 4;
994-
unsigned m_pollingInterval = 200;
961+
unsigned m_pollingInterval = 1000;
995962
unsigned m_worktimeout = 180;
996963
bool m_shutdown = false;
997964
};

ethminer/main.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ void CtrlHandlerPosix(int s){
8080
void donations()
8181
{
8282
cout
83-
<< " Please consider a donation to :" << endl
84-
<< " ETH : mining-visualizer.eth (0xA804e933301AA2C919D3a9834082Cddda877C205)" << endl
85-
<< " ETC : 0x29224Be72851D7Bad619f64c2E51E8Ca5Ba1094b" << endl
83+
<< " Please consider a donation to mining-visualizer.eth (0xA804e933301AA2C919D3a9834082Cddda877C205)" << endl
8684
<< " " << endl;
8785
}
8886

0 commit comments

Comments
 (0)