mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
v3.12.3.1
This commit is contained in:
@@ -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.
|
||||
|
||||
|
@@ -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.
|
||||
|
@@ -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;
|
||||
|
20
configure
vendored
20
configure
vendored
@@ -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.
|
||||
@@ -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=''
|
||||
|
||||
@@ -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]...
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
@@ -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 $@
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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\\"
|
||||
|
||||
|
@@ -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
|
||||
|
27
cpu-miner.c
27
cpu-miner.c
@@ -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;
|
||||
@@ -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
|
||||
@@ -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)) {
|
||||
@@ -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 );
|
||||
|
2
miner.h
2
miner.h
@@ -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\
|
||||
|
23
util.c
23
util.c
@@ -159,8 +159,6 @@ void applog2( int prio, const char *fmt, ... )
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void applog(int prio, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
@@ -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:
|
||||
@@ -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;
|
||||
|
Reference in New Issue
Block a user