Skip to content

Commit

Permalink
v3.12.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
JayDDee committed Feb 18, 2020
1 parent 19b0ac6 commit b93be88
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 29 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ https://bitcointalk.org/index.php?topic=1326803.0

mailto://jayddee246@gmail.com


I created a new BCT user JayDDee to match my github user id.
Over timme all discussion will be migrated using the new user.
This note is to confirm JayDDee is the sae person as joblo.

See file RELEASE_NOTES for change log and INSTALL_LINUX or INSTALL_WINDOWS
for compile instructions.

Expand Down
4 changes: 4 additions & 0 deletions RELEASE_NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ If not what makes it happen or not happen?
Change Log
----------

v3.12.3.1

Issue #241: Fixed regression that broke GBT in v3.11.2.

v3.12.3

Issue #238: Fixed skunk AVX2.
Expand Down
1 change: 1 addition & 0 deletions algo/yespower/yescrypt-r8g.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ bool register_yescryptr8g_algo( algo_gate_t* gate )
gate->optimizations = SSE2_OPT | SHA_OPT;
gate->scanhash = (void*)&scanhash_yespower_r8g;
gate->hash = (void*)&yespower_tls;
pk_buffer_size = 26;
opt_sapling = true;
opt_target_factor = 65536.0;
return true;
Expand Down
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.12.3.
# Generated by GNU Autoconf 2.69 for cpuminer-opt 3.12.3.1.
#
#
# 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.12.3'
PACKAGE_STRING='cpuminer-opt 3.12.3'
PACKAGE_VERSION='3.12.3.1'
PACKAGE_STRING='cpuminer-opt 3.12.3.1'
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.12.3 to adapt to many kinds of systems.
\`configure' configures cpuminer-opt 3.12.3.1 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.12.3:";;
short | recursive ) echo "Configuration of cpuminer-opt 3.12.3.1:";;
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.12.3
cpuminer-opt configure 3.12.3.1
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.12.3, which was
It was created by cpuminer-opt $as_me 3.12.3.1, 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.12.3'
VERSION='3.12.3.1'
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.12.3, which was
This file was extended by cpuminer-opt $as_me 3.12.3.1, 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.12.3
cpuminer-opt config.status 3.12.3.1
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.12.3])
AC_INIT([cpuminer-opt], [3.12.3.1])

AC_PREREQ([2.59c])
AC_CANONICAL_SYSTEM
Expand Down
27 changes: 20 additions & 7 deletions cpu-miner.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,13 @@ char *rpc_url = NULL;;
char *rpc_userpass = NULL;
char *rpc_user, *rpc_pass;
char *short_url = NULL;
static unsigned char pk_script[25] = { 0 };
char *coinbase_address;

// pk_buffer_size is used as a version selector by b58 code, therefore
// it must be set correctly to work.
const int pk_buffer_size_max = 26;
int pk_buffer_size = 25;
static unsigned char pk_script[ 26 ] = { 0 };
static size_t pk_script_size = 0;
static char coinbase_sig[101] = { 0 };
char *opt_cert;
Expand Down Expand Up @@ -1118,7 +1124,7 @@ static int share_result( int result, struct work *null_work,
sprintf( bres, "B%d", solved_block_count );
if ( stale )
{
sprintf( sres, "Stale job %d", stale_share_count );
sprintf( sres, "Stale %d", stale_share_count );
sprintf( rres, "R%d", rejected_share_count );
}
else
Expand Down Expand Up @@ -2984,11 +2990,7 @@ void parse_arg(int key, char *arg )
opt_hash_meter = true;
break;
case 1016: /* --coinbase-addr */
pk_script_size = address_to_script(pk_script, sizeof(pk_script), arg);
if (!pk_script_size) {
fprintf(stderr, "invalid address -- '%s'\n", arg);
show_usage_and_exit(1);
}
if ( arg ) coinbase_address = strdup( arg );
break;
case 1015: /* --coinbase-sig */
if (strlen(arg) + 1 > sizeof(coinbase_sig)) {
Expand Down Expand Up @@ -3471,6 +3473,17 @@ int main(int argc, char *argv[])
// All options must be set before starting the gate
if ( !register_algo_gate( opt_algo, &algo_gate ) ) exit(1);

if ( coinbase_address )
{
pk_script_size = address_to_script( pk_script, pk_buffer_size,
coinbase_address );
if ( !pk_script_size )
{
applog(LOG_ERR,"Invalid coinbase address: '%s'", coinbase_address );
exit(0);
}
}

// Initialize stats times and counters
memset( share_stats, 0, 2 * sizeof (struct share_stats_t) );
gettimeofday( &last_submit_time, NULL );
Expand Down
2 changes: 2 additions & 0 deletions miner.h
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,8 @@ extern uint32_t solved_block_count;
extern pthread_mutex_t applog_lock;
extern pthread_mutex_t stats_lock;
extern bool opt_sapling;
extern const int pk_buffer_size_max;
extern int pk_buffer_size;

static char const usage[] = "\
Usage: " PACKAGE_NAME " [OPTIONS]\n\
Expand Down
23 changes: 12 additions & 11 deletions util.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ void applog2( int prio, const char *fmt, ... )
}




void applog(int prio, const char *fmt, ...)
{
va_list ap;
Expand Down Expand Up @@ -921,25 +919,28 @@ bool jobj_binary(const json_t *obj, const char *key, void *buf, size_t buflen)
return true;
}

size_t address_to_script(unsigned char *out, size_t outsz, const char *addr)
size_t address_to_script( unsigned char *out, size_t outsz, const char *addr )
{
unsigned char addrbin[26];
unsigned char addrbin[ pk_buffer_size_max ];
int addrver;
size_t rv;

if (!b58dec(addrbin, sizeof(addrbin), addr))
if ( !b58dec( addrbin, outsz, addr ) )
return 0;
addrver = b58check(addrbin, sizeof(addrbin), addr);
if (addrver < 0)

addrver = b58check( addrbin, outsz, addr );
if ( addrver < 0 )
return 0;
switch (addrver) {

switch ( addrver )
{
case 5: /* Bitcoin script hash */
case 196: /* Testnet script hash */
if (outsz < (rv = 23))
if ( outsz < ( rv = 23 ) )
return rv;
out[ 0] = 0xa9; /* OP_HASH160 */
out[ 1] = 0x14; /* push 20 bytes */
memcpy(&out[2], &addrbin[1], 20);
memcpy( &out[2], &addrbin[1], 20 );
out[22] = 0x87; /* OP_EQUAL */
return rv;
default:
Expand All @@ -948,7 +949,7 @@ size_t address_to_script(unsigned char *out, size_t outsz, const char *addr)
out[ 0] = 0x76; /* OP_DUP */
out[ 1] = 0xa9; /* OP_HASH160 */
out[ 2] = 0x14; /* push 20 bytes */
memcpy(&out[3], &addrbin[1], 20);
memcpy( &out[3], &addrbin[1], 20 );
out[23] = 0x88; /* OP_EQUALVERIFY */
out[24] = 0xac; /* OP_CHECKSIG */
return rv;
Expand Down

0 comments on commit b93be88

Please sign in to comment.