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
819406714a Remove discarded work from quota used. 2013-11-03 01:22:13 +11:00
Con Kolivas
c3854378e1 Display works completed in summary and API data. 2013-11-03 01:01:24 +11:00
Con Kolivas
8e1ec8bd43 Store how many work items are worked on per pool. 2013-11-03 00:52:15 +11:00
Con Kolivas
ab1e9404a7 Make each pool store its on reference for what the most current block is and fine tune management of block change in shared pool failover strategies using the information. 2013-11-03 00:47:43 +11:00
Con Kolivas
448b1fae64 Rationalise use of current_hash to a single hex string the length of the previous block and display only the first non zero hex chars of the block in the status window. 2013-11-02 22:25:45 +11:00
Con Kolivas
e6a5068470 show_hash doesn't know the size of the string so hard code the max size. 2013-11-02 21:09:37 +11:00
Con Kolivas
57d6a6f697 Remove as many initial zeroes as exist on share display, abstracting out a hash show function to use across different submission mechanisms. 2013-11-02 20:56:29 +11:00
Con Kolivas
876a83024d Sanity check for absurd target setting and divide by zero. 2013-11-02 11:20:26 +11:00
Con Kolivas
21bdcdd6b3 Abstract out conversion of a 256 bit endian number to a double, correcting errors and use it for determining any magnitude share diff. 2013-11-02 11:17:36 +11:00
Con Kolivas
759bd39f17 Avoid the extra generation of a byte flipped hash2 in struct work and directly use the LE work hash. 2013-11-02 11:07:44 +11:00
Con Kolivas
e95b42ea54 Add a sanity check to avoid divide by zero crashes in set_target 2013-11-02 08:46:13 +11:00
Con Kolivas
8abe9d4e39 Calculate diff from target accurately for all 256 bits. 2013-11-01 23:40:20 +11:00
Con Kolivas
8d61ee2455 Set a true 256bit binary target based on any diff value in set_target() 2013-11-01 23:39:09 +11:00
Con Kolivas
61297399de Provide a copy_work_noffset function for copying a work struct but changing its ntime. 2013-11-01 23:38:59 +11:00
Con Kolivas
e18ae1e222 Make calls to flush queue and flush work asynchronous wrt to the main work loops. 2013-11-01 00:28:12 +11:00
Con Kolivas
39c8491302 Share is also above target for submit noffset nonce. 2013-11-01 00:13:22 +11:00
Con Kolivas
8ed936330e Use round for displaying current pool diff. 2013-10-31 23:46:48 +11:00
Con Kolivas
eb73897ade Use round for stratum share diff display instead of floor. 2013-10-31 23:36:41 +11:00
Con Kolivas
7e59ec4f2d Use round instead of floor for displayed pool difficulty. 2013-10-31 23:29:47 +11:00
Con Kolivas
ac5b12e1a0 Allow arbitrary diffs to be tested against nonces via a test_nonce_diff function. 2013-10-31 17:15:42 +11:00
Con Kolivas
99b24c48fd Abstract out the rebuilding of hash2 in work. 2013-10-31 17:04:44 +11:00
Con Kolivas
5da3d58f6f Share is above, not below target, when it doesn't meet it. 2013-10-31 16:49:52 +11:00
Con Kolivas
774061e3f2 Minor style changes to output. 2013-10-31 12:31:34 +11:00
Con Kolivas
c4542f2b96 Merge branch 'master' into hfa
Conflicts:
	Makefile.am
	api.c
	configure.ac
	miner.h
2013-10-31 12:29:59 +11:00
Con Kolivas
b431ea4e1f Merge branch 'master' into kncminer 2013-10-31 12:09:23 +11:00
Con Kolivas
5c9f30369a Merge branch 'master' into hashfast 2013-10-29 22:25:05 +11:00
Kano
3e93b268fa klondike - change options to clock and temptarget only 2013-10-29 20:53:41 +11:00
Vitalii Demianets
53570ae8a0 KnC driver: knc-spi-fpga ASIC driver
This driver talks to KnCMiner controller via SPI

Protocol specification is available at
https://github.com/KnCMiner/jupiter-hw-docs/blob/master/fpga_spi.md
2013-10-26 23:58:52 +02:00
Vitalii Demianets
14d20837b3 'llround' is more suitable here than 'roundl' 2013-10-26 23:58:52 +02:00
Con Kolivas
36c6da8ad4 Reinstate block solve testing. 2013-10-27 00:46:47 +11:00
Con Kolivas
3f6b9d6796 Dramatically simplify the calculation of blockdiff. 2013-10-27 00:27:39 +11:00
Con Kolivas
ca91994709 Simplify the set_target function, allowing it to work properly for fractional diffs. 2013-10-26 23:16:10 +11:00
Con Kolivas
2d67bb06dc Merge branch 'master' into hashfast 2013-10-26 16:22:13 +11:00
Con Kolivas
f9d3d008da Merge pull request #509 from roybadami/master
Improvements to support for BitBurner boards
2013-10-25 20:11:24 -07:00
Con Kolivas
e1b4aa980c Merge branch 'master' into hashfast 2013-10-25 14:42:35 +11:00
Con Kolivas
3ffc3f1d78 Adjust the binary ntime data in submit_noffset_nonce even when there is no hex ntime string for eg. gbt. 2013-10-25 14:41:23 +11:00
Con Kolivas
f29f612182 Merge branch 'master' into hashfast 2013-10-25 14:35:56 +11:00
Con Kolivas
316e6d61c9 Put an entry into the work struct telling drivers how much they can roll the ntime themselves. 2013-10-25 14:34:05 +11:00
Con Kolivas
4728dd82d1 Remove the applog on miner threads dying to prevent deadlocks on exit. 2013-10-25 12:54:10 +11:00
Con Kolivas
4c979d756f Do one extra guaranteed libusb event handling before testing if there are any pending async usb transfers. 2013-10-25 12:46:47 +11:00
Con Kolivas
0da551fac1 Use a linked list for all usb transfers instead of just cancellable ones. 2013-10-25 12:30:39 +11:00
Con Kolivas
d342bcbe81 Provide a mechanism for informing drivers of updated work templates for stratum and gbt mining. 2013-10-25 11:57:27 +11:00
Con Kolivas
9d8e3df0a8 Add usb transfer cancellation on shutdown and documentation regarding where cancellable transfers are suitable. 2013-10-25 04:07:09 +11:00
Con Kolivas
d2feacdfb2 Cancel cancellable usb transfers on work restart messages. 2013-10-24 22:26:13 +11:00
Con Kolivas
b639e68870 Merge branch 'master' into hashfast 2013-10-24 21:19:29 +11:00
Con Kolivas
448f8dde80 Don't attempt to disable curses or print a summary during an app restart to prevent deadlocks. 2013-10-24 21:15:36 +11:00
Con Kolivas
81dfe60d36 Keep the libusb event handle polling thread active until there are no async usb transfers in progress. 2013-10-24 20:41:55 +11:00
Con Kolivas
5ea6a8eaa2 Merge branch 'master' into hashfast
Conflicts:
	Makefile.am
2013-10-23 22:45:56 +11:00
Con Kolivas
e76421320e Minor opencl build corrections. 2013-10-23 22:31:00 +11:00
Con Kolivas
273b04be62 Do the ntime binary modification to the work struct when submitting an ntime offset nonce within submit_noffset_nonce 2013-10-20 13:23:11 +11:00
Con Kolivas
572c8b9624 Do the ntime binary modification to the work struct when submitting an ntime offset nonce within submit_noffset_nonce 2013-10-20 13:22:14 +11:00
Roy Badami
c69a130dc1 Improvements to support for BitBurner boards
--bitburner-fury-options allows avalon-options to be overridden for
BitBurner Fury Boards, facilitating simultanous use of BitBurner XX
and BitBurner Fury boards

More sensible defaults for BitBurner boards, so cgminer should do something
sensible without any command line args
2013-10-19 18:42:20 +01:00
Con Kolivas
31e8ebaffa Merge branch 'master' into hashfast 2013-10-19 16:08:17 +11:00
Con Kolivas
06776af000 Use the forcelog function on shutdown to cope with indeterminate console lock states due to killing of threads. 2013-10-18 23:34:55 +11:00
Con Kolivas
8e9f32a81b Add a forcelog variant of applog which invalidates any console lock to force output. 2013-10-18 23:30:05 +11:00
Con Kolivas
f5baf9f57a Merge branch 'master' into hashfast
Conflicts:
	usbutils.h
2013-10-18 19:12:13 +11:00
ckolivas
680f014c85 Simplify queued hashtable by storing unqueued work separately in a single pointer. 2013-10-18 14:58:33 +11:00
ckolivas
40821d1f11 Use cgcompletion timeouts for the unreliable shutdown functions on kill_work. 2013-10-18 10:44:56 +11:00
Kano
c9adb1929c allow __work_complete() access 2013-10-18 00:54:37 +11:00
Kano
514b3c424f API add 'MHS %ds' to 'summary' 2013-10-17 20:24:09 +11:00
Kano
d3d3fc1316 Optional lock tracking and stats via the API 2013-10-17 20:24:02 +11:00
Con Kolivas
685c2acecd Speed up polling repeat again in usb poll thread and handle async after the message to disable polling is complete. 2013-10-17 20:03:31 +11:00
Con Kolivas
bec75b61a6 Make the USB polling thread poll every second to potentially aid longer timeout transfers. 2013-10-17 08:28:57 +11:00
ckolivas
f821d0fbf3 Set device_diff on work in get_work to not be missed with drivers that use get_work directly. 2013-10-17 08:28:49 +11:00
Con Kolivas
9e287f9598 Merge pull request #499 from someone42/master
changes to bitburner driver for bitburner fury boards
2013-10-14 03:27:57 -07:00
Con Kolivas
e06e495ab8 Merge branch 'master' into hashfast 2013-10-14 15:07:32 +11:00
Con Kolivas
07837072f1 hexstr is too small in test_work_current 2013-10-14 12:12:01 +11:00
Con Kolivas
9b5c534911 Merge branch 'master' into hashfast
Conflicts:
	api.c
	configure.ac
	miner.h
	usbutils.c
	usbutils.h
2013-10-13 16:41:53 +11:00
Con Kolivas
56edabc64d Use a timeout with usb handle events set to a nominal 200ms and wait for the polling thread to shut down before deinitialising libusb. 2013-10-12 11:06:54 +11:00
Con Kolivas
9f8023a959 Use stack memory for hex used in stratum share submissions. 2013-10-12 10:34:07 +11:00
Con Kolivas
e0c90359fd Use stack memory in test_work_current, avoiding a malloc/free cycle each time. 2013-10-12 09:56:48 +11:00
Con Kolivas
835ad82441 Convert the bitfury driver to use the hash_driver_work version of hash_work. 2013-10-12 09:32:07 +11:00
Con Kolivas
58008a3742 Add a hash_driver_work function to allow for drivers that wish to do their own work queueing and management. 2013-10-12 09:05:58 +11:00
Chris Chua
b509e84376 using separate identifier for bitburner fury boards 2013-10-11 21:14:59 +11:00
Con Kolivas
cda797d1be Avoid calling get_statline_before on exit to avoid trying to use it on drivers in an indeterminate state. 2013-10-11 16:04:23 +11:00
Con Kolivas
d437de8428 Avoid calling get_statline on exit. 2013-10-11 15:58:29 +11:00
Con Kolivas
b5dfacef24 We are always dependent on libusb handling events so use the blocking libusb_handle_events in the polling thread and use a bool to know if we should continue polling. 2013-10-11 10:15:06 +11:00
Con Kolivas
853aa28ffc Merge branch 'master' into async
Conflicts:
	usbutils.c
2013-10-11 08:49:59 +11:00
Con Kolivas
2834eb8d6d Kill off threads that have failed using hash_sole_work instead of just disabling them. 2013-10-08 23:35:22 +11:00
Con Kolivas
f80c900336 Merge branch 'master' into async
Conflicts:
	api.c
	cgminer.c
	miner.h
	usbutils.c
	util.c
2013-10-08 20:46:36 +11:00
Con Kolivas
f8e28f251d Try switching pools if for some reason we end up with only idle pools and have ended up current_pool set to an idle one. 2013-10-08 20:42:36 +11:00
Con Kolivas
3b527f14d0 Check a pool is stable for >5 mins before switching back to it. 2013-10-08 20:41:13 +11:00
Con Kolivas
7318eceef9 Make the devlock a cglock in usbutils and only grab the write lock for fundamental changes allowing us to send and receive transfers concurrently without lock contention. 2013-10-07 23:34:01 +11:00
Con Kolivas
8c0ea19e13 Submitting an ntime offset nonce needs to be done on a copy of the work instead of the original so abstract out shared components as much as possible, minimising strdups in copy_work and make submit_work_async work take copied work, cleaning up code in the process. 2013-10-07 23:33:13 +11:00
Con Kolivas
b6a97de687 Provide a way for drivers to submit work that it has internally rolled the ntime value by returning the amount it has ntime rolled to be added. 2013-10-07 23:33:13 +11:00
ckolivas
6cd7f0f1be Remove unmaintained broken ztex driver. 2013-10-07 23:33:13 +11:00
Kano
51418f79e5 Klondike update code to current git 2013-10-07 23:33:11 +11:00
Con Kolivas
a6a9407067 Use asynchronous transfers for all bulk transfers, allowing us to use our own timers and cancelling transfers that take too long. 2013-10-07 23:31:20 +11:00
Con Kolivas
dbef95f77d Submitting an ntime offset nonce needs to be done on a copy of the work instead of the original so abstract out shared components as much as possible, minimising strdups in copy_work and make submit_work_async work take copied work, cleaning up code in the process. 2013-10-05 09:31:36 +10:00
Con Kolivas
4c79252dc8 Provide a way for drivers to submit work that it has internally rolled the ntime value by returning the amount it has ntime rolled to be added. 2013-10-04 21:39:42 +10:00
ckolivas
052e434846 Remove unmaintained broken ztex driver. 2013-10-04 12:00:41 +10:00
Kano
dc85abd9cd Klondike update code to current git 2013-10-03 23:19:18 +10:00
Con Kolivas
f49a3c7657 Merge branch 'master' into hashfast
Conflicts:
	Makefile.am
	api.c
	cgminer.c
	configure.ac
	miner.h
	usbutils.c
	usbutils.h
2013-09-30 08:43:29 +10:00
Con Kolivas
5e1ebd5070 Deuglify use of _PARSE_COMMANDS macro expansions. 2013-09-29 13:54:16 +10:00
ckolivas
2ec601e123 There is no need to get the external prototypes for drivers in cgminer.c any more. 2013-09-28 16:00:55 +10:00
ckolivas
f3294f7424 Remove unnecessary gpu_threads initialisation. 2013-09-28 15:18:08 +10:00
ckolivas
6d7471237d Use macro expansion to iterate over all device drivers without needing to explicitly code in support in all places. Pass a hotplug bool to the detect() function to prevent opencl trying to hogplug GPUs. 2013-09-28 15:11:06 +10:00
ckolivas
df54b76855 Add a noop function for driver detect when it's missing. 2013-09-28 13:52:13 +10:00
ckolivas
8875197466 Create a macro list of drivers to enable easier addition of further drivers. 2013-09-28 10:25:48 +10:00
Con Kolivas
7696f26a93 Abstract out work submission once it's been tested, to be used by drivers that do their own internal validity testing. 2013-09-26 21:18:33 +10:00