mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
v3.7.0
This commit is contained in:
@@ -139,6 +139,13 @@ Support for even older x86_64 without AES_NI or SSE2 is not availble.
|
|||||||
Change Log
|
Change Log
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
v3.7.0
|
||||||
|
|
||||||
|
Fixed x14 misalignment bug.
|
||||||
|
Fixed decred stake version bug.
|
||||||
|
Getwork fixes for algos that use big endian data encoding: m7m, zr5, neoscrypt,
|
||||||
|
blake2b, decred.
|
||||||
|
|
||||||
v3.6.10
|
v3.6.10
|
||||||
|
|
||||||
Fixed misalignment bug in hsr.
|
Fixed misalignment bug in hsr.
|
||||||
|
@@ -227,8 +227,8 @@ void std_le_build_stratum_request( char *req, struct work *work );
|
|||||||
void std_be_build_stratum_request( char *req, struct work *work );
|
void std_be_build_stratum_request( char *req, struct work *work );
|
||||||
void jr2_build_stratum_request ( char *req, struct work *work );
|
void jr2_build_stratum_request ( char *req, struct work *work );
|
||||||
|
|
||||||
// set_work_data_endian target, default is do_nothing;
|
// Default is do_nothing (assumed LE)
|
||||||
void swab_work_data( struct work *work );
|
void set_work_data_big_endian( struct work *work );
|
||||||
|
|
||||||
double std_calc_network_diff( struct work *work );
|
double std_calc_network_diff( struct work *work );
|
||||||
|
|
||||||
|
@@ -111,15 +111,7 @@ uint32_t *decred_get_nonceptr( uint32_t *work_data )
|
|||||||
return &work_data[ DECRED_NONCE_INDEX ];
|
return &work_data[ DECRED_NONCE_INDEX ];
|
||||||
}
|
}
|
||||||
|
|
||||||
// does decred need a custom stratum_get_g_work to fix nicehash
|
|
||||||
// bad extranonce2 size?
|
|
||||||
//
|
|
||||||
// does decred need a custom init_nonce?
|
|
||||||
// does it need to increment nonce, seems not because gen_work_now always
|
|
||||||
// returns true
|
|
||||||
|
|
||||||
double decred_calc_network_diff( struct work* work )
|
double decred_calc_network_diff( struct work* work )
|
||||||
//void decred_calc_network_diff( struct work* work )
|
|
||||||
{
|
{
|
||||||
// sample for diff 43.281 : 1c05ea29
|
// sample for diff 43.281 : 1c05ea29
|
||||||
// todo: endian reversed on longpoll could be zr5 specific...
|
// todo: endian reversed on longpoll could be zr5 specific...
|
||||||
@@ -235,11 +227,15 @@ void decred_build_extraheader( struct work* g_work, struct stratum_ctx* sctx )
|
|||||||
for ( i = 0; i < headersize/4; i++ ) // header
|
for ( i = 0; i < headersize/4; i++ ) // header
|
||||||
g_work->data[17 + i] = extraheader[i];
|
g_work->data[17 + i] = extraheader[i];
|
||||||
// extradata
|
// extradata
|
||||||
|
|
||||||
for ( i = 0; i < sctx->xnonce1_size/4; i++ )
|
for ( i = 0; i < sctx->xnonce1_size/4; i++ )
|
||||||
g_work->data[ DECRED_XNONCE_INDEX + i ] = extradata[i];
|
g_work->data[ DECRED_XNONCE_INDEX + i ] = extradata[i];
|
||||||
for ( i = DECRED_XNONCE_INDEX + sctx->xnonce1_size/4; i < 45; i++ )
|
for ( i = DECRED_XNONCE_INDEX + sctx->xnonce1_size/4; i < 45; i++ )
|
||||||
g_work->data[i] = 0;
|
g_work->data[i] = 0;
|
||||||
g_work->data[37] = (rand()*4) << 8;
|
g_work->data[37] = (rand()*4) << 8;
|
||||||
|
// block header suffix from coinb2 (stake version)
|
||||||
|
memcpy( &g_work->data[44],
|
||||||
|
&sctx->job.coinbase[ sctx->job.coinbase_size-4 ], 4 );
|
||||||
sctx->bloc_height = g_work->data[32];
|
sctx->bloc_height = g_work->data[32];
|
||||||
//applog_hex(work->data, 180);
|
//applog_hex(work->data, 180);
|
||||||
//applog_hex(&work->data[36], 36);
|
//applog_hex(&work->data[36], 36);
|
||||||
|
@@ -250,7 +250,7 @@ bool register_drop_algo( algo_gate_t* gate )
|
|||||||
gate->build_stratum_request = (void*)&std_be_build_stratum_request;
|
gate->build_stratum_request = (void*)&std_be_build_stratum_request;
|
||||||
gate->work_decode = (void*)&std_be_work_decode;
|
gate->work_decode = (void*)&std_be_work_decode;
|
||||||
gate->submit_getwork_result = (void*)&std_be_submit_getwork_result;
|
gate->submit_getwork_result = (void*)&std_be_submit_getwork_result;
|
||||||
gate->set_work_data_endian = (void*)&swab_work_data;
|
gate->set_work_data_endian = (void*)&set_work_data_big_endian;
|
||||||
gate->display_extra_data = (void*)&drop_display_pok;
|
gate->display_extra_data = (void*)&drop_display_pok;
|
||||||
gate->work_data_size = 80;
|
gate->work_data_size = 80;
|
||||||
gate->work_cmp_size = 72;
|
gate->work_cmp_size = 72;
|
||||||
|
@@ -361,11 +361,6 @@ out:
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
void m7m_reverse_endian( struct work *work )
|
|
||||||
{
|
|
||||||
swab32_array( work->data, work->data, 20 );
|
|
||||||
}
|
|
||||||
|
|
||||||
bool register_m7m_algo( algo_gate_t *gate )
|
bool register_m7m_algo( algo_gate_t *gate )
|
||||||
{
|
{
|
||||||
gate->optimizations = SSE2_OPT | AES_OPT | AVX_OPT | SHA_OPT;
|
gate->optimizations = SSE2_OPT | AES_OPT | AVX_OPT | SHA_OPT;
|
||||||
@@ -376,7 +371,7 @@ bool register_m7m_algo( algo_gate_t *gate )
|
|||||||
gate->submit_getwork_result = (void*)&std_be_submit_getwork_result;
|
gate->submit_getwork_result = (void*)&std_be_submit_getwork_result;
|
||||||
gate->set_target = (void*)&scrypt_set_target;
|
gate->set_target = (void*)&scrypt_set_target;
|
||||||
gate->get_max64 = (void*)&get_max64_0x1ffff;
|
gate->get_max64 = (void*)&get_max64_0x1ffff;
|
||||||
gate->set_work_data_endian = (void*)&m7m_reverse_endian;
|
gate->set_work_data_endian = (void*)&set_work_data_big_endian;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1091,7 +1091,7 @@ bool register_neoscrypt_algo( algo_gate_t* gate )
|
|||||||
gate->build_stratum_request = (void*)&std_be_build_stratum_request;
|
gate->build_stratum_request = (void*)&std_be_build_stratum_request;
|
||||||
gate->work_decode = (void*)&std_be_work_decode;
|
gate->work_decode = (void*)&std_be_work_decode;
|
||||||
gate->submit_getwork_result = (void*)&std_be_submit_getwork_result;
|
gate->submit_getwork_result = (void*)&std_be_submit_getwork_result;
|
||||||
gate->set_work_data_endian = (void*)&swab_work_data;
|
gate->set_work_data_endian = (void*)&set_work_data_big_endian;
|
||||||
gate->work_data_size = 80;
|
gate->work_data_size = 80;
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
@@ -75,7 +75,7 @@ void init_x14_ctx()
|
|||||||
|
|
||||||
static void x14hash(void *output, const void *input)
|
static void x14hash(void *output, const void *input)
|
||||||
{
|
{
|
||||||
unsigned char hash[128]; __attribute__ ((aligned (32)))
|
unsigned char hash[128] __attribute__ ((aligned (32)));
|
||||||
#define hashB hash+64
|
#define hashB hash+64
|
||||||
|
|
||||||
x14_ctx_holder ctx;
|
x14_ctx_holder ctx;
|
||||||
|
@@ -231,7 +231,7 @@ bool register_zr5_algo( algo_gate_t* gate )
|
|||||||
gate->build_stratum_request = (void*)&std_be_build_stratum_request;
|
gate->build_stratum_request = (void*)&std_be_build_stratum_request;
|
||||||
gate->work_decode = (void*)&std_be_work_decode;
|
gate->work_decode = (void*)&std_be_work_decode;
|
||||||
gate->submit_getwork_result = (void*)&std_be_submit_getwork_result;
|
gate->submit_getwork_result = (void*)&std_be_submit_getwork_result;
|
||||||
gate->set_work_data_endian = (void*)&swab_work_data;
|
gate->set_work_data_endian = (void*)&set_work_data_big_endian;
|
||||||
gate->work_data_size = 80;
|
gate->work_data_size = 80;
|
||||||
gate->work_cmp_size = 72;
|
gate->work_cmp_size = 72;
|
||||||
return true;
|
return true;
|
||||||
|
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.6.11.
|
# Generated by GNU Autoconf 2.69 for cpuminer-opt 3.7.0.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# 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.6.11'
|
PACKAGE_VERSION='3.7.0'
|
||||||
PACKAGE_STRING='cpuminer-opt 3.6.11'
|
PACKAGE_STRING='cpuminer-opt 3.7.0'
|
||||||
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.6.11 to adapt to many kinds of systems.
|
\`configure' configures cpuminer-opt 3.7.0 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.6.11:";;
|
short | recursive ) echo "Configuration of cpuminer-opt 3.7.0:";;
|
||||||
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.6.11
|
cpuminer-opt configure 3.7.0
|
||||||
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.6.11, which was
|
It was created by cpuminer-opt $as_me 3.7.0, 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.6.11'
|
VERSION='3.7.0'
|
||||||
|
|
||||||
|
|
||||||
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.6.11, which was
|
This file was extended by cpuminer-opt $as_me 3.7.0, 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.6.11
|
cpuminer-opt config.status 3.7.0
|
||||||
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.6.11])
|
AC_INIT([cpuminer-opt], [3.7.0])
|
||||||
|
|
||||||
AC_PREREQ([2.59c])
|
AC_PREREQ([2.59c])
|
||||||
AC_CANONICAL_SYSTEM
|
AC_CANONICAL_SYSTEM
|
||||||
|
@@ -279,6 +279,7 @@ void work_copy(struct work *dest, const struct work *src)
|
|||||||
bool jr2_work_decode( const json_t *val, struct work *work )
|
bool jr2_work_decode( const json_t *val, struct work *work )
|
||||||
{ return rpc2_job_decode( val, work ); }
|
{ return rpc2_job_decode( val, work ); }
|
||||||
|
|
||||||
|
// Default
|
||||||
bool std_le_work_decode( const json_t *val, struct work *work )
|
bool std_le_work_decode( const json_t *val, struct work *work )
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -325,7 +326,7 @@ bool std_be_work_decode( const json_t *val, struct work *work )
|
|||||||
for ( i = 0; i < adata_sz; i++ )
|
for ( i = 0; i < adata_sz; i++ )
|
||||||
work->data[i] = be32dec( work->data + i );
|
work->data[i] = be32dec( work->data + i );
|
||||||
for ( i = 0; i < atarget_sz; i++ )
|
for ( i = 0; i < atarget_sz; i++ )
|
||||||
work->target[i] = be32dec( work->target + i );
|
work->target[i] = le32dec( work->target + i );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1518,12 +1519,12 @@ void scrypt_set_target( struct work* work, double job_diff )
|
|||||||
work_set_target( work, job_diff / (65536.0 * opt_diff_factor) );
|
work_set_target( work, job_diff / (65536.0 * opt_diff_factor) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// set_work_data_endian target, default is do_nothing
|
// Default is do_nothing (assumed LE)
|
||||||
void swab_work_data( struct work *work )
|
void set_work_data_big_endian( struct work *work )
|
||||||
{
|
{
|
||||||
int nonce_index = algo_gate.nonce_index;
|
int nonce_index = algo_gate.nonce_index;
|
||||||
for ( int i = 0; i < nonce_index; i++ )
|
for ( int i = 0; i < nonce_index; i++ )
|
||||||
work->data[i] = swab32( work->data[i] );
|
be32enc( work->data + i, work->data[i] );
|
||||||
}
|
}
|
||||||
|
|
||||||
double std_calc_network_diff( struct work* work )
|
double std_calc_network_diff( struct work* work )
|
||||||
|
Reference in New Issue
Block a user