1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-08 22:08:02 +00:00
Commit Graph

491 Commits

Author SHA1 Message Date
elbandi
7c9fe7112e Apply immediately the first set_difficulty
This is a workaround for pool, who send the first difficulty after notify
2015-11-10 21:27:46 +01:00
elbandi
4a96caafd8 Merge branch 'master' of https://github.com/sgminer-dev/sgminer 2015-11-09 15:57:26 +01:00
elbandi
d0881e82a2 store the next difficulty 2015-07-19 00:09:33 +02:00
elbandi
5b37b52e24 store the next difficulty 2015-07-18 23:59:25 +02:00
ystarnaud
4ba8a68043 Merged develop branch with master +updates
Moved the develop code to master. Moving forward all updates will be
done on master unless it's work on a major feature.

This update contains all previous develop code as well as a few new ones
that weren't pushed yet:

* Added neoscrypt compatibility for xintensity/rawintensity
* Neoscrypt now uses correct TC if not specified or set to 0
* Reworked the application of pool settings on algorithm switch which
should resolve TC/Intensity changes between algos such as X11 and
neoscrypt
2014-12-03 10:09:55 -05:00
Jan Berdajs
0bd7a9ff63 After cancelling a thread (unless it's detached, but mining threads aren't), it is always necessary to join the thread so the system will release resources.
This also simplifies kill_mining a bit.
2014-07-07 12:35:27 +02:00
Elbandi
a39316dbd3 Fix nonce1 and sessionid memory leak 2014-07-03 17:24:34 +02:00
ystarnaud
9d54637e3c Fix HW Issue at startup
Fixed an issue where the GPUs would be initialized on first pool alive,
but the mining threads would end up being initialized on another pool
because it was selected right away.
2014-06-30 00:12:12 -04:00
elbandi
f8261b1215 Fix nonce1 and sessionid memory leak 2014-06-10 22:42:53 +02:00
Jan Berdajs
25d7d426fd convert tabs to spaces in most commonly modified files 2014-06-09 17:45:06 +02:00
Jan Berdajs
ff05aacdc3 attempt to fix memory issues when doing curl calls
From curl CURLOPT_ERRORBUFFER docs: You must keep the associated storage available until libcurl no longer needs it. Failing to do so will cause very odd behavior or even crashes. libcurl will need it until you call curl_easy_cleanup(3) or you set the same option again to use a different pointer.
2014-06-09 01:17:29 +02:00
Jan Berdajs
5e3142cf68 remove unused code (mostly intended for ASICs which are not supported in sgminer), fix some compiler warnings 2014-06-08 20:36:33 +02:00
Noel Maersk
910c360899 stratum: parse_notify(): Don't die on malformed bbversion/prev_hash/nbit/ntime.
Might have introduced a memory leak, don't have time to check. :(

Should the other hex2bin()'s be checked?

Thanks to Mick Ayzenberg <mick.dejavusecurity.com> for finding this.
2014-06-05 23:07:47 +03:00
Noel Maersk
78cc408369 stratum: parse_reconnect(): treat pool-sent URL as untrusted.
Thanks to Mick Ayzenberg <mick@dejavusecurity.com> for reminding
that this existed and highlighting the offender.

Also to Luke-jr for actually fixing this in bfgminer. :D
2014-06-05 23:07:08 +03:00
Luke Dashjr
b65574bef2 Stratum: extract_sockaddr: Truncate overlong addresses rather than stack overflow
Thanks to Mick Ayzenberg <mick@dejavusecurity.com> for finding this!
2014-06-05 21:29:44 +03:00
Luke Dashjr
bac5831b35 Bugfix: initiate_stratum: Ensure extranonce2 size is not negative (which could lead to exploits later as too little memory gets allocated)
Thanks to Mick Ayzenberg <mick@dejavusecurity.com> for finding this!
2014-06-05 21:20:25 +03:00
Jan Berdajs
e4a4efdb42 fix some potential memory leaks, remove a few old unused functions 2014-06-05 00:13:43 +02:00
Jan Berdajs
6c5ce535d9 fix compiler warnings 2014-05-29 01:34:29 +02:00
elbandi
91a26c46b7 Protect pool name with lock
Disconnect from pool, if auth is failed

handle mining.set_extranonce method

subscribe for mining.extranonce

Allow disable extranonce subscribe

Send subscribe request before auth

Change mining.set_extranonce method as stratum notification

Set extranonce.subscribe timeout to 2sec

Some tweaks for extranonce

Handle pool response, who send errors in invalid format

Move no-extranonce-subscribe parameter to a pool config

Include pool.h

Set the pool idle and switch pool, if need

Mark pool as idle if stratum restart is failed

Conflicts:
	sgminer.c
2014-05-28 23:17:51 +02:00
Jan Berdajs
c0baf790f6 making new algorithms and other changes merged from sph-sgminer work with current version of sgminer 2014-05-27 01:11:54 +02:00
Jan Berdajs
93e3a6d107 Merge branch 'master' into sph
Not working yet, need to upgrade algorithm_t

Conflicts:
	configure.ac
	driver-opencl.c
	miner.h
	ocl.c
	sgminer.c
	util.c
2014-05-24 21:22:04 +02:00
elbandi
98676763b9 Set the pool idle and switch pool, if need 2014-05-08 00:02:39 +02:00
elbandi
c469ff923a Disconnect from pool, if auth is failed 2014-05-08 00:02:03 +02:00
elbandi
08b7ab1dd4 Add build_number to version string 2014-05-04 01:29:28 +02:00
elbandi
28ff05e327 Set the pool idle and switch pool, if need 2014-05-02 22:33:38 +02:00
elbandi
a32ec16169 Move no-extranonce-subscribe parameter to a pool config 2014-04-27 19:32:23 +02:00
elbandi
91be2e9e07 Handle pool response, who send errors in invalid format 2014-04-27 19:28:59 +02:00
elbandi
e7bca31941 Some tweaks for extranonce 2014-04-26 01:17:14 +02:00
elbandi
7521451cae Merge branch 'nicehash-extranonce' into master 2014-04-26 01:00:41 +02:00
elbandi
77545de0e8 Disconnect from pool, if auth is failed 2014-04-26 00:58:49 +02:00
Elbandi
75a86fbf10 Set extranonce.subscribe timeout to 2sec 2014-04-24 20:57:09 +02:00
elbandi
e1dcbfab15 Change mining.set_extranonce method as stratum notification 2014-04-24 20:40:30 +02:00
elbandi
281bcd75e9 Send subscribe request before auth 2014-04-24 20:40:20 +02:00
elbandi
4ad62b9a78 Allow disable extranonce subscribe 2014-04-24 15:44:33 +02:00
elbandi
b742ced4eb subscribe for mining.extranonce 2014-04-24 14:34:50 +02:00
elbandi
aaaf387222 handle mining.set_extranonce method 2014-04-24 14:34:42 +02:00
Elbandi
973dcefa8c Use get_pool_name everywhere 2014-04-24 12:09:56 +02:00
Noel Maersk
7051629232 log: change log level in setup_stratum_socket().
Erroneously stayed at LOG_ERROR after issue #88 (IIRC).
2014-04-07 23:54:43 +03:00
phm
7678db6801 Fixed problem with stratum support when mining FC, GRS and TWE. Added --difficulty-multiplier parameter for controlling stratum difficulty multiplier. 2014-04-05 20:55:22 +02:00
Noel Maersk
cabb02f5d4 log: do not show pool difficulty changes on non-current pool.
Keep log spam down when using a lot of vardiff pools, or if a p2pool is
a fallback.
2014-04-02 23:35:03 +03:00
Noel Maersk
1f7b7ef26e stratum: move log warning under opt_disable_client_reconnect clause. 2014-03-24 15:25:31 +02:00
Martin Danielsen
01b3f70b63 A new --no-client-reconnect command that disables the 'client.reconnect' function.
It looks like there's an exploit that abuses said command, but it is still not clear exactly how.

There's also an additional message when the reconnect happens: "WARNING: POTENTIAL CLIENT.EXPLOIT!", but it requires you to be actively monitoring your log to catch it, and in which case you already get a "Reconnect requested from Pool 0 to 127.0.0.1" message.

Note that disabling 'client.reconnect' might affect some pools that rely on the feature, like pools that you lease your rig to.

Oh and this is dry-coded. :)
2014-03-24 15:12:40 +02:00
phm
21d928b543 Fixed problem with invalid stratum difficulty for Quark, AnimeCoin and QubitCoin. 2014-03-22 14:16:49 +01:00
troky
49aef7100f Reverting "poolname" to "name". 2014-03-15 19:08:24 +02:00
Noel Maersk
8f014effeb util: add missing include. 2014-03-02 19:15:30 +02:00
Noel Maersk
d58de45c0e pool: use get_pool_name() where appropriate. 2014-02-28 23:22:40 +02:00
Noel Maersk
44aed3570e Merge branch 'build-msvs2010-upd' into build-msvs2010-merge
Test in separate branch before merging into master.

Conflicts (resolved):
	api.c
	util.c
2014-02-22 17:05:07 +02:00
phm
9585d2a8e6 Added support for DarkCoin kernel. Modified stats display to handle low difficulty values. 2014-02-19 23:06:29 +01:00
Con Kolivas
aca8a58f2e Only show one decimal place if pool diff is not an integer. 2014-02-16 15:11:59 +02:00
Con Kolivas
f7394ff165 Check for more interrupted conditions in util.c and handle them gracefully. 2014-02-16 14:43:00 +02:00