1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-10 06:48:05 +00:00
Commit Graph

1339 Commits

Author SHA1 Message Date
Con Kolivas
79521fe8f0 Initialise devices before attempting to connect to pools to allow their thread prepare function to be called before having to connect to pools.
Conflicts:
	cgminer.c
2014-01-15 13:38:44 +02:00
Con Kolivas
05d69bf75c Provide a function to discard queued work based on age. (NOTE: may be unused) 2014-01-15 13:25:30 +02:00
Con Kolivas
7dd8b316ac Prevent a deadlock with use of restart_threads by spawning a thread to send the driver flush work messages.
Conflicts:
	cgminer.c
2014-01-15 13:19:30 +02:00
Con Kolivas
39121183e1 Set priority of various threads if possible.
Conflicts:
	cgminer.c
2014-01-15 12:59:54 +02:00
Con Kolivas
e9f20f5e0b Do not hold the mining thread lock in restart_threads when calling the driver flush work commands. 2014-01-15 12:54:33 +02:00
Con Kolivas
b5eddd1159 Don't run device restart code if the device is not enabled. 2014-01-15 12:53:41 +02:00
Con Kolivas
9ed6c3b1b5 Provide a function for setting the work ntime. 2014-01-15 12:49:48 +02:00
Con Kolivas
f1902fe6ac We can't connect to a GBT pool at all with fix protocol enabled. 2014-01-15 12:44:56 +02:00
Noel Maersk
cb806d2437 core: Display difficulty in cgminer style, not true network difficulty (for consistency within the interface).
This regression was introduced by commit 3f6b9d6796.
2014-01-14 19:33:20 +02:00
Con Kolivas
cd7f6ed56a Initialise the stgd lock mutex earlier to prevent dereferences when pool testing occurs before it.
Conflicts:
	cgminer.c
2014-01-14 18:33:59 +02:00
Con Kolivas
694a98ece3 --shares should be scaled to diff1 not absolute number of shares 2014-01-14 18:31:15 +02:00
Con Kolivas
cd03fcdf2d Reset the work_restart bool after the scanwork loop in case the driver flushes work synchronously. 2014-01-14 18:25:36 +02:00
Con Kolivas
75c5ac0457 Only check for the stratum clean message if we have had a valid message. 2014-01-14 18:24:29 +02:00
Con Kolivas
d38802a68f Get rid of the stage thread since all work can be asynchronously added now via hash_push anyway.
Conflicts:
	cgminer.c
2014-01-14 18:19:57 +02:00
Con Kolivas
c9bf06d19b Break out of the hash work loops when a failure is detected instead of dropping into mt disable. 2014-01-13 21:24:57 +02:00
ckolivas
d9b3037e4b Fix build for no libcurl 2014-01-13 21:19:15 +02:00
Noel Maersk
e4680ab627 core: allow changing TCP keepalive packet idle time using tcp-keepalive command-line option or config-file option.
This may be useful in certain scenarios. However, server load from keepalive
is increased 6-fold if code is hard-changed from 30 to 5. So, provide it as
an option instead, and use the previous value as a default (30).

Explanation from

015c064396

Kevin's middlecoin fix, CURL TCP keepalive constants lowered:

CURLOPT_TCP_KEEPIDLE from 45 to 5 and CURLOPT_TCP_KEEPINTVL from 30 to
5. Before it'd trigger a keepalive packet after 45 seconds of connection
idle time and then again every 30 seconds. Now it triggers a keepalive
packet after 5 seconds of connection idle time and then again every 5
seconds.

It makes the client more resilient against coin switching pools or just
pools with connection issues in general. It will however add a tiny bit
pressure to the pool server; but a TCP keepalive probe is only about
60-80 bytes, so I don't think it is an issue.
2014-01-12 19:45:31 +02:00
Noel Maersk
bb5065b601 core: Remove two unused functions.
They were previously necessary to switch between SHA256d and Scrypt.
2014-01-12 17:46:57 +02:00
Noel Maersk
211da58a73 Remove a few stray ASIC defines. 2014-01-12 17:40:59 +02:00
Noel Maersk
83e52dfe78 api: remove references to FPGAs and ASICs. 2014-01-11 23:01:02 +02:00
Noel Maersk
71927bb0ba misc: Add Martin Danielsen to AUTHORS. 2014-01-11 22:31:22 +02:00
Noel Maersk
b11ca3650a Remove remaining references to have_opencl. 2014-01-11 20:57:15 +02:00
Noel Maersk
744e819117 Remove last references to opt_nogpu. 2014-01-11 20:51:54 +02:00
Martin Danielsen
11c20c87fa core: Warn if GPU_MAX_ALLOC_PERCENT or GPU_USE_SYNC_OBJECTS is not set
...through export (Linux) or setx (Windows).
2014-01-11 18:13:20 +02:00
Martin Danielsen
31123de410 -g or --gpu-threads now support comma separated values, yaaay!
It is exactly what it says, now you can finally put that Frankenrig configuration in one file.
The parameter follows the same design as gpu-engine and gpu-memclock.
2014-01-11 18:11:14 +02:00
Noel Maersk
b4e36e69e8 Code cleanup after last two commits.
Display reject percentage in a fixed-width field.
2014-01-11 17:59:01 +02:00
Martin Danielsen
89663c7e94 Display reject percentage instead of absolute accepted/rejected values
Changed GPU status line from "A:xxxxx R:xxx" to "R:0.0%". It shows (rejected/(accepted+rejected))*100, which is the percentage of rejections for a GPU. Total accepted and rejected in top status is unchanged.

GPU status lines now show both threads and intensity.
2014-01-11 17:41:30 +02:00
Noel Maersk
f6f950273b log: Change log_dateformat to log_show_date and make it bool. 2014-01-11 17:32:57 +02:00
Martin Danielsen
ba1c47781f log: Added a switch to the log date and time format.
It is possible to switch back to full date and time on each log line with "--log-dateformat 1". The short time-only format is default with the value of 0.

Log with short time-only format looks like:
 [23:59:59] Accepted 389c47d1 Diff 1.16K/512 GPU 0 pool 0
 [00:00:16] Log date is now 2013-12-22
 [00:00:16] Stratum from pool 0 detected new block
 [00:00:33] Accepted 7a4950a4 Diff 536/512 GPU 0 pool 0
2014-01-11 17:32:39 +02:00
Martin Danielsen
fd8d465b02 core: Timeout on switching back to a pool after a broken connection lowered from 5 minutes to one minute. 2014-01-11 17:32:34 +02:00
Noel Maersk
1cb220781a core: Clarify --scrypt deprecation message. 2013-12-22 16:45:33 +02:00
Benjamin Herrenschmidt
9b8a7319c0 core: Add back a dummy --scrypt option
Removing it means existing shell scripts fail unless they are updated
to remove passing the option. Instead, just print a deprecation
warning.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-12-22 13:10:20 +11:00
Noel Maersk
199cb10e18 HAVE_OPENCL is mandatory, remove checks form code an build system. 2013-12-05 20:49:18 +02:00
Noel Maersk
fd57382ef7 Remove USE_USBUTILS define clauses.
This software shall not support USB devices. They should be handled
by different software. Inter-software compatibility (such as stats
pulling) should be maintained on an API level.
2013-11-25 01:58:50 +02:00
Noel Maersk
664fc33b0c Remove code for Bitcoin GPU kernel execution. 2013-11-24 22:16:16 +02:00
Noel Maersk
323af83fdb Remove define-clauses for USE_SCRYPT. 2013-11-24 19:52:14 +02:00
Noel Maersk
95586f72f0 Squash-merge branch dead-end with unnecessary check removals. 2013-11-24 16:18:10 +02:00
Noel Maersk
37cd3fb04c Get rid of several opt_scrypt checks.
--scrypt will eventually become a default, and is the only reason to use this
version of cgminer.
2013-11-24 15:28:53 +02:00
Con Kolivas
757fcb3df6 Do all hotplug_process under the write mining_thr_lock 2013-11-05 17:29:20 +11:00
Con Kolivas
2489b2aeba Fix for opt_worktime on big endian machines. 2013-11-05 16:54:29 +11:00
Con Kolivas
463e366c8d Correct set_blockdiff for big endian machines. 2013-11-05 16:53:06 +11:00
Con Kolivas
043e9d9bab Make sure cgpu exists in the restart threads loop in cases of hotplug etc. 2013-11-05 16:20:19 +11:00
Con Kolivas
c030439d0b Do get_work in fill_queue without holding other locks. 2013-11-05 12:46:34 +11:00
Con Kolivas
4a620cce44 Initialise usb after all the locks and conditionals are initialised. 2013-11-05 11:46:45 +11:00
Con Kolivas
aa9938973e Use only a trylock in flush queue to prevent deadlocks. 2013-11-05 09:08:52 +11:00
Con Kolivas
609ca9292a Scale diff for scrypt when testing for block solves. 2013-11-05 08:03:24 +11:00
Con Kolivas
c5b10a6cf3 Fix for non curses build. 2013-11-04 20:57:47 +11:00
Con Kolivas
e3ed101ce8 Force unlocking of the console lock on restart to avoid corrupting the console state when we finally quit. 2013-11-03 23:05:16 +11:00
Con Kolivas
c9b54f1502 Never wait indefinitely for a pthread conditional in the hash_pop loop in case the work scheduler misses the last wakeup. 2013-11-03 22:41:32 +11:00
Con Kolivas
a077c9f9a4 Make hash_pop signal the work scheduler each time it waits on the conditional that it should look for more work. 2013-11-03 22:41:21 +11:00