Skip to content

Commit

Permalink
Combined mikaelh's optimized yacoin functions
Browse files Browse the repository at this point in the history
improved performance using mikaelh source code
fixed bug with finding shares by adding ALGO_SCRYPT_JANE
  • Loading branch information
Thirtybird committed Dec 10, 2013
1 parent 663a184 commit d0d3ef5
Show file tree
Hide file tree
Showing 47 changed files with 1,224 additions and 757 deletions.
15 changes: 2 additions & 13 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,10 @@ INCLUDES = $(PTHREAD_FLAGS) -fno-strict-aliasing $(JANSSON_INCLUDES)

bin_PROGRAMS = minerd

dist_man_MANS = minerd.1

minerd_SOURCES = elist.h miner.h compat.h \
cpu-miner.c util.c \
sha2.c scrypt.c
if ARCH_x86
minerd_SOURCES += sha2-x86.S scrypt-x86.S
endif
if ARCH_x86_64
minerd_SOURCES += sha2-x64.S scrypt-x64.S
endif
if ARCH_ARM
minerd_SOURCES += sha2-arm.S scrypt-arm.S
endif
minerd_SOURCES += yacoin.c scrypt-jane/scrypt-jane.c
sha2.c sha2-arm.S sha2-x86.S sha2-x64.S \
scrypt.c scrypt-arm.S scrypt-x86.S scrypt-x64.S scrypt-jane.c
minerd_LDFLAGS = $(PTHREAD_FLAGS)
minerd_LDADD = @LIBCURL@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @WS2_LIBS@
minerd_CPPFLAGS = @LIBCURL_CPPFLAGS@ -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME
Expand Down
6 changes: 0 additions & 6 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
Version 2.3.2 - Jul 10, 2013

- Add optimizations for AVX2-capable x86-64 processors
- Ensure that the output stream is flushed after every log message
- Fix an undefined-behavior bug in the Stratum code

Version 2.3.1 - Jun 18, 2013

- Add a --cert option for specifying an SSL certificate (martinwguy)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ typedef uint32_t scrypt_mix_word_t;

#if defined(SCRYPT_CHACHA_AVX)
#define SCRYPT_CHUNKMIX_FN scrypt_ChunkMix_avx
#if defined(X86_INTRINSIC_AVX)
#define SCRYPT_CHUNKMIX_1_FN scrypt_ChunkMix_avx_1
#define SCRYPT_CHUNKMIX_1_XOR_FN scrypt_ChunkMix_avx_1_xor
#endif
#define SCRYPT_ROMIX_FN scrypt_ROMix_avx
#define SCRYPT_MIX_FN chacha_core_avx
#define SCRYPT_ROMIX_TANGLE_FN scrypt_romix_nop
Expand All @@ -27,6 +31,10 @@ typedef uint32_t scrypt_mix_word_t;

#if defined(SCRYPT_CHACHA_SSSE3)
#define SCRYPT_CHUNKMIX_FN scrypt_ChunkMix_ssse3
#if defined(X86_INTRINSIC_SSSE3)
#define SCRYPT_CHUNKMIX_1_FN scrypt_ChunkMix_ssse3_1
#define SCRYPT_CHUNKMIX_1_XOR_FN scrypt_ChunkMix_ssse3_1_xor
#endif
#define SCRYPT_ROMIX_FN scrypt_ROMix_ssse3
#define SCRYPT_MIX_FN chacha_core_ssse3
#define SCRYPT_ROMIX_TANGLE_FN scrypt_romix_nop
Expand All @@ -36,6 +44,10 @@ typedef uint32_t scrypt_mix_word_t;

#if defined(SCRYPT_CHACHA_SSE2)
#define SCRYPT_CHUNKMIX_FN scrypt_ChunkMix_sse2
#if defined(X86_INTRINSIC_SSE2)
#define SCRYPT_CHUNKMIX_1_FN scrypt_ChunkMix_sse2_1
#define SCRYPT_CHUNKMIX_1_XOR_FN scrypt_ChunkMix_sse2_1_xor
#endif
#define SCRYPT_ROMIX_FN scrypt_ROMix_sse2
#define SCRYPT_MIX_FN chacha_core_sse2
#define SCRYPT_ROMIX_TANGLE_FN scrypt_romix_nop
Expand All @@ -52,7 +64,7 @@ typedef uint32_t scrypt_mix_word_t;

#if !defined(SCRYPT_CHOOSE_COMPILETIME)
static scrypt_ROMixfn
scrypt_getROMix(void) {
scrypt_getROMix() {
size_t cpuflags = detect_cpu();

#if defined(SCRYPT_CHACHA_AVX)
Expand Down Expand Up @@ -80,7 +92,7 @@ scrypt_getROMix(void) {

#if defined(SCRYPT_TEST_SPEED)
static size_t
available_implementations(void) {
available_implementations() {
size_t cpuflags = detect_cpu();
size_t flags = 0;

Expand All @@ -104,7 +116,7 @@ available_implementations(void) {
#endif

static int
scrypt_test_mix(void) {
scrypt_test_mix() {
static const uint8_t expected[16] = {
0x48,0x2b,0x2d,0xb8,0xa1,0x33,0x22,0x73,0xcd,0x16,0xc4,0xb4,0xb0,0x7f,0xb1,0x8a,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#define SCRYPT_TEST_HASH_LEN 257 /* (2 * largest block size) + 1 */

static int
scrypt_test_hash(void) {
scrypt_test_hash() {
scrypt_hash_state st;
scrypt_hash_digest hash, final;
uint8_t msg[SCRYPT_TEST_HASH_LEN];
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit d0d3ef5

Please sign in to comment.