Skip to content

Commit

Permalink
Merge pull request #1208 from fireice-uk/dev
Browse files Browse the repository at this point in the history
release 2.3.0
  • Loading branch information
fireice-uk authored Mar 25, 2018
2 parents 2ae7260 + 09a5dcc commit a036cd8
Show file tree
Hide file tree
Showing 59 changed files with 3,331 additions and 993 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ config-debug.txt
# KDevelop files
.kdev4/
xmr-stak.kdev4

# Idea/Clion project files
cmake-build-release/
cmake-build-debug/
\.idea/
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,8 @@ matrix:

before_install:
- . CI/checkPRBranch
- if [ $TRAVIS_OS_NAME = osx ]; then
- if [ $TRAVIS_OS_NAME = osx ] ; then
brew update;
brew tap homebrew/science;
fi
- export PATH=$CUDA_ROOT/bin:$PATH

Expand Down
32 changes: 14 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project(xmr-stak)

cmake_minimum_required(VERSION 3.1.0)
cmake_minimum_required(VERSION 3.4.0)

# enforce C++11
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down Expand Up @@ -36,10 +36,6 @@ if(NOT CMAKE_BUILD_TYPE)
endif()
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "${BUILD_TYPE}")

set(XMR-STAK_CURRENCY "all" CACHE STRING "select miner currency")
set_property(CACHE XMR-STAK_CURRENCY PROPERTY STRINGS "all;monero;aeon")


set(XMR-STAK_COMPILE "native" CACHE STRING "select CPU compute architecture")
set_property(CACHE XMR-STAK_COMPILE PROPERTY STRINGS "native;generic")
if(XMR-STAK_COMPILE STREQUAL "native")
Expand All @@ -53,16 +49,6 @@ else()
message(FATAL_ERROR "XMR-STAK_COMPILE is set to an unknown value '${XMR-STAK_COMPILE}'")
endif()

if(XMR-STAK_CURRENCY STREQUAL "all")
message(STATUS "Set miner currency to 'monero' and 'aeon'")
elseif(XMR-STAK_CURRENCY STREQUAL "aeon")
message(STATUS "Set miner currency to 'aeon'")
add_definitions("-DCONF_NO_MONERO=1")
elseif(XMR-STAK_CURRENCY STREQUAL "monero")
message(STATUS "Set miner currency to 'monero'")
add_definitions("-DCONF_NO_AEON=1")
endif()

# option to add static libgcc and libstdc++
option(CMAKE_LINK_STATIC "link as much as possible libraries static" OFF)

Expand Down Expand Up @@ -438,6 +424,14 @@ else()

endif()

# add -Wall for debug builds with gcc
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
endif()
endif()

# activate static libgcc and libstdc++ linking
if(CMAKE_LINK_STATIC)
set(BUILD_SHARED_LIBRARIES OFF)
Expand Down Expand Up @@ -522,9 +516,11 @@ endif()
file(GLOB SRCFILES_CPP "xmrstak/cli/*.cpp")
set_source_files_properties(${SRCFILES_CPP} PROPERTIES LANGUAGE CXX)

add_executable(xmr-stak
${SRCFILES_CPP}
)
if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
add_executable(xmr-stak ${SRCFILES_CPP} xmrstak/cli/xmr-stak.manifest)
else()
add_executable(xmr-stak ${SRCFILES_CPP})
endif()

set(EXECUTABLE_OUTPUT_PATH "bin")
set(LIBRARY_OUTPUT_PATH "bin")
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ ENV XMRSTAK_CMAKE_FLAGS -DXMR-STAK_COMPILE=generic -DCUDA_ENABLE=ON -DOpenCL_ENA
# Innstall packages
RUN apt-get update \
&& set -x \
&& apt-get install -qq --no-install-recommends -y ca-certificates cmake cuda-core-9-0 git cuda-cudart-dev-9-0 libhwloc-dev libmicrohttpd-dev libssl-dev \
&& apt-get install -qq --no-install-recommends -y build-essential ca-certificates cmake cuda-core-9-0 git cuda-cudart-dev-9-0 libhwloc-dev libmicrohttpd-dev libssl-dev \
&& git clone $GIT_REPOSITORY \
&& cd /xmr-stak \
&& cmake ${XMRSTAK_CMAKE_FLAGS} . \
&& make \
&& cd - \
&& mv /xmr-stak/bin/* /usr/local/bin/ \
&& rm -rf /xmr-stak \
&& apt-get purge -y -qq cmake cuda-core-9-0 git cuda-cudart-dev-9-0 libhwloc-dev libmicrohttpd-dev libssl-dev \
&& apt-get purge -y -qq build-essential cmake cuda-core-9-0 git cuda-cudart-dev-9-0 libhwloc-dev libmicrohttpd-dev libssl-dev \
&& apt-get clean -qq

VOLUME /mnt
Expand Down
68 changes: 18 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ XMR-Stak is a universal Stratum pool miner. This miner supports CPUs, AMD and NV
## HTML reports
<img src="https://gist.githubusercontent.com/fireice-uk/2da301131ac01695ff79539a27b81d68/raw/4c09cdeee86f94df2e9dd86b927e64aded6184f5/xmr-stak-cpu-hashrate.png" width="260"> <img src="https://gist.githubusercontent.com/fireice-uk/2da301131ac01695ff79539a27b81d68/raw/4c09cdeee86f94df2e9dd86b927e64aded6184f5/xmr-stak-cpu-results.png" width="260"> <img src="https://gist.githubusercontent.com/fireice-uk/2da301131ac01695ff79539a27b81d68/raw/4c09cdeee86f94df2e9dd86b927e64aded6184f5/xmr-stak-cpu-connection.png" width="260">

## Video setup guide on Windows

[<img src="https://gist.githubusercontent.com/fireice-uk/3621b179d56f57a8ead6303d8e415cf6/raw/4f2863d4072b78fdff649805e733203c9802daef/vidguidetmb.jpg">](https://www.youtube.com/watch?v=-8paGFwxyMU)
###### Video by Crypto Sewer

## Overview
* [Features](#features)
* [Supported altcoins](#supported-altcoins)
Expand All @@ -15,32 +20,37 @@ XMR-Stak is a universal Stratum pool miner. This miner supports CPUs, AMD and NV
* [HowTo Compile](doc/compile.md)
* [FAQ](doc/FAQ.md)
* [Developer Donation](#default-developer-donation)
* [Release Cheksums](#release-checksums)
* [Developer PGP Key's](doc/pgp_keys.md)

## Features

- support all common backends (CPU/x86, AMD-GPU and NVIDIA-GPU)
- support all common OS (Linux, Windows and MacOS)
- support all common OS (Linux, Windows and macOS)
- supports algorithm cryptonight for Monero (XMR) and cryptonight-light (AEON)
- easy to use
- guided start (no need to edit a config file for the first start)
- auto configuration for each backend
- open source software (GPLv3)
- TLS support
- HTML statistics
- JSON API for monitoring
- [HTML statistics](doc/usage.md#html-and-json-api-report-configuraton)
- [JSON API for monitoring](doc/usage.md#html-and-json-api-report-configuraton)

## Supported altcoins

Besides Monero, following coins can be mined using this miner:
Besides [Monero](https://getmonero.org), following coins can be mined using this miner:

- [Aeon](http://www.aeon.cash/)
- [Aeon](http://www.aeon.cash)
- [Edollar](https://edollar.cash)
- [Electroneum](https://electroneum.com)
- [Graft](https://www.graft.network)
- [Intense](https://intensecoin.com)
- [Karbo](https://karbo.io)
- [Sumokoin](https://www.sumokoin.org)

For all coins, except Aeon, you can use Monero settings.
If your prefered coin is not listed, you can chose one of the following algorithms:

- Cryptonight - 2 MiB scratchpad memory
- Cryptonight-light - 1 MiB scratchpad memory

Please note, this list is not complete, and is not an endorsement.

Expand All @@ -62,47 +72,5 @@ fireice-uk:

psychocrypt:
```
43NoJVEXo21hGZ6tDG6Z3g4qimiGdJPE6GRxAmiWwm26gwr62Lqo7zRiCJFSBmbkwTGNuuES9ES5TgaVHceuYc4Y75txCTU
```

## Release Checksums

Please use the [Developer PGP Key's](doc/pgp_keys.md) to verify the integrity of the precompiled binaries.

```
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
XMR-Stak 2.2.0 Windows Build Checksums
compiled by: psychocrypt
$ sha1sum *
3f1634244ccd336f7df581e3c82e1c6ca38ce714 libeay32.dll
538f3bd9dfcafc379e912562bcf343333f5375c7 ssleay32.dll
302e5be7c97fcd4922bf99b3533c0523ead5d109 xmrstak_cuda_backend.dll
ad6b9e62a7ea132e1bec0efd8d9e5f8a2ae531ca xmr-stak.exe
393bc5deb7e59e61cc7f4ccc0f4438402422f3b0 xmrstak_opencl_backend.dll
$ sha3sum *
5aeefca7278be1b2706d99bf89fa23646931f881aff8bbca33654eb1 libeay32.dll
6b696caa620b0c6372881b11e503313152b5191c2d5497b26f81ab79 ssleay32.dll
038de57a707664c7c3ab3a74c8bdb3ed4e22000a74d8b7c359c7c4b5 xmrstak_cuda_backend.dll
19ab61049051178a362dc0d1c17af06f5ca1eb0a75182c0388e5aa22 xmr-stak.exe
cc7ba0fbde50d72df2a530ce52a831578cfa19999841eb954554a022 xmrstak_opencl_backend.dll
date
Fri Dec 22 22:09:59 CET 2017
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBCAAGBQJaPXYSAAoJEAUWOMCIZelDQpAH/As2BD6qDZvbKH5NPHjjDv6T
KBJ6/0h+x2k4Iy3GelrtaogB4LvUDzci4MRfaTXr23Xr+rhwsx3J2xvVdWKZgPXh
bQm5pTJFhiao6Dh+Orway6TLmuaEBLNtknatSkjPUPKmkVd/A7kxxkdelDB//yb+
7k5HGb84T+HU8HBlB00pDITyXv/414egpZGMqWeBXsYDeEYa8KHZlEIO3YI4JrEz
pNW44Q1YcWZ+zxqTDrvMgjW8KJZcXg6ijJ3fEhGBo+hcnF+WuUB3Yd3Frf0ps5J5
MjnWXl/uOobML6K70g2UQcHcEDbPk8f9LUxX1++/I0aHsRMGMYhRj0ad5KYE1IY=
=VCEv
-----END PGP SIGNATURE-----
45tcqnJMgd3VqeTznNotiNj4G9PQoK67TGRiHyj6EYSZ31NUbAfs9XdiU5squmZb717iHJLxZv3KfEw8jCYGL5wa19yrVCn
```
5 changes: 5 additions & 0 deletions THIRD-PARTY-LICENSES
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ License: MIT License and BSD License

-------------------------------------------------------------------------

Package: PicoSHA2
Authors: okdshin
License: MIT License

-------------------------------------------------------------------------
49 changes: 36 additions & 13 deletions doc/FAQ.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
# FAQ

## Content Overview
* [SeLockMemoryPrivilege failed](#selockmemoryprivilege-failed)
* ["Obtaining SeLockMemoryPrivilege failed."](#obtaining-selockmemoryprivilege-failed)
* [VirtualAlloc failed](#virtualalloc-failed)
* [Error msvcp140.dll and vcruntime140.dll not available](#error-msvcp140dll-and-vcruntime140dll-not-available)
* [Error: MEMORY ALLOC FAILED: mmap failed](#error-memory-alloc-failed-mmap-failed)
* [Illegal instruction (core dumped)](#illegal-instruction)
* [Virus Protection Alert](#virus-protection-alert)
* [Change Currency to Mine](#change-currency-to-mine)
* [How can I mine Monero](#how-can-i-mine-monero)
* [Why is Monero named monero7](why-is-monero-named-monero7)
* [Which currency must be chosen if my fork coin is not listed](#which-currency-must-be-chosen-if-my-fork-coin-is-not-listed)

## SeLockMemoryPrivilege failed
## "Obtaining SeLockMemoryPrivilege failed."

Please see [config.txt](config.txt) under section **LARGE PAGE SUPPORT**
For professional versions of Windows see [this article](https://msdn.microsoft.com/en-gb/library/ms190730.aspx).
Make sure to reboot afterwards!

For Windows 7 pro, or Windows 8 and above see [this article](https://msdn.microsoft.com/en-gb/library/ms190730.aspx) (make sure to reboot afterwards!).
For Windows 7/10 Home:

For Windows 7 Home :
1) Download and install [Windows Server 2003 Resource Kit Tools](https://www.microsoft.com/en-us/download/details.aspx?id=17657). Ignore any incompatibility warning during installation.

1) Download and install [Windows Server 2003 Resource Kit Tools](https://www.microsoft.com/en-us/download/details.aspx?id=17657). Ignore incompatiablity warning during installation.
2) Open cmd or PowerShell as an administrator.

2) In cmd or power shell: `ntrights -u %USERNAME% +r SeLockMemoryPrivilege` (where %USERNAME% is the user that will be running the program. This command needs to be run as admin)
3) Use `ntrights -u %USERNAME% +r SeLockMemoryPrivilege` where %USERNAME% is the user that will be running the program.

3) Reboot.
4) Reboot.

Reference: http://rybkaforum.net/cgi-bin/rybkaforum/topic_show.pl?pid=259791#pid259791

*Warning: do not download ntrights.exe from any other site other then the offical Microsoft download page.*
*Warning: Do not download ntrights.exe from any other site other than the offical Microsoft download page.*

## VirtualAlloc failed

Expand All @@ -40,13 +44,18 @@ Download and install this [runtime package](https://go.microsoft.com/fwlink/?Lin

## Error: MEMORY ALLOC FAILED: mmap failed

On Linux you will need to configure large page support `sudo sysctl -w vm.nr_hugepages=128` and increase your
ulimit -l. To do this you need to add following lines to /etc/security/limits.conf:
On Linux you will need to configure large page support and increase your ulimit -l.

To set large page support, add the following lines to /etc/sysctl.conf:

vm.nr_hugepages=128

To increase the ulimit, add following lines to /etc/security/limits.conf:

* soft memlock 262144
* hard memlock 262144

Save file. You WILL need to log out and log back in for these settings to take affect on your user (no need to reboot, just relogin in your session).
You WILL need to log out and log back in for these settings to take affect on your user (no need to reboot, just relogin in your session).

You can also do it Windows-style and simply run-as-root, but this is NOT recommended for security reasons.

Expand All @@ -63,4 +72,18 @@ If your antivirus software flags **xmr-stak**, it will likely move it to its qua

If the miner is compiled for Monero and Aeon than you can change
- the value `currency` in the config *or*
- start the miner with the [command line option](usage.md) `--currency monero` or `--currency aeon`
- start the miner with the [command line option](usage.md) `--currency monero7` or `--currency aeon`
- run `xmr-stak --help` to see all supported currencies and algorithms

## How can I mine Monero

Set the value `currency` in `pools.txt` to `monero7`.

## Why is Monero named monero7

To avoid configuration conflicts after the hard fork of Monero to the new POW with our old naming schema where all cryptonight currencies was selected by choosing `monero` as currency we decided to switch to the name `monero7`.

## Which currency must be chosen if my fork coin is not listed

If your coin you want to mine is not listed please check the documentation of the coin and try to find out if `cryptonight` or `cryptonight-lite` is the used algorithm.
Select one of these generic coin algorithms.
1 change: 1 addition & 0 deletions doc/Linux_deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ For automatic deployments, please use the steps above to obtain config.txt and u

```
#!/bin/bash
sudo apt install curl
curl -O `curl -s https://api.github.com/repos/fireice-uk/xmr-stak/releases/latest | grep -o 'browser_download_url.*xmr-stak-portbin-linux.tar.gz' | sed 's/.*"//'`
curl -O http://path.to/your/config.txt
tar xzf xmr-stak-portbin-linux.tar.gz
Expand Down
5 changes: 2 additions & 3 deletions doc/compile.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* [Compile on Windows](compile_Windows.md)
* [Compile on Linux](compile_Linux.md)
* [Compile on FreeBSD](compile_FreeBSD.md)
* [Compile on MacOS](compile_MacOS.md)
* [Compile on macOS](compile_macOS.md)

## Build System

Expand All @@ -31,7 +31,7 @@ After the configuration you need to compile the miner, follow the guide for your
* [Compile in Windows](compile_Windows.md)
* [Compile in Linux](compile_Linux.md)
* [Compile in FreeBSD](compile_FreeBSD.md)
* [Compile in MacOS](compile_MacOS.md)
* [Compile in macOS](compile_macOS.md)

## Generic Build Options
- `CMAKE_INSTALL_PREFIX` install miner to the home folder
Expand All @@ -47,7 +47,6 @@ After the configuration you need to compile the miner, follow the guide for your
- there is no *http* interface available if option is disabled: `cmake .. -DMICROHTTPD_ENABLE=OFF`
- `OpenSSL_ENABLE` allow to disable/enable the dependency *OpenSSL*
- it is not possible to connect to a *https* secured pool if option is disabled: `cmake .. -DOpenSSL_ENABLE=OFF`
- `XMR-STAK_CURRENCY` - compile for Monero(XMR) or Aeon(AEON) usage only e.g. `cmake .. -DXMR-STAK_CURRENCY=monero`
- `XMR-STAK_COMPILE` select the CPU compute architecture (default: native)
- native means the miner binary can be used only on the system where it is compiled but will archive the highest hash rate
- use `cmake .. -DXMR-STAK_COMPILE=generic` to run the miner on all CPU's with sse2
Expand Down
32 changes: 30 additions & 2 deletions doc/compile_Linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

### Cuda 8.0+ (only needed to use NVIDIA GPUs)

- donwload and install [https://developer.nvidia.com/cuda-downloads](https://developer.nvidia.com/cuda-downloads)
- download and install [https://developer.nvidia.com/cuda-downloads](https://developer.nvidia.com/cuda-downloads)
- for minimal install choose `Custom installation options` during the install and select
- CUDA/Develpment
- CUDA/Runtime
Expand All @@ -25,7 +25,7 @@
make install
# Arch
sudo pacman -S base-devel hwloc openssl cmake libmicrohttpd
sudo pacman -S --needed base-devel hwloc openssl cmake libmicrohttpd
git clone https://github.com/fireice-uk/xmr-stak.git
mkdir xmr-stak/build
cd xmr-stak/build
Expand Down Expand Up @@ -64,6 +64,34 @@
cd xmr-stak/build
cmake ..
make install
# TinyCore Linux 8.x
# TinyCore is 32-bit only, but there is an x86-64 port, known as "Pure 64,"
# hosted on the TinyCore home page, and it works well.
# Beware that huge page support is not enabled in the kernel distributed
# with Pure 64. Consider http://wiki.tinycorelinux.net/wiki:custom_kernel
# Note that as of yet there are no distro packages for microhttpd or hwloc.
# hwloc is easy enough to install manually though, shown below.
# Also note that only CPU mining has been tested on this platform, thus the
# disabling of CUDA and OpenCL shown below.
tce-load -iw openssl-dev.tcz cmake.tcz make.tcz gcc.tcz git.tcz \
glibc_base-dev.tcz linux-4.8.1_api_headers.tcz \
glibc_add_lib.tcz
wget https://www.open-mpi.org/software/hwloc/v1.11/downloads/hwloc-1.11.8.tar.gz
tar xzvf hwloc-1.11.8.tar.gz
cd hwloc-1.11.8
./configure --prefix=/usr/local
make
sudo make install
cd ..
git clone http://github.com/fireice-uk/xmr-stak
cd xmr-stak
mkdir build
cd build
CC=gcc cmake .. -DCUDA_ENABLE=OFF \
-DOpenCL_ENABLE=OFF \
-DMICROHTTPD_ENABLE=OFF
make install
```

- g++ version 5.1 or higher is required for full C++11 support.
Expand Down
Loading

0 comments on commit a036cd8

Please sign in to comment.