diff --git a/.gitignore b/.gitignore index 3547f273..6f57c216 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ minerd* +cpuminer *.exe *.o *.d diff --git a/.travis.yml b/.travis.yml index 8386c778..1f9f3496 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,4 +13,4 @@ before_script: script: - ./configure --with-crypto --with-curl - make - - ./minerd --cputest + - ./cpuminer --cputest diff --git a/Dockerfile b/Dockerfile index dc2101dd..9db25eec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,4 +22,4 @@ RUN cd cpuminer && ./configure CFLAGS="-O3" RUN cd cpuminer && make WORKDIR /cpuminer -ENTRYPOINT ["./minerd"] +ENTRYPOINT ["./cpuminer"] diff --git a/Makefile.am b/Makefile.am index 7045a755..294d57dc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,11 +11,11 @@ SUBDIRS = compat INCLUDES = @PTHREAD_FLAGS@ -fno-strict-aliasing $(JANSSON_INCLUDES) -bin_PROGRAMS = minerd +bin_PROGRAMS = cpuminer -dist_man_MANS = minerd.1 +dist_man_MANS = cpuminer.1 -minerd_SOURCES = \ +cpuminer_SOURCES = \ cpu-miner.c util.c \ api.c sensors.c \ sha3/sph_keccak.c \ @@ -67,45 +67,45 @@ minerd_SOURCES = \ disable_flags = if USE_ASM - minerd_SOURCES += neoscrypt_asm.S + cpuminer_SOURCES += neoscrypt_asm.S if ARCH_x86 - minerd_SOURCES += sha2-x86.S scrypt-x86.S aesb-x86.S crypto/aesb-x86-impl.c + cpuminer_SOURCES += sha2-x86.S scrypt-x86.S aesb-x86.S crypto/aesb-x86-impl.c endif if ARCH_x86_64 - minerd_SOURCES += sha2-x64.S scrypt-x64.S aesb-x64.S + cpuminer_SOURCES += sha2-x64.S scrypt-x64.S aesb-x64.S endif if ARCH_ARM - minerd_SOURCES += sha2-arm.S scrypt-arm.S + cpuminer_SOURCES += sha2-arm.S scrypt-arm.S endif else disable_flags += -DNOASM - minerd_SOURCES += crypto/aesb-x86-impl.c + cpuminer_SOURCES += crypto/aesb-x86-impl.c endif if HAVE_WINDOWS - minerd_SOURCES += compat/winansi.c + cpuminer_SOURCES += compat/winansi.c endif -minerd_LDFLAGS = @LDFLAGS@ -minerd_LDADD = @LIBCURL@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @WS2_LIBS@ -minerd_CPPFLAGS = @LIBCURL_CPPFLAGS@ -minerd_CFLAGS = -Wno-pointer-sign -Wno-pointer-to-int-cast $(disable_flags) +cpuminer_LDFLAGS = @LDFLAGS@ +cpuminer_LDADD = @LIBCURL@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @WS2_LIBS@ +cpuminer_CPPFLAGS = @LIBCURL_CPPFLAGS@ +cpuminer_CFLAGS = -Wno-pointer-sign -Wno-pointer-to-int-cast $(disable_flags) if HAVE_WINDOWS -minerd_CFLAGS += -Wl,--stack,10485760 +cpuminer_CFLAGS += -Wl,--stack,10485760 endif if HAVE_WINDOWS # use to profile an object # gprof_cflags = -pg -g3 -# minerd_LDFLAGS += -pg -# minerd_CFLAGS += -fno-inline-functions -static +# cpuminer_LDFLAGS += -pg +# cpuminer_CFLAGS += -fno-inline-functions -static # copy/paste from generated Makefile -common_ccflags = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minerd_CPPFLAGS) $(CPPFLAGS) $(minerd_CFLAGS) $(CFLAGS) +common_ccflags = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpuminer_CPPFLAGS) $(CPPFLAGS) $(cpuminer_CFLAGS) $(CFLAGS) # special CFLAGS (if you find a simpler way to do that tell me ;) -minerd-neoscrypt.o: neoscrypt.c +cpuminer-neoscrypt.o: neoscrypt.c @echo "CUSTOM ${@}: ${filter %.o,${^}} ${filter %.c,${^}}" $(CC) $(common_ccflags) -g -O3 $(gprof_cflags) -MT $@ -MD -MP -c -o $@ $< diff --git a/NEWS b/NEWS index a9299455..9632cdd0 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,6 @@ version 1.0.9 (Tanguy Pruvot) - pool extranonce subscribe +- upgrade jansson - lyra2 algo - fix for solo mining @@ -282,7 +283,7 @@ Version 0.3.2 - December 23, 2010 Version 0.3.1 - December 19, 2010 - Critical fix for sha256_via -- Retry JSON-RPC failures (see --retry, under "minerd --help" output) +- Retry JSON-RPC failures (see --retry, under "--help" output) Version 0.3 - December 18, 2010 diff --git a/README.md b/README.md index 4bab7a4f..93984f94 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,12 @@ Algorithms ========== #### Currently supported * ✓ __scrypt__ (Litecoin, Dogecoin, Feathercoin, ...) - * ✓ __scrypt:N__ (Vertcoin [VTC]) + * ✓ __scrypt:N__ * ✓ __sha256d__ (Bitcoin, Freicoin, Peercoin/PPCoin, Terracoin, ...) * ✓ __blake__ (Neos/Saffron [SFR] Blake-256) * ✓ __cryptonight__ (Bytecoin [BCN], Monero) * ✓ __fresh__ (FreshCoin) + * ✓ __lyra2__ (VertCoin [VTC]) * ✓ __neoscrypt__ (Feathercoin) * ✓ __nist5__ (MistCoin [MIC], TalkCoin [TAC], ...) * ✓ __pentablake__ (Joincoin) @@ -112,7 +113,7 @@ Build Usage instructions ================== -Run "minerd --help" to see options. +Run "cpuminer --help" to see options. ### Connecting through a proxy diff --git a/minerd.1 b/cpuminer.1 similarity index 90% rename from minerd.1 rename to cpuminer.1 index 3a712d55..581be77f 100644 --- a/minerd.1 +++ b/cpuminer.1 @@ -1,35 +1,35 @@ -.TH MINERD 1 "May 2014" "cpuminer 2.4" +.TH CPUMINER 1 "May 2014" "cpuminer 2.4" .SH NAME -minerd \- CPU miner for Bitcoin and Litecoin +cpuminer \- CPU miner for Bitcoin and Litecoin .SH SYNOPSIS -.B minerd +.B cpuminer [\fIOPTION\fR]... .SH DESCRIPTION -.B minerd +.B cpuminer is a multi-threaded CPU miner for Bitcoin, Litecoin and other cryptocurrencies. It supports the getwork and getblocktemplate (BIP 22) methods, as well as the Stratum mining protocol. .PP -In its normal mode of operation, \fBminerd\fR connects to a mining server +In its normal mode of operation, \fBcpuminer\fR connects to a mining server (specified with the \fB\-o\fR option), receives work from it and starts hashing. As soon as a solution is found, it is submitted to the same mining server, which can accept or reject it. When using getwork or getblocktemplate, -\fBminerd\fR can take advantage of long polling, if the server supports it; +\fBcpuminer\fR can take advantage of long polling, if the server supports it; in any case, fresh work is fetched as needed. When using the Stratum protocol this is not possible, and the server is responsible for sending fresh work at least every minute; if it fails to do so, -\fBminerd\fR may drop the connection and try reconnecting again. +\fBcpuminer\fR may drop the connection and try reconnecting again. .PP -By default, \fBminerd\fR writes all its messages to standard error. +By default, \fBcpuminer\fR writes all its messages to standard error. On systems that have a syslog, the \fB\-\-syslog\fR option can be used to write to it instead. .PP On start, the nice value of all miner threads is set to 19. On Linux, the scheduling policy is also changed to SCHED_IDLE, or to SCHED_BATCH if that fails. -On multiprocessor systems, \fBminerd\fR +On multiprocessor systems, \fBcpuminer\fR automatically sets the CPU affinity of miner threads if the number of threads is a multiple of the number of processors. .SH EXAMPLES @@ -38,7 +38,7 @@ at example.com on port 3333, authenticating as worker "foo" with password "bar": .PP .nf .RS -minerd \-o stratum+tcp://example.com:3333 \-O foo:bar +cpuminer \-o stratum+tcp://example.com:3333 \-O foo:bar .RE .fi .PP @@ -47,7 +47,7 @@ authenticating with username "rpcuser" and password "rpcpass": .PP .nf .RS -minerd \-a sha256d \-o http://localhost:18332 \-O rpcuser:rpcpass \\ +cpuminer \-a sha256d \-o http://localhost:18332 \-O rpcuser:rpcpass \\ \-\-coinbase\-addr=mpXwg4jMtRhuSpVq4xS3HFHmCmWp9NyGKt .RE .fi @@ -58,7 +58,7 @@ omitting the per-thread hashmeter output: .PP .nf .RS -minerd \-BSq \-o http://my.server:9327 +cpuminer \-BSq \-o http://my.server:9327 .RE .fi .SH OPTIONS @@ -218,7 +218,8 @@ Sets the proxy server to use if no protocol-specific proxy is set. Using an environment variable to set the proxy has the same effect as using the \fB\-x\fR option. .SH AUTHOR -Most of the code in the current version of minerd was written by -Pooler with contributions from others. +This variant is maintained by tpruvot@github. +Most of the code in the current version of cpuminer was written by +Pooler with contributions from others. The original minerd was written by Jeff Garzik .