Skip to content

Commit

Permalink
v3.19.5
Browse files Browse the repository at this point in the history
  • Loading branch information
JayDDee committed Jan 31, 2022
1 parent 8727d79 commit 90137b3
Show file tree
Hide file tree
Showing 18 changed files with 159 additions and 81 deletions.
13 changes: 13 additions & 0 deletions RELEASE_NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,19 @@ If not what makes it happen or not happen?
Change Log
----------

v3.19.5

Enhanced stratum-keepalive preemptively resets the stratum connection
before the server to avoid lost shares.

Added build-msys2.sh scrypt for easier compiling on Windows, see Wiki for details.

X16RT: eliminate unnecessary recalculations of the hash order.

Fix a few compiler warnings.

Fixed log colour error when a block is solved.

v3.19.4

#359: Fix verthash memory allocation for non-hugepages, broken in v3.19.3.
Expand Down
4 changes: 2 additions & 2 deletions algo/argon2/argon2a/ar2/sj/scrypt-jane-portable-x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ static size_t
detect_cpu(void) {
//union { uint8_t s[12]; uint32_t i[3]; } vendor_string;
//cpu_vendors_x86 vendor = cpu_nobody;
x86_regs regs;
x86_regs regs; regs.eax = regs.ebx = regs.ecx = 0;
uint32_t max_level, max_ext_level;
size_t cpu_flags = 0;
#if defined(X86ASM_AVX) || defined(X86_64ASM_AVX)
Expand Down Expand Up @@ -460,4 +460,4 @@ get_top_cpuflag_desc(size_t flag) {
#endif
#endif

#endif /* defined(CPU_X86) || defined(CPU_X86_64) */
#endif /* defined(CPU_X86) || defined(CPU_X86_64) */
3 changes: 2 additions & 1 deletion algo/argon2/argon2a/ar2/sj/scrypt-jane-romix-basic.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ typedef void (FASTCALL *scrypt_ROMixfn)(scrypt_mix_word_t *X/*[chunkWords]*/, sc
#endif

/* romix pre/post nop function */
/*
static void asm_calling_convention
scrypt_romix_nop(scrypt_mix_word_t *blocks, size_t nblocks) {
(void)blocks; (void)nblocks;
}

*/
/* romix pre/post endian conversion function */
static void asm_calling_convention
scrypt_romix_convert_endian(scrypt_mix_word_t *blocks, size_t nblocks) {
Expand Down
3 changes: 3 additions & 0 deletions algo/blake/decred-gate.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ void decred_be_build_stratum_request( char *req, struct work *work,
rpc_user, work->job_id, xnonce2str, ntimestr, noncestr );
free(xnonce2str);
}

#if !defined(min)
#define min(a,b) (a>b ? (b) :(a))
#endif

void decred_build_extraheader( struct work* g_work, struct stratum_ctx* sctx )
{
Expand Down
2 changes: 1 addition & 1 deletion algo/hodl/sha512-avx.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ void sha512Compute32b_parallel(
uint64_t *data[SHA512_PARALLEL_N],
uint64_t *digest[SHA512_PARALLEL_N]);

void sha512ProcessBlock(Sha512Context *context);
void sha512ProcessBlock(Sha512Context contexti[2] );

#endif
6 changes: 6 additions & 0 deletions algo/ripemd/sph_ripemd.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

#include "sph_ripemd.h"

#if 0
/*
* Round functions for RIPEMD (original).
*/
Expand All @@ -46,6 +47,7 @@ static const sph_u32 oIV[5] = {
SPH_C32(0x67452301), SPH_C32(0xEFCDAB89),
SPH_C32(0x98BADCFE), SPH_C32(0x10325476)
};
#endif

/*
* Round functions for RIPEMD-128 and RIPEMD-160.
Expand All @@ -63,6 +65,8 @@ static const sph_u32 IV[5] = {

#define ROTL SPH_ROTL32

#if 0

/* ===================================================================== */
/*
* RIPEMD (original hash, deprecated).
Expand Down Expand Up @@ -539,6 +543,8 @@ sph_ripemd128_comp(const sph_u32 msg[16], sph_u32 val[4])
#undef RIPEMD128_IN
}

#endif

/* ===================================================================== */
/*
* RIPEMD-160.
Expand Down
3 changes: 3 additions & 0 deletions algo/ripemd/sph_ripemd.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
* can be cloned by copying the context (e.g. with a simple
* <code>memcpy()</code>).
*/
#if 0
typedef struct {
#ifndef DOXYGEN_IGNORE
unsigned char buf[64]; /* first field, for alignment */
Expand Down Expand Up @@ -204,6 +205,8 @@ void sph_ripemd128_close(void *cc, void *dst);
*/
void sph_ripemd128_comp(const sph_u32 msg[16], sph_u32 val[4]);

#endif

/* ===================================================================== */

/**
Expand Down
2 changes: 1 addition & 1 deletion algo/sm3/sph_sm3.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ typedef struct {

void sm3_init(sm3_ctx_t *ctx);
void sm3_update(sm3_ctx_t *ctx, const unsigned char* data, size_t data_len);
void sm3_final(sm3_ctx_t *ctx, unsigned char digest[SM3_DIGEST_LENGTH]);
void sm3_final(sm3_ctx_t *ctx, unsigned char *digest);
void sm3_compress(uint32_t digest[8], const unsigned char block[SM3_BLOCK_SIZE]);
void sm3(const unsigned char *data, size_t datalen,
unsigned char digest[SM3_DIGEST_LENGTH]);
Expand Down
20 changes: 10 additions & 10 deletions algo/x16/x16rt-4way.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ int scanhash_x16rt_8way( struct work *work, uint32_t max_nonce,
if ( bench ) ptarget[7] = 0x0cff;

static __thread uint32_t s_ntime = UINT32_MAX;
uint32_t ntime = bswap_32( pdata[17] );
if ( s_ntime != ntime )
uint32_t masked_ntime = bswap_32( pdata[17] ) & 0xffffff80;
if ( s_ntime != masked_ntime )
{
x16rt_getTimeHash( ntime, &timeHash );
x16rt_getTimeHash( masked_ntime, &timeHash );
x16rt_getAlgoString( &timeHash[0], x16r_hash_order );
s_ntime = ntime;
s_ntime = masked_ntime;
if ( opt_debug && !thr_id )
applog( LOG_INFO, "hash order: %s time: (%08x) time hash: (%08x)",
x16r_hash_order, ntime, timeHash );
x16r_hash_order, bswap_32( pdata[17] ), timeHash );
}

x16r_8way_prehash( vdata, pdata );
Expand Down Expand Up @@ -78,15 +78,15 @@ int scanhash_x16rt_4way( struct work *work, uint32_t max_nonce,
if ( bench ) ptarget[7] = 0x0cff;

static __thread uint32_t s_ntime = UINT32_MAX;
uint32_t ntime = bswap_32( pdata[17] );
if ( s_ntime != ntime )
uint32_t masked_ntime = bswap_32( pdata[17] ) & 0xffffff80;
if ( s_ntime != masked_ntime )
{
x16rt_getTimeHash( ntime, &timeHash );
x16rt_getTimeHash( masked_ntime, &timeHash );
x16rt_getAlgoString( &timeHash[0], x16r_hash_order );
s_ntime = ntime;
s_ntime = masked_ntime;
if ( opt_debug && !thr_id )
applog( LOG_INFO, "hash order: %s time: (%08x) time hash: (%08x)",
x16r_hash_order, ntime, timeHash );
x16r_hash_order, bswap_32( pdata[17] ), timeHash );
}

x16r_4way_prehash( vdata, pdata );
Expand Down
10 changes: 5 additions & 5 deletions algo/x16/x16rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ int scanhash_x16rt( struct work *work, uint32_t max_nonce,
mm128_bswap32_80( edata, pdata );

static __thread uint32_t s_ntime = UINT32_MAX;
uint32_t ntime = swab32( pdata[17] );
if ( s_ntime != ntime )
uint32_t masked_ntime = swab32( pdata[17] ) & 0xffffff80;
if ( s_ntime != masked_ntime )
{
x16rt_getTimeHash( ntime, &timeHash );
x16rt_getTimeHash( masked_ntime, &timeHash );
x16rt_getAlgoString( &timeHash[0], x16r_hash_order );
s_ntime = ntime;
s_ntime = masked_ntime;
if ( opt_debug && !thr_id )
applog( LOG_INFO, "hash order: %s time: (%08x) time hash: (%08x)",
x16r_hash_order, ntime, timeHash );
x16r_hash_order, swab32( pdata[17] ), timeHash );
}

x16r_prehash( edata, pdata );
Expand Down
10 changes: 10 additions & 0 deletions build-msys2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
#
# Compile on Windows using MSYS2 and MinGW.

make distclean || echo clean
rm -f config.status
./autogen.sh || echo done
CFLAGS="-O3 --param=evrp-mode=legacy -march=native -Wall -D_WIN32_WINNT=0x0601" ./configure --with-curl
make -j 4
strip -s cpuminer
20 changes: 10 additions & 10 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for cpuminer-opt 3.19.4.
# Generated by GNU Autoconf 2.69 for cpuminer-opt 3.19.5.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -577,8 +577,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='cpuminer-opt'
PACKAGE_TARNAME='cpuminer-opt'
PACKAGE_VERSION='3.19.4'
PACKAGE_STRING='cpuminer-opt 3.19.4'
PACKAGE_VERSION='3.19.5'
PACKAGE_STRING='cpuminer-opt 3.19.5'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

Expand Down Expand Up @@ -1332,7 +1332,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures cpuminer-opt 3.19.4 to adapt to many kinds of systems.
\`configure' configures cpuminer-opt 3.19.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1404,7 +1404,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of cpuminer-opt 3.19.4:";;
short | recursive ) echo "Configuration of cpuminer-opt 3.19.5:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1509,7 +1509,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
cpuminer-opt configure 3.19.4
cpuminer-opt configure 3.19.5
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -2012,7 +2012,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by cpuminer-opt $as_me 3.19.4, which was
It was created by cpuminer-opt $as_me 3.19.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
Expand Down Expand Up @@ -2993,7 +2993,7 @@ fi
# Define the identity of the package.
PACKAGE='cpuminer-opt'
VERSION='3.19.4'
VERSION='3.19.5'
cat >>confdefs.h <<_ACEOF
Expand Down Expand Up @@ -6690,7 +6690,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by cpuminer-opt $as_me 3.19.4, which was
This file was extended by cpuminer-opt $as_me 3.19.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -6756,7 +6756,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
cpuminer-opt config.status 3.19.4
cpuminer-opt config.status 3.19.5
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([cpuminer-opt], [3.19.4])
AC_INIT([cpuminer-opt], [3.19.5])

AC_PREREQ([2.59c])
AC_CANONICAL_SYSTEM
Expand Down
Loading

0 comments on commit 90137b3

Please sign in to comment.