mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
v3.8.3.2
This commit is contained in:
@@ -159,6 +159,16 @@ Support for even older x86_64 without AES_NI or SSE2 is not availble.
|
|||||||
Change Log
|
Change Log
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
v3.8.3.2
|
||||||
|
|
||||||
|
Reverted gbt changes from v3.8.0 that broke getwork.
|
||||||
|
Reverted scaled hash rate for API, added HS term in addition to KHS.
|
||||||
|
Added blocks solved to console display and API.
|
||||||
|
|
||||||
|
v3.8.3.1
|
||||||
|
|
||||||
|
Fixed regression in v3.8.3 that broke several algos.
|
||||||
|
|
||||||
v3.8.3
|
v3.8.3
|
||||||
|
|
||||||
More restoration of lost lyra2 hash.
|
More restoration of lost lyra2 hash.
|
||||||
|
|||||||
14
api.c
14
api.c
@@ -98,6 +98,7 @@ extern int opt_api_remote;
|
|||||||
extern double global_hashrate;
|
extern double global_hashrate;
|
||||||
extern uint32_t accepted_count;
|
extern uint32_t accepted_count;
|
||||||
extern uint32_t rejected_count;
|
extern uint32_t rejected_count;
|
||||||
|
extern uint32_t solved_count;
|
||||||
|
|
||||||
#define cpu_threads opt_n_threads
|
#define cpu_threads opt_n_threads
|
||||||
|
|
||||||
@@ -138,8 +139,7 @@ static char *getsummary( char *params )
|
|||||||
double accps = (60.0 * accepted_count) / (uptime ? uptime : 1.0);
|
double accps = (60.0 * accepted_count) / (uptime ? uptime : 1.0);
|
||||||
double diff = net_diff > 0. ? net_diff : stratum_diff;
|
double diff = net_diff > 0. ? net_diff : stratum_diff;
|
||||||
char diff_str[16];
|
char diff_str[16];
|
||||||
double hashrate = (double)global_hashrate;
|
double hrate = (double)global_hashrate;
|
||||||
char units[4] = {0};
|
|
||||||
struct cpu_info cpu = { 0 };
|
struct cpu_info cpu = { 0 };
|
||||||
#ifdef USE_MONITORING
|
#ifdef USE_MONITORING
|
||||||
cpu.has_monitoring = true;
|
cpu.has_monitoring = true;
|
||||||
@@ -157,16 +157,14 @@ static char *getsummary( char *params )
|
|||||||
sprintf( diff_str, "%.6f", diff);
|
sprintf( diff_str, "%.6f", diff);
|
||||||
|
|
||||||
*buffer = '\0';
|
*buffer = '\0';
|
||||||
scale_hash_for_display ( &hashrate, units );
|
|
||||||
|
|
||||||
sprintf( buffer, "NAME=%s;VER=%s;API=%s;"
|
sprintf( buffer, "NAME=%s;VER=%s;API=%s;"
|
||||||
"ALGO=%s;CPUS=%d;%sH/s=%.2f;ACC=%d;REJ=%d;"
|
"ALGO=%s;CPUS=%d;HS=%.2f;KHS=%.2f;ACC=%d;REJ=%d;SOL=%d;"
|
||||||
"ACCMN=%.3f;DIFF=%s;TEMP=%.1f;FAN=%d;FREQ=%d;"
|
"ACCMN=%.3f;DIFF=%s;TEMP=%.1f;FAN=%d;FREQ=%d;"
|
||||||
"UPTIME=%.0f;TS=%u|",
|
"UPTIME=%.0f;TS=%u|",
|
||||||
PACKAGE_NAME, PACKAGE_VERSION, APIVERSION,
|
PACKAGE_NAME, PACKAGE_VERSION, APIVERSION,
|
||||||
algo, opt_n_threads, units, hashrate,
|
algo, opt_n_threads, hrate, hrate/1000.0,
|
||||||
accepted_count, rejected_count, accps, diff_str,
|
accepted_count, rejected_count, solved_count,
|
||||||
cpu.cpu_temp, cpu.cpu_fan, cpu.cpu_clock,
|
accps, diff_str, cpu.cpu_temp, cpu.cpu_fan, cpu.cpu_clock,
|
||||||
uptime, (uint32_t) ts);
|
uptime, (uint32_t) ts);
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|||||||
20
configure
vendored
20
configure
vendored
@@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.69 for cpuminer-opt 3.8.4.
|
# Generated by GNU Autoconf 2.69 for cpuminer-opt 3.8.3.2.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||||
@@ -577,8 +577,8 @@ MAKEFLAGS=
|
|||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='cpuminer-opt'
|
PACKAGE_NAME='cpuminer-opt'
|
||||||
PACKAGE_TARNAME='cpuminer-opt'
|
PACKAGE_TARNAME='cpuminer-opt'
|
||||||
PACKAGE_VERSION='3.8.4'
|
PACKAGE_VERSION='3.8.3.2'
|
||||||
PACKAGE_STRING='cpuminer-opt 3.8.4'
|
PACKAGE_STRING='cpuminer-opt 3.8.3.2'
|
||||||
PACKAGE_BUGREPORT=''
|
PACKAGE_BUGREPORT=''
|
||||||
PACKAGE_URL=''
|
PACKAGE_URL=''
|
||||||
|
|
||||||
@@ -1321,7 +1321,7 @@ if test "$ac_init_help" = "long"; then
|
|||||||
# Omit some internal or obsolete options to make the list less imposing.
|
# 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.
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
cat <<_ACEOF
|
cat <<_ACEOF
|
||||||
\`configure' configures cpuminer-opt 3.8.4 to adapt to many kinds of systems.
|
\`configure' configures cpuminer-opt 3.8.3.2 to adapt to many kinds of systems.
|
||||||
|
|
||||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
|
|
||||||
@@ -1392,7 +1392,7 @@ fi
|
|||||||
|
|
||||||
if test -n "$ac_init_help"; then
|
if test -n "$ac_init_help"; then
|
||||||
case $ac_init_help in
|
case $ac_init_help in
|
||||||
short | recursive ) echo "Configuration of cpuminer-opt 3.8.4:";;
|
short | recursive ) echo "Configuration of cpuminer-opt 3.8.3.2:";;
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
@@ -1497,7 +1497,7 @@ fi
|
|||||||
test -n "$ac_init_help" && exit $ac_status
|
test -n "$ac_init_help" && exit $ac_status
|
||||||
if $ac_init_version; then
|
if $ac_init_version; then
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
cpuminer-opt configure 3.8.4
|
cpuminer-opt configure 3.8.3.2
|
||||||
generated by GNU Autoconf 2.69
|
generated by GNU Autoconf 2.69
|
||||||
|
|
||||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||||
@@ -2000,7 +2000,7 @@ cat >config.log <<_ACEOF
|
|||||||
This file contains any messages produced by compilers while
|
This file contains any messages produced by compilers while
|
||||||
running configure, to aid debugging if configure makes a mistake.
|
running configure, to aid debugging if configure makes a mistake.
|
||||||
|
|
||||||
It was created by cpuminer-opt $as_me 3.8.4, which was
|
It was created by cpuminer-opt $as_me 3.8.3.2, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
$ $0 $@
|
$ $0 $@
|
||||||
@@ -2981,7 +2981,7 @@ fi
|
|||||||
|
|
||||||
# Define the identity of the package.
|
# Define the identity of the package.
|
||||||
PACKAGE='cpuminer-opt'
|
PACKAGE='cpuminer-opt'
|
||||||
VERSION='3.8.4'
|
VERSION='3.8.3.2'
|
||||||
|
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
@@ -6677,7 +6677,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||||||
# report actual input values of CONFIG_FILES etc. instead of their
|
# report actual input values of CONFIG_FILES etc. instead of their
|
||||||
# values after options handling.
|
# values after options handling.
|
||||||
ac_log="
|
ac_log="
|
||||||
This file was extended by cpuminer-opt $as_me 3.8.4, which was
|
This file was extended by cpuminer-opt $as_me 3.8.3.2, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
CONFIG_FILES = $CONFIG_FILES
|
CONFIG_FILES = $CONFIG_FILES
|
||||||
@@ -6743,7 +6743,7 @@ _ACEOF
|
|||||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||||
ac_cs_version="\\
|
ac_cs_version="\\
|
||||||
cpuminer-opt config.status 3.8.4
|
cpuminer-opt config.status 3.8.3.2
|
||||||
configured by $0, generated by GNU Autoconf 2.69,
|
configured by $0, generated by GNU Autoconf 2.69,
|
||||||
with options \\"\$ac_cs_config\\"
|
with options \\"\$ac_cs_config\\"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
AC_INIT([cpuminer-opt], [3.8.3.1])
|
AC_INIT([cpuminer-opt], [3.8.3.2])
|
||||||
|
|
||||||
AC_PREREQ([2.59c])
|
AC_PREREQ([2.59c])
|
||||||
AC_CANONICAL_SYSTEM
|
AC_CANONICAL_SYSTEM
|
||||||
|
|||||||
55
cpu-miner.c
55
cpu-miner.c
@@ -433,7 +433,8 @@ static bool get_mininginfo(CURL *curl, struct work *work)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define BLOCK_VERSION_CURRENT 4
|
// hodl needs 4 but leave it at 3 until gbt better understood
|
||||||
|
#define BLOCK_VERSION_CURRENT 3
|
||||||
|
|
||||||
static bool gbt_work_decode(const json_t *val, struct work *work)
|
static bool gbt_work_decode(const json_t *val, struct work *work)
|
||||||
{
|
{
|
||||||
@@ -781,16 +782,16 @@ static int share_result( int result, struct work *work, const char *reason )
|
|||||||
hashrate += thr_hashrates[i];
|
hashrate += thr_hashrates[i];
|
||||||
}
|
}
|
||||||
result ? accepted_count++ : rejected_count++;
|
result ? accepted_count++ : rejected_count++;
|
||||||
/*
|
|
||||||
if ( solved )
|
if ( solved )
|
||||||
{
|
{
|
||||||
solved_count++;
|
solved_count++;
|
||||||
if ( use_colors )
|
if ( use_colors )
|
||||||
sprintf( sol, CL_GRN "Solved" CL_WHT " %d", solved_count );
|
sprintf( sol, CL_GRN " Solved" CL_WHT " %d", solved_count );
|
||||||
else
|
else
|
||||||
sprintf( sol, "Solved %d", solved_count );
|
sprintf( sol, " Solved %d", solved_count );
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
pthread_mutex_unlock(&stats_lock);
|
pthread_mutex_unlock(&stats_lock);
|
||||||
global_hashcount = hashcount;
|
global_hashcount = hashcount;
|
||||||
global_hashrate = hashrate;
|
global_hashrate = hashrate;
|
||||||
@@ -861,11 +862,11 @@ static int share_result( int result, struct work *work, const char *reason )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if ((defined(_WIN64) || defined(__WINDOWS__)))
|
#if ((defined(_WIN64) || defined(__WINDOWS__)))
|
||||||
applog( LOG_NOTICE, "%s %lu/%lu (%s%%), diff %.3g %s, %s %sH/s",
|
applog( LOG_NOTICE, "%s %lu/%lu (%s%%), diff %.3g%s, %s %sH/s",
|
||||||
sres, ( result ? accepted_count : rejected_count ),
|
sres, ( result ? accepted_count : rejected_count ),
|
||||||
total_submits, rate_s, sharediff, sol, hr, hr_units );
|
total_submits, rate_s, sharediff, sol, hr, hr_units );
|
||||||
#else
|
#else
|
||||||
applog( LOG_NOTICE, "%s %lu/%lu (%s%%), diff %.3g %s, %s %sH/s, %dC",
|
applog( LOG_NOTICE, "%s %lu/%lu (%s%%), diff %.3g%s, %s %sH/s, %dC",
|
||||||
sres, ( result ? accepted_count : rejected_count ),
|
sres, ( result ? accepted_count : rejected_count ),
|
||||||
total_submits, rate_s, sharediff, sol, hr, hr_units,
|
total_submits, rate_s, sharediff, sol, hr, hr_units,
|
||||||
(uint32_t)cpu_temp(0) );
|
(uint32_t)cpu_temp(0) );
|
||||||
@@ -1626,16 +1627,18 @@ void std_get_new_work( struct work* work, struct work* g_work, int thr_id,
|
|||||||
{
|
{
|
||||||
uint32_t *nonceptr = algo_gate.get_nonceptr( work->data );
|
uint32_t *nonceptr = algo_gate.get_nonceptr( work->data );
|
||||||
|
|
||||||
// This logic depends on expression short circuiting to prevent tripping
|
// the job_id check doesn't work as intended, it's a char pointer!
|
||||||
// over NULL job_id pointers when benchmarking.
|
// For stratum the pointers can be dereferenced and the strings compared,
|
||||||
if ( ( memcmp( work->data, g_work->data, algo_gate.work_cmp_size )
|
// benchmark not, getwork & gbt unsure.
|
||||||
&& clean_job )
|
// || ( have_straum && strcmp( work->job_id, g_work->job_id ) ) ) )
|
||||||
|| ( *nonceptr >= *end_nonce_ptr )
|
// or
|
||||||
|| ( !opt_benchmark && strcmp( work->job_id, g_work->job_id ) ) )
|
// || ( !benchmark && strcmp( work->job_id, g_work->job_id ) ) ) )
|
||||||
{
|
// For now leave it as is, it seems stable.
|
||||||
if ( *nonceptr >= *end_nonce_ptr )
|
|
||||||
algo_gate.stratum_gen_work( &stratum, g_work );
|
|
||||||
|
|
||||||
|
if ( memcmp( work->data, g_work->data, algo_gate.work_cmp_size )
|
||||||
|
&& ( clean_job || ( *nonceptr >= *end_nonce_ptr )
|
||||||
|
|| ( work->job_id != g_work->job_id ) ) )
|
||||||
|
{
|
||||||
work_free( work );
|
work_free( work );
|
||||||
work_copy( work, g_work );
|
work_copy( work, g_work );
|
||||||
*nonceptr = 0xffffffffU / opt_n_threads * thr_id;
|
*nonceptr = 0xffffffffU / opt_n_threads * thr_id;
|
||||||
@@ -1791,6 +1794,8 @@ static void *miner_thread( void *userdata )
|
|||||||
{
|
{
|
||||||
algo_gate.wait_for_diff( &stratum );
|
algo_gate.wait_for_diff( &stratum );
|
||||||
pthread_mutex_lock( &g_work_lock );
|
pthread_mutex_lock( &g_work_lock );
|
||||||
|
if ( *algo_gate.get_nonceptr( work.data ) >= end_nonce )
|
||||||
|
algo_gate.stratum_gen_work( &stratum, &g_work );
|
||||||
algo_gate.get_new_work( &work, &g_work, thr_id, &end_nonce,
|
algo_gate.get_new_work( &work, &g_work, thr_id, &end_nonce,
|
||||||
stratum.job.clean );
|
stratum.job.clean );
|
||||||
pthread_mutex_unlock( &g_work_lock );
|
pthread_mutex_unlock( &g_work_lock );
|
||||||
@@ -2006,19 +2011,15 @@ json_t *std_longpoll_rpc_call( CURL *curl, int *err, char* lp_url )
|
|||||||
{
|
{
|
||||||
json_t *val;
|
json_t *val;
|
||||||
char *req = NULL;
|
char *req = NULL;
|
||||||
// if (have_gbt)
|
if (have_gbt)
|
||||||
// {
|
{
|
||||||
req = (char*) malloc( strlen(gbt_lp_req) + strlen(lp_id) + 1 );
|
req = (char*) malloc( strlen(gbt_lp_req) + strlen(lp_id) + 1 );
|
||||||
sprintf( req, gbt_lp_req, lp_id );
|
sprintf( req, gbt_lp_req, lp_id );
|
||||||
// }
|
}
|
||||||
//TODO this code makes no sense, this first call should be removed.
|
val = json_rpc_call( curl, rpc_url, rpc_userpass, getwork_req, err,
|
||||||
// also remove conditional expression in second call, no getwork.
|
JSON_RPC_LONGPOLL );
|
||||||
// val = json_rpc_call( curl, rpc_url, rpc_userpass, getwork_req, err,
|
val = json_rpc_call( curl, lp_url, rpc_userpass, req ? req : getwork_req,
|
||||||
// JSON_RPC_LONGPOLL );
|
err, JSON_RPC_LONGPOLL);
|
||||||
// val = json_rpc_call( curl, lp_url, rpc_userpass, req ? req : getwork_req,
|
|
||||||
// err, JSON_RPC_LONGPOLL);
|
|
||||||
val = json_rpc_call( curl, lp_url, rpc_userpass, req,
|
|
||||||
err, JSON_RPC_LONGPOLL );
|
|
||||||
free(req);
|
free(req);
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user