GithubHelp home page GithubHelp logo

firoorg / cpuminer-xzc Goto Github PK

View Code? Open in Web Editor NEW
32.0 15.0 47.0 1.24 MB

cpuminer for Zcoin Lyra2Z PoW

License: Other

Makefile 0.11% C 91.95% PHP 0.14% HTML 0.03% Assembly 5.55% Shell 0.04% C++ 1.53% Objective-C 0.12% M4 0.16% Roff 0.14% NSIS 0.22% Perl 0.02%

cpuminer-xzc's Introduction

CPUMiner-Multi

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!! THIS IS A HACKED VERSION TO SUPPORT ZCOIN (XZC)'s Lyra2Z algo ! ONLY USE WITH ZCOIN AFTER BLOCK 20500 !!

Use -a lyra2z for XZC mining on pools like on https://xzc.suprnova.cc or solomining.

This contains following optimizations by optiminer:

  • Some unnecessary computations and memory accesses removed.
  • Code for AVX2 can be enabled by compiling with "-mavx2": $ CFLAGS="-O2 -mavx2" ./configure && make clean && make
  • Memory prefetching can be enabled by compiling with "-mavx2": $ CFLAGS="-O2 -DROW_PREFETCH" ./configure && make clean && make

The different flags can also be combined. If you are building for your local CPU, use "-march=native" as well. The hash algorithm is memory bandwith bound, therefore AVX2 / prefetching will not have a big impact on performance.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Build Status

This is a multi-threaded CPU miner, fork of pooler's cpuminer (see AUTHORS for list of contributors).

Table of contents

Algorithms

Currently supported

  • scrypt (Litecoin, Dogecoin, Feathercoin, ...)
  • scrypt:N
  • scrypt-jane:N
  • sha256d (Bitcoin, Freicoin, Peercoin/PPCoin, Terracoin, ...)
  • axiom (Axiom Shabal-256 based MemoHash)
  • bastion (Joincoin [J])
  • blake (Saffron [SFR] Blake-256)
  • blake2s (NevaCoin Blake2-S 256)
  • bmw (Midnight [MDT] BMW-256)
  • cryptonight (Bytecoin [BCN], Monero)
  • cryptonight-light (Aeon)
  • dmd-gr (Diamond-Groestl)
  • fresh (FreshCoin)
  • groestl (Groestlcoin)
  • lbry (LBRY Credits [LBC])
  • lyra2RE (Lyrabar, Cryptocoin)
  • lyra2Z (Zcoin [XZC])
  • myr-gr (Myriad-Groestl)
  • neoscrypt (Feathercoin)
  • nist5 (MistCoin [MIC], TalkCoin [TAC], ...)
  • pentablake (Joincoin)
  • pluck (Supcoin [SUP])
  • quark (Quarkcoin)
  • qubit (MyriadCoin [MYR])
  • skein (Skeincoin, Myriadcoin, Xedoscoin, ...)
  • skein2 (Woodcoin)
  • s3 (OneCoin)
  • vanilla (Blake-256 8-rounds - double sha256 [VNL])
  • x11evo (Revolver [XRE])
  • x11 (Darkcoin [DRK], Hirocoin, Limecoin, ...)
  • x13 (Sherlockcoin, [ACE], [B2B], [GRC], [XHC], ...)
  • x14 (X14, Webcoin [WEB])
  • x15 (RadianceCoin [RCE])
  • yescrypt (GlobalBoostY [BSTY], Unitus [UIS])
  • zr5 (Ziftrcoin [ZRC])

Implemented, but untested

  • ? hefty1 (Heavycoin)
  • ? keccak (Maxcoin HelixCoin, CryptoMeth, Galleon, 365coin, Slothcoin, BitcointalkCoin)
  • ? luffa (Joincoin, Doomcoin)
  • ? shavite3 (INKcoin)
  • ? sib X11 + gost (SibCoin)

Planned support for

  • scrypt-jane (YaCoin, CopperBars, Pennies, Tickets, etc..)

Dependencies

Download

Build

Basic *nix build instructions:

  • just use ./build.sh OR
  • ./autogen.sh # only needed if building from git repo
  • ./nomacro.pl # only needed if building on Mac OS X or with Clang
  • ./configure CFLAGS="-march=native" --with-crypto --with-curl
    • Use -march=native if building for a single machine

  • make

Note for Debian/Ubuntu users:

  • apt-get install automake autoconf pkg-config libcurl4-openssl-dev libjansson-dev libssl-dev libgmp-dev

Notes for AIX users:

  • To build a 64-bit binary, export OBJECT_MODE=64
  • GNU-style long options are not supported, but are accessible via configuration file

Basic Windows build with Visual Studio 2013

  • All the required .lib files are now included in tree (windows only)
  • AVX enabled by default for x64 platform (AVX2 and XOP could also be used)

Basic Windows build instructions, using MinGW64:

  • Install MinGW64 and the MSYS Developer Tool Kit (http://www.mingw.org/)
    • Make sure you have mstcpip.h in MinGW\include
  • install pthreads-w64
  • Install libcurl devel (http://curl.haxx.se/download.html)
    • Make sure you have libcurl.m4 in MinGW\share\aclocal
    • Make sure you have curl-config in MinGW\bin
  • Install openssl devel (https://www.openssl.org/related/binaries.html)
  • In the MSYS shell, run:
    • for 64bit, you can use ./mingw64.sh else : ./autogen.sh # only needed if building from git repo
    • LIBCURL="-lcurldll" ./configure CFLAGS="-march=native"
      • Use -march=native if building for a single machine

    • make

Architecture-specific notes:

  • ARM:
    • No runtime CPU detection. The miner can take advantage of some instructions specific to ARMv5E and later processors, but the decision whether to use them is made at compile time, based on compiler-defined macros.
    • To use NEON instructions, add "-mfpu=neon" to CFLAGS.
  • x86:
    • The miner checks for SSE2 instructions support at runtime, and uses them if they are available.
  • x86-64:
    • The miner can take advantage of AVX, AVX2 and XOP instructions, but only if both the CPU and the operating system support them.
      • Linux supports AVX starting from kernel version 2.6.30.
      • FreeBSD supports AVX starting with 9.1-RELEASE.
      • Mac OS X added AVX support in the 10.6.8 update.
      • Windows supports AVX starting from Windows 7 SP1 and Windows Server 2008 R2 SP1.
    • The configure script outputs a warning if the assembler doesn't support some instruction sets. In that case, the miner can still be built, but unavailable optimizations are left off.

Usage instructions

Run "cpuminer --help" to see options.

Connecting through a proxy

Use the --proxy option.

To use a SOCKS proxy, add a socks4:// or socks5:// prefix to the proxy host
Protocols socks4a and socks5h, allowing remote name resolving, are also available since libcurl 7.18.0.

If no protocol is specified, the proxy is assumed to be a HTTP proxy.
When the --proxy option is not used, the program honors the http_proxy and all_proxy environment variables.

Donations

Donations for the work done in this fork are accepted :

Tanguy Pruvot :

  • BTC: 1FhDPLPpw18X4srecguG3MxJYe4a1JsZnd
  • ZRC: ZX6LmrCwphNgitxvDnf8TX6Tsegfxpeozx

Lucas Jones :

  • MRO: 472haywQKoxFzf7asaQ4XKBc2foAY4ezk8HiN63ifW4iAbJiLnfmJfhHSR9XmVKw2WYPnszJV9MEHj9Z5WMK9VCNHaGLDmJ
  • BTC: 139QWoktddChHsZMWZFxmBva4FM96X2dhE

Credits

CPUMiner-multi was forked from pooler's CPUMiner, and has been started by Lucas Jones.

  • tpruvot added all the recent features and newer algorythmns
  • Wolf9466 helped with Intel AES-NI support for CryptoNight

License

GPLv2. See COPYING for details.

cpuminer-xzc's People

Contributors

aizensou 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

Watchers

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

cpuminer-xzc's Issues

Tried to compile this for Mac OS X High Sierra 10.13.6

No go.

  1. I git cloned the source files from the github url to my Downloads directory.
  2. cd to the cpuminer-xzc/ folder created.
  3. Executed the ./autogen.sh file.
  4. Executed the ./nomacro.pl next.
  5. copied and pasted this from the Read me page: ./configure CFLAGS="-march=native" --with-crypto --with-c
  6. Then ran 'make'.
  7. I get an error.

screen shot 2018-10-07 at 3 57 18 pm

Problem in making

Hello, I have a problem in making.
the libcurl and openssl is already installed:

$ curl --version
curl 7.21.7 (x86_64-w64-mingw32) libcurl/7.21.7 OpenSSL/1.0.2k
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtsp smtp smtps telnet tftp
Features: Largefile NTLM SSL TLS-SRP
$ openssl
WARNING: can't open config file: /usr/local/ssl/openssl.cnf
OpenSSL> exit

The output of make is :

$ make
make  all-recursive
make[1]: Entering directory `/home/sl/cpuminer-xzc'
Making all in compat
make[2]: Entering directory `/home/sl/cpuminer-xzc/compat'
Making all in jansson
make[3]: Entering directory `/home/sl/cpuminer-xzc/compat/jansson'
depbase=`echo dump.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../..      -Icompat/pthreads -march=native -I/usr/local/include  -MT dump.o -MD -MP -MF $depbase.Tpo -c -o dump.o dump.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo error.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../..      -Icompat/pthreads -march=native -I/usr/local/include  -MT error.o -MD -MP -MF $depbase.Tpo -c -o error.o error.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo hashtable.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../..      -Icompat/pthreads -march=native -I/usr/local/include  -MT hashtable.o -MD -MP -MF $depbase.Tpo -c -o hashtable.o hashtable.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo load.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../..      -Icompat/pthreads -march=native -I/usr/local/include  -MT load.o -MD -MP -MF $depbase.Tpo -c -o load.o load.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo memory.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../..      -Icompat/pthreads -march=native -I/usr/local/include  -MT memory.o -MD -MP -MF $depbase.Tpo -c -o memory.o memory.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo pack_unpack.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../..      -Icompat/pthreads -march=native -I/usr/local/include  -MT pack_unpack.o -MD -MP -MF $depbase.Tpo -c -o pack_unpack.o pack_unpack.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo strbuffer.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../..      -Icompat/pthreads -march=native -I/usr/local/include  -MT strbuffer.o -MD -MP -MF $depbase.Tpo -c -o strbuffer.o strbuffer.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo strconv.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../..      -Icompat/pthreads -march=native -I/usr/local/include  -MT strconv.o -MD -MP -MF $depbase.Tpo -c -o strconv.o strconv.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo utf.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../..      -Icompat/pthreads -march=native -I/usr/local/include  -MT utf.o -MD -MP -MF $depbase.Tpo -c -o utf.o utf.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo value.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../..      -Icompat/pthreads -march=native -I/usr/local/include  -MT value.o -MD -MP -MF $depbase.Tpo -c -o value.o value.c &&\
mv -f $depbase.Tpo $depbase.Po
rm -f libjansson.a
ar cru libjansson.a dump.o error.o  hashtable.o load.o memory.o  pack_unpack.o strbuffer.o strconv.o  utf.o value.o
ranlib libjansson.a
make[3]: Leaving directory `/home/sl/cpuminer-xzc/compat/jansson'
make[3]: Entering directory `/home/sl/cpuminer-xzc/compat'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/sl/cpuminer-xzc/compat'
make[2]: Leaving directory `/home/sl/cpuminer-xzc/compat'
make[2]: Entering directory `/home/sl/cpuminer-xzc'
gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -fno-strict-aliasing -I./compat/jansson -I.  -Wno-pointer-sign -Wno-pointer-to-int-cast   -Wl,--stack,10485760 -Icompat/pthreads -march=native -I/usr/local/include -I/local/include -MT cpuminer-cpu-miner.o -MD -MP -MF .deps/cpuminer-cpu-miner.Tpo -c -o cpuminer-cpu-miner.o `test -f 'cpu-miner.c' || echo './'`cpu-miner.c
mv -f .deps/cpuminer-cpu-miner.Tpo .deps/cpuminer-cpu-miner.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -fno-strict-aliasing -I./compat/jansson -I.  -Wno-pointer-sign -Wno-pointer-to-int-cast   -Wl,--stack,10485760 -Icompat/pthreads -march=native -I/usr/local/include -I/local/include -MT cpuminer-util.o -MD -MP -MF .deps/cpuminer-util.Tpo -c -o cpuminer-util.o `test -f 'util.c' || echo './'`util.c
mv -f .deps/cpuminer-util.Tpo .deps/cpuminer-util.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -fno-strict-aliasing -I./compat/jansson -I.  -Wno-pointer-sign -Wno-pointer-to-int-cast   -Wl,--stack,10485760 -Icompat/pthreads -march=native -I/usr/local/include -I/local/include -MT cpuminer-api.o -MD -MP -MF .deps/cpuminer-api.Tpo -c -o cpuminer-api.o `test -f 'api.c' || echo './'`api.c
mv -f .deps/cpuminer-api.Tpo .deps/cpuminer-api.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -fno-strict-aliasing -I./compat/jansson -I.  -Wno-pointer-sign -Wno-pointer-to-int-cast   -Wl,--stack,10485760 -Icompat/pthreads -march=native -I/usr/local/include -I/local/include -MT cpuminer-sysinfos.o -MD -MP -MF .deps/cpuminer-sysinfos.Tpo -c -o cpuminer-sysinfos.o `test -f 'sysinfos.c' || echo './'`sysinfos.c
mv -f .deps/cpuminer-sysinfos.Tpo .deps/cpuminer-sysinfos.Po
g++ -DHAVE_CONFIG_H -I.  -fno-strict-aliasing -I./compat/jansson -I.   -g -O2 -MT cpuminer-uint256.o -MD -MP -MF .deps/cpuminer-uint256.Tpo -c -o cpuminer-uint256.o `test -f 'uint256.cpp' || echo './'`uint256.cpp
In file included from uint256.cpp:7:0:
miner.h:33:23: fatal error: curl/curl.h: No such file or directory
 #include <curl/curl.h>
                       ^
compilation terminated.
Makefile:2185: recipe for target `cpuminer-uint256.o' failed
make[2]: *** [cpuminer-uint256.o] Error 1
make[2]: Leaving directory `/home/sl/cpuminer-xzc'
Makefile:2248: recipe for target `all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sl/cpuminer-xzc'
Makefile:460: recipe for target `all' failed
make: *** [all] Error 2

And I also put libcurl.m4 in /share and curl-config in /bin

$ find / -name libcurl.m4
/home/sl/curl-7.21.7/curl-7.21.7/docs/libcurl/libcurl.m4
/share/aclocal/libcurl.m4
/share/aclocal-1.12/libcurl.m4

sl@DESKTOP-TQ90JBU ~/cpuminer-xzc
$ find / -name curl-config
/bin/curl-config
/home/sl/curl-7.21.7/curl-7.21.7/curl-config
/local/bin/curl-config

But I have a problem in making, in fact, I can find the curl/curl.h in /local/include .

$ find / -name curl.h
/home/sl/cpuminer-xzc/compat/curl-for-windows/curl/include/curl/curl.h
/home/sl/curl-7.21.7/curl-7.21.7/include/curl/curl.h
/local/include/curl/curl.h

Please help me !!!
Thanks!!!

This version is low

xzc lyra2z
E5-2680 V2 dual, windows cpuminer.exe can run 800KH, this version of the compiler to run on Linux only 150K

Release

Regular people don't know how to compile. Please upload a proper built release for windows so people can actually use it and don't have hunt down random exe files from other websites. Thank you, Aaron.

cross-compiled failed to ARM platform

HI,

I tried to compile the latest CPUMiner on ARM. I got the following error message:

......

arm-openwrt-linux-muslgnueabi-gcc -DHAVE_CONFIG_H -I.  -fno-strict-aliasing -I./compat/jansson -I. -I/usr/openwrt-cc/lede-trunk/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl-1.1.16_eabi/usr/include -I/usr/openwrt-cc/lede-trunk/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl-1.1.16_eabi/include -I/usr/openwrt-cc/lede-trunk/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-5.4.0_musl-1.1.16_eabi/usr/include -I/usr/openwrt-cc/lede-trunk/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-5.4.0_musl-1.1.16_eabi/include/fortify -I/usr/openwrt-cc/lede-trunk/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-5.4.0_musl-1.1.16_eabi/include   -Wno-pointer-sign -Wno-pointer-to-int-cast   -Os -pipe -mcpu=cortex-a15 -mfpu=neon-vfpv4 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -iremap /usr/openwrt-cc/lede-trunk/build_dir/target-arm_cortex-a15+neon-vfpv4_musl-1.1.16_eabi/cpuminer/cpuminer-1.3.3:cpuminer-1.3.3 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro   -MT lyra2/cpuminer-Lyra2.o -MD -MP -MF lyra2/.deps/cpuminer-Lyra2.Tpo -c -o lyra2/cpuminer-Lyra2.o `test -f 'lyra2/Lyra2.c' || echo './'`lyra2/Lyra2.c
lyra2/Lyra2.c:24:23: fatal error: mm_malloc.h: No such file or directory
compilation terminated.
Makefile:1611: recipe for target 'lyra2/cpuminer-Lyra2.o' failed
make[5]: *** [lyra2/cpuminer-Lyra2.o] Error 1
make[5]: Leaving directory '/usr/openwrt-cc/lede-trunk/build_dir/target-arm_cortex-a15+neon-vfpv4_musl-1.1.16_eabi/cpuminer/cpuminer-1.3.3'
Makefile:2348: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/usr/openwrt-cc/lede-trunk/build_dir/target-arm_cortex-a15+neon-vfpv4_musl-1.1.16_eabi/cpuminer/cpuminer-1.3.3'
Makefile:558: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/usr/openwrt-cc/lede-trunk/build_dir/target-arm_cortex-a15+neon-vfpv4_musl-1.1.16_eabi/cpuminer/cpuminer-1.3.3'
Makefile:42: recipe for target '/usr/openwrt-cc/lede-trunk/build_dir/target-arm_cortex-a15+neon-vfpv4_musl-1.1.16_eabi/cpuminer/cpuminer-1.3.3/.built' failed
make[2]: *** [/usr/openwrt-cc/lede-trunk/build_dir/target-arm_cortex-a15+neon-vfpv4_musl-1.1.16_eabi/cpuminer/cpuminer-1.3.3/.built] Error 2
make[2]: Leaving directory '/usr/openwrt-cc/lede-trunk/package/github/cpuminer'
package/Makefile:106: recipe for target 'package/github/cpuminer/compile' failed
make[1]: *** [package/github/cpuminer/compile] Error 2
make[1]: Leaving directory '/usr/openwrt-cc/lede-trunk'
Build failed - please re-run with -j1 to see the real error message
/usr/openwrt-cc/lede-trunk/include/toplevel.mk:197: recipe for target 'package/github/cpuminer/compile' failed

As we see, the error information is lyra2/Lyra2.c:24:23: fatal error: mm_malloc.h: No such file or directory and I try to find the same issue in other project. But it not useful because I didn't add the -march=native option as compile.

How can I run it in ARM?

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.