Skip to content

Commit

Permalink
v3.23.2
Browse files Browse the repository at this point in the history
  • Loading branch information
JayDDee committed Sep 21, 2023
1 parent d6b5750 commit be88afc
Show file tree
Hide file tree
Showing 113 changed files with 3,354 additions and 2,925 deletions.
7 changes: 2 additions & 5 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,13 @@ cpuminer_SOURCES = \
algo/sha/sph_sha2big.c \
algo/sha/sha256-hash-4way.c \
algo/sha/sha512-hash-4way.c \
algo/sha/sha256-hash-opt.c \
algo/sha/sha256-hash-2way-ni.c \
algo/sha/hmac-sha256-hash.c \
algo/sha/hmac-sha256-hash-4way.c \
algo/sha/sha256d.c \
algo/sha/sha2.c \
algo/sha/sha256d-4way.c \
algo/sha/sha256t-gate.c \
algo/sha/sha256t-4way.c \
algo/sha/sha256t.c \
algo/sha/sha256q-4way.c \
algo/sha/sha256q.c \
algo/sha/sha512256d-4way.c \
Expand Down Expand Up @@ -294,10 +291,10 @@ disable_flags =
if USE_ASM
cpuminer_SOURCES += asm/neoscrypt_asm.S
if ARCH_x86
cpuminer_SOURCES += asm/sha2-x86.S asm/scrypt-x86.S asm/aesb-x86.S
cpuminer_SOURCES += asm/sha2-x86.S asm/scrypt-x86.S
endif
if ARCH_x86_64
cpuminer_SOURCES += asm/sha2-x64.S asm/scrypt-x64.S asm/aesb-x64.S
cpuminer_SOURCES += asm/sha2-x64.S asm/scrypt-x64.S
endif
if ARCH_ARM
cpuminer_SOURCES += asm/sha2-arm.S asm/scrypt-arm.S
Expand Down
5 changes: 5 additions & 0 deletions RELEASE_NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ If not what makes it happen or not happen?
Change Log
----------

v3.23.2

sha256dt, sha256t & sha256d +10% with SHA, small improvement with AVX2.
Other small improvements and code cleanup.

v3.23.1

#349: Fix sha256t low difficulty shares and low effective hash rate.
Expand Down
2 changes: 1 addition & 1 deletion algo-gate-api.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ int null_hash()
return 0;
};

void init_algo_gate( algo_gate_t* gate )
static void init_algo_gate( algo_gate_t* gate )
{
gate->miner_thread_init = (void*)&return_true;
gate->scanhash = (void*)&scanhash_generic;
Expand Down
2 changes: 1 addition & 1 deletion algo-gate-api.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ void std_get_new_work( struct work *work, struct work *g_work, int thr_id,
void sha256d_gen_merkle_root( char *merkle_root, struct stratum_ctx *sctx );
void sha256_gen_merkle_root ( char *merkle_root, struct stratum_ctx *sctx );
// OpenSSL sha256 deprecated
void SHA256_gen_merkle_root ( char *merkle_root, struct stratum_ctx *sctx );
//void SHA256_gen_merkle_root ( char *merkle_root, struct stratum_ctx *sctx );

bool std_le_work_decode( struct work *work );
bool std_be_work_decode( struct work *work );
Expand Down
2 changes: 1 addition & 1 deletion algo/argon2/argon2a/argon2a.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ bool register_argon2_algo( algo_gate_t* gate )
gate->optimizations = SSE2_OPT | AVX_OPT | AVX2_OPT;
gate->scanhash = (void*)&scanhash_argon2;
gate->hash = (void*)&argon2hash;
gate->gen_merkle_root = (void*)&SHA256_gen_merkle_root;
gate->gen_merkle_root = (void*)&sha256_gen_merkle_root;
opt_target_factor = 65536.0;

return true;
Expand Down
2 changes: 1 addition & 1 deletion algo/blake/sph-blake2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <string.h>
#include <stdio.h>

#include "algo/sha/sph_types.h"
#include "compat/sph_types.h"
#include "sph-blake2s.h"

static const uint32_t blake2s_IV[8] =
Expand Down
2 changes: 1 addition & 1 deletion algo/blake/sph_blake.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ extern "C"{
#endif

#include <stddef.h>
#include "algo/sha/sph_types.h"
#include "compat/sph_types.h"

/**
* Output size (in bits) for BLAKE-224.
Expand Down
2 changes: 1 addition & 1 deletion algo/blake/sph_blake2b.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <stdint.h>
#include <string.h>
#include "simd-utils.h"
#include "algo/sha/sph_types.h"
#include "compat/sph_types.h"
#include "sph_blake2b.h"

// Little-endian byte access.
Expand Down
6 changes: 2 additions & 4 deletions algo/bmw/bmw-hash-4way.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ extern "C"{
#endif

#include <stddef.h>

#include "algo/sha/sph_types.h"
#include "simd-utils.h"

#define SPH_SIZE_bmw256 256
Expand All @@ -57,7 +55,7 @@ typedef struct {
__m128i buf[64];
__m128i H[16];
size_t ptr;
sph_u32 bit_count; // assume bit_count fits in 32 bits
uint32_t bit_count; // assume bit_count fits in 32 bits
} bmw_4way_small_context;

typedef bmw_4way_small_context bmw256_4way_context;
Expand Down Expand Up @@ -144,7 +142,7 @@ typedef struct {
__m256i buf[16];
__m256i H[16];
size_t ptr;
sph_u64 bit_count;
uint64_t bit_count;
} bmw_4way_big_context __attribute__((aligned(128)));

typedef bmw_4way_big_context bmw512_4way_context;
Expand Down
4 changes: 2 additions & 2 deletions algo/bmw/bmw256-hash-4way.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ static const uint32_t IV256[] = {
_mm_sub_epi32( _mm_add_epi32( rol_off_32( M, j, 0 ), \
rol_off_32( M, j, 3 ) ), \
rol_off_32( M, j, 10 ) ), \
_mm_set1_epi32( ( (j)+16 ) * SPH_C32(0x05555555UL) ) ), \
_mm_set1_epi32( ( (j)+16 ) * 0x05555555UL ) ), \
H[ ( (j)+7 ) & 0xF ] )


Expand Down Expand Up @@ -485,7 +485,7 @@ bmw32_4way(bmw_4way_small_context *sc, const void *data, size_t len)
size_t ptr;
const int buf_size = 64; // bytes of one lane, compatible with len

sc->bit_count += (sph_u32)len << 3;
sc->bit_count += (uint32_t)len << 3;
buf = sc->buf;
ptr = sc->ptr;
h1 = sc->H;
Expand Down
24 changes: 12 additions & 12 deletions algo/bmw/bmw512-hash-4way.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ extern "C"{

#define LPAR (

static const sph_u64 IV512[] = {
SPH_C64(0x8081828384858687), SPH_C64(0x88898A8B8C8D8E8F),
SPH_C64(0x9091929394959697), SPH_C64(0x98999A9B9C9D9E9F),
SPH_C64(0xA0A1A2A3A4A5A6A7), SPH_C64(0xA8A9AAABACADAEAF),
SPH_C64(0xB0B1B2B3B4B5B6B7), SPH_C64(0xB8B9BABBBCBDBEBF),
SPH_C64(0xC0C1C2C3C4C5C6C7), SPH_C64(0xC8C9CACBCCCDCECF),
SPH_C64(0xD0D1D2D3D4D5D6D7), SPH_C64(0xD8D9DADBDCDDDEDF),
SPH_C64(0xE0E1E2E3E4E5E6E7), SPH_C64(0xE8E9EAEBECEDEEEF),
SPH_C64(0xF0F1F2F3F4F5F6F7), SPH_C64(0xF8F9FAFBFCFDFEFF)
static const uint64_t IV512[] = {
0x8081828384858687, 0x88898A8B8C8D8E8F,
0x9091929394959697, 0x98999A9B9C9D9E9F,
0xA0A1A2A3A4A5A6A7, 0xA8A9AAABACADAEAF,
0xB0B1B2B3B4B5B6B7, 0xB8B9BABBBCBDBEBF,
0xC0C1C2C3C4C5C6C7, 0xC8C9CACBCCCDCECF,
0xD0D1D2D3D4D5D6D7, 0xD8D9DADBDCDDDEDF,
0xE0E1E2E3E4E5E6E7, 0xE8E9EAEBECEDEEEF,
0xF0F1F2F3F4F5F6F7, 0xF8F9FAFBFCFDFEFF
};

#if defined(__SSE2__)
Expand Down Expand Up @@ -894,7 +894,7 @@ static const __m256i final_b[16] =
};

static void
bmw64_4way_init( bmw_4way_big_context *sc, const sph_u64 *iv )
bmw64_4way_init( bmw_4way_big_context *sc, const uint64_t *iv )
{
sc->H[ 0] = _mm256_set1_epi64x( 0x8081828384858687 );
sc->H[ 1] = _mm256_set1_epi64x( 0x88898A8B8C8D8E8F );
Expand Down Expand Up @@ -926,7 +926,7 @@ bmw64_4way( bmw_4way_big_context *sc, const void *data, size_t len )
size_t ptr;
const int buf_size = 128; // bytes of one lane, compatible with len

sc->bit_count += (sph_u64)len << 3;
sc->bit_count += (uint64_t)len << 3;
buf = sc->buf;
ptr = sc->ptr;
h1 = sc->H;
Expand Down Expand Up @@ -1377,7 +1377,7 @@ static const __m512i final_b8[16] =


void bmw512_8way_init( bmw512_8way_context *ctx )
//bmw64_4way_init( bmw_4way_big_context *sc, const sph_u64 *iv )
//bmw64_4way_init( bmw_4way_big_context *sc, const uint64_t *iv )
{
ctx->H[ 0] = _mm512_set1_epi64( 0x8081828384858687 );
ctx->H[ 1] = _mm512_set1_epi64( 0x88898A8B8C8D8E8F );
Expand Down
2 changes: 1 addition & 1 deletion algo/bmw/sph_bmw.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ extern "C"{
#endif

#include <stddef.h>
#include "algo/sha/sph_types.h"
#include "compat/sph_types.h"

/**
* Output size (in bits) for BMW-224.
Expand Down
1 change: 0 additions & 1 deletion algo/cubehash/cubehash_sse2.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <immintrin.h>
#endif
#include "cubehash_sse2.h"
#include "algo/sha/sha3-defs.h"
#include <stdbool.h>
#include <unistd.h>
#include <memory.h>
Expand Down
2 changes: 1 addition & 1 deletion algo/cubehash/cubehash_sse2.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "compat.h"
#include <stdint.h>
#include "algo/sha/sha3-defs.h"
#include "compat/sha3-defs.h"

#define OPTIMIZE_SSE2

Expand Down
2 changes: 1 addition & 1 deletion algo/cubehash/sph_cubehash.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ extern "C"{
#endif

#include <stddef.h>
#include "algo/sha/sph_types.h"
#include "compat/sph_types.h"

/**
* Output size (in bits) for CubeHash-224.
Expand Down
2 changes: 1 addition & 1 deletion algo/echo/aes_ni/hash_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#endif


#include "algo/sha/sha3_common.h"
#include "compat/sha3_common.h"

#include <emmintrin.h>

Expand Down
2 changes: 1 addition & 1 deletion algo/echo/sph_echo.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ extern "C"{
#endif

#define AES_BIG_ENDIAN 0
#include "algo/sha/aes_helper.c"
#include "compat/aes_helper.c"

#if SPH_ECHO_64

Expand Down
2 changes: 1 addition & 1 deletion algo/echo/sph_echo.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ extern "C"{
#endif

#include <stddef.h>
#include "algo/sha/sph_types.h"
#include "compat/sph_types.h"

/**
* Output size (in bits) for ECHO-224.
Expand Down
2 changes: 1 addition & 1 deletion algo/fugue/fugue-aesni.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#error "Unsupported configuration, AES needs SSE4.1. Compile without AES."
#endif

#include "algo/sha/sha3_common.h"
#include "compat/sha3_common.h"
#include "simd-utils.h"


Expand Down
2 changes: 1 addition & 1 deletion algo/fugue/sph_fugue.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define SPH_FUGUE_H__

#include <stddef.h>
#include "algo/sha/sph_types.h"
#include "compat/sph_types.h"

#ifdef __cplusplus
extern "C"{
Expand Down
2 changes: 1 addition & 1 deletion algo/gost/sph_gost.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ extern "C"{
#endif

#include <stddef.h>
#include "algo/sha/sph_types.h"
#include "compat/sph_types.h"

/**
* Output size (in bits) for GOST-256.
Expand Down
4 changes: 2 additions & 2 deletions algo/groestl/aes_ni/hash-groestl.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#define LENGTH (512)

#include "brg_endian.h"
#define NEED_UINT_64T
#include "algo/sha/brg_types.h"
//#define NEED_UINT_64T
#include "compat/brg_types.h"

/* some sizes (number of bytes) */
#define ROWS (8)
Expand Down
3 changes: 1 addition & 2 deletions algo/groestl/aes_ni/hash-groestl256.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ typedef crypto_uint64 u64;
//#define LENGTH (512)

#include "brg_endian.h"
#define NEED_UINT_64T
#include "algo/sha/brg_types.h"
#include "compat/brg_types.h"

#ifdef IACA_TRACE
#include IACA_MARKS
Expand Down
2 changes: 1 addition & 1 deletion algo/groestl/groestl-gate.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ bool register_dmd_gr_algo( algo_gate_t *gate )
bool register_groestl_algo( algo_gate_t* gate )
{
register_dmd_gr_algo( gate );
gate->gen_merkle_root = (void*)&SHA256_gen_merkle_root;
gate->gen_merkle_root = (void*)&sha256_gen_merkle_root;
return true;
};

4 changes: 0 additions & 4 deletions algo/groestl/groestl256-hash-4way.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@

#define LENGTH (256)

//#include "brg_endian.h"
//#define NEED_UINT_64T
//#include "algo/sha/brg_types.h"

/* some sizes (number of bytes) */
#define ROWS (8)
#define LENGTHFIELDLEN (ROWS)
Expand Down
2 changes: 1 addition & 1 deletion algo/groestl/myrgr-4way.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <stdint.h>
#include <string.h>
#include "aes_ni/hash-groestl.h"
#include "algo/sha/sha-hash-4way.h"
#include "algo/sha/sha256-hash.h"
#if defined(__VAES__)
#include "groestl512-hash-4way.h"
#endif
Expand Down
2 changes: 1 addition & 1 deletion algo/groestl/sph_groestl.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ extern "C"{
#endif

#include <stddef.h>
#include "algo/sha/sph_types.h"
#include "compat/sph_types.h"

#if !defined(__AES__)
/**
Expand Down
Loading

0 comments on commit be88afc

Please sign in to comment.