Sie sind auf Seite 1von 106

Version 4.1.

0 - 8th March 2014 - Correct fix for dev start time being adjusted for stat zeroing. - Make per device stats work for average after a stat zeroing. - Add an hfa-options command line that allows the clockspeed to be chosen per device by name comma separated, with a function that can be expanded with more options in the future. - Off by one drv_rolllimit check against jobs - Free the work that may be lost, leaking memory, in a failed hfa_send_frame - Roll the ntime for work within the hfa driver for firmware we know doesn't do it internally as an optimisation. - Export the roll_work function to be usable by driver code and make it compatible with rolling stratum work. - Make opt_queue be respected as a maximum value for staged items. - Disable mistakenly enabled lock tracking. - api version update for HEX32 - api.c - HEX32 type needs quotes - Disable the MAX_CLOCK_DIFF check for newer hashfast firmwares since it's not required. - Store the hardware and firmware revision in the info struct for easy use in the hfa driver. - Only decrease the hfa clock rate if the device has been running for less than an hour before dying. - Change lack of op name response message in hfa driver - Check for lost devices at every write/read in hfa_detect_common - Make bxm bits configurable. - Move avalon2 options to ~alphabetic position in help. - Do a shutdown routine on bxm close. - Provide support for 2 chips in libbitfury sendhashdata and enable the 2nd chip on BXM devices. - Remove unnecessary opayload and newbuf members of bitfury info struct. - Add an spi add fasync command. - Cope with older hfa firmware not even responding to op_name. - Forcibly kill everything silently with an exit code of 1 should we fail to cleanly shut down and use a completion timeout for the __kill_work in app_restart. - Make __kill_work itself also be a completion timeout. - Generalise more of libbitfury for more reuse in both nf1 and bxm drivers. - Remove redundant init components of bxm driver. - Set default osc6 bits on bxm to 50 - Enable the transaction translator emulator for bxm devices and use a dummy spi tx the size of a normal payload. - Store usb11 and tt flags as booleans in cgusbdev allowing them to be discretely enabled as well as detected by the device data. - Add bxm scan function and check spi txrx returns only as much as sent. - Add init sequence to bxm detect one. - Add a bxm specific txrx function for spi transfers. - Add bxm close to bitfury shutdown switch. - Add reset/purge/cshigh/low sequence to bxm init - Add bitmode init to bxm open sequence. - Add initial bxm opening sequence for detect one. - Add identifiers for bxm bitfury devices. - Clean up parse_method - More gracefully break out of parse_notify on a corrupted hex string error, checking the return value of all hex2bin conversions and being consistent with using stack memory. Fix an unlocking error in cases of failure. - AntS1 - add detection information to usbutils - Enable Bitmain Ant S1 code and make it conform to cgminer requirements - Make the cointerra displayed hashrate based on valid share generation. - Convert and update values shown in the cointerra api output.

- Export the api_add_int16 function. - Use a custom mystrstr function in cointerra driver. - Add api_add_int16 to API functions. - Add support for Bitmain Multi Chain and Single Chain and optimize the efficiency - Add support for bitmain devices - Perfect function of BitMain Multi Chain - Add support for Bitmain Multi Chain and Single Chain and optimize the efficiency - Add support for bitmain devices Version 4.0.1 - 28th February 2014 - Refresh the log window on pool failure message at startup. - Rework the pool fail to connect at startup to not get stuck indefinitely repeatedly probing pools with new threads and to exit immediately when any key is pressed. - Use an early_quit function for shutting down when we have not successfully initialised that does not try to clean up. - Add more information to a hfa bad sequence tail event. - Increase the work queue at the top end if we've hit the bottom as well. - Set the work generation thread high priority, not the miner threads. - Bringing each hfa device online takes a lot of work generation so only ever do one at a time. - Increase the opt_queue if we can hit the maximum amount asked for but are still bottoming out. - Keep the old hfa device data intact with a clean thread shutdown to allow it to be re-hotplugged with the old information. - Cope with the API calling hfa on partially initialised devices having no info. - Show only as many digits as are required to display the number of devices. - Cold plug only one hashfast device to get started, and then hotplug many to minimise startup delays and possible communication delays causing failed first starts. - Send a shutdown and do a usb_nodev if hfa_reset fails. - Null a device driver should thread prepare fail. - Add a function for making all driver functions noops. - Don't try to reinit a device that's disabled. - Disable a device that fails to prepare. - Check for lack of thread in watchdog thread for a failed startup. - Make all device_data dereferences in the hfa driver safe by not accessing it in statline before when it's non-existent. - Add an option to disable dynamic core shedding on hashfast devices. - Do not remove the info struct on a failure to hfa prepare. - Detect an hfa device purely on the basis of getting a valid header response to an OP_NAME query, leaving init to hfa_prepare which will allow multiple devices to start without holding each other up at startup. - Store the presence and validity of opname in the hfa info. - api - buffer size off by 1 for joined commands - minion - clean up statline - Only break out of usb_detect_one when a new device is found. - Use usb_detect_one in the hfa driver. - Provide a usb_detect_one wrapper which only plugs one device at a time, breaking out otherwise. - Issue a usb_nodev on a bad work sequence tail in hfa - Read in hfa stream until we get a HF_PREAMBLE - Add shed count to hfa API stats output. - Display the base clockrate for hfa devices with a different name to per die clockrates to be able to easily distinguish them. - Use op_name if possible first with hfa devices to detect old instances and be

able to choose the starting clockspeed before sending an init sequence, reverting to setting op name and serial number as fallbacks. - Make hfa resets properly inherit across a shutdown. - Don't break out of hfa_old_device early if there's no serial number. - Fix harmless warning. - Allow the drop in MHz per hfa failure to be specified on the command line. - Icarus - ignore HW errors in hash rate ... and fix detection of them - Enable the hfa shed supported feature by default. - Add to udev rules hfa devices for firmware writing. - Remove ENV from hashfast udev rules. - Add a --hfa-name command that allows one to specify the unique opname for a hashfast device. - Ava2 decode the voltage, get the temp_max - Set the clock rate with a work restart instead of an init when changing to old clocks for hfa - Set opname on hfa devices without a serial number to a hex value based on time to not overflow the field. - Add op name to hfa API stats output if it exists. - Set the actual op_name in hfa devices if cgminer is choosing it itself due to it being invalid. - Re-init an hfa device to its old data before setting up info structures as their sizes may change. - Remove the usb device whenever we do a running shutdown on hfa and do a shutdown as the imitated reinit to allow it to hotplug again. - Reset opt hfa dfu boot after it's used. - Comment out windows only transfer on hfa startup. - Clean up structures unused in case of all failures in hfa detect common - Clear all structures should we fail to hfa reset on adjusting clock on a hotplug. - Set master and copy cgpu hash clock rate for hfa when dropping it on a restart. - Set the master hfa clock speed to lower when shutting down a copy. - Do a clear readbuf on any hfa reset in case the device has not yet cleanly shut down. - Increase hfa fanspeed slightly more when it's rising in the optimal range than falling. - Always decrease hfa clock speed on a running shutdown and don't try sending an init frame since it will be dropped regardless. - Match hfa devices to old ones based on OP_NAME values before serial numbers if possible. - Read off the OP_NAME if it exists and is supported on hfa devices, setting it to the device serial number or a timestamp if it is invalid. - Updated hf protocol - Check for an amount along with no error in hfa clear readbuf - Hfa clear readbuf can return a nonsense amount when there's a return error so ignore the amount. - Running resets always cause a shutdown on hfa meaning the device will disappear with modern firmware so always kill off the threads to allow re-hotplugging. - Reset the hfa hash clock rate to the old one if we find an old instance, only setting the device id in hfa_prepare - Keep the device_id on the original zombie thread for HFA in case of further resets. - Break out of hfa inherit if there is no device data. - Inherit the hfa zombie instance after the device id has been allocated. - The list_for_each_cgpu macro will dereference when there are no mining threads yet. - Make hfa hotplug inherit some parameters from a previous instance if the serial number exists and is matching, avoiding dropping the clock on all devices.

- Per device last getwork won't work if the device stops asking for work. - Use the share_work_tdiff function in the driver watchdogs. - Provide a helper function for determining time between valid share and getwork per device. - Store last_getwork time on a per-device basis. - Limit the decrease of hfa clock rate on reset to the default clockrate. - Base the hfa failure time on the current expected hashrate instead of a static 15 seconds. - We shouldn't be trying to read from the hfa_send_shutdown function itself. - Reset the icarus failing flag only when a valid nonce is found. - Transferred value is corrupt on a NODEV error in usbutils. - Set each miner thread last valid work just before starting its hash loop in case there are delays at startup. - Only memcopy *transferred data in usbutils if we have received only success or a non-fatal error. - Increase to 25 nonce ranges on icarus fail detect. - Set icarus device fail time to be dependent on device speed to avoid falsely detecting failure on slower AMU devices. - Updated hf protocol header. - Updated BE hf protocol header. - Take into account shed cores on hfa devices when determining how many jobs to send. - Fix compilation error with two avalon types. - Fix missing A1 files from distribution. Version 4.0.0 - 21st February 2014 - Check for error from setfloatval - Halfdelay cannot be larger than 255. - Allow any arbitrary frequency to be specified for ANU devices and try to find the nearest frequency when initialising it, reporting if the frequency is not exactly as requested. - Only show system libusb warning when appropriate during configure. - Merge branch 'avalon2' of https://github.com/xiangfu/cgminer into xiangfu-avalon2 - Hfa cooling remains satisfactory down to a minimum fanspeed of 5% - Give a nodev error if we have already set nodev in hfa clear readbuf to avoid further usb comms attempts. - Fix missing include - Move bitmine options to alphabetic positioning. - bab - missed a few 'DEAD's in last commit - bab - use 'bad' instead of 'dead' as per the screen B: - bab - roll work if possible to reduce CPU - Update the per die hash clock data on a running reset on hfa devices. - Set the per die clock on hfa to the known starting base clock instead of our requested clock rate. - Hfa device failure can be detected within 15 seconds so we should try restarting it sooner to avoid tripping the device's own watchdog. - Check return result of hfa clear readbuf to minimise error messages on device failure. - Put MHz into cta statline description. - Send a work restart with every shutdown message to hfa devices to clear any work that might be stale on the next restart. - Store the hfa hash_clock rate and display it in the statline. - Store the maximum board temperature for hfa devices and take that into consideration when calculating the highest temperature as well as the dies. - A1: CoinCraft-Desk driver variant - Initial import of Bitmine.ch A1 SPI driver - klondike ensure stats type matches

- avalon, bab, drillbit, klondike use more screen space rather than truncating info - Add hashfast fanspeed% to statline display. - Move driver statline padding to cgminer.c, expanding width of maximum displayable statistics and window width to add more info. - Prune old stratum shares that we've seen no response for over 2 minutes to avoid memory leaks for pools that don't respond about some shares. - Add warning if system libusb is being added. - Only run ./configure with autogen.sh if extra parameters are passed to it. - Updated cointerra features. - Add le16toh defines for platforms that may be missing it. - Remove modminer bitstreams from distribution and replace with a README saying what file needs to be added if modminer build is still desired. - Use the simplelog function from usb_list() - Add a simplelog function that does not log date and time. - Use a unique usb_list function displaying only pertinent information when listing usb devices from the menu. - Abstract out the _in_use function to take different linked lists. - Break out of linked list loop in remove_in_use in case we've gone over the whole list. - Check for hfa invalid hash clockrate after other error messages. - Detect non-responsive icarus devices and attempt a usb reset before killing them after 2 minutes of no hashes. - Detect non-responsive bitfury devices and try a usb reset on them before killing their instances off after 2 minutes of no activity. - Allow hotplug interval to be changed from the USB menu. - Prevent recursive loop in __is_in_use linked list walking. - Add the ability to whitelist previously blacklisted usb devices from the menu. - Use a bool in struct cgpu to know when a usb device has been blacklisted, avoiding blacklisting it more than once. - bab - ensure disabled chips are counted in the screen dead chip counter - bab - only disable the chip once ... - bab - short work list skip disabled chips - api.c avoid incorrect gcc warning - cgminer -h crash fix - Add blacklisting as an option to the USB menu. - Add a mechanism to blacklist a usb device from its cgpu. - Add an option to the USB menu to list all known devices. - Add an option to send a USB reset via the USB menu. - Add a usb_reset by cgpu function to usbutils. - Add warning for attempting to unplug a usb device that is already removed. - Add USB Unplug option to USB management device management menu. - Add enable and disable USB device functions to the menu. - Add a [U]SB menu item, initially with just statistics per device, adding device number to the device status window display. - Reuse the cgpu temp entry for avalon and bitfury devices, changing avalon to a damped value. - Store the cointerra maximum temperature in the cgpu struct as an exponentially changing value based on the maximum temperature. - Reuse the cgpu->temp entry for max temperature in hfa driver. - bab - disable chips that return only bad results - Add driver for cointerra devices. - Add Avalon2 (2U size machine) support - miner.php - define a default rigport (that can be changed) and don't require a port number in the rigs array - miner.php allow links for rig buttons in tables and allow using the 4th IP octet if no rig name - default disabled for both - format fix and bad variable usage fix for --benchfile - Allow running cgminer in benchmark mode with a work file --benchfile - ANU frequency is in MHz, not hex.

- Remove bitfury devices from the usb list on shutdown in case they have stopped responding but have not had a fatal usb error. Version 3.12.3 - 8th February 2014 - Put the hashfast temperature into the cgpu structure so that it shows up in the devs API call. - We shouldn't block on no work situations directly from the getwork scheduler itself. - Revert "Make the pthread cond wait in the getwork scheduler a timed wait in case we miss a wakeup." Version 3.12.2 - 8th February 2014 - Adjust antminer U1 timing according to command line frequency set, fixing the need for icarus timing on the command line. - Read pipe errors that don't clear are worth attempting to reset the usb. - Revert "Do away with usb resets entirely since we retry on both pipe and io errors now and they're of dubious value." - Make the pthread cond wait in the getwork scheduler a timed wait in case we miss a wakeup. Version 3.12.1 - 7th February 2014 - Document new features for antminer U1 and hfa devices. - Add support for ANU overclocking. - Increase hfa fanspeed by more if we're rising in temp above the target than if the temp is staying the same. - Add debug output when get_work() is blocked for an extended period and add grace time to the device's last valid work to prevent false positives for device failure. - Issue a shutdown prior to a reset command for hfa devices and lock access to reads awaiting the response if the device is already running. - Do not register as successful a hfa init sequence that reports the clockrate as zero. - Show device info in noffset nonce share above target message. - Widen lines in top menu to fit extra large share values. - Only show one decimal place if pool diff is not an integer. - Show serial number as a hex value in hfa verbose startup. - Slowly remove work even if it's not being used to keep the getwork counter incrementing even if work is not used and as a test that pools are still working. - Increase the maximum diff between hfa dies to 100Mhz. - Show which hfa die is bringing down all the others when decreasing all the clock speeds. - Increase the decrease when temp has increased more and we want to decrease it on hfa. - Give device info with share above target message. - Allow throttling of hfa dies more frequently and increasing of speeds less frequently. - Wait after sending a hfa shutdown to allow the device to properly shut down before possibly sending it more commands. - Minimise the die clock differences in hfa to no more than 50Mhz. - Check for when errno is set on windows as well as the windows variant for errors. - Revert "Update to libusb-1.0.18" - Disable fan/die clock control in hfa if the firmware does not support it, with

notification. - Add ability to enter ANU frequency as a multiple of 25 from 150-500. - Decrease hfa clock by 10 if a reset is attempted due to the device remaining idle. - ifdef out icarus options unused without icarus built in. - Reorder command line options alphabetically. - Add no matching work to hfa API output. - Change various logging message levels in the hfa driver. - Only adjust clocks if there is no restart in hfa to avoid 2 restarts back to back. - Ensure we iterate over all dies adjusting temperate for hfa by starting iterating after the last die modified. - Clamp initial hfa fanspeed to min/max if passed as parameters. - Allow hfa fanspeed to be set via command line. - Further relax the target temperatures on hfa driver, targetting 88 degrees. - Try one more time to get the hfa header on init since it can take 2 seconds for all 3 boards on a sierra. - Update authors for removal of gpu/scrypt. - Wait for 5 temperature updates in hfa before adjusting fanspeed. - Have some leeway before starting to throttle hfa dies. - Use increments of 10 when increasing hfa clock since it may not have 5 MHz granularity internally. - Only perform a hfa fan speed update if we have new temps to work with. - Correctly measure the hfa max temp and smooth out the changes in its value. - Choose better defaults for min/max/default fan settings for hfa driver. - bab - reduce def speed, fix speed staying in ranges and report bank/chips in ioctl() errors - bab - add info about number of boards/chips to each Dead Chain - These may not be longs (eg: OSX)... fo a safe cast to ensure. - bab - add dead boards and dead chains to stats - Add fanspeed to hfa api output and set initial fanspeed to 10% - Add hfa fanspeed control to try and maintain a target temperature. - API-README correct new text format documentation - API allow multiple commands/replies in one request - Add op commands necessary to control hfa fanspeeds. - Add OP_FAN to hf protocol header. - Always show the stratum share lag time in debug mode. - Add stratum share response lag time to verbose output if it's greater than 1 second. - Add stratum share submission lag time to verbose information if it's over 1 second. - Check for more interrupted conditions in util.c and handle them gracefully. - Send a ping to hfa devices if nothing is sent for over 5 seconds. - Add OP_PING to hfa commands - Display the hfa serial number as a hexadecimal value. - Add the ability to display a hexadecimal 32 bit unsigned integer to the API. - Limit all hfa restarts for temperature control to no closer than 15 seconds apart. - Allow the hfa temp target to be disabled by setting it to zero. - Handle interruptions to various select calls in util.c - Add sanity check for silly overflows in hfa die temperature readings. - Add per-die throttling control for hfa driver based on each die's temperature, issuing a suitable reset to maintain the temperature below a configurable target temperature. - Update hf protocol - Do not memcpy in usbutils unless data was transferred. - Send a full allotment of jobs to the hfa device after a restart instead of reading the status. - Export the flush_queue function for use by drivers. - Remove wrong goto

- Remove the unqueued work reference when we discard work from get queued as well. - Wake the global work scheduler when we remove a work item from the unqueued work pointer. - Discard work that is stale in the get_queued() function, returning NULL instead. - Add a call to a driver specific zero stats function when zero stats is called to allow each driver to reset its own stats as well if desired. Version 3.12.0 - 29th January 2014 - Add support for AntminerU1 devices with the icarus driver. - Add antminer U1 to comment in udev rules. - Do away with usb resets entirely since we retry on both pipe and io errors now and they're of dubious value. - Retry on usb IO errors instead of faking success. - Check that we've cleared the pipe error after a clear request, not the err value which is unchanged. - Update to libusb-1.0.18 - Change hfa overheat limit to 90 degrees. - Relax timeout in hf get header to 500ms to match the usb timeout. - Minion - check/clear interrupts for all chips - Set info work to null after it is freed in nf1 after a restart to prevent double free later. - The second_run bool in libbitfury should be per device. Microoptimise its and job_switched usage, removing the unused results array for NF1 devices. - Fix displayed diff when solo mining at >2^32 diff. - bab - stop stale work accumulating - bab - set the default SPI speed back to 96000 Version 3.11.0 - 25th January 2014 - Add hashfast documentation to ASIC README - Support the variable HFA naming throughout the driver notices. - Set the global hfa hash clock rate to equal the lowest if we are lowering it for a device reset since it may be re-hotplugged after failing reset. - Decrease the hfa clock rate if it is overclocked and we have had to try resetting it. - Put a sanity check on the measured temperature in the hfa driver for obviously wrong values. - Avoid calling applog from within hfa statline before to avoid a deadlock. - Add throttling control to hfa driver, configurable at command line, nominally set to 85 degrees. - Reset hfa device if no valid hashes are seen for 1 minute from the last work. - Store when the last getwork was retrieved and display it in the API summary. - bab - also report dead chip count screen - Count share based hashes in the hfa driver with the device diff to get more frequent updates. - Only count 2/3 of the accumulated hashes on each pass through the hfa scan work loop to smooth out displayed hashrate. - bab add total history HW% to API stats - Test valid nonces in the hashfast driver allowing us to check against the target when trying to submit them. - No point casting a double to a uint64 - Convert the hfa hashmeter to one based on successful share return and display the raw and calculated hash totals in the API. - bab - remove libbitfury dependency since it requires USB - Add description to hfa hash clock command.

- Add hfa board temperatures to API output. - Wait for up to 0.5 seconds in the hashfast scanwork loop if no jobs are required. - Label HFA devices as B or S when their configuration matches babyjet or sierra. - Fix libbitfury being compiled in always by mistake. - bab - spelling - Add bab-options - bab - tune the chip speed based on error rates - bab record/report spie and miso errors - Win32 falsely comes up as big endian pulling in the wrong hf protocol header. - Remove unused components in hashfast driver. - Check in all usb communication places for hashfast driver that the device still exists. - Do not send a usb reset on a usb read pipe error. - Don't replace usb pipe errors with the pipe reset return code. - Updated hf protocol header. - The search for extra nonce is not worth performing in the hashfast driver. - Add core address to hfa parse nonce debugging. - Retry sending a frame once if it has failed in hfa_send_frame - Add extra hfa usb init errors. - Quiet now unused variable warning in hfa detect. - Remove unused variable. - Add board temperature to hfa debug - Make submit_tested_work return a bool about whether it meets the work target or not. - Provide a helper function for determining dev runtime and use it in the hashmeters used. - Look for hfa usb init header for 2 seconds, then resend the init twice more before failing. - Really only set up the hfa crc table once. - Generically increase the queue if we are mining on a pool without local work generation each time we run out of work. - Change new block detection message since longpoll is rarely relevant today. - Change the default clockspeed bits on nanofury devices to 50 and add a command line option to allow it to be changed. - Use unused line at the top of the log window which often gets stuck unchanging. - Clear pool work on a stratum reconnect message. - bab record/report spie and miso errors - bab - cleanup old work for dead chips also - bab add avg fail tests to API stats - bab report bank/board/chip for dead and v.slow chips - bab process all nonce replies per chip together - bab reduce work delays - bab record the number of E0s discarded - bab - modified result parsing - bab restore removed unused flag - configure - correct minion name - bab only scan valid nonce offsets - bab record continuous (and max) bad nonces - bab display Banks/Boards/Chips in the device window - Modify thread naming to make them easier to identify - bab reduce the work send delay - bab remove results polling - bab report SPI wait in seconds - bab report missing chips at start and API - bab ensure there's enough space for the nonce reply - bab correct stats 'Send Max' - bab allow long enough wait on ioctl() per board

bab more I/O stats api.c 2014 api allow any size stats data bab add processed links which excludes expired links skipped bab report chips per bank, hw% and ghs per chip bab lock access to new_nonces to ensure correct reporting bab report V2 banks/boards during initialisation bab expire chip work bab use only k_lists and make work handling more refined klist - allow adding to tail bab remove old unused #define bab correct for master git correct klist reallocs klist lists for bab api.c correct DEVICECODE and ordering Maxchips should be 384 (16 chips/board 24 boards/controller) bab more detailed stats and delay less when waiting for a buffer api add data type AVG float 3 decimal bab - add V2 detect with bug fix in detect api.c set the actual version number to 3.0 API V3.0 unlimited socket reply size README update --usb Check for loss of device in usb read before any other code on the usbdev Change stratum strings under stratum_lock in reconnect and free old strings. Add mcp2210 compilation to want_libbitfury configs. Fix HF driver typo.

Version 3.10.0 - 9th January 2014 - Set the mcp2210 transfer setting only when it changes. - Buffer sizes in nanofury device data are unnecessarily large. - Only perform spi reset on init, not with each transaction. - Remove spi_detect_bitfury at nanofury startup and fix incorrect refresh time. - Use a simple serialised work model for nanofury - Use bitfury_checkresults to avoid hashing results twice in nanofury. - Export bitfury_checkresults in libbitfury - Pass extra parameters for later use in libbitfury_sendHashData - Avoid double handling bswap of the nonce value in nanofury - Avoid unnecessary rehashing in nanofury nonce checking. - Remove the unused portions of atrvec in the nanofury driver - Age work in nf1_scan to avoid risk of losing a work item and leaking memory. - bitfury_work_to_payload is double handling the data unnecessarily - Default bitrate on nanofury should be 200kHz - localvec should be only 80 bytes not 80 words - Wrong init value for nanofury - Remove unused rehash values from nanofury driver. - Only update info work in nanofury driver when it's empty. - Fill the appropriate type of usb transfer when we know if it's an interrupt transfer instead of a bulk one. - Use the internal knowledge of the usb epinfo to determine whether we should be doing an interrupt instead of a bulk transfer, and do not send a ZLP if so, and limit read transfer to expected size automatically. - Avoid bin2hex memleak when we start getting nanofury nonces - Set atrvec only once and use a local array for each device's work. - Cancel any spi transfers on nf1 close - Add bitfury detection loop to nanofury startup - Move spi init code to libbitfury - Remove inappropriate extra config reg in nanofury setup. - Status 0x30 should never happen with spi transfers.

- Fix spi transfer data size transmission mistakes. - Minor correctness change in spi_add_data - spi_txrx should always send and receive the same size message - Random libbitfury changes. - Set value of gpio pins to low on closing nanofury. - Fix more init sequence for nanofury. - Add basic initialisation for nf1 devices - Add basic nf1_scan function. - Basic import of libbitfury functions from nanofury branch - Import functions from nanofury fork for libbitfury - Meter out spi sends to only 2 bytes at a time, offsetting according to how much data returns. - Use the usb read limit function for mcp2210 reads. - Provide a way for usb reads to just read the size asked for with a limit bool. - Get pin value after an nf1 spi reset. - Make sure what we send in the buffer doesn't change during spi reset for nanofury - Remove all standalone gpio setting change functions in mcp2210 and just use the one global setting function. - Set gpio values in the one function with all values for nanofury. - Provide a helper function for setting all mcp2210 gpio settings. - Add a helper function for getting all mcp2210 gpio settings. - Set all pin designations and directions in one call for nanofury and don't bother storing their values in the info struct. - Provide helper functions for setting all pins and dirs on mcp2210 - Set all nanofury pin designations in one call - Provide a helper function for setting all pin designations on mcp2210 - Store the spi settings in a struct for nanofury devices. - Check the received status in mcp2210 spi transfers and repeat a zero byte send if it's in progress. - Set the bytes per spi transfer prior to each mcp2210 transfer. - Separate out the send and receive functions for mcp2210 and check response value in return. - Check that mcp2210 spi settings have taken and check the value of the pin during nanofury setup. - Don't set GPIO pin designations after initial setting in nanofury since the direction and values will be changed. - Provide an mcp 2210 set gpio input helper function that sets a pin to gpio and input. - Move the set gpio output function to a generic mcp2210 version from nanofury which also sets the pin to gpio. - Implement a nanofury txrx with a larger buffer and cycling over data too large to send. - Implement magic spi reset sequence for nanofury. - Add more spi magic to the nanofury init sequence. - Add lots of magic spi initialisation to nanofury. - Export reused components of bitfury management into a libbitfury and use for bab and bitfury drivers. - More init sequence for nanofury and implement a close function that sets all pins to input. - Reword offset header handling in hfa_get_header - Sanity check in hfa_get_header - Add more checks in hashfast driver for lost devices. - Change spimode and send more data in nanofury setup. - Add basic setup comms to nanofury. - Implement an mcp2210 spi transfer function. - Set the initial spi settings for nanofury driver. - Provide a helper function for gettings mcp2210 spi settings. - Implement an mcp2210 set spi transfer settings function. - Cancel any SPI transfers in progress in nanofury after initial setup.

- Implement an mcp2210 spi cancel function. - Return only binary values for mcp2210 GPIO values. - Set GPIO LED and power to high in nanofury driver. - Implement initial part of nanofury init sequence for GPIO pin settings and add output debugging of set values. - Add helper functions for getting and setting mcp2210 gpio pin designations. - Don't return an error in usb read if we've managed to get the whole read length we've asked for. - Use correct endpoint order for nanofury devices and read with a short timeout on return loop from send_recv. - Add mcp2210 helper functions for getting and setting one GPIO pin val and direction. - Create a generic gpio pin struct and add helpers for mcp get pin val and dirs. - Check the receive msg of a send/receive cycle on mcp2210 matches the send message. - Add a set of usb commands to the usbutils defines for mcp2210 comms, and use the same command name for send and receive. - Create a generic mcp2210 send_rcv function. - Include mcp header for bitfury and fix extra params in macro. - Add basic SPI comms defines for mcp2210 and build rules for bitfury. - Minion set some core defaults similar to final requirements - minion compile warnings - move driver-minion.c to main directory - Minion with ioctl() stats, settings to attempt to emulate 21TH/s - minion driver with results interrupt working - tested working driver-minion.c without interrupts - Working driver-minion.c v0.1 - driver-minion.c compilable untested - minion driver - incomplete - Add minion driver into cgminer - Add basic device detection and updated udev rules for nanofury devices. - Remove GPU from share logging example. - Don't keep resetting BXF clockspeed to default. - If no pools are active on startup wait 60s before trying to reconnect since we likely have the wrong credentials rather than all the pools being out. - Discard bad crc packets for hashfast driver instead of trying to process them. - Update documentation for modified avalon options syntax and document relevant 55nm details. - Modify the auto tuning sequence to work with the 50MHz changes required to work with 55nm Avalon. - 55nm avalon requires the delays between writes reinstated for stability. - Use an equation instead of a lookup table to set the frequency for 55nm avalon allowing arbitrary values to be used. - Make the result return rate low detection on avalon less trigger happy. - Always send the bxf device a clockspeed after parsing the temperature in case the device has changed the clockspeed itself without notification. - Fix BXF being inappropriately dependent on drillbit. Version 3.9.0 - 23rd December 2013 drillbit asic - enable in api.c Fix trivial warnings in knc driver. Reinstate work utility based hashmeter for knc. drillbit format %z not valid on windows drillbit more formatting changes usbutils remove old code added back Memset the spi tx buffer under lock in knc driver. drillbit fix temp display to fit in standard space Drillbit formatting

- drillbit - use one drvlog and display dname before add_cgpu - Keep orginal naming for the bitfury driver - knc: Bugfix - good shares wrongly reported as HW errors. Root cause of the problem: several work items were assigned the same work_id in the active works queue of the knc driver. Thus when good nonce report arrived from the FPGA, wrong work item was picked up from the queue, and submit_nonce evaluated that as an error. Fix: Limit the work_id counter update rate. Update it only to the number of works actually consumed by the FPGA, not to the number of works send. - Store per-chip submit information for bxf device and show them in the API. - Check for removed bxf devices before trying to update work or send messages. - api.c no decref if not json - Minimise risk of nonce2 overflow with small nonce2 lengths by always encoding the work little endian, and increasing the maximum size of nonce2 to 8 bytes. - Change default hashfast timeout to 500ms. - Ensure we can look up the work item in the hashfast driver or print out an error if we don't. - Drillbit source formatting - reindent and retabify - Add ASIC count, temperature status to drillbit API output (closes #1) - Many warning fixes - knc: Do not include variable "last minute" data into the "last hour" per-core stats - knc: Make per-core statistics available through API - Implement command line control of the bxf target temperature. - Add a simple PID-like controller to bi*fury devices to dynamically alter the clock setting to maintain a nominal target temperature set to 82 degrees. - Add data to BXF API output. - Add support for newer protocol bi*fury commands job, clock and hwerror, setting clock to default 54 value, turning parsing into a compact macro. - Look for the thermal overload flag in the gwq status message in the hashfast driver and send it a shutdown followed by an attempted reset. - Log message fixups - Fix for "Timing out unresponsive ASIC" for pools which send early reconnect requests, and then take a short time to send work (ie BTCGuild) - Shorten initial config line, win32/pdcurses doesn't like long lines during early logging - Pull back the very long timeouts set in fe478953cf50 - Fix bug where work restart during results scan could lead to bad device state - Align device status lines same regardless of number of temp status or >10 ASICs - Tag log lines from brand new devices as DRB-1 until they are initialised - Tag log lines as 'DRB0' rather than 'DRB 0', same as other places in cgminer - Print a summary of the device settings at level NOTICE during initialisation - Allow chosing device settings based on 'short' product names shown in status line - Allow per-device settings to use "DRBnn" as an identifier instead - Issue an ASIC restart during a work_restart, removes spurious timeout messages from ASICs and probably some rejected shares - Check all results against all work instead of just taking the first match (avoids some rejected submissions to the pool, ASIC can produce multiple candidate results.) - Fix memory leak caused by unnecesarily copied work - Fix bug with find_settings not returning default value - Set timeouts on write, set very long timeouts - Merge drillbit driver Version 3.8.5 - 10th December 2013 - Increase the BFLSC overtemp to 75 for fanspeed to maximum.

- Set bflsc cutoff temperature to 85 degrees and throttle 3 degrees below the cutoff temperature. - Only set LIBUSB_TRANSFER_ADD_ZERO_PACKET for libusb versions we know include support for. - Provide a helper function that can reset cgsems to zero. - Add to cgminer_CPPFLAGS instead of redefining them. - Attempt a libusb reset device on usb devices that have stopped responding. - Replace deprecated use of INCLUDES with _CPPFLAGS. - Remove more unused GPU code. - Attempt USB device resets on usb read/write errors that will normally cause the device to drop out. - Quieten down jansson component of build. - Cache the bool value for usb1.1 in _usb_write - Initialise usb locks within usbutils.c instead of exporting them. - Imitate a transaction translator for all usb1.1 device writes to compensate for variable quality hubs and operating system support. - Rationalise variables passed to usb_bulk_transfer. - Unlink files opened as semaphores on releasing them. - Remove user configuration flag from pll bypass enabling in hashfast driver. - Provide an hfa-dfu-boot option for resetting hashfast devices for reprogramming. - Fixed one byte stack overflow in mcast recvfrom. - Having changed C_MAX means we don't calloc enough for usb stats, off by one. - Don't free the info struct on hashfast shutdown since it's still accessed after a device is removed. Version 3.8.4 - 1st December 2013 - Deprecate the usb usecps function and just split up transfers equal to the maxpacketsize on usb1.1 devices. - Retry sending after successfully clearing a pipe error. - Drop logging of timeout overrun message to verbose level. - Use a much longer callback timeout for USB writes on windows only as a last resort since cancellations work so poorly. - Use vcc2 in bflsc voltage displayed. - Increment per core errors on false nonces in bflsc and add per core statistics to api stats, removing debugging. - Store a per-core nonce and hw error count for bflsc. - Fix json parsing in api.c - Add debugging to hfa driver for how many jobs are being sent. - Shut down the hfa read thread if the device disappears. - Add debug output saying what frame command is being sent in hfa driver. - Revert "Disable USB stats which were not meant to be enabled by default and add extra memory for a memory error when stats are enabled." - Reset work restart flag in hfa driver since we may check for it again in restart_wait. - Add more op usb init errors for hfa driver. - Perform basic displaying of hfa notices received. - Add hfa op usb notice macros. - Update hf protocol header. - Use sync usb transfers in lowmem mode. - Go back to allowing timeout errors on USB writes to be passed back to the driver without removing the device in case the driver wishes to manage them. - Initialise more values for the hfa data structures. - A USB control error must be < 0 - Simplify USB NODEV error checking to success only for writes and control transfers, and success and timeout for reads. - libusb error IO should be fatal as well if it gets through usb read and write. - Allow IO errors in usb reads/writes to be ignored up to retry max times.

- Use correct padding for bxf temperature display. - Initialise devices before attempting to connect to pools to allow their thread prepare function to be called before having to connect to pools. - Add hidden hfa options to set hash clock, group ntime roll and pll bypass, fixing frame sent on reset to include extra data. - Relax the timeouts for the slower usb devices on linux. - Add big endian hf protocol header to Makefile - Check for correct big endian macro in hf_protocol - Use an absolute timeout in hfa_get_header to cope with buffered usb reads returning instantly confusing the 200ms counter. - Update hfa_detect_one to use the new detect function API. Version 3.8.3 - 23rd November 2013 - Set the bitfury device start times from when we first get valid work. - Fix stack corruption of zeroing too much in bf1 driver. - Make usb_detect return the cgpu associated with it to check if it succeeds to decide on whether to increment the device count or not. - Set tv work start time for bxf driver. - Age the bxf work items over 90 seconds, not the bf1 work items. - Zero the read buffer in _usb_read to avoid stale data and only use stack memory instead of using the bulkbuf since it is only used in _usb_read. - Leave room for temperatures above 100 degrees and pad consistently for bxf statline. - Drop json stratum auth failed message log level to verbose. - Change the processed value not the bufsiz in response to an end of message marker. - Don't lose data beyond the end of message in a usb read. - Silence irrelevant warning. - Only check strlen on end if end exists. - Simplify the end of message detection in _usb_read and allow it to return without doing another read if the message is already in the buffer. - Increase work ageing time to 90 seconds for bxf driver to account for firmware changes. - Use the age_queued_work function in the bitfury driver. - Provide a function to discard queued work based on age. - The json_val in api.c is a borrowed reference, not a new one so don't decref it. - Decrement json references in api.c to not leak memory. - line 2913 added urlencode - With reliable writes to the avalon there is no need for the sleep delays between writes. - There is no need to limit usb write transfers to maxpacketsize and it's harmful for large transfers on slow devices such as wrt routers. - Disable USB stats which were not meant to be enabled by default and add extra memory for a memory error when stats are enabled. - Set limit and count to integers to not overflow during failed hotplug attempts and then not trying again. - Update api example compilation instructions. Version 3.8.2 - 16th November 2013 - Add more verbose documentation to the readme files for windows users. - Add more information on libusb failure to init telling users to check README file. - Add information on unloading cdc drivers on osx to README - Prevent a deadlock with use of restart_threads by spawning a thread to send the driver flush work messages.

- Set priority of various threads if possible. - Add bxf data to api output. - Do not hold the mining thread lock in restart_threads when calling the driver flush work commands. - Send extra work regularly to the bxf device and parse the needwork command by sending the amount of work it requests. - Allow messages to have arbitrary offsets in the bxf parser in case we have lingering buffered data. - Send the maxroll command to the bxf driver and store the value to see if we need to update it. - Add sending of flush command to bxf on flush_work - Add flush and version commands to bxf start up, flush buffer and try to parse version response string. - Abstract out bxf recv message. - Add extra bxf commands to usbutils - Abstract out bxf send message to allow us to easily add extra commands. - Don't run device restart code if the device is not enabled. - Expand size of bitfury statline - Various driver fixes for bitfury devices, including a flag from when first valid work appears. - Look up work results in bxf driver from correct variable. - Correct incorrect error code in bxf driver for usb writes and add debugging. - Add bxf details to usbutils. - Implement a statline showing temperature for bxf - Add api data for bxf device, sharing the hashrate function with bf1. - Count no matching work as a hw error on bxf - Add BXF to udev rules. - Work id should be hexadecimal in bxf messages. - Add unrecognised string debugging to bxf driver. - Implement the main scanloop for bxf, trying to prevent it from ntime rolling work if the work protocol does not allow it. - Parse bxf work submits fully, submitting the results. - Provide a function for setting the work ntime. - Implement a skeleton parse bxf submit function. - Use the bxf read thread to set the device target and send its first work item. - Implement a bxf send work function and set update and restart functions to sending new work since that's the equivalent for that device. - Add temperature parsing to bxf driver - Create and destroy a basic bxf read thread. - Remove the buffer from bitfury info since it is only used on one pass in the bf1 device. - Add a rudimentary bxf detect one function. - Rename all bf1 specific functions in the bitfury driver, using a switch to choose correct function. - Rename bitfury_getinfo to bf1_getinfo since it's unique to bf1 devices. - Separate out the bf1 reset from bitfury reset. - Store the bitfury identity in the info struct. - BaB - updated tested OS comment - Uniquely identify the BF1 and BXF bitfury devices. - Remove the default libusb WinUsb pipe policies that don't suit us. - Only set the winusb pipe policy if it doesn't match our requirements instead of every transfer. - klondike - dont try to flush if not initialised - api.c trylock() add missing locklock - Use our new zero length packet support directly in windows. - Enable support for zero length packet on windows and auto clear pipe stalls. - util.c: Decreasing reference count on allocated JSON obects to prevent memory leak - api.c: Release apisock on error in api() - api.c: Release io_data->ptr when releasing io_data in io_free()

- We can't connect to a GBT pool at all with fix protocol enabled. - Initialise the stgd lock mutex earlier to prevent dereferences when pool testing occurs before it. - Klondike support I2C USB layout also - as KLI - Return error codes in avalon_read() if they're not timeouts. - Break out of the avalon idle loop if we get a send error. - Set avalon ftdi latency to just less than the time it would take to fill the ftdi buffer at 115200 baud - Update example.conf - Only limit packetsize on usb out writes. - We must chop up every 64 bytes returned on an ftdi chip, not just the first 2 bytes so revert to parsing the data internally in the avalon instead of using usbutils' simple ftdi parser. - Only retry 3 times in hfa_reset. - Only add_cgpu in hashfast driver once we have a real driver set up. - Clean up properly if hfa_detect_common fails in the hashfast driver. - --shares should be scaled to diff1 not absolute number of shares Version 3.8.1 - 11th November 2013 - Revert "Send a zero length packet at the end of every usb transfer on windows in case libusb internally has batched them into one maxpacket sized." Version 3.8.0 - 10th November 2013 - api update version to 2.0 and remove GPU form API-README -Remove now unused scrypt files. - api.c remove all GPU/gpu references and correct code as required - Rudimentary removal of GPU OpenCL and Scrypt features from api.c - Reorder configure alphabetically for devices to compile and fail if no support is selected to be compiled in. - BaB update/format some comments - BlackArrowBitfury early GPIO V1 driver - Fine tune the reading of results in bitfury driver to not lose any across work restarts or corrupt due to store results not parsed during restart. - Send a zero length packet at the end of every usb transfer on windows in case libusb internally has batched them into one maxpacket sized. - Framework for ntime rolling, keep looking for OP_USB_INIT replies when other packets received - Configure source for a new BaB driver - sha2 allow external access to some macros and the K array - Fixed a math issue when reporting fan speed on the status line. - Use the main hashlist to store work done in the bitfury driver and remove work from the list by time, thereby fixing the duplicates at startup. Count hardware errors for when no match occurs. - Add a get and queue helper work function. - Remove GPU mining code. - Use libusb's own zero length packet support unless we have to emulate it on windows since only libusb knows for sure if it's needed. - Unlock the avalon qlock while sending tasks to not hold the lock for an extended period. - Sleep in avalon send task on return to the function to allow other code to work during the sleep period. - Send zero length packets when terminating a usb write aligned to maxpacketsize. - Do the driver flush in avalon code lockless since it can lead to deadlocks. - Reset the work_restart bool after the scanwork loop in case the driver flushes work synchronously.

- Only check for the stratum clean message if we have had a valid message. - Get rid of the stage thread since all work can be asynchronously added now via hash_push anyway. - Remove the now incorrect faq entry regarding scrypt difficulty. - Check for fatal read errors and break out of the read loop in avalon. - Send errors are basically fatal in avalon driver so break out of the send tasks loop. - Make the avalon driver return -1 for hash count when usb fails, allowing the main loop code to send it the shutdown flag. - Break out of the hash work loops when a failure is detected instead of dropping into mt disable. - Use usbutils' own ftdi parser for avalon and the ftdir's own latency for managing timeouts since we can wait on reads with completely asynchronous reads+writes. - Use usbutils' own cps function for slowing rate of usb writes on avalon. - Fix build for no libcurl - Check length before submitting sync transfers Version 3.7.2 - 5th November 2013 - Clean up completely on avalon shutdown. - Use cgsem timed waits in avalon driver to not miss any queued wake ups to account for async messages coming during a flush work. - Statline before is too long on icarus that doesn't have monitoring. - Different windows+usb combinations respond with varying levels of reliability wrt timeouts so use a nominal extra 40ms before cancelling transfers that fail to time out on their own. - Do all hotplug_process under the write mining_thr_lock - Fix for opt_worktime on big endian machines. - Correct set_blockdiff for big endian machines. - Make sure cgpu exists in the restart threads loop in cases of hotplug etc. - Treat usb write timeout errors as unrecoverable. - Transfer errors are filtered out in usbutils now so no need to look for them in NODEV checks. - Remove now unused entries from struct cg_usb_device - Do not double up with checking for end of timeout measurements in usb read/write. - Do get_work in fill_queue without holding other locks. - Initialise usb after all the locks and conditionals are initialised. - Use only a trylock in flush queue to prevent deadlocks. - Add a wr_trylock wrapper for pthread rw lock write trylock. - Scale diff for scrypt when testing for block solves. - Fix for non curses build. Version 3.7.0 - 4th November 2013 - Use WRITEIOERR macro check for all usb writes. - Always use a usb read buffer instead of having to explicitly enable it. - Force unlocking of the console lock on restart to avoid corrupting the console state when we finally quit. - Never wait indefinitely for a pthread conditional in the hash_pop loop in case the work scheduler misses the last wakeup. - Make hash_pop signal the work scheduler each time it waits on the conditional that it should look for more work. - Discriminate between libusb transfer errors and regular libusb errors and make sure to capture them all. - Always read a full sized transfer for bulk reads. - Deprecate preferred packet size functions in usbutils since they're unhelpful.

- Copy known transferred amount back to buffer for usb reads instead of requested length. - Treat timeout errors on usb writes as IO errors. - Ignore iManufacturer from bitfury devices to support bluefury as well as redfury. - Add more debugging info for when usb details don't match. - Look for timeout overruns in usb read/write. - Use an int for usb_read/write to identify overruns. - Use the callback timeout as a safety mechanism only on windows. - Instead of using complicated sleeps to emulate characters per second on usb writes, submit only as many characters as can be transferred per usb poll of 1ms, and use timeouts in bulk transfers, cancelling transfers only as a failsafe. - Remove discarded work from quota used. - Display works completed in summary and API data. - Store how many work items are worked on per pool. - 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. - 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. - Update uthash to latest. - show_hash doesn't know the size of the string so hard code the max size. - Remove as many initial zeroes as exist on share display, abstracting out a hash show function to use across different submission mechanisms. - Add missing endian swap functions for 64bits. - Sanity check for absurd target setting and divide by zero. - Abstract out conversion of a 256 bit endian number to a double, correcting errors and use it for determining any magnitude share diff. - Avoid the extra generation of a byte flipped hash2 in struct work and directly use the LE work hash. - Add a sanity check to avoid divide by zero crashes in set_target - Calculate diff from target accurately for all 256 bits. - Set a true 256bit binary target based on any diff value in set_target() - Provide a copy_work_noffset function for copying a work struct but changing its ntime. - Make calls to flush queue and flush work asynchronous wrt to the main work loops. - Share is also above target for submit noffset nonce. - Use round for displaying current pool diff. - Use round for stratum share diff display instead of floor. - Use round instead of floor for displayed pool difficulty. - Allow arbitrary diffs to be tested against nonces via a test_nonce_diff function. - Abstract out the rebuilding of hash2 in work. - Share is above, not below target, when it doesn't meet it. - Add the ability to add uint8 and uint16 entities to api data. - Use a non blocking connect with a 1 second select timeout when initiating stratum to allow us to iterate over all IPs returned by getaddrinfo in round robin DNS pools. - Minor style changes to output. - Revert two different hash_sequence(_head)'s to one variable, use HF_SEQUENCE_DISTANCE in both places - Remove duplicate HF_SEQUENCE_DISTANCE() macro, and duplicate hash_sequence from info structure - Change SEQUENCE_DISTANCE() macro to HF_SEQUENCE_DISTANCE() - Structure changes for OP_NONCE, add big endian header - klondike - initialise stat_lock - klondike - better to unlock locks than to lock them twice :)

- Add copyright notice to knc driver. - Trivial style changes to knc driver. - Improve performance of work generation by optimizing hex2bin and bin2hex - klondike - change options to clock and temptarget only - klondike - fix another uninit dev warning - klondike - downgrade 'late update' but add an idle detect - and correct error levels - klondike - fix isc uninit warning - Use a mutex to protect data in the knc structure, to prevent loading more work during a flush, and unlock and return to main between calls to get_queued_work. - Use the existing device_data for knc state data. - Only count successful nonces as hashrate in the knc driver. - Fix trivial warnings in knc driver. - Add KNC to api - klondike - drop the device for hotplug if it's unresponsive - usbutils - usb_nodev() allow a driver to drop a device - klondike - single 'shutdown' and ensure it happens - klondike remove SCNu8 - unsupported on windows - Correctly calculate sleep_estimate in usbutils that may have been preventing usecps from working. - Use a sanity check on timeout on windows. - Better HW error count; disable permanently those cores which fail often - KnC driver: knc-spi-fpga ASIC driver - Fixup jansson & libusb include paths when using separate build directory - 'llround' is more suitable here than 'roundl' - Silence warning if MAX/MIN is already defined - Remove prebuild ccan/opt dependencies - Reinstate block solve testing. - Dramatically simplify the calculation of blockdiff. - Simplify the set_target function, allowing it to work properly for fractional diffs. - Merge hashfast driver - Merge KnC driver Version 3.6.6 - 26th October 2013 - Remove inappropriate extra locking in _usb_transfer_read Version 3.6.5 - 26th October 2013 - klondike - fix uninitialised dev bug - Adjust the binary ntime data in submit_noffset_nonce even when there is no hex ntime string for eg. gbt. - Put an entry into the work struct telling drivers how much they can roll the ntime themselves. - Only set libusb cancellable status if the transfer succeeds. - Remove the applog on miner threads dying to prevent deadlocks on exit. - Do one extra guaranteed libusb event handling before testing if there are any pending async usb transfers. - Use a linked list for all usb transfers instead of just cancellable ones. - Provide a mechanism for informing drivers of updated work templates for stratum and gbt mining. - Add cancellable transfers correctly to the ct_list - Check for presence of thr in icarus get nonce for startup nonce testing to work. - Use cancellable usb transfers in the icarus driver to avoid having to loop and poll when waiting for a response and to speed up work restart response time. - Add a usb_read_ii_timeout_cancellable wrapper

- Add usb transfer cancellation on shutdown and documentation regarding where cancellable transfers are suitable. - Use cancellable transfers on bitfury device. - Cancel cancellable usb transfers on work restart messages. - Don't bother having a separate cancellable transfer struct for usb transfers, simply include the list in the usb_transfer struct. - Add wrappers for usb_read_cancellable and usb_read_timeout_cancellable - Specifically set the cancellable state for it to not be uninitialised in the usb transfer struct. - Alter the usb cancellable list only under cgusb_fd_lock write lock. - Pass the cancellable option to _usb_read options to decide on whether to add usb transfers to the list of cancellable transfers. - Create a linked list of potentially cancellable usb transfers. - Don't attempt to disable curses or print a summary during an app restart to prevent deadlocks. - Keep the libusb event handle polling thread active until there are no async usb transfers in progress. - Keep a global counter of how many async usb transfers are in place. - Perform libusb_submit_transfer under the write variant of cgusb_fd_lock - klondike - error condition handling - Avoid entering static libusb directory if --with-system-libusb is enabled. - Minor opencl build corrections. - Enable dynamic linking against system libusb --with-system-libusb - Modify Makefile to only include opencl related code when configured in. - Convert opencl to need to be explicitly enabled during build with --enable-opencl - Implement a cglock_destroy function. - Implement a rwlock_destroy function. - Implement a mutex_destroy function. - Add usb command name to critical libusb error reporting. - Use windows' own higher resolution time and handlers allowing us to have higher precision absolute timeouts. - Fix lldiv error in windows cgminer_t calculation. - miner.php correct sort gen field names largest to smallest - api ... the code related to device elapsed - api add device elapsed since hotplug devices Elapsed is less than cgminer Elapsed - Drop usb buffering message to debug logging level. - Do the ntime binary modification to the work struct when submitting an ntime offset nonce within submit_noffset_nonce - Code cleanup and improved documentation - Improvements to support for BitBurner boards - Convert libusb transfer errors to regular libusb error messages to allow for accurate message reporting. Version 3.6.4 - 18th October 2013 - Fixing the memory leak for remaining semaphores means we can go back to using async transfers on other OSes with our own timeout management again. - Use the forcelog function on shutdown to cope with indeterminate console lock states due to killing of threads. - Add a forcelog variant of applog which invalidates any console lock to force output. - Send pthread_cancel to failed completion_timeout that has timed out. - Simplify queued hashtable by storing unqueued work separately in a single pointer. - bflsc use getinfo chip parallelization if it is present - bflsc - fix brackets so [Chips] isn't always null - Remove unused variables.

- Use cgcompletion timeouts for the unreliable shutdown functions on kill_work. - Fix cgcompletion return code and free on successful completion. - Provide a cg_completion_timeout helper function for unreliable functions that takes arbitrary functions and parameters and reliably returns. - Perform sync transfers on shutdown to allow final transfers to complete. - Destroy cgsems used after transfers to not leave open files on osx. - klondike rewrite work control - allow __work_complete() access - miner.h allow devices to tv_stamp work Version 3.6.3 - 17th October 2013 - API add 'MHS %ds' to 'summary' - Optional lock tracking and stats via the API - Speed up polling repeat again in usb poll thread and handle async after the message to disable polling is complete. - Revert to using timeouts on !linux since libusb leaks memory without them. - Revert to libusb instead of libusbx Version 3.6.2 - 17th October 2013 - Remove unused components of jansson - Remove unused parts of libusb - Work around older libtoolize that fails without top ltmain.sh not being present during autogen - Fix open coded use of autoreconf in autogen - Update jansson to only build parts we require and suited to our build environment. - Initial import of jansson-2.5 - Prevent further USB transfers from occurring once the shutdown signal has been sent to prevent transfers getting stuck and libusb failing to shut down. - Make the USB polling thread poll every second to potentially aid longer timeout transfers. - Set device_diff on work in get_work to not be missed with drivers that use get_work directly. - Convert icarus driver to hash_driver_work model. - bflsc - also allow ' 0' in DEVICES IN CHAIN - bflsc - allow a 0 in DEVICES IN CHAIN - Add needed EXTRA_DIST for libusbx. - Update libusbx configure.ac changes. - Revert libusb Makefile changes from going to libusbx. - Fix trivial libusbx warnings. - Convert libusb-1.0.16-rc10 to libusbx-1.0.17 Version 3.6.1 - 14th October 2013 - Emulate the libusb_control_transfer sync setup in our async variant. - usbutils - make all libusb_error_name messages the same Version 3.6.0 - 14th October 2013 increasing max miners for avalon driver using separate identifier for bitburner fury boards changes to bitburner driver for bitburner fury boards hexstr is too small in test_work_current Windows uses errno for WSAETIMEDOUT

- Convert the usb callback function to using cgsem_t timed waits to avoid race conditions with conditionals/mutexes. - Give correct return code in cgsem_mswait - Check for correct timeout error in cgsem_mswait - Fix util.h exports for cgsem_mswait - Implement a generic cgsem_mswait similar to sem_timedwait - Use the one LIBUSB_ERROR_TIMEOUT for cancelled transactions since this error is explicitly tested for in various drivers. - Do not use locking on usb callback function pthread signalling to prevent deadlock with libusb's own event lock. - Use a write lock when performing any USB control transfers to prevent concurrent transfers. - Free a libusb transfer after we have finished using it to avoid a dereference in usb_control_transfer - Do not perform bfi int patching for opencl1.2 or later. - Although async transfers are meant to use heap memory, we never return before the transfer function has completed so stack memory will suffice for control transfers, fixing a memory leak in the process. - klondike - correct/reverse min/max stats - api incorrect message name - klondike - use a link list queue rather than a circular buffer - and add timing stats - Use a timeout with usb handle events set to a nominal 200ms and wait for the polling thread to shut down before deinitialising libusb. - Use stack memory for hex used in stratum share submissions. - Use stack memory in test_work_current, avoiding a malloc/free cycle each time. - Provide a lower level __bin2hex function that does not allocate memory itself. - Convert the bitfury driver to use the hash_driver_work version of hash_work. - Add a hash_driver_work function to allow for drivers that wish to do their own work queueing and management. - Convert all usb control transfers to asynchronous communication with our own timeout management as well. - Klondike - increase circular read buffer size - Klondike - extra zero value and range checking in temp conversion - klondike - display MHz also - Make pthread conditional timeouts handle all bulk usb transfer timeouts performing libusb_cancel_transfer, disabling timeouts within libusb itself. - Avoid calling get_statline_before on exit to avoid trying to use it on drivers in an indeterminate state. - Avoid calling get_statline on exit. - Add a small amount to the usb timeout before cancelling to allow for a regular usb polling interval to pass. - Do not attempt to clear a usb halt before sending the cancel message since all transfers should normally be cancelled before attempting to clear a halt condition, and only change the return message to a timeout if it's consistent with a cancellation. - Retry up to USB_RETRY_MAX times to clear a halt condition before failing. - Show the error number as well as the description in erroring bulk transfers. - Drop logging level for failed to connect to stratum to verbose mode only since we hit it regularly. - 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. - Use fractional hashrate return values in bitfury_scanhash to minimise the number of times we return 0 based on hashrate so far to further damp out displayed hashrate. - Check for presence of driver name in DRIVER_COUNT_FOUND to prevent strcmp on a null pointer when a driver is not built in. - CMR allow sending flash and clock commands - Kill off threads that have failed using hash_sole_work instead of just

disabling them. - Make the bf1 getinfo size a macro - Failing to add_cgpu in bitfury should be a terminal failure. - Check return values when attempting to open a BF1 device and set the msg size as a macro. - Display errors on failed usb read and write and consider sequential IO errors a permanent failure. - Use libusb's own error name function instead of hand coding the error names. - Limit ms_tdiff to 1 hour as a sanity check. - Enable the usb buffer in avalon driver. - Check for async transfer variants of error messages. - Remove unused variables. - 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. - Check a pool is stable for >5 mins before switching back to it. - Minimise the time between dropping the read devlock and grabbing the write devlock to avoid tons of logging spam in the interim. - Check for libusb transfer stall error to be consistent with async IO errors returned for a halt condition. - Check for continuous IO errors on USB and consider the device inactive if more than retry max. - 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. - Prevent overflows in us_tdiff and ms_tdiff. - Change second initialise message on bitfury verbose mode. - 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. - 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. - Typo in configure.ac - Remove unmaintained broken ztex driver. - Icarus - use a data structure for I/O rather than magic numbers - delete old tracked ccan/opt/*.o files - klondike correct cvtKlnToC() temperature calculation - klondike - correct 1st reply debug based on define - klondike - debug dump structured replies - klondike - avoid division by zero if maxcount is unexpectedly zero - klondike store and report errorcount and noise - klondike - fix chipstats api stats buffer overrun with 16 chips - klondike add new nonecount only once - klondike - report mh/s based on nonces found + put old estimate into API stats - klondike use a memcpy - klondike fix bracket tabs indenting - api.c missing Klondike from ASIC list - Klondike update code to current git - Add 2nd CMR to 01-cgminer.rules - Add Klondike to 01-cgminer.rules - Klondike to main directory - Klondike consistent code spacing - Klondike update driver code to current git - update firmware for 16 chips, add dist files - beta final 0.3.0 release - updated firmware, IOC method - prevent nonces when not state W - added driver config option support - fixes for 300 MHz, fix K1 parts list - update driver, docs

- update firmware & utils - updated cgminer driver for 3.3.1 - update firmware and driver, create new cgminer fork - update klondike driver - add cgminer driver file as-is - Add API output displaying USB cancellations. - Store statistics on how often we have to cancel async bulk transfers and add a debug message whenever we do. - Treat any unexpected timeouts waiting for async transfers as though there may be a usb halt condition and attempt to clear the halt before cancelling the tranfer. - Remove zero packet flag on usb as it's unsupported outside linux and unnecessary. - Fake the libusb transfer timed out message if we force cancel it with our own async functions. - Use asynchronous transfers for all bulk transfers, allowing us to use our own timers and cancelling transfers that take too long. - Add libusb error warning message when significant error occurs. - Icarus CMR2 detect FPGA setup - Disable bitfury device thread on it disappearing. Version 3.5.0 - 29th September 2013 - Add magic init sequence required on BF1 devices to get them mining on windows. - usbinfo.devlock is only ever write locked so convert it to a mutex - Icarus remove unneeded opt_debug tests due to applog being a macro - Icarus - CMR shouldn't wait the full timeout due to handle sharing - We should only yield once in cg_wunlock - Provide a function to downgrade a cglock from a write lock to an intermediate variant. - Deuglify use of _PARSE_COMMANDS macro expansions. - Deuglify use of usb parse commands macro in usbutils. - Use the driver add commands macros in api.c to avoid individually listing them. - Separate out asic fpga and opencl drivers in the driver parse commands macro for use individually as needed. - Use macro expansion in usb_find_devices to avoid explicitly listing them all. - Use macro expansion to iterate over all the drivers without explicitly writing them out in usbutils.c - Iterate over the bitfury offsets in order of decreasing likelihood. - Reattach the kernel driver on linux on usb_uninit. - Attach the kernel driver on failure to usb init on linux. - libusb kernel driver operations are only available on linux. - There is no need to get the external prototypes for drivers in cgminer.c any more. - Remove unnecessary gpu_threads initialisation. - Put avalon last in the sequence of adding drivers to prevent it trying to claim similar chip devices on startup. - 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. - Forward declare all device drivers in miner.h avoiding the need to export them everywhere else. - Add a noop function for driver detect when it's missing. - Reuse the DRIVER_ macros to avoid having yet another definition for DRV_ - Use macro expansion to generate extern device_drv prototypes. - Create a macro list of drivers to enable easier addition of further drivers. - There is no point setting the BF1 preferred packet size to the maximum since it will do so automatically.

- icarus ensure all cmr interfaces are initialised properly - usbutils - fix USBDEBUG warnings - Remove unnecessary steps in communicating with BF1 and just use USB interface 1. - usbutils - usb_bulk_transfer fix the buf/data fix - usb_bulk_transfer - use the allocated buffer - Set preferred packet sizes per interface on BF1. - usbutils allow PrefPacketSize per endpoint - Remove magic control sequences on open/close on BF1 and just flush the read buffers. - Check return codes in getinfo and reset and fail as needed in BF1. - Check return code for bitfury_open and release resources properly on failed initialisation. - Abstract out flushing of interrupt reads in BF1 devices. - Perform interrupt read after close message on BF1 as per serial close. - Perform interrupt read flush as per serial open on BF1 devices. - Add information for 2nd USB interface on BF1 devices and choose interface 1 for bulk transfers. - usbutils - bulk transfer copy test fix - usbutils - add USBDEBUG for usb_bulk_transfer - Add more read_ii variants to usbutils. - Name remainder of BFU usb commands used. - Use submit_tested_work in bitfury driver to avoid unnecessarily re-testing the work for validity. - Abstract out work submission once it's been tested, to be used by drivers that do their own internal validity testing. - Store the hash2 array in struct work for further reuse. - usbutils - which_intinfo not requried - Use the test_nonce function within submit_nonce and store the uint32 corresponding to hash2 37 for further use. - usbutils - interfaces must all be on one handle - ep implies the interface - avalon stats use exact type - Only set share diff if we've confirmed it's a share first. - Update ASIC-README for bitfury devices. - Use an array of offsets when checking nonces in bitfury_checkresults - Limit the duration we wait for reads in BF1 based on time already elapsed to account for other delays such as work restart messages or out of work. - Minimise size of serial string we copy in BF1 stats to avoid overflow. - Implement basic API stats for BF1 and increase array of results to check for the rare straggling result. - Space debug output for bf1 to separate from numerals. - Abstract out the bitfury open close and reset functions and use them on reinit. - Rename BF1 devices BF1 - Check for work restart, breaking out early after usb reads in BF1. - Do not lose the first sets of results from BF1. - There is no point checking for results from the next round of work on BF1. - Last result returned by BF1 is an end of results marker so ignore it. - restart_wait should return 0 if thr_restart is true. - Remove unused code by bitfury driver since current driver uses serialised scanhash. - Meter out return of estimated hashes in BF1 to smooth out visible hashrate. - Optimise inner scanhash loop for bf1. - Add yet another backup work for triple buffering of work in bf1 to account for extra late results returned and don't check nonce offsets which appear to never return. - Name the work request and result usb commands for BF1 - Define a mandatory upper limit to waiting for reset and data on BF1 based on full nonce duration. - Decrease usb buffering to verbose logging.

- Add in first draft for a serialised work model sending/receiving data for BF1 devices. - Add complete close sequence to bf1 as it happens on serial. - Provide a bitfury identify function for bf1. - Reliably extract BF1 information at startup and reset the device. - Add commands for getting BF1 bitfury info - Add magic BF1 bitfury open and close control sequences. - Add BF1 detection code to bitfury driver. - Create basic placeholders for bitfury driver code. - Add bf1 device information to usbutils to enable device detection. - Add basic defines for building for bitfury devices. - Add redfury device to udev rules. - avalon: display the FPGA controller version on API - pool_active uninitialised_var rolltime - Use macro expansion to only need to define usb enums and commands in one place. - usbutils saving incorrect overflow buffer - ignore libusb.la and *.lo on linux - icarus support CMR with no extensions - usbtils - interfaces dont work yet in libusb windows so disable for that only - Provide a --disable-libcurl config option to build support for stratum mining only. - Fix the api-example.c compile under Linux - usbutils - only release the device once - for the first intinfo - usbutils set_interface is no longer valid - ubsutils interfaces much each have their own handle - usbutils kernel_detach should use the interface number - usbutils - allow the driver to change which_intinfo - Reset quotas on load balance for all pools at the same time to avoid running out during selection and unintentionally dropping to fallback. - Break out of select pool from a common point for appropriate debug messages and to avoid further tests. - usbutils correct/reverse CMR product numbers - usbutils specifically track handles and interfaces - change drivers to use usb_interface() - required for multi interface change - usbutils - allow a device to use multiple interfaces (and better var names) - Cast -1 to (char) to cope with different default char types on ARM. Version 3.4.3 - 13th September 2013 - Put corefoundation and iokit separate in ldflags for darwin. - Add rules for libusb Makefile.am building on osx - Add flags for building libusb statically on osx. - Find the greatest common denominator in quotas and use the smallest number of consecutive work items per pool in quota load balance mode to smooth hashrate across pools with large quotas. Give excess quota to priority pool 0 instead of pool 0. - Avoid dynamically adding stack memory for nonce2 in the stratum send thread and check the pool's nonce2_len will not cause an overflow. - Add subdir-objects to automake options. - Use inet_addr instead of inet_network to fix windows build. - Remove unused pbase variable. - Add support for socks4/4a proxies with stratum, and drop back to socks4 support via the global --socks-proxy command to not break previous configurations. - Fix warning on mingw build. - Only show long-poll message in pool summary if it's not using stratum. - Increase the time for the waiting for work message to be given to be greater than that required for a pool swap in the scheduler which is set to 5s.

- Change message in status when using a balanced pool strategy to notify if there's a stratum pool as well. - Use the --failover-only flag to have special meaning in combination with load-balance mode to distribute any unused quota back to pool 0 to maintain ratios amongst other pools. - Display quota and allow it to be modified via the pool menu. - Add API commands and modify output to support pool quota displaying and changing. - Change message in status when using a balanced pool strategy to notify if there's a stratum pool as well. - Add quota support to configuration files. - Rotate pools on all failures to set a pool in select_pool. - Use quotas for load-balance pool strategy. - Provide a mechanism for setting a pool quota to be used by load-balance. - Use the --socks-proxy option with stratum, changing it to defaulting to socks5 and give appropriate message should it fail to connect. - Cope with trailing slashes in stratum urls. - Add more debugging messages when negotiating with proxies for stratum. - Test specifically for socks5h in socks support for stratum. - Add support for socks5 proxy with stratum - Provide support for negotiating a stratum connection via http proxies. - Connect to the proxy URL and port if specified for stratum sockets instead of the pool directly. - Extract any proxy url and port to be used by sockaddr if possible using extract_sockaddr. - Make extract_sockaddr set variables passed to it rather than pool struct members. - miner.php sort the mcast rigs so they are always in the same relative order - miner.php allow sending the muticast message multiple times - miner.php mcast ignore duplicate replies Version 3.4.2 - 3rd September 2013 take_queued_work_bymidstate should use a write lock. miner.php coding warning miner.php disable 'gen' by default miner.php allow formula generation of new fields miner.php add doctype miner.php remove incorrect echo miner.php optional error if not enough mcast rigs are found

Version 3.4.1 - 31st August 2013 - API mcast add a description option with miner.php - Always use a maxpacketsize buffer in usb_bulk_transfer - bflsc ensure getinfo cannot overflow it's storage buffer - Don't decref json values in stratum parsing due to memory corruption. - Use 64 bytes for all libusb control transfers. - Skip dissecting opt->names in parse_config if it doesn't exist. - Use an internal buffer in _usb_transfer_read in case the read is larger than the buffer passed to it. - ICA optional limit timing with short=N or long=N - Revert to old custom tolines function since strtok_r is not portable. - bflsc remove unused commented out code - logging - code mistake - logging - applogsiz() for large messages - Provide base structures for getaddrinfo. - Include string.h in bflsc driver.

- Get rid of linear removal of spaces in bflsc text parsing and use strstr throughout instead. - Use reentrant strtok in tolines() function in bflsc to avoid racing on contextless calls. - Show how small a too small result in bflsc is. - Duplicate the buffer in process_results in bflsc since strtok modifies it making debugging output limited to one line. - Only process nonces in bflsc if the breakdown function succeeds. - Ignore zero count messages in bflsc instead of trying to parse them. - Return ok in tolines when it doesn't match inprocess message for bflsc. - Remove inprocess line instead of deleting all following responses in bflsc. - Change ok testing logic in breakdown() in bflsc and return if not ok at any stage. - Check the return value of tolines in bflsc driver. - Use strtok to parse lines in bflsc driver. - Add libusb-1.0 m4 directory and gitignore file. - Properly convert from ranlib to lt_init in configure.ac - Make autoconf always build for libusb. - More autoconf fixes. - Unconditionally build jansson statically from the cgminer source tree. - Only test for all usb devices once in configure.ac - Fix various libusb warnings and possible bugs on linux build. - Add make clean and maintainer-clean to autogen - Remove examples from libusb Makefile and generated autoconf files. - Fix libusb subdirectory builds. - Remove cached files from libusb autoconf on running autogen.sh - Remove unused HAVE_LISBUSB macro and use USE_USBUTILS everywhere. - Use direct auto* files to avoid failure of autoreconf - Remove unused and maintainer cleaned files - Show RT_LIBS in ./configure output. - First import of libusb-1.0 - bflsc xlinkstr use snprintf - Fix win32 build. - Use take_queued_work_bymidstate in the bflsc driver to avoid the rare chance repeated results come back from the same work item. - Provide a funcion that looks up queued work by midstate and then removes it from the device hash database. - Fix no -rt library on darwin. - Update included jansson to v2.4 - Fix OSX build. - Provide an osx fix for cgtimers and a fallback to timevals for all other platforms !linux !win32 !osx. - Move two more timer functions out of define macros to enable them to be used by future osx code. - cgtimer_sub is now the same since cgtimer_t should be the same on all platforms. - miner.php fix missing global - Only count submitted nonces as diff1shares if they're valid. - Substantially raise the maximum avalon frequency for water-cooled, over-volted designs. - Compile MCast.java with an old java - API Multicast sample MCast.java+MCast.class - BTB show C/MHz/mV for device - api.c remove unused reply string - api.c fix mcast debug message bug - miner.php implement API Multicast handling to automatically find your local net miners - API mcast only reply to remote IP's that are allowed access - Initial API Multicast response v0.1 to find cgminer APIs - Use timespecs on windows as cgtimer_t to capitalise on the higher resolution

clock changes. - Abstract out the conversion of system time to an lldiv_t in decimicroseconds. - Use our own gettimeofday implementation on windows for it to be consistent across ming builds and higher resolution. Version 3.4.0 - 21st August 2013 - Use stack data for HW error% in avalon stats. - Add avalon HW error% to stats and only show BTB variables if avalon is a BTB. - Check for cnx_needed on each loop through wait_lp_current. - Return positive for cnx_needed when no_work is true. - Stratum is used more often so test for it first. - Reorder support names alphabetically. - Only display the no pool work message once if there are multiple waiters in hash_pop - Provide a message and set a bool when no work is available from any pools and when it resumes again. - We don't want to continue into the hash_pop function if the getq is frozen. - Only report threads in and out in queued work devices across a get work since the rest happens asynchronously and the get work is what the device might be waiting on. - Thread reportin and out can be static non inline. - usbutils cps sleep_estimate is not an underestimate - usbutils add cps stats estimates - Provide cgtimer_sub helper functions. - Provide cgtimer_to_ms helper functions. - Rename cgsleep_prepare_r as cgtimer_time to get time in cgtimer_t format and call cgsleep_prepare_r as a macro for cgtimer_time - Use the reentrant cgsleep functions for usecps in usbutils. - TimeBeginPeriod and TimeEndPeriod do not add significant overhead when run the entire time for cgminer so avoid trying to maintain balanced numbers of them for specific time calls to simplify code. - Replace all references to the old n*sleep functions with the equivalent cgsleep_*s replacements. - timeGetTime uses huge resources on windows so revert to using timevals for its implementation of cgtimer_t - Quotient/remainder error in ms division. - Only grab a queued work item if we successfully grab the lock to submit work in bflsc_send_work - BTB get version from Firmware - Carve out the unused portions of sha2 implementation. - Import Aaron D. Gifford's fast sha256 implementation. - Increase the que_low watermarks on BFLSC for they are too low to keep the device busy on scanwork loops. - Provide cgtimer_to_timeval helper functions. - Provide a timeval_to_cgtime helper function to reuse values. - Check for thr->work_restart in restart_wait. - We should be using que_low to decrease scan sleep time in bflsc. - Prepare sleep time on bflsc if no dev needs work yet to avoid busy waiting. - Simplify cgsleep code for windows by using a typedef for cgtimer_t that resolves to clock resolution, using that internally. - On windows use the higher accuracy timegettime function to really get 1ms clock and timer accuracy. - Use the cgsleep reentrant function to sleep for bflsc between read results to account for time taken to perform reads. - Use 100ms delay between checking for results on all bflsc devices as the buffering of results mean checking more frequently just wastes CPU and causes more lock contention for only marginally better latencies. - Fix missed endtimeperiod in overrun timer on windows.

- Make cgsleep_us_r take an int64_t for us. - Make the cgsleep functions build on windows. - Use the cgsleep reentrant function in avalon_send_task. - Use the reentrant cgsleep functions within the avalon_send_tasks function. - Set high resolution timing on windows within the cgsleep functions. - Use the reentrant cgsleep function to time sleeps on reading from avalon. - Provide reentrant versions of cgsleep functions to allow start time to be set separately from the beginning of the actual sleep, allowing scheduling delays to be counted in the sleep. - Make the nmsleep and nusleep functions use the new cgsleep functions internally till functions are migrated to the new cgsleep API. - Add a ms_to_timespec helper function, and create a cgsleep_ms function that uses absolute timers with clock_nanosleep to avoid overruns. - Add rt lib linkage to enable use of clock_nanosleep functions with older glibc. - Add necessary time header include to avalon driver. - Do a sleep of the full duration it would take to do all the work using clock_nanosleep in avalon_send_tasks to avoid sleep overruns before polling to see if it's ready. - Add a timeraddspec helper function. - Provide a us_to_timespec helper function. - Use the us_to_timeval helper function in the avalon driver. - Provide a us_to_timeval helper function. - Use timeval_to_spec helper in avalon driver. - Add helper functions to convert timespec to timeval and vice versa. - simplifying buffer full check - forking bitburner write thread function - making sure original Avalon is unaffected by BitBurner changes - changes to queueing strategy for BitBurner boards - Do not poll in avalon_get_results without sleeping if we have finished parsing a full result. - Add c to ambient temperature display for avalon driver. - BTB allow up to 1400mV as per firmware limits - avalon for timeout allow d='calculate it' and fix uninitialised - Use cloned work when finding avalon results since another thread can discard the work item while it's in use. - Provide a variant of find_work_bymidstate that returns a clone of the found work. Version 3.3.4 - 14th August 2013 - API/miner.php add some % fields - Nonce2 stratum submission is not working with nonce2 lengths >4, revert the buggy __bin2hex function and use bin2hex. - The write thread in avalon is only ever actually woken up by timeout so remove the write semaphore and use a simple sleep poll. - Fix warning. - Interrupting reads on the avalon to start writes loses data so remove the cgsem_post in the read code. - Add room for the null byte at the end of the nonce2 string on stratum share submission and zero the allocated ram. Version 3.3.3 - 13th August 2013 - Only perform the bin2hex on nonce2 data if it's required for stratum submission, thereby removing the last conversion of that type from stratum work generation. - Create a work data template when receiving stratum notification, allowing a

simple memcpy of the merkle root avoiding more hex2bin conversions on each work generation. - Export the workpadding char in miner.h - Avoid a potential overflow should a pool specify a large nonce2 length with stratum. - Avoid one more hex2bin in gen stratum work. - Rename work gbt_coinbase to coinbase to be in line with pool variable name. - Perform merkle bin hex2bin on stratum notify to avoid doing it on each work generation. - Reuse just the one pool coinbase variable in stratum, avoiding more string functions and storage in gen_stratum_work on each work generation. - Rename pool gbt_coinbase variable to coinbase to combine it with the stratum coinbase data. - Use a nonce2 offset variable for both gbt and stratum to consolidate requirements on work generation. - Merge pull request #474 from kanoi/master - util.c update quit call for new functions - use correct define for OSX in util.c - miner.h inline semaphores increase information on failure - util.c expand quit to show file/func/line - Merge remote-tracking branch 'conman/master' - Cache as much of the gbt coinbase as possible to avoid doing unnecessary hex2bin conversion on every work generation with gbt. - We should be using a cg_wlock initially in generating stratum and gbt work before downgrading the lock. - Add the ability to downgrade a write variant of the cglocks. - Fix --scrypt being required before scrypt intensities on command line or not working at all via config files. - Cache the hex2bin of pool nonce1 in stratum, avoiding hex2bin on each work generation. - Cache the binary generation of coinbase1 and 2 on stratum, avoiding a hex2bin of coinbase1 and 2 on each work generation. - cgsem - increase information on failure - avalon init write_sem before use - 3.3.2 - 9th August 2013 - Fix uninit variable warnings. - usbutils - force check every combination - Fix warning. - Recreate curses windows on windows when a device is hotplugged to allow window resizing without crashing. - Update copyright notice. - Limit intensity range according to whether scrypt is in use or not. - Do not allow benchmark mode to be used with scrypt. - Add a --bflsc-overheat command which allows you to set the throttling temperature for BFLSC devices or disable it. - Move bflsc defines to a header file. - avalon allow frequency to be set via the API - BTB voltage management via the API - and set default on startup - Avalon BTB allow partial work to be transferred - avalon_cts use correct buffer - miner.php format Best Share - remove unnecessary memcpy - using more concise description - using usb_ident - forgot a return - changes to Avalon driver for BitBurner boards - Revert "Sleep after sending icarus work to emulate working at 115200 baud."

- api correct timeout stat display - usb timeouts - min/max also - log USB timeouts in API stats - usbutils report failed timeouts - usbutils ensure stats macros are using the macro arguments - Check for negative wait time in socket_full. - Fix extra argument passed to statline before. - Adjust socket wait timeout in recv_line according to how long we've already waited to avoid a 60 second wait dropping to 1 second due to a blocked socket. - usbutils use a heap buffer for bulk read rather than stack - usbutils only one bulk transfer call per stat - set device_drv function noops when first add_cgpu - usbutils - in init only change the config if needed - bflsc nonce per work item stats - bflsc increase flush count to handle parallel work - force type checking on curses - logging - size check sprintf - usbutils - size check all sprintf - cgminer - size check all sprintf - size check get_datestamp/get_timestamp and remove unused cgpu->init - make all statline overflow safe - WU only needs +2 width - Check for a timeout in avalon_scanhash and post to the write sem if we receive one. - Decay result count in avalon more slowly to not falsely detect idle periods as low result return rates. - Count the number of miners idled in avalon to account more accurately for when its result return rate is too low. - Fix potential dereference when starting avalon with all new work. - Convert the decay_time function into one that truly creates an exponentially decaying average over opt_log_interval. - Only throttle avalon clockspeed in avalon_auto in non optimal temperature settings if the fanspeed has reached maximum. - Reinstate more aggressive <2% HW error target for avalon-auto - Set avalon fan min and fan max to PWM values instead of percentage. - Provide an --avalon-freq command line to give a valid range of frequencies for avalon in auto mode. - Set the avalon idle frequency to lowest if avalon auto is enabled and we have an overheat condition. - Decrease avalon frequency in auto mode if we are unable to maintain the temperature in the optimal range. - Don't count invalid nonces as hashrate for bflsc. - Use a more conservative upper limit of 1% for hardware errors with avalon auto frequency. - Allow the avalon fanspeed range to be passed as parameter on the command line, default to 20-100% - Just display A: and R: for difficulty accepted and rejected to preserve screen real estate and decrease decimal places for WU. - correct device DR: and remove global U: - Update all screen A/R to instead use DA/DR and device U to WU - miner.php add ASC fields - GPU fan rpm display 9999 when it overflows - bflsc get volts stats needs its own GETVOLTS - Support all avalon frequencies on the command line. - Move to slightly more relaxed timeouts for avalon. - MMQ turn on cps delays - bflsc x-link header different to documentation - Reset the other auto counters in avalon when idling a device. - usbutils/icarus include more locking to usbdev access - Icarus turn on cps delays by default

- usbutils cps correct time measurement Version 3.3.1 - 25th June 2013 - Add an avalon-auto option which enables dynamic overclocking based on hardware error rate for maximum effective hashrate. - Add an --avalon-cutoff feature which puts the avalon idle should it reach this temperature, defaulting to 60, re-enabling it when it gets to target temperature. - Change default avalon target temperature to 50 degrees. - usbutils - incorrect test for * in bus:dev - Redo +1 fix in bflsc. Version 3.3.0 - 24th June 2013 - Add an --avalon-temp option to allow a user specified target temperature. - Demote no matching work message to verbose logging only on avalon. - Make the fan control on the avalon a simple PID controller with a target temperature of 45. - Demote bflsc hw error messages to verbose logging only. - bflsc - handle xlink timeouts by having generic IO functions - Demote the invalid nonce warning to log info. - Ignore iManufacturer for BFLSC devices since the device name will still match and some unbinned chips are missing it. - sc_count shouldn't be +1 in bflsc. - Use the info timeout for read_nl in getidentify bflsc. - Add a usb_read_nl_timeout macro. - bflsc try getinfo twice - set MSG_ASCUSBNODEV always defined - Hard code the preferred packet size for AMU, BLT and ICA. - API V1.26 update ASIC support - Icarus enable the read buffer for the detect nonce - Support new overclocking speeds for avalon: 325, 350 and 375 - undo icarus show errno, put it as debug in ubsutils - icarus add errno to rerr and werr - Sleep after sending icarus work to emulate working at 115200 baud. - Use the nusleep function for sleeping after sending work in avalon. - Show an integer only for diff if it is one. - Set the avalon preferred packet size to 512. - Reinstate the maxPacketSize determined by the end descriptor but allow the driver to override it. - Only update hashmeter if we have done hashes or haven't updated longer than the log interval, fixing a us/ms error. - Use only one cgsem in avalon signalling when the write thread should commit work by reading the status bytes off during an avalon_read, minimising the number of usb calls and resetting from only one place. - Change avalon no valid work message to no matching work to match API terminology. - Use low latency usb transfers on the avalon, sleeping up to half a buffer's worth only if no data is returning to increase hashrate, abolish lost work and decrease CPU. - Minimise the sleep times in avalon read to avoid result loss. - Use a half nonce range before cycling through avalon's scanwork to ensure it gets a chance to fill work if time is tight for the write thread to signal a wakeup. - Temporarily limit usb transfer sizes to 512 till we provide a way for each driver to choose the upper limit. - Increase watchdog sick time to longer than it takes for a pool to be detected

dead. - Limit USB transfers to the max size reported by the descriptors. - Increase the BFLSC timeout to allow the maximum number of results to be returned for BAS in time. - Decrease BAL and BAS latency to be just larger than one result read. - disable curses device resize that crashes on windows - BFLSC latest firmware has its own thermal cutoff set to 90, so use the same value in case we have an old firmware that isn't throttling by itself. - Drop watermark low limits for bflsc. - Set the fanspeed on bflsc to max if we don't know the temperature. - Use a low watermark for queueing mandatory work on bflsc instead of zero. - Only mandatorily grab the bflsc mutex on submitting work when the queue is empty. - Adjust bflsc v2 watermarks. - Only increase sleep time on bflsc if the queue isn't emptying at all over the sleep duration. - Fix warning. - bflsc yet more API stats - bflsc add some more API stats - bflsc correct firmware matching - bflsc correct comment - Fixed Commands with No params - bflsc driver support for v2 firmware - Odd Issues - Fixed Python Example - Added Python Api Example - Added Python Api Example - Multiplier fail for microseconds vs milliseconds when updating hashmeter in hash_queued_work. - Only make threads report in/out across the actual driver code and update their status on reporting out as well as in. - usbutils initialise close key/sem - usbutils cleanup linux semaphores on release - Difficulty should be unconditionally byteswapped, not swapped to big endian. - We should be setting cancelstate, not canceltype when disabling it for usb locking. - Pthread cancel state should be set to disable on usb DEVLOCK. - Fanauto on bflsc is Z9X according to the source code, not 5 as per the draft protocol document. Version 3.2.2 - 16th June 2013 - Record and report USB pipe errors via API stats - Suspend stratum connections when we know they've failed and don't try to recv data from them once the socket no longer exists. - Pipe error is quite common on usb3 so drop logging to verbose level only. - ocl.c fix applog warnings on windows - applog/quit fix GPU errors created - usbutils - DEVLOCK other usbdev access - applog usb device list can be > LOGBUFSIZ - fix windows log warnings - logging remove extra added <LF> - remove varargs from logging/quit/in general as much as possible - Don't yield when downgrading a cg ilock. - Don't yield on grabbing the read lock variant of cglocks. - Off by one error in device count for display. - Don't display devices beyond the most_devices count in the curses status. - Only display as many device rows as the maximum live existed at any time. - usb lock out use cg locks

- usb lock out transfers during open/close - Add error message to libusb pipe error - Differentiate libusb control transfer pipe errors from transfer errors since they're not fatal. - Create a usb_bulk_transfer wrapper for libusb_bulk_transfer to cope with pipe errors. - Only show efficiency in pool information for pools that don't support local work generation. - Create a pool_localgen bool function for testing when a pool can generate work locally. - ignore file that is generated on Macs - compile unix code on Mac OS X fixes not finding the config file in $HOME - Use mining start time for device MH/U calculations - Decrease the sleep duration before reading in avalon to not let the read buffer overflow. - Failure to read and write on pseudo semaphores on apple happens routinely on shut down so should not be a quit error, just a warning. - Unlock usb dev lock in the same place in usbutils. - Sleep if the avalon buffer is empty and we've requested a read to allow the write thread to take precedence. - Yield after releasing a lock in case we are on a device with limited CPU resources. - Add the cgpu_info structure before avalon reset. - Tidy up DEVLOCK/UNLOCK to have consistent use of the pstate variable without needing brace level match. - Icarus driver elaspsed timeout shouldn't be just USB I/O - usbutils avoid leaving devlock locked when thread cancelled - MMQ fix nodev failure caused by changes - ubsutils lock all access to nodev and cgusb - USB make device_path handled by usbutils - tidy up free in device detect functions - USB control creation and free of cgpu - Add FAQ regarding Work Utility. - Throttling the BFLSC at 80 seems to prevent generating garbled responses of higher temps. - Return after failed bin2hex conversion in bflsc. - Demote failed hex2bin result to LOG_INFO and check return result in driver-bflsc to avoid doing find_work_by_midstate. - Set BFLSC fan speed coarsely to keep it under 60 or auto as per specs saying it tries to stay below 60. - Limit usbutils LATENCY_STD to 32ms to keep transfers under 512 bytes. - Move macro definition to bflsc driver - Use a longer timeout for retrieving bflsc details. - Add a usb_read_ok_timeout wrapper to cope with slow init'ing devices. - cgsem_post after creating the thread info - Fix build. - Use cgsem structures instead of the flaky pings in the work queue to start mining threads and remove the unused thr_info_freeze function. Version 3.2.1 - 7th June 2013 - Shorten the avalon statline to fit in the curses interface and show the lowest speed fan cooling the asic devices. - Set usbdev in usbutils after checking for nodev to avoid trying to access a dereferenced value. - AMU usbstatus correct name from enable UART - Icarus AMU enable the UART - Only libusb close if libusb release succeeds. - Failed reads and writes on cgsem_post and cgsem_wait should be extremely rare.

- Implement cgminer specific cgsem semaphores to imitate unnamed semaphore behaviour on osx which does not support them. - Set cgusb->buffer to NULL when doing usb_buffer_disable. - Temporarily fix apple not having semtimedop by ignoring the timeout value. - BFLSC enable buffered USB reading - Icarus use buffered USB reading - bflsc & icarus use usb_ftdi_set_latency - usb_ftdi_set_latency LOG_ERRs if called incorrectly - add usb_ftdi_set_latency - usbutils optional read buffering - Set the avalon read transfer latency to avoid sleeping when no data is returned after very short latency settings. - correct bflsc BFLSC_BUFSIZ max calculation - Fix build for !curses - restore max code - since timeout is unsigned - compile warning - remove unused max - usb set FTDI latency higher to minimise status bytes - Check for zero timeout on _usb_write. - Check for zero timeout in usb read. - Define a minimum polling time based on frequency of mandatory updates of ftdi responses at 40ms. - Sleep right up to the timeout instead of the first half if we find ourselves polling in _usb_read - Enforce half timeout sized sleeps in usb_read if we find the device is not respecting libusb timeouts to avoid polling frequently. - Add more ASIC documentation. - Update README - Remove start device limitation on log window size to allow it to get larger with hotplugged devices. - Switch logsize after hotplugging a device. - Change switch_compact function name to switch_logsize to be used for other changes. - Only adjust cursor positions with curses locked. - devs display - fix GPU duplicate bug - Do not hotplug enable a device if devices have been specified and the hotplug device falls outside this range. - Change the --device parameter parsing and configuration to use ranges and comma separated values. - basic copyright statement in API.java - devs display - show ZOMBIEs after all others - Modify scrypt kernel message. - Check for pool_disabled in wait_lp_current - usbutils semun use proper def for linux which fixes OSX also - Check for pool enabled in cnx_needed. - Icarus add delays during intialisation - Update documentation. - Update copyrights of modified files. Version 3.2.0 - 31st May 2013 - Add FAQ about windows USB keyboards and hotplug interactions. - Fix mingw build warnings in icarus driver. - Make usb_ftdi_cts use the _usb_transfer_read function. - Update ASIC-README with avalon info regarding default behaviour. - Break out of idling loop in avalon_idle if the buffer is full. - Provide some defaults for avalon if none are specified and do not try to claim the device if it fails to reset with them and no options are specified. - usbutils automatically track IO errors - usbutils allow a short wait for resources to be released

- correct semaphore timeout comment - Set the fanspeed to the nominal chosen for GPUs. - Inverted sem_init logic. - Document avalon options in ASIC-README - Do avalon driver detection last as it will try to claim any similar device and they are not reliably detected. - Clamp initial GPU fanspeed to within user specified range. - Use a counting semaphore to signal the usb resource thread that it has work to do. - Avalon fan factor is already multiplied into the info values. - Get rid of zeros which corrupt display. - Logic fail on minimum fanspeed reporting. - Provide a workaround for fan0 sensor not being used on avalon and pad fan RPM with zeros. - Add ambient temp and lowest fan RPM information to avalon statline. - Display max temperature and fanspeed data for avalon. - Set devices to disabled after they exit the hashing loops to prevent the watchdog thread from trying to act on them. - Add avalon driver to hotplug. - Shut down the avalon mining thread if the device disappears. - Check for no usb device in usb_ftdi_cts - Check for valid usbdev in _usb_read in case the device has been unplugged. - Scanhash functions perform driver shutdown so don't repeat it. - Change the opencl shutdown sequence. - Send the shutdown message to threads and do the thread shutdown functions before more forcefully sending pthread_cancel to threads. - Use the cgpu_info shutdown to determine when to stop the avalon read and write threads. - Use semaphores to signal a reset to pause the read thread while the write thread does the actual reset, making all writes come from the same place. - Remove now unneeded fgpautils.h include from avalon. - usb_transfer_read should also not play with the endianness. - Use the USB wrappers for avalon, telling usbutils that we want the raw data. - Use separate ep for avalon tasks vs avalon reset and do not loop in write indefinitely. - Remove unneeded function and checks in avalon write code. - CMR handle baud options - work_restart is reset within the queued hash work loop. - Fix avalon shutdown sequence. - Execute driver shutdown sequence during kill_work. - Use nusleep in avalon_get_results in place of nmsleep. - Provide an nusleep equivalent function to nmsleep. - usb/ica add more (incomplete) CMR settings - Give a buffer of perceived results in avalon during idle periods to allow for results once it becomes active again. - libusb_control_transfer are meant to be endian specific, but host endianness so no conversion is needed. - Reuse old MTX Handle - usbutils check all memory allocation - usb separate thread for resource locking and modified windows locking code - Icarus report data direction with comms errors - Set the read and write threads for avalon to not cancel within libusb functions and wait for the threads to pthread_join on shutdown. - Offset needs to be incremented after avalon reads. - Make the avalon_read function parse the ftdi responses appopriately. - Use the avalon read timeout to completion if no data has been read. - wait_avalon_ready should only be used before writes. - Ask for the correct amount to read in avalon get results. - Spawn the avalon read thread first with info->reset set to discard any data till work is adequately queued.

- Use direct usb read commands to avoid ftdi data being automatically cut off in avalon reads. - Do a simple usb_read_once for the avalon result from a reset command. - Make sure avalon is ready to receive more usb commands before sending them. - Implement avalon_ready and avalon_wait_ready functions for when usb is ready to receive commands. - avalon_read should not loop but just return whatever it has succeeded in reading. - Set avalon_info to device data void struct. - Specify avalon in avalon_reset. - First pass rewriting serialdev into direct usb dev for avalon driver. - Define a cts equivalent for direct usb and use it for avalon driver full. - Compile usbutils into avalon driver. - Check results come in at least at 2/3 the rate they should be on avalon and if not, reset it. - Give a warning but don't reset if the avalon buffer is full early. - Discard any reads obtained from the avalon get results thread during a reset. - Differentiate initial reset in avalon from subsequent ones. - Perform a mandatory reset if the avalon buffer signals it's full before it has queued its normal quota of work. - Wait till buffer is cleared after sending idle tasks to avalon before returning from avalon_idle. - Lock qlock mutex during reset from read thread in avalon to prevent more work being sent till the reset is over. - Reset avalon if we continue to be unable to send all the work items. - Add avalon reset response to debugging output. - Do a wait_avalon_ready before sending a reset code. - Iterate over spare bytes in the avalon result returned from a reset request trying to find the beginning of the reset. - Idle avalon after reset. - Check for nothing but consecutive bad results on avalon and reset the FPGA if it happens. - Make submit_nonce return a bool for whether it's a valid share or not. - Unset the work restart flag sooner in avalon_flush_work to avoid re-entering the flush work function and just reset the queued counter instead of rotating the array to avoid runs of no valid work. - Implement an avalon_flush_work function for work restarts. - Shut down avalon read and write threads and idle the miners on closing it. - Tighter control over work submissions in avalon allows us to use a smaller array. - Rotate avalon array to reset the queued count before releasing the lock so work will always be available on next pass. - Move avalon read thread start till after conditional wait, store idle status in avalon_info and use it to determine whether an error is appropriate or not. - Wait till the avalon_send_tasks thread has filled the avalon with idle work before starting the avalon_get_results thread. - Use AVA_GETS_OK macro in avalon_read. - Do all writes on avalon with a select() timeout to prevent indefinite blocking and loop if less than desired is written. - Check explicitly that ava_buffer_full equals the macro. - Send initial reset as an avalon task to remove avalon_write function. - avalon_clear_readbuf is no longer required. - Check for 2 stray bytes on avalon reset. - Create a separate thread for handling all work and idle submission to the avalon which messages the scanhash function it has completed to update statistics. - usbutils ensure it compiles without stats - usbutils include transfer mode in usbstats - Give the avalon get results thread name the device number as well. - Make sure we're not adjusting temps on every successful work retrieval on

avalon. - Count missing work items from behind a successful work read in avalon as well. - Change message for work not found in avalon parser. - usbutils handle bulk_transfer partial writes - Simplify debugging and only discard from avalon read buffer if at least one full result has been discarded. - Only display discarded bytes in avalon if they're not used as nonces. - Only loop once through avalon_parse_results, but do so after timeouts as well. - Only debug and move ram if spare bytes exist in avalon buffer. - Remove off by one error. - Inverted logic. - Add more debugging to avalon reads. - Convert unsigned size_ts to ints for parsing avalon messages. - Cope with not finding nonces in avalon parsing gracefully by not overflowing buffers. - Adjust avalon temp values on one lot of valid nonces from the parser. - Created a threaded message parser for avalon reads. - Avalon_wait_write is not effective during resets so do it after going idle. - Send only a single byte reset. - Repeat going idle after avalon reset, and wait for write ready before sending each reset request instead of some arbitrary sleep time. - Timeouts on avalon_read and avalon_write should be 100ms. - Don't close avalon after detecting it until we're cleaning up, instead using reset for comms failures. - Check for avalon_wait_write before sending reset command. - Sleep in avalon_write_ready. - Make avalon_wait_write a bool function and check its return value. - Show how many idle tasks are sent to avalon if it aborts on buffer full. - Reset avalon->device_fd after it is closed. - Create an avalon_wait_write function that is used before sending avalon idle command. - Avoid repeating avalon_idle in do_avalon_close and extra sleep. - Pass fd to avalon_idle. - Do avalon_reset after info structure is set up. - Rework avalon reset sequence to include idling of chips and waiting for them to go idle followed by 2nd reset and then checking result. - Do a non-blocking read of anything in the avalon buffer after opening the device. - Assign the avalon info data to the device_data in cgpu_info. - thread shutdown is different on windows - usbutils make all windows timeouts 999ms - usb add another Cairnsmore1 USB chip - icarus do the full detect test twice if required - CMR usb config guess - usb add transfer_read and commented out in icarus - usbutils allow unrounded control transfers - icarus ICA initialisation - icarus report err on read failure - icarus correct device_id and use device_data for icarus_info - miner.h remove unused device_file and add device_data - miner.h icarus no long uses fd - icarus AMU config transfers - Create a logwin_update function which mandatorily updates the logwin and use it when input is expected to prevent display refresh delays. - usbutils force an unknown IDENT for zero - icarus set default options/timing based on device - Must unlock curses as well in logwin_update. - Create a logwin_update function which mandatorily updates the logwin and use it when input is expected to prevent display refresh delays. - icarus report usb write error information

- Add name to icarus copyright notice. - Check for *pth dereference on pthread_join - usbutils name latency correctly - Check for restart before buffering more reads in Icarus. - Icarus should timeout if it's greater than the timeout duration even if it's receiving data. - We should check for amount buffered in icarus get_nonce against amount already received. - Make mining threads report out during work submission. - submit_work_async is no longer used directly by driver code. - Fix first read timeout on icarus get nonce. - Retry icarus_initialise if the first read attempt fails. - Properly pthread_join miner threads on shutdown. - Properly pthread_join miner threads on shutdown. - Use a persistent single separate thread for stratum share submission that uses workqueues since all stratum sends are serialised. - All stratum calls to recv_line are serialised from the one place so there is no need to use locking around recv(). - Only allow the mining thread to be cancelled when it is not within driver code, making for cleaner shutdown and allowing us to pthread_join the miner threads on kill_work(). - Only allow the mining thread to be cancelled when it is not within driver code, making for cleaner shutdown and allowing us to pthread_join the miner threads on kill_work(). - Set pool->probed to true after an attempt to resolve the url via stratum code. - icarus test nodev everywhere - usbutils/icarus separate FTDI transfer values and more debug - add icarus to hotplug - usbutils add rest of icarus - simple serial-USB python test script - icarus->USB v0.1 incomplete - missing initialise() - README spelling - Update documentation for icarus switch to USB - Add USB rules for supported USB devices - switch icarus configuration to usb - usbutils new command for icarus - usb add a numeric sub-indentity for each name - usbutils - make FTDI handling automatic - fix duplicate name - usbutils set Black Arrow Lancelot's as BAL and match the lot->llt name - usbutils identify Icarus devices - libusb_control_transfer 16 bit words are endian specific. - usb_applog separate amt display - Show pool difficulty more verbosely if it changes via stratum. - Attribute whatever stats we can get on untracked stratum shares based on current pool diff. - Provide a --lowmem option which does not cache shares on failed submission to prevent low memory hardware (eg Avalon) from crashing. - Update util.c Version 3.1.1 - May 11th, 2013 - Use a discrete device target for scrypt that dynamically changes to ensure we still report a work utility even if no shares are submitted such as in solo mining. - Make set_work_target a function to set a specified char as target for use elsewhere. - Further consolidate the hash regeneration between sha and scrypt doing it only once and always checking the share diff for both before submission.

- Regenerate the hash before checking the share diff in hashtest(). - Minor typo. - Use a scantime of 30 seconds for scrypt if none is specified. - Support more shares to be returned for scrypt mining. - Update the write config to properly record device entries and remove disabled option. - Show a different warning and loglevel for failure to resolve a URL on first or subsequent testing of stratum pool URLs. - Fix the problem of seting up termio of ttyUSB0 for icarus. the CSIZE is the mask of CS2/4/8 From: navyxliu <navy.xliu@gmail.com> - Set all stratum sockets to nonblocking to avoid trying to use MSG_DONTWAIT on windows. - Fix warnings on win32 build. - Only use MSG_NOSIGNAL for !win32 since it doesn't exist on windows. - Use MSG_NOSIGNAL on stratum send() - Set TCP_NODELAY for !linux for raw sockets. - Use TCP_NODELAY with raw sockets if !opt_delaynet - Make raw sockets compile on windows - Recheck select succeeds on EWOULDBLOCK for stratum. - usbutils/mmq fixed size usb_read default to wait for all data - usbutils optional (disabled by default) dev debug - Add an ftdi usb read macro without newline - Avalon usb interface should be 0. - Add more debug for failure to USB init. - Recv() should all be non-blocking for raw sockets in stratum. - Change verbosity and error for getaddrinfo warnings in setup stratum socket. - Free servinfo after p is checked in setup stratum socket. - Use raw sockets without curl for stratum communications. - Sacrifice curl handle memory on stratum disconnects on all versions of libcurl to avoid curl corruption. - Don't use TCP_NODELAY if opt_delaynet is enabled with stratum. - Fix warnings in avalon driver. - Make FULLNONCE an ULL to fix a warning on 32 bit. - ztx correct applog typing - ocl correct applog typing - util correct applog typing - api correct applog typing - cgminer correct applog typing - scrypt correct applog typing - bfl correct applog typing - ica correct applog typing - mmq correct applog typing - adl fix trailing % - usbutils correct applog typing - applog - force type checking - Simplify the many lines passed as API data in the avalon driver now that the API does not need persistent storage for the name. - Duplicate the name string always in api_add_data_full to not need persistent storage for names passed to it. - Add extra matching work count data in API for Avalon with 4 modules. Version 3.1.0 - April 28th, 2013 va_copy is meant to be matched by a va_end in log_generic. usbutils remove_in_use break usbutils remove_in_use missing prev usbutils missing add_in_use Clean up summary slightly better on exit. Make the scan sleep time after scanwork in bflsc dynamic to keep queues

between watermark levels. - Remove unused temp counts in bflsc. - Calculate a rolling 5 min average set of temperatures for bflsc. - Damp the display of voltage for BFLSC devices. - Damp the temperature display measurement for bflsc since it fluctuates so wildly. - bflsc add volt stats - Handle failed tolines command in bflsc driver. - Can use a read lock instead of a write lock in bflsc scanwork. - Since we are filling a queue on the bflsc devices, there is no need to run through scanwork frequently provided we use the restart_wait function to abort early during a block change. - Remove flushed work in bfl scanwork from the hash table. - Set correct device in process_nonces in bflsc driver. - bflsc add work reply INPROCESS: missing from the spec - bflsc put in some error messages not yet written - bflsc get completed hashes as late as possible - Fix potential memory leak with unused work items in bflsc_queue_full - Reverse bools in bflsc_queue_full - Avoid recursive loop calling correct function instead. - bflsc fix details identification - Differentiate BFLSC device from regular bitforce and give warning if no support is compiled in. - util.c str_text make a fully text readable version of str - BFLSC fix FPGA identity overlap - Locking error in bflsc_send_work - Use htobe32 function for converting nonce in bflsc. - Replace deprecated bzero with memset in bflsc driver. - Fix compilation of bflsc driver without opencl. - Check for realloc failures in bflsc driver. - Check for failure to calloc in bflsc driver. - Trivial style change - Use copy_time function in bflsc driver. - Use cgtime in bflsc driver and update copyright notice. - Use a separate function for bfl initialise that doesn't require locking. - Fix BFLSC building. - bflsc v0.1 Version 3.0.1 - April 25th, 2013 - Bypass attempting to read and save binary files on OSX to avoid crashes on >1 GPU. - Receive failures in recv_line should unconditionally fail. - Use sock_blocks in api.c - Use sock_blocks function for stratum send and receive. - Create an OS specific sock_blocks function. Version 3.0.0 - April 22nd, 2013 Further fix distdir for hexdump.c Fix build and distdir. Remove all CPU mining code. compile on win32 Update SCRYPT README with improved hashrates for 7970. Use copy_time helper throughout cgminer.c Provide wrappers for commonly used timer routines with API stats. Avoid one cgtime call in sole_hash_work. Fulltest is true if value is <= target.

- Use system host to endian functions for clarity in fulltest. - Provide endian_flipX functions to avoid special casing big endian in cgminer.c - Provide a flip128 helper to simplify big endian flipping. - Use flip helpers to simplify code for calculation of midstate. - Use flip32 function instead of open coding it in gen_stratum_work. - Move util.c exports to util.h - Fix warning on building avalon on win32 - Use cgtime in driver-avalon.c - Use cgtime in driver-icarus.c - Use cgtime in driver-bitforce.c - Use cgtime in logging.c - Use cgtime in usbutils.c - Use cgtime in driver-opencl.c - Use cgtime wrapper in driver-modminer.c - Use cgtime in driver-ztex.c - Use cgtime in compat.h - Use cgtime instead of gettimeofday in fpgautils.c - Replace gettimeofday usage in cgminer.c with cgtime - Create a cgminer specific gettimeofday wrapper that is always called with tz set to NULL and increases the resolution on windows. - Add high resolution to nmsleep wrapper on windows. - Set default ocl work size for scrypt to 256. - define le32toh if needed - fliter out the wrong result from adjust fan code - compile avalon driver on win32 and win64 - Restart threads on the rare chance we found the block ourselves. - Add more FAQs about crossfire. - Set last device valid work on adding device. - Increment last device valid work count in submit_nonce to cover scrypt. - Set opt_scrypt drv max diff for correctness. - Make scrypt submission use the submit_nonce code, with nonces matching endianness. - Do testing for HW errors on submit nonce for both scrypt and sha. - Increment hardware error count from the one site. - Rename scrypt regenhash function for consistency. - Add new best share info to verbose logging. - Add notice for when network diff is changed. - Convert error getting device IDs in ocl code to info log level only since multiple platforms may be installed and the error is harmless there. - Unnecessary extra array in ocl code. - Further driver FAQs. - Add MAC FAQ. - Add more FAQ details. - Check for work restart after disable in the hash queued work loop since it may be a long time before we re-enable a device. - Unconditionally test for many wrong results on avalon and reset to avoid passing a corrupt avalon result to temperature code. - build out of source dir - Set device_diff for queued work or there will be no diff1 share count. - Only reset an avalon device with no results when there are no results consecutively. - More FAQs. - More FAQs. - Cleanup when stratum curl fails to initialise. - Avoid applog in recalloc_sock. - Avoid applog under stratum_lock in recv_line. - Avoid applog under stratum_lock in __stratum_send. - Put spacing around locking in util.c for clarity. - Avoid applog under cg_wlock. - Put spacing around locking code for clarity.

- Avoid applog under pool_lock. - Avoid more recursive locks. - Avoid applog while ch_lock is held. - Avoid recursive locks in fill_queue. - Variable is already initialised in global scope. - More GPU faqs. - More README faqs. - Yet more README faqs. - Add more faqs to README. - Wrap result wrong tests in avalon scanhash in unlikely() and only consider a hash count of zero wrong if a restart wasn't issued. - avalon: if result_wrong >= get_work_count jump out the read loop - Fix warning on 32bit. - Fix warning on 32bit. - Avoid curl_easy_cleanup on old curl versions in setup_stratum_curl as well. - fix the fan control on max temp2/3 - for some reason network down. one simple cgminer command: "cgminer -o 127.0.0.1:8888 -O fa:ke --avalon-options 115200:32:10:50:256" can idle the avalon for safe power and protect chip - if hash_count == 0; reinit avalon, fix the 0MHS bug use the max value of temp1 and temp2 for fan control - Reinstate the matching_work_count per subdevice on avalon based on the work subid. - Avalon driver is missing the drv_id. - Rationalise and simplify the share diff and block solve detection to a common site. - Rationalise and simplify the share diff and block solve detection to a common site. - Make the avalon array size a macro. - Use replacement of work items in the avalon buffer as needed instead of flushing them. - Reinstate wrong work count to reset avalon regardless and display number of wrong results. - Revert "The result_wrong measurement for avalon is continually leading to false positives so remove it." - select() on serial usb in avalon does not work properly with zero timeout. - The result_wrong measurement for avalon is continually leading to false positives so remove it. - Revert "Use only 2 queued work arrays in avalon." - Use no timeout on further reads in avalon_gets - Do sequential reads in avalon_get_reset to cope with partial reads. - Show read discrepancy in avalon_get_reset. - Reuse avalon_get_work_count variable. - Check for AVA_GETS_RESTART when deciding if avalon has messed up. - Make the detection of all wrong results on avalon much more conservative to avoid false positives on work restarts. - Show error codes on select and read fail in avalon. - If we get a restart message in avalon_gets still check if there's a receive message to parse first without a timeout before returning AVA_GETS_RESTART. - Use only 2 queued work arrays in avalon. - avalon_gets is always called from the one call site so inline it. - The read_count is unused by the avalon get result code and no longer required for avalon reset so simplify code removing it. - Use a separate avalon_get_reset function for resetting avalon instead of using avalon_get_result. - The current hash count returned by avalon scanhash is just an obfuscated utility counter so make it explicit. - Check for a restart before a timeout in message parsing code in avalon. - We should check for a restart message before checking for a timeout in avalon scanhash.

- Store the subid for the work item in avalon. - usbutils more stats for bflsc - Fix record_temp_fan function in avalon driver. Patch by Xiangfu <xiangfu@openmobilefree.net> - Remove inappropriate memset of struct avalon result which was corrupting fan values. - Fix warning with no curses built in. - Bump version to 2.11.4 - Add API support for Avalon. - Only do_avalon_close once on multiple errors. - Reset the result_wrong count on block change in avalon scanhash to prevent false positives for all nonces failed. - Small timeouts on select() instead of instant timeout increase reliability of socket reads and writes. - Only get extra work in fill_queue if we don't have any unqueued work in the list. - Small timeouts on select() instead of instant timeout increase reliability of socket reads and writes. - Rotate the avalon work array and free work on AVA_SEND_BUFFER_EMPTY as well. - Only get extra work in fill_queue if we don't have any unqueued work in the list. - Don't get any work if our queue is already full in avalon_fill. - Differentiate socket closed from socket error in recv_line. - Differentiate socket closed from socket error in recv_line. - Free avalon->works in the event we call avalon_prepare on failure to initialise. - Fix warnings. - Create an array of 4 lots of work for avalon and cycle through them. - Remove unused per unit matching work count for avalon. - Rename the confusing avalon_info pointer. - Simplify avalon scanhash code using the new find_queued_work_bymidstate function. Partially works only. - Members of cgpu_info for avalon are not meant to be in the union. - Use correct struct device_drv for avalon_drv. - cgminer.c -S help to only say Icarus - Check enough work is queued before queueing more in avalon_fill. - Actually put the work in the avalon queue. - Rneame avalon_api to avalon_drv. - First draft of port of avalon driver to new cgminer queued infrastructure. - Add Makefile entry for driver-avalon. - Add configure support for avalon. Version 2.11.4 - April 5th, 2013 - Remove bfl-sc option from configure for 2.11 branch. - Only update hashrate calculation with the log interval. - Update the total_tv_end only when we show the log to prevent failure to update logs. - Minor README updates. - Add example 7970 tuning for scrypt in readme. - Update driver recommendations. - Add extensive GPU FAQs for the flood of new Scrypt miners. - Remove help option for cpumining in build environment. - Remove scripts that make it too easy to compile CPU mining support. - Win32 and win64 build updates - Remove references to CPU mining from README. - Show share hash as little endian as needed. - usbutils extra message requirements - Make hashmeter frequency for hash_queued_work match sole_work.

- Update links and recommended SDKs. - Update scrypt readme re drivers and sdk. - usbutils.c usb_cmdname() usb_cmds -> string name - BFL FPGA Windows timeout set to 999ms - AUTHORS - spam update time (one year since the last) - Update README for x970 memdiff values. - Update README to match changes to display. - Remove increasingly irrelevant discarded work from status lines. - Remove increasingly irrelevant queued and efficiency values from status and move WU to status line. - Allow cgminer to start if usb hotplug is enabled but no devices yet exist. - Do not scan other gpu platforms if one is specified. - Update README for sync objects on windows. - Update README about intensity. - Add information for setting gpu max alloc and sync parameters for windows with scrypt. - If the hashmeter is less than the log interval and being updated by the watchdog, don't update the hashrate. Version 2.11.3 - March 17, 2013 - Update docs and reorder README to show executive summary near top. - Update the hashmeter at most 5 times per second. - Usbutils use its own internal read buffer - Calculate work utility for devices that support target diffs of greater than 1, and update scrypt code to use it. - usbutils allow read termination match to be a string - Set default GPU threads to 1 for scrypt. - Connect backup stratum pools if the primary pool cannot deliver work. - Use a new algorithm for choosing a thread concurrency when none or no shader value is specified for scrypt. - Do not round up the bufsize to the maximum allocable with scrypt. - Remove the rounding-up of the scrypt padbuffer which was not effectual and counter-productive on devices with lots of ram, limiting thread concurrencies and intensities. - bufsize is an unsigned integer, make it so for debug. - Update the hashmeter once per second but only display the extra logs every opt_log_inteval. - add a dummy ztex to usbutils so cgminer -n lists ztex also - nDevs required for -n with usb - USB device list - convert some common error numbers to messages - USB -n 'known' text only without ---usb-list-all - USB modify -n and --usb-dump to only show known devices or use new --usb-list-all option to see all - Make pool adding while running asynchronous, using the pool test thread functionality. - Only curl easy cleanup a stratum curl if it exists. - Sacrifice the ram of curl handles in stratum disconnects when we have built with old libcurl to avoid crashes. - cgminer -n to include a USB device list - usbutils allow call of usb_all() from other code - Convert gbt_lock to a cg_lock. - Add intermediate variants of cglocks that can be up or downgraded to read or write locks and use them for stratum work generation. - Move the stratum and GBT data to be protected under a new cg_lock data_lock. - Convert the ch_lock to cg_lock. - Convert the control_lock to a cg_lock. - Remove unused qd_lock. - Implement cg_lock write biased rwlocks.

- do usb_initialise() after the started message so we see it - --usb-dump display brief dump if value = 0 - USB add --usb options to limit USB device selection v0.1 Version 2.11.2 - March 9, 2013 - Whitelist AMD APP SDK 2.8 for diablo kernel. - Cope with the highest opencl platform not having usable devices. - Fix memory leak with share submission on GPU work structures as discovered by twobitcoins. - usb_cleanup() without locking. - Use curl_easy_cleanup to close any open stratum sockets. - Show pool number in switch message - Don't start testing any pools with the watchpool thread if any of the test threads are still active. - Set sockd to false should curl setup fail on stratum. - Close any open sockets when reusing a curl handle and reopen the socket whenever we're retrying stratum. - Set pool died on failed testing to allow idle flag and time to be set. - Remove unused pthread_t typedefs from struct pool. - Perform pool_resus on all pools that are found alive with the test pool threads. - Use pool_unworkable in select_balanced as well. - Differentiate pool_unusable from pool_unworkable. - Keep a connection open on higher priority stratum pools to fail back to them. - Rename threads according to what pool they're associated with as well. - Set the wrong bool in pool_active - Start the stratum thread only if we successfully init and authorise it, otherwise unset the init flag. - Make the initialisation of the stratum thread more robust allowing the watchpool thread safe access to it after the stratum thread is started. - API no longer ignore send() status - API make the main socket non-static Version 2.11.1 - March 7, 2013 - Shorten the time before keepalive probes are sent out and how frequently they're sent with stratum curls. - Only set stratum auth once to prevent multiple threads being started. - Display select return value on select fail in stratum thread. - Clear the socket of anything in the receive buffer if we're going to retry connecting. - Allow pools to be resuscitated on first startup by the watchpool thread. - Check all pools simultaneously at startup switching to the first alive one to speed up startup. - Clear just the socket buffer when we don't care what is left in a stratum socket. - Clear the stratum socket whenever we are closing it since the buffer is going to be reused. - Do not continue work from a stratum pool where the connection has been interrupted. - Reset stratum_notify flag on suspend_stratum as well. - Close any sockets opened if we fail to initiate stratum but have opened the socket. - Close any existing stratum socket if we are attempting to restart stratum so the pool knows the connection has gone. - Show mechanism of stratum interruption if select times out. - Make stratum connection interrupted message higher priority to be visible at

normal logging levels. - Implement client.show_message support for stratum. - API add 'Network Difficulty' to 'coin' - Setup BFLSC support - API use control_lock when switching pools - Make sure to retry only once with noresume support for stratum. - Instead of keeping track of when the last work item was generated to keep stratum connections open, keep them open if any shares have been submitted awaiting a response. - usbutils.c copy full size to 'Last Command' - configure - set USE_USBUTILS when usbutils is required and use it in the code - Clear last pool work on switching pools if the current pool supports local work generation or we are in failover only mode. - make rw locks: mining_thr_lock and devices_lock - Release MMQ device only once (not 4 times) - api.c fix MSG overlap - Hotplug - allow setting interval via --hotplug or API - curses - fix - put a dev_width inside #ifdef - usb_cleanup() use correct locking mechanism - Implement and use usb_cleanup() on shutdown or restart - miner.php report 'Last Valid Work' as time before request - API - return Last Valid Work - api -> drv - ZTX bug set missing drv_id Version 2.11.0 - March 2, 2013 - Update kernel file names signifying changes. - Update a pool's last work time when the work is popped as well as staged. - API always report failed send() replies - Update diff stale: total and pools when stratum throws away shares - Keep stratum connections open for 2 minutes after the last work item was staged to allow stray shares to be submitted on pool switching. - Try to extract the sessionid associated with mining.notify on 3rd level array and submit it along with the userid to support mining resume, failing gracefully and restarting if the pool rejects it. - Speed up watchdog interval and therefore display updates to 2 seconds. - Update copyright dates. - Cope with misread sessionid on stratum for now. - Use constants from the array of __constants throughout the diablo kernel. - Create a __constant array for use within diablo kernel. - Fix --benchmark generating valid work for cgminer. - Use the sessionid as passed on stratum connect to attempt to resume a connection once and then clear it if it fails, to use a new connection. - Move to storing the nonce1 in the work struct instead of the sessionid for the now defunct first draft mining.resume protocol. - Use global constant arrays for all other constants used in scrypt kernel. - Use global __constants for sha functions in scrypt kernel. - Use constants for endian swap macros. - Revise scrypt kernel copyright notice. - Separate out additions in scrypt kernel. - Reuse some Vals[] variables that can be assigned to constants earlier in the poclbm kernel, making for fewer ops. - Put all constants used in poclbm kernel into __const memory array to speed up concurrent reads on the wavefront. - BFL stop 1st init command if no device - Add a get_queued function for devices to use to retrieve work items from the queued hashtable. - Bugfix: Duplicate stratum sessionid when copying work, to avoid double-free

- Bugfix: Missing pool_no parameter to applog for no-stratum-sessionid debug message - Add the choice of hash loop to the device driver, defaulting to hash_sole_work if none is specified. - Add comments. - Add a driver specific flush_work for queued devices that may have work items already queued to abort working on them on the device and discard them. - Flush queued work on a restart from the hash database and discard the work structs. - Create a central point for removal of work items completed by queued device drivers. - Create a fill_queue function that creates hashtables of as many work items as is required by the device driver till it flags the queue full. - Create the hash queued work variant for use with devices that are fast enough to require a queue. - Update copyright year. - Fix tv_lastupdate being made into tv_end and update the hashmeter on cycle, not opt_log_interval. - Fix tv_lastupdate being made into tv_end and update the hashmeter on cycle, not opt_log_interval. - Only continue submitting shares with mining.resume support on stratum when the session id matches. - Provide support for mining.resume with stratum, currently re-authorising after successful resumption pending finalising of the protocol process. - Provide basic framework for restarting stratum depending on whether resume support exists or not. - Abstract out the setting up of the stratum curl socket. - Free sessionid in clean_work and remove redundant setting of strings to NULL since the whole work struct is zeroed. - Only clear stratum shares mandatorily on stratum dropouts when the pool does not support resume. - Try resubmitting stratum shares every 5 seconds for up to 2 minutes if the pool session id exists and matches on failure to submit. - Do as much outside of mutex locking of sshare_lock as possible. - Remove last reference to struct work used outside the sshare_lock in submit_work_thread - Unlock the sshare_lock in submit_work_thread when all references to work and sshare are complete. - Add timestamps to stratum_share structs as they're generated and copy the stratum sessionid if it exists to stratum work generated. - Store session id for stratum if the pool supports it for future mining.resume support. - API.java allow partial reads - debug_cb buffer type warning - MMQ rewrite the last of the old scanhash loop and drastically reduce CPU - hash_sole_work can be static - Make the numbuf larger to accept larger scrypt parameters. - Keep the unique id of each work item across copy_work to prevent multiple work items having the same id. - Abstract out the main hashing loop to allow us to use a separate loop for devices that are fast enough to require queued work. - Provide a noop thread_enable function for drivers that don't support it. - Provide a noop thread_shutdown function for drivers that don't support it. - Provide a noop hw_error function for drivers that don't support it. - Provide a noop prepare_work for drivers that don't support it. - Provide a noop thread_init for drivers that don't support it. - Provide a noop can_limit_work for devices that don't support it. - Provide a noop thread_prepare function for drivers that don't use thread_prepare. - Use blank_get_statline_before for GPU devices that don't support adl

monitoring. - Provide a noop get_stats function for drivers that don't support it. - Provide a blank get_statline for drivers that don't support it. - Provide a blank get_statline_before function for drivers that don't have one. - Fill drivers missing reinit_device with a noop version. - add 'count' to cumstomsummarypage 'calc' - hotplug use get_thread() where appropriate - convert sleep(const) to nmsleep() - remove empty #ifdef - call a separate get_devices() with locking, as required - usbutils - avoid free cgusb twice - usbutils hotplug v0.1 - Report USB nodev as ZOMBIE on the screen - Change file modes. Version 2.10.5 - February 7, 2013 - Fix logic fail on partial writes with stratum send that was leading to corrupt message submissions. - Do not consider every call to stratum_resumed a pool recovery unless it was actually idle. - Do not enable the pool disable on reject feature unless explicitly enabled with --disable-rejecting. - Stratum disconnect shares - count total against stale - Use sanity checking to prevent a possible overflow with invalid data being given by the pool for difficulty as reported by luke-Jr. - Check for calloc failure for completeness in gen_stratum_work. - Cache the coinbase length to speed up stratum work generation. - Cache the header length when generating stratum work to avoid calculating it on every work generation, and to only need one alloc+sprintf, speeding up work generation. - Use heap ram for coinbase in gen_stratum_work, zeroing it before use. - Provide a wrapper for aligning lengths of size_t to 4 byte boundaries. - Fix memory leak on stratum share submission. - Zero the best share string memory when zeroing stats. Version 2.10.4 - December 29, 2012 - Change the pool stratum socket buffer to be dynamically allocated to accomodate any size coinbase and keep receiving data in recv line for up to 60s if no end of line has been received. - Differentiate socket full from sock full. - Allow stratum to startup without notify but check it is valid before creating stratum work. - Do not try to generate stratum work unless the notify command has succeeded. - Reset total diff1 shares when zeroing stats as well to show correct work utility. Version 2.10.3 - December 26, 2012 - Do not give the share submission failure message on planned stratum disconnects. - Parse anything in the stratum socket if it's full without waiting. Empty the socket even if a connection is not needed in case there are share returns. - Provide a mechanism to zero all the statistics from the menu. - Display the current pool diff in the status line. - Display block diff in status line.

- Generalise the code for solving a block to enable block solve detection with scrypt mining. - Generate the output hash for scrypt as well and use the one function to set share_diff. - Use the flip80 function in regeneratehash and the correct sized hash array. - Use one size for scratchbuf as a macro in scrypt.c - Stage work outside of the stgd lock to prevent attempted recursive locking in clone_available. - share_diff needs to be performed on a BE version of the output hash to work, leading to false best_share values as spotted by luke-Jr. - Remove the unused sha224 functions. - Use the flip functions in hashtest. - Simplify the setting of the nonce data field in work on submitting nonces. - Scrypt code does not enter the hashtest function. - Go back to cloning available work under staged lock. - Updated links to AMD APP SDK - Updated link to ADL SDK - scrypt_diff uses a uint64_t as well. - Correct target for stratum support with scrypt mining. - libztex: fixed a typo - libztex: check returnvalue of libusb_claim_interface() and release the interface in case of early exit Version 2.10.2 - December 19, 2012 - Stop all work from the current pool if it's a stratum pool once it is disconnected since it will be invalid upon reconnecting. - Discard all staged work from stratum pools as well as the shares upon disconnection since all the work becomes invalid. - Use correct cbreak after 15 second delay when no pool is found alive. - MMQ missing firmware -> ERR not DEBUG - Allow stratum to work with scrypt. - MMQ ensure delta clock can never exceed limits - MMQ lowercase new string constants - MMQ add api pgaset for clock - API V1.23 - new pgaset command, to be used soon - Protect the best_share/best_diff values under control lock. - MMQ style police - MMQ count work check timeout failures - MMQ allow partial work replies and count them - Check a stratum pool hasn't gone dead while being a backup pool and missed having its idle flag cleared. - MMQ overheat: remove clockdown (doesn't help) + ensure no lost shares - API-README grammar - API-README explain custom page extensions in miner.php - miner.php add a sample group pool report - miner.php allow where,group,having on cumstom pages Version 2.10.1 - December 14, 2012 - Check for EWOULDBLOCK when supported in send and recv as well. - Use the raw send() command instead of curl_easy_send since curl raw socket usage introduces random bugs on windows. - Use raw recv() command in place of curl_easy_recv since the curl implementation introduces random bugs on windows builds when the recv fails. - miner.php when displaying a single rig, add prev/next rig buttons if they exist, next to refresh - miner.php allow custom page joins for STATS

- API show if pool has GBT (so people know not to use that pool) - miner.php - include windows easyphp link - driver-ztex: use the correct size for the swap array - API stats - display pool byte transfer stats - Pool store data transfer stats - README ModMiner dependency - Benchmark incorrect work size - ChangeLog refer to NEWS - MMQ handle over temp differently and hash longer - driver-ztex: search the complete noncerange based on the actual speed - README - update ModMiner details - API-README update - api use a dynamic io buffer, truncated before it reaches the current ~64k limit Version 2.10.0 - December 10, 2012 - Include prctl header for thread renaming to work. - Set tv_idle time if a pool is not active when input from the menu. - usb display message when device is in use/another cgminer - libztex: avoid the use of libusb_error_name() - minor unlikely zero pointer test - BeaverCreek doesn't like BFI INT patching. - Only stratum pools that are idle need to be kicked via cnx_needed. - mmq - abbreviate the temperature numbers - Do not do any setup if opt_api_listen is disabled in api.c. - usbutils.c uninitialised usbstat for non-primary mmqs - Only set the lagging flag for select_pool() on failed getwork if we're not in opt_fail_only mode. - libztex: in case the selectFpga() failed set the selected fpga to unknown - Modified windows-build.txt to update git instructions. - libztex: use a function for the twice called firmware reset code - libztex: removed an unused struct member (ztex->valid) - driver-ztex: support for broken fpga on a multifpga board - Set the pool lagging flag on startup to avoid it being shown initially, and only unset it once the maximum number of staged work items has been reached. - Avoid recursive locking of the stgd lock. - Return value of keep_sockalive is no longer used. - Remove dependency on mstcpip.h for windows build by making curl version >= 7.25.0 mandatory on windows builds, and use curl functions for keepalive whenever possible instead. - Make main() the getwork scheduler once everything is set up, so that all app exits use the kill_work and quit paths. - ztex: more style and whitespace fixes - libztex: silenced another warning - Set successful connect to true on auth stratum to allow summary on exit from single stratum pool. - Only consider work stale for stratum of different job_id if it's not a share. - Increment version preempting changed version signifying different codebase to 2.9 - Hash_pop should signal further waiters on its own pthread conditional in case there are multiple waiters. - Check the job_id has not changed on stratum work when deciding if the work is stale as might occur across disconnections. - Perform pool_resus on getwork pool that generates work in getwork_thread. - Set pool lagging message for getwork pool that falls to zero staged in getwork thread. - Stage extra work when the primary pool is a getwork pool without rolltime. - Do not try to clean up twice if kill message is given.

- Only recalculate total_staged in getwork thread if required. - Include the correct config header in libztex and include it before other includes. - Implement a completely new getwork scheduler. Stage all work from the one thread, making it possible to serialise all requests minimising the number of getworks requested or local work generated. Use a pthread conditional to wake up the thread whenever work is removed to generate enough work to stay above the watermark set by opt_queue. Remove all remnants of the old queueing mechanism, deleting the now defunct queued count. - libztex: fixed some warnings and removed some whitespaces - libztex: silenced some warnings - Remove all references to the now unused workio_cmd structure. - Remove the old workio command queue thread, replacing it with a kill conditional to exit the program. - Remove getwork command from workio_cmd queues and do them directly from queue_request. - Begin tearing down the old workio command queues by removing submit commands from there and submit them asynchronously via their own threads. - Update windows build instructions. - Set pool probed to true on successful authorisation with stratum to avoid it being pinged later with pool_getswork. - driver-ztex: libztex_setFreq() must be called before ztex_releaseFpga() - driver-ztex: changed two pairs of malloc()/memset() to calloc() - libztex: Read bitstream file in 2kb blocks with simpler and faster code - Added the binary versions of ztex_ufm1_15d4.ihx and ztex_ufm1_15y1.ihx - Trivial space removal. - libztex: Add firmware download support for ZTEX 1.15d and 1.15x - libztex: Factor out local version of libusb_get_string_descriptor_ascii() - Shut up some boring old cpu warnings. - Style changes. - Allow pool active to be called on stratum or disabled pools in the watchpool thread if the pool has not been probed. - libztex: Make log messages say bitstream when refering to bitstreams - libztex: Don't return error when a bitstream was already configured - libztex: Read bitstream file in 64kb blocks with simpler and faster code - libztex: Verify that the mining firmware is not a dummy firmware - libztex: Match mining firmware ZTEX descriptor against the dummy firmware - Combine shared padding into one char. - libztex: Start download sequence only after reading in the new firmware - libztex: Download mining firmware to all devices with dummy firmware - lock (most of) the threaded statistics updates - README stats don't add up - usbutils.c remove compiler warning - Make need connection return true if a pool is idle. - API add Best Share to summary - Check on creating new GBT work if the structures are up to date and update them as required rather than regularly. - Update windows build instructions. - Enable backup stratum connections for getwork when the primary pool doesn't have longpoll aka solo mining. - Check for correct absence of opt_fail_only in cnx_needed. - Remove unused variable. - The specification for stratum has been elaborated to say that a changed diff applies only to new work so do not retarget when submitting shares. - Use a variable length string array in submit_upstream_work to cope with massive GBT submissions. - API lock access to some summary statistics (and copy them) - Suspend stratum connections to backup pools when there is no requirement to potentially grab work from them. - Fix missing export for RenameThread.

- enumerate the mining threadnames - MMQ avoid possible number overrun crashes - mmq usb v0.4 + api usb stats - setting the name of the threads for linux,freebsd,openbsd and osx code is borrowed from bitcoins util.c, so it is already tested - Don't show broken WU value with scrypt mining. - Style police. - Remove unused getwork times in getswork. - Fix readme wordwrap. Version 2.9.6 - December 2, 2012 - Make gen_stratum_work more robust by using a dynamically allocated array for the header in case bogus data is sent by the pool to avoid overflowing a static array. - scrypt_diff now returns a uint64_t - Support monitoring and reporting much higher diffs for scrypt mining, truncating irrelevant zeroes from displayed hash. - Pass ostate values around in scrypt to be able to extract full hashes if needed later on. - Since we will be using calloc_str to put a string into it, convert the function to calloc_strcat which does it automatically. - Revert "Handle crash exceptions by trying to restart cgminer unless the --no-restart option is used." - Count longpoll and GBT decodes as queued work since the count otherwise remains static. - Use the string helper functions to create gbt blocks of any length. - Provide helper functions calloc_str and realloc_strcat to create and extend arbitrary length arrays based on string length. Version 2.9.5 - November 25, 2012 - fixes target calc for mips openwrt - openwrt needs roundl - Get rid of unused last_work in opencl thread data. - Do away with the flaky free_work api in the driver code which would often lose the work data in opencl and simply flush it before exiting the opencl scanhash. - Use base_work for comparison just for cleanness in __copy_work - Remove all static work structs, using the make and free functions. - Add pool no. to stale share detected message. - Add info about which pool share became stale while resubmitting. -b Copy the work on opencl_free_work - Add an extra slot in the max backlog for ztex to minimise dupes. - Do not use or count the getworks submitted which are simply testing that pools are still up. This was increasing share leakage and making stats not reflect real work. - Track all dynamically allocated memory within the work struct by copying work structs in a common place, creating freshly allocated heap ram for all arrays within the copied struct. Clear all work structs from the same place to ensure memory does not leak from arrays within the struct. Convert the gbt coinbase and stratum strings within the work struct to heap ram. This will allow arbitrary lengths without an upper limit for the strings, preventing the overflows that happen with GBT. - libztex: Work around ZTEX USB firmware bug exposed by the FreeBSD libusb - opencl: Use new dev_error function for REASON_DEV_NOSTART Version 2.9.4 - November 18, 2012

- Provide rudimentary support for the balancing failover strategies with stratum and GBT by switching pools silently on getwork requests. - Convert remaining modminer and bfl uses of usleep to nmsleep. - Convert libztex to nmsleep where possible. - Convert unreliable usleep calls to nmsleep calls in ztex driver. - Support workid for block submission on GBT pools that use it. - Provide rudimentary support for literal ipv6 addresses when parsing stratum URLs. - Work around libcurl cflags not working on hacked up mingw installations on windows. - Only increase gpu engine speed by a larger step if the temperature is below hysteresis instead of increasing it to max speed. - Convert pool not responding and pool alive message on backup pools to verbose level only since they mean a single failed getwork. - Update work block on the longpoll work item before calling restart threads to ensure all work but the longpoll work item gets discarded when we call discard_stale from restart_threads. - Do not attempt to remove the stratum share hash after unsuccessful submission since it may already be removed by clear_stratum_shares. - Check against a double for current pool diff. - Support for fractional diffs and the classic just-below-1 share all FFs diff target. Version 2.9.3 - November 11, 2012 - Make header larger on gen stratum work to accomodate \0 at the end. Version 2.9.2 - November 11, 2012 - Use stratum block change from backup pools as an alternative to longpoll for pools that don't support LP. - Check share target diff for best_share to be calculated when solo mining. - Round some more static string arrays to 4 byte boundaries. - There is no need for the static arrays to be larger than required, so long as they're 4 byte aligned to appease ARM. - Store the full stratum url information in rpc_url for correct configuration file saving. - Put in a hack to prevent dud work from sneaking into test_work_current being seen as a new block. - Reset the work->longpoll flag where it will affect stratum work items as well. - Check for both coinbase/append and submit/coinbase support before using GBT protocol. - First pass through testing for GBT should not set probed to true since we are about to probe again. - Hash1 is only used by the deprecated cpu mining code and never changes so remove it from the work struct and bypass needing to process the value for all other mining. - Get a work item once per minute for all getwork and GBT pools to test they're still alive and to maintain a current GBT template. - Get a fresh block template with GBT pools on switching to them. Version 2.9.1 - November 6, 2012 - Reset work flags to prevent GBT shares from being submitted as stratum ones after switching.

Version 2.9.0 - November 6, 2012 - Add endian swap defines for where missing. - Only retarget stratum shares to new pool diff if diff has dropped. - Remove resetting of probed variable when detecting GBT. - Count lost stratum share submits and increase message priority to warning. - Only retrieve a new block template for GBT pools that are the current pool. - Show which pool untracked share messages have come from. - Add management for dead GBT pools. - Count lost shares with stratum as submit stale lost. - Discard record of stratum shares sent and report lost shares on disconnection since they will never be reported back. - Swab, don't just swap the bytes in the GBT target. - Change status window message for GBT connected pools versus LP. - Generate a gbt work item from longpoll when required to set new block and message appropriately. - Use existing pool submit_old bool from gbt data. - Retrieve a new block template if more than 30 seconds has elapsed since the last one to keep the data current and test the pool is still alive. - Update GBT longpollid every time we request a new longpoll. - Manage appropriate response codes for share submission with GBT. - Allow the longpoll thread to start with GBT and only set the longpollid once. - Correct last few components of GBT block generation courtesy of Luke-jr. - Use correct length for offsetting extra nonce and remaining data. - Flip all 80 bytes in the flip function which was wrongly named flip256 for its purpose. - Calculate midstate for gbt work and remove now unused variable. - Use a standard function for flipping bytes. - Insert the extra nonce and remaining data in the correct position in the coinbase. - Remove txn size debugging and enlarge gbt block string to prevent overflow. - Remove varint display debugging. - Build varint correctly for share submission and sleep 5 seconds before retrying submit. - Make gbt_coinbase large enough for submissions, swap bytes correctly to make a header from GBT and encode the number of transactions in share submission. - Store the fixed size entries as static variables in GBT in binary form, byteswapping as is required. - 32 bit hex encoded variables should be in LE with GBT. - Target and prevblockhash need to be reversed from GBT variables. - Construct block for submission when using GBT. - Use same string for debug as for submission and make string larger to cope with future GBT messages. - Skip trying to decipher LP url if we have GBT support. - Store all the transaction hashes in pool->txn_hashes instead of separating txn0 and correct generation of merkle root, fixing memory overwrites. - Hook into various places to generate GBT work where appropriate. - Create extra work fields when generating GBT work. - Generate header from correct hashing generation of the merkle root for GBT. - Generate the merkle root for gbt work generation. - Create a store of the transactions with GBT in the minimum size form required to generate work items with a varied coinbase. - Create a function that generates a GBT coinbase from the existing pool variables. - Extract and store the various variables GBT uses when decoding gbt work. - Check for invalid json result in work_decode. - Decode work in separate functions for getwork vs gbt. - Check for the coinbase/append mutable in GBT support to decide whether to use it or not.

- Add a gbt mutex within the pool struct for protecting the gbt values. - Convert work decode function to prepare for decoding block templates. - Check for GBT support on first probing the pool and convert to using the GBT request as the rpc request for that pool. - Make the rpc request used with getwork a pool variable to allow it to be converted to/from gbt requests. - Changes to build prototypes to support building on FreeBSD 9.1-RC2 amd64 - Free old stratum_work data before replacing it - There is no need for addrinfo any more. - server and client sockaddr_in are no longer used in struct pool. - Merge pull request #322 from luke-jr/bugfix_stratum_tmpwork - Set sshare id and swork_id within the sshare mutex to avoid multiple share submits with the same id. - Initialize temporary stratum work Version 2.8.7 - October 29, 2012 - Fail on select() failing in stratum thread without needing to attempt recv_line. - Add share to stratum database before sending it again in case we get a response from the pool before it's added. Version 2.8.6 - October 29, 2012 - Shorten the initiate stratum connect timeout to 30 seconds. - Shorten the stratum timeout on read to 90 seconds to detect unresponsive pool. - Display best share difficulty on exit. - Make stratum socket fail more robust on windows by disabling the send buffer. - Reuse the same curl handle forcing a new connection instead of risking derefencing. - Add information about submission failure to stratum send. - Only add stratum share to database if we succeeded in submitting it, with a debug output saying it succeeded. - Use keepalive with stratum sockets to improve its ability to detect broken connections. - Show only the URL in the status bar to avoid long prefixes making for extra long lines. - Display compact status in menu and update README to reflect current menu entries. - Add a compact display mode that does not list per device statistics in the status window. - Add blank spaces after best share displayed. - Round a few static string arrays up to 4 byte boundaries for ARM. - Display best share diff for scrypt as well. - Show the best diff share as "best share" and add info to the README. - Display the best diff share submitted so far. - Redundant check. - The work struct pointer in struct pc_data in findnonce is never freed yet there is no need to allocate it separately so make struct work a static part of the struct pc_data. s Version 2.8.5 - October 23, 2012 - Handle crash exceptions by trying to restart cgminer unless the --no-restart option is used. - Switch queued count when choosing a different pool from a failed stratum pool in getwork thread.

- Put a mandatory 5s wait between reattempting a getwork on failure to avoid hammering requests. - The ATI stream / AMD APP SDK environment variables appear to only interfere with win32 builds so bypass them. - Make sure to check pool stratum curl exists under lock before attempting any recv to not risk dereferencing upon attempting to reinitiate stratum. - Avoid redefining macros and align to 4 byte boundaries. - API - add Stratum information to pools - update FPGA-README for MMQ Version 2.8.4 - October 18, 2012 - Time for dynamic is in microseconds, not ms. - x86_64 builds of mingw32 are not supported directly and should just configure as generic mingw32 builds since they're NOT 64 bit. - Cope with both ATI stream and AMD APP SDK roots being set when building. - Use 3 significant digits when suffix string is used and values are >1000. - MMQ new initialisation (that works) and clocking control - Get rid of unused warning for !scrypt. - Use select on stratum send to make sure the socket is writeable. - Cope with dval being zero in suffix_string and display a single decimal place when significant digits is not specified but the value is greater than 1000. - Pad out the suffix string function with zeroes on the right. - Failure to calloc in bin2hex is a fatal failure always so just check for that failure within the function and abort, simplifying the rest of the code. - Provide locking around the change of the stratum curl structures to avoid possible races. - Bump opencl kernel version numbers. - Remove atomic ops from opencl kernels given rarity of more than once nonce on the same wavefront and the potential increased ramspeed requirements to use the atomics. - Clear the pool idle flag in stratum when it comes back to life. - Display correct share hash and share difficulty with scrypt mining. - Use explicit host to BE functions in scrypt code instead of hard coding byteswap everywhere. - Show work target diff for scrypt mining. - Ease the checking on allocation of padbuffer8 in the hope it works partially anyway on an apparently failed call. - Watch for buffer overflows on receiving data into the socket buffer. - Round target difficulties down to be in keeping with the rounding of detected share difficulties. - Dramatically simplify the dynamic intensity calculation by oversampling many runs through the opencl kernel till we're likely well within the timer resolution on windows. - String alignment to 4 byte boundaries and optimisations for bin<->hex conversions. - In opencl_free_work, make sure to still flush results in dynamic mode. - Align static arrays to 4 byte boundaries to appease ARM builds for stratum. Version 2.8.3 - October 12, 2012 Left align values that are suffix_string generated. Share_diff should not be converting the work data to hex. Off by one error. Prevent overflows of the port char array in extract_sockaddr. Disable stratum detection with scrypt. Use the suffix string function when displaying device hashrates. Be consistent with the get_statline function.

- Use the suffix string function for displaying hashrate with 4 significant digits. - Display the actual share diff next to the pool required diff, using a suffix creation function to prevent values of >1000 being shown in their entirety. - Fix 4 * 0 being 0 that would break dynamic intensity mode. - Fix wrong byteswap macro being used on mingw32 which was breaking target generation on stratum. Version 2.8.2 - October 11, 2012 - Reinstate the history on dynamic intensity mode to damp fluctuations in intensity but use an upper limit on how much the value can increase at any time to cope with rare overflows. - Create a fix-protocol option which prevents cgminer from switching to stratum if it's detected. - Simplify target generation code. - Add support for client.get_version for stratum. - Use a 64 bit unsigned integer on the diff target to generate the hex target. - Update reconnect message to show whole address including port. - Look for null values and parse correct separate array entries for url and port with client reconnect commands for stratum. - The command for stratum is client.reconnect, not mining.reconnect. - Only copy the stratum url to the rpc url if an rpc url does not exist. - Implement rudimentary mining.reconnect support for stratum. - Ignore the value of stratum_active on calling initiate_stratum and assume we're always trying to reinitiate it, and set the active flag to false in that function. - stratum auth can be unset if we fail to authorise on subsequent calls to auth_stratum which undoes the requirement of setting it in one place so set it in pool_active. Version 2.8.1 - October 8, 2012 - Use the stratum url as the rpc url advertised if we switch to it. - Count an invalid nonce count as a hardware error on opencl. - Count each stratum work item as local work. - Cope with one stratum pool being the only active pool when it dies by sleeping for 5 seconds before retrying to get work from it instead of getting work indefinitely. - Detect stratum outage based on either select timing out or receiving an empty buffer and properly re-establish connection by disabling the stratum_active flag, coping with empty buffers in parse_stratum. Version 2.8.0 - October 7, 2012 - Major upgrade - support for the stratum mining protocol. - Fix various modminer warnings on mingw. - Fix sign warning on windows build for bitforce. - Cast socketfail to integer since SOCKET is an unsigned int on windows. - Use strtod not strtol for bitforce temp backup. - Cope with broken drivers returning nonsense values for bitforce temperatures. - Minor warning fixes. - Use the stratum thread to detect when a stratum pool has died based on no message for 2 minutes. - Only set the stratum auth flag once and once the stratum thread is started, use that to set/unset the stratum active flag. - Only hand off to stratum from getwork if we succeed in initiating the

protocol. - Target should only be 32 bytes copied. - Use a static array for work submission data instead of stack memory. - Clear the buffer data before sprinting to it. - Clear work stratum strings before setting them and add them to debug output. - Drop stratum connect failed message to verbose level only since it's a regular probing message. - TCP Keepalive in curl is only in very recent versions and not required with regular messages on stratum anyway. - Move stratum sockets to curl infrastructure with locking around send+recv to begin support for proxies and ssl. - Make detect stratum fail if a proxy has been set up. - Stratum does not currently have any proxy support so do not try to switch to stratum if a proxy has been specified. - Windows doesn't work with MSG_PEEK on recv so move to a continuously updating buffer for incoming messages. - Alloca is unreliable on windows so use static arrays in util.c stratum code. - Begin support for mingw stratum build. - Add space to reject reason. - Parse the reject reason where possible from stratum share submission. - Pass json error value to share result function to be able to parse reject reason in stratum. - Don't try to parse unneeded parameters in response to mining.subscribe. - Remove the sshare hash entry if we failed to send it. - Change notify message to info level to avoid spamming repeatedly when a pool is down. - Check the stratum pool difference has not changed compared to the work diff when testing whether a share meets the target or not and retarget if necessary. - Bit error in target calculation for stratum. - Set work_block in gen_stratum_work for when work is reused to avoid thinking it's all stale. - Offset the current block detection to the prev block hash. - We should be testing for id_val, not id in parse stratum response. - Make target on stratum scale to any size by clearing sequential bits according to diff. - Correct target calculation in gen_stratum_work. - If a share result has an error code but still has an id, it is likely a reject, not an error. - Initiate stratum the first time in pool_active only, allowing us to switch to it on getting a failed getwork and detecting the presence of stratum on the url at that time. - Use 5 second timeout on sock full for now as a temporary workaround. - If no stratum url is set by the end of the detect stratum routine, copy the sockaddr url. - Make all buffers slightly larger to prevent overflow. - Make the stratum recv buffer larger than the recvsize. - Userpass needs to be copied to user and pass earlier to allow stratum authorisation to work with it. - Store a sockaddr url of the stripped url used in determining sockaddr to not confuse it with the stratum url and fix build warnings. - Decrease the queued count with stratum work once it's staged as well. - Allow the stratum retry to initiate and auth stratum in pool_alive to make sure the stratum thread is started. - Avoid duplicating pool->rpc_url and setting pool->stratum_url twice to itself. - Detect if a getwork based pool has the X-Stratum header on startup, and if so, switch to the stratum based pool. - Comment update. - Minor message change. - Create a work item from a "clean" request from stratum allowing the new block to be detected and the appropriate block change message to be given.

- Use statically allocated stratum strings in struct work to cope with the inability to safely deallocate dynamically allocated ram. - Use the current pool when deciding whether to reuse work from a stratum source rather than the work's previous pool. - Copy the stratum url to the rpc url to avoid none being set. - Provide locking around stratum send operations to avoid races. - Submit shares from stratum through the abstracted submit share function detecting what message they belong to and showing the data from the associated work, and then deleting it from the hash. - Use a more robust mechanism to obtain a \n terminated string over a socket. - Abstract out share submit as a function to be useable by stratum. - Rename parse_stratum to parse_method as it is only for stratum messages that contain methods. - Display stratum as mechanism in status line when current pool is running it. - Count each stratum notify as a getwork equivalent. - Correct nonce submitted with share. - Extranonce2 should be added before coinbase2. - We should be hashing the binary coinbase, not the hex one. - Fix endianness of nonce submitted for stratum. - Check that stratum is already active in initiate_stratum to avoid de-authorising ourselves by subscribing again. - Begin implementing a hash database of submissions and attempt sending results. - Copy parameters from stratum work required for share submission. - Set lagging flag on first adding a pool to prevent pool slow warning at startup. - Fix work->target being a 32 byte binary in gen_stratum_work. - Store and display stripped url in its own variable. - Create machinery to divert work requests to stratum. - Generate the work target in gen_stratum_work, setting default diff to 1 in case it is not yet set. - Generate work data, midstate and hash1 in gen_stratum_work. - Generate header created from stratum structures in gen_stratum_work. - Generate merkle root hash in gen_stratum_work. - Generate the coinbase for generation of stratum based work. - The number of transactions is variable so make merkle a variable length dynamically allocated array and track how many there are for stratum. - Rename nonce2 to n2size reflecting that it's a size variable and not the actual nonce. - Provide rudimentary support for stratum clean work command in the stratum thread. - Cope with pools being removed in the stratum thread. - Use the pool sock value directly in the stratum thread in case it changes after reconnecting. - Create a stratum thread per pool that has stratum that monitors the socket and serves received data. - Check return value of stratum_parse. - Complete authorisation in stratum. - Implement stratum parsing of notify parameters and storing them in the pool stratum work structure. - Create helper functions for duplicating json strings to avoid keeping json references in use. - Append \n in the sock_send function instead of adding it when constructing json in stratum. - Don't keep any json references around with stratum structures. - Create parse_stratum function that hands off stratum parameters to other functions to manage pool stratum work struct variables. Implement mining difficulty setting. - Create helper functions for checking when a socket is ready to read on and receive a single line at a time. Begin stratum authorisation process. - Provide a helper function for reading a single \n terminated string from a

socket. - Create a stratum work structure to store current work variables. - Test specifically for stratum being active in pool_active. - Detect stratum in common place when adding urls, and use a bool to tell us when it's active. - Fix warnings. - Extract and store various parameters on stratum init confirming successful mining notify. - Use existing socket macros and close the socket on failure in init stratum. - Initiate stratum and grab first json result. - Get detailed addressinfo from the parsed URL for future raw socket usage when possible. IPV4 only for now. - Prepare for getaddrinfo call. - Add data structures to pool struct for socket communications. - Put all socket definitions in util.h to allow reusing by added socket functions to be used in util.c. Version 2.7.7 - October 7, 2012 - Fix unused warnings on ming build. - Fix sign warning in ocl.c - fds need to be zeroed before set in modminer. - Put scrypt warning on separate line to avoid 0 being shown on windows as bufsize. - Display correct pool number when block is found. - Prevent corrupt values returned from the opencl code from trying to read beyond the end of the buffer by masking the value to a max of 15. - Icarus USB write failure is also a comms error - api.c DEBUG message has no paramter - Icarus catch more USB errors and close/reopen the port - API-README update cgminer verison number - hashmeter fix stats kh/s on 32bit windows Version 2.7.6 - September 24, 2012 - Reorder libztex header include order to fix missing struct definition. - Display share difficulty on log with a shortened hash display on submission. - API stats add some pool getwork difficulty stats - Ignore any pings pushed to the worker threads if the thread is still paused to prevent it being enabled and disabled repeatedly. - README - FAQ - usermod group - shouldn't remove other groups - Test for sequential getwork failures on a pool that might actually be up but failing to deliver work as we may end up hammering it repeatedly by mistake. - reduce windows compile warnings - util.c - bug - proxy - no data end condition - As we average gpu time over 5 work intervals for dynamic GPU intensity, there is no need to maintain a rolling average and it avoids the potential long term corruption of a single overflow value. - Test for the now-automatically exported variable AMDAPPSDKROOT when looking for the presence of the OpenCL headers. - API don't change 'Diff1 Shares' - backward compatability FTW - miner.php highlighting correctly handling difficulty - API - Add last share difficulty for devices and pool - Store and report Accepted,Rejected,Stale difficulty in the summary and API - WorkTime - display prevblock for scrypt - api.c remove compile warnings - Calculate work difficulty for each getwork and display with WorkTime debug - remove MMQ unused variable warning

- FPGA - allow long or short device names in detect code + style police - WorkTime - multiple nonce per work and identify the work source - Optional WorkTime details with each Accepted/Rejected work item - Icarus - ignore hardware errors in timing mode - miner.php oops - mistype - miner.php by default don't display IP/Port numbers in error messages - api.c all STATUS messages automatically escaped - api.c add missing escape for comma in MSG_PGAUNW - API add display of and setting queue,scantime,expiry - HW: dont submit bad shares - save individual pool proxy settings to config - --default-config - allow command line to define the default configuration file for loading and saving - API-README update for pools proxy info - README URL proxy must use quote so show in the example - bug: remove proxy: from the front of the proxy used - CURL support for individual proxy per pool and all proxy types - README spelling/etc - README - FPGA device FAQ - HW: error counter auto for all devices - ztex code not fixed - API pgaidentify - unsupported message should be a warning - API/BFL identify a device - currently only BFL to flash the led - BFL add throttle count to internal stats + API - BFL: missing device id in log message - miner.php correct to new Diff1 Work field names - API add device diff1 work - API-README update - api.c Correct diff1 field name - count device diff1 shares - API-README more debug parameter information - API allow full debug settings control Version 2.7.5 - August 31, 2012 - Adjust opencl intensity when adjusting thread count to prevent it getting pegged at a value below the minimum threads possible. - miner.h max_hashes -> int64_t - Keep the local block number in the blocks structs stored and sort them by number to guarantee we delete the oldest when ageing the block struct entries. - Use correct sdk version detection for SDK 2.7 - Revert "Pick worksize 256 with Cypress if none is specified." - Test for lagging once more in queue_request to enable work to leak to backup pools. - There is no need to try to switch pools in select_pool since the current pool is actually not affected by the choice of pool to get work from. - Only clear the pool lagging flag if we're staging work faster than we're using it. - needed flag is currently always false in queue_request. Remove it for now. - thr is always NULL going into queue_request now. Version 2.7.4 - August 23, 2012 - Perform select_pool even when not lagging to allow it to switch back if needed to the primary. - Simplify macros in output kernels avoiding apparent loops and local variables. - Carry the needed bool over the work command queue. - Move the decision to queue further work upstream before threads are spawned based on fine grained per-pool stats and increment the queued count immediately.

- Track queued and staged per pool once again for future use. - OpenCL 1.0 does not have native atomic_add and extremely slow support with atom_add so detect opencl1.0 and use a non-atomic workaround. - Pools: add RollTime info to API 'stats' and 'Stats' button in miner.php Version 2.7.3 - August 22, 2012 - Minimise the number of getwork threads we generate. Version 2.7.2 - August 22, 2012 - Pick worksize 256 with Cypress if none is specified. - Give warning with sdk2.7 and phatk as well. - Whitelist sdk2.7 for diablo kernel as well. - Only keep the last 6 blocks in the uthash database to keep memory usage constant. Storing more is unhelpful anyway. - BFL Flash - always distribute source - Increase kernel versions signifying changed APIs. - BFL flash - include source in builds and more FPGA-README - Check we haven't staged work while waiting for a curl entry before proceeding. - Use atomic ops to never miss a nonce on opencl kernels, including nonce==0, also allowing us to make the output buffer smaller. - Remove compile errors/warnings and document compile/usage in FPGA-README - bitforce-firmware-flash.c by Luke-jr - Ignore the submit_fail flag when deciding whether to recruit more curls or not since we have upper bounds on how many curls can be recruited, this test is redundant and can lead to problems. - API-README update cgminer version number - API-README fix groups P: example mistake - API-README add COIN and other edits - gpu->hit should be reset on new work as well. - Do not add time to dynamic opencl calculations over a getwork. - miner.php allow 'coin' is custom pages Version 2.7.1 - August 21, 2012 - Update windows build instructions courtesy of sharky. - Increase max curls to number of mining threads + queue * 2, accounting for up and downstream comms. - Queue enough requests to get started. - There is no point trying to clone_work in get_work() any more since we clone on every get_work_thread where possible. - There is no point subtracting 1 from maxq in get_work_thread. - Only set lagging flag once there are no staged work items. - select_pool does not switch back to the primary once lagging is disabled. - miner.php allow page title to be defined in myminer.php - Free work before retrying in get_work_thread. - Increment total work counter under mutex lock. - Increment the queued count after the curl is popped in case there's a delay waiting on curls and we think we've queued work when in fact we're waiting - API new command 'coin' with mining information - Do the dynamic timing in opencl code over a single pass through scanhash to make sure we're only getting opencl times contributing to the measured inte - Increase curl reaping time to 5 minutes since comms between curl requests can be 2 mins apart with lots of rolltime. - No need for extra variable in hash_push. - Remove short options -r and -R to allow them to be reused and remove readme

entries for deprecated options. - Avoid attempting to recursively lock the console mutex by disabling warnings in gpu_fanpercent when fanspeed monitoring fails on windows. Debugged by l - Deprecate the opt_fail_pause parameter, leaving a null placeholder for existing configurations. - Don't pause after failed getwork, set lagging flag and reassess. - Add message to share if it's a resubmit. - We should not be pausing in trying to resubmit shares. - Get rid of the extending fail pause on failed connects since we discard work after a period. - get_work always returns true so turn it into a void function. - get_work never returns false so get rid of fail pause loop. - Get rid of pause and retry from get_upstream_work so we only do it from one place. - Deprecate the opt_retries feature as no one wants cgminer to automatically abort. Leave a null placeholder for configurations that still have it. - Reinstate fix ADL gpu-map not working when there are more ADL devices than openCL patch by Nite69. Add virtual adl mapping for when none is specified o - miner.php show summary Diff1 Shares total - miner.php fix Work Utility totals - miner.php format new Work Utility and Diff1 Shares - API V1.17 show Work Utility and Diff1 Shares

Version 2.7.0 - August 18, 2012 - Introduce a new statistic, Work Utility, which is the number of difficulty 1 shares solved per minute. This is useful for measuring a relative rate of work that is independent of reject rate and target difficulty. - Implement a new pool strategy, BALANCE, which monitors work performed per pool as a rolling average every 10 minutes to try and distribute work evenly over all the pools. Do this by monitoring diff1 solutions to allow different difficulty target pools to be treated equally, along with solo mining. Update the documentation to describe this strategy and more accurately describe the load-balance one. - Getwork fail was not being detected. Remove a vast amount of unused variables and functions used in the old queue request mechanism and redefine the getfail testing. - Don't try to start devices that don't support scrypt when scrypt mining. - 0 is a valid return value for read so only break out if read returns -1. - Consider us lagging only once our queue is almost full and no staged work. - Simplify the enough work algorithm dramatically. - Only queue from backup pools once we have nothing staged. - Don't keep queueing work indefinitely if we're in opt failover mode. - Make sure we don't opt out of queueing more work if all the queued work is from one pool. - Set lagging flag if we're on the last of our staged items. - Reinstate clone on grabbing work. - Grab clones from hashlist wherever possible first. - Cull all the early queue requests since we request every time work is popped now. - Keep track of staged rollable work item counts to speed up clone_available. - Make expiry on should_roll to 2/3 time instead of share duration since some hardware will have very fast share times. - Do the cheaper comparison first. - Check that we'll get 1 shares' worth of work time by rolling before saying we should roll the work. - Simplify all those total_secs usages by initialising it to 1 second. - Overlap queued decrementing with staged incrementing.

- Artificially set the pool lagging flag on pool switch in failover only mode as well. - Artificially set the pool lagging flag on work restart to avoid messages about slow pools after every longpoll. - Factor in opt_queue value into enough work queued or staged. - Roll work whenever we can on getwork. - Queue requests for getwork regardless and test whether we should send for a getwork from the getwork thread itself. - Get rid of age_work(). - 0 is a valid return value for read so only break out if read returns -1. - Offset libusb reads/writes by length written as well in ztex. - Cope with timeouts and partial reads in ztex code. - fpga serial I/O extra debug (disabled by default) Version 2.6.5 - August 15, 2012 - Don't try to get bitforce temperature if we're polling for a result to minimise the chance of interleaved responses. - Set memory clock based on memdiff if present from with engine changes, allowing it to parallel manual changes from the menu as well. - Increase the timeout on bitforce as per Paul Sheppard's suggestion to account for throttling + work time + excess. - Fix ADL gpu-map not working when there are more ADL devices than openCL. Initial patch supplied by Nite69. Modified to suit. - Windows' timer resolution is limited to 15ms accuracy. This was breaking dynamic intensity since it tries to measure below this. Since we are repeatedly sampling similar timeframes, we can average the gpu_us result over 5 different values to get very fine precision. - Fix harmless unused warnings in scrypt.h. - api.c typo - API allow display/change failover-only setting - Check we are not lagging as well as there is enough work in getwork. - Minimise locking and unlocking when getting counts by reusing shared mutex lock functions. - Avoid getting more work if by the time the getwork thread is spawned we find ourselves with enough work. - The bitforce buffer is cleared and hw error count incremented on return from a failed send_work already so no need to do it within the send_work function. - miner.php allow a custom page section to select all fields with '*' - e.g. to create a STATS section on a custom page - Escape " and \ when writing json config file - miner.php optional single rig totals (on by default) Version 2.6.4 - August 7, 2012 - Convert the serial autodetect functions to use int instead of char to enumerate devices. - Make the serial open timeout for BFL generically 1 second on windows. - Deuglify windows autodetect code for BFL. - There is no point zeroing temperature in BFL if we fail to get a response, and we should register it as a HW error, suggesting throttling. - Update SCRYPT README with information about HW errors. - Use the scrypt CPU code to confirm results from OCL code, and mark failures as HW errors, making it easier to tune scrypt parameters. - We may as well leave one curl still available per pool instead of reaping the last one. - Need to recheck the pool->curls count on regaining the pool lock after the pthread conditional wait returns.

- Display reaped debug message outside mutex lock to avoid recursive locking. - Add specific information when ADL detects error -10 saying the device is not enabled. - api.c update API start message and include port number - miner.php ignore arg when readonly - miner.php allow pool inputs: delete, addpool, poolpriority Version 2.6.3 - August 5, 2012 - Count likely throttling episodes on bitforce devices as hardware errors. - Style cleanups. - Use FTD2XX.DLL on Windows to autodetect BitFORCE SHA256 devices. - Make pool_disabled the first in the enums == 0, fixing the pool enabled count which compares if value is not enabled before enabling it. - Correct writing of scrypt parameters to config file based on command line parameters only. - Use different variables for command line specified lookup gap and thread concurrency to differentiate user defined versus auto chosen values. - Queue a request on pool switch in case we have no work from the new pool yet. - Display failover only mode in pool menu and allow it to be toggled live. - Reinstate check for system queueing lag when the current pool's queue is maxed out, there is no staged work, and the work is needed now. - There is no need for pool active testing to be mandatory any more with queue request changes. - Fix harmless warnings. - Check the current staged and global queued as well before queueing requests. Discard stales before ageing work in the watchdog thread. Queue requests after discarding and ageing work in watchdog thread. Display accurate global queued in curses output. Reuse variable in age_work(). - The queueing mechanism has become a complex state machine that is no longer predictable. Rewrite it from scratch watching only current queues in flight and staged work available on a pool by pool basis. - API remove unused warning in non-GPU compile - api.c in linux allow to open a closed socket in TIME_WAIT - Queue an extra request whenever staged work drops below mining thread count in hash_pop. - Update debian package configs to v2.6.2 Version 2.6.2 - August 3, 2012 - Scrypt mining does not support block testing yet so don't try to print it. - Clear the bitforce buffer whenever we get an unexpected result as it has likely throttled and we are getting cached responses out of order, and use the temperature monitoring as a kind of watchdog to flush unexpected results. - It is not critical getting the temperature response in bitforce so don't mandatorily wait on the mutex lock. - Check there is a cutoff temp actually set in bitforce before using it as a cut off value otherwise it may think it's set to zero degrees. - We dropped the temporary stopping of curl recruiting on submit_fail by mistake, reinstate it. - Make threads report in either side of the scanhash function in case we miss reporting in when restarting work. - Don't make mandatory work and its clones last forever. - Make test work for pool_active mandatory work items to smooth out staged work counts when in failover-only mode. - Add debugging output when work is found stale as to why. - Print the 3 parameters that are passed to applog for a debug line in bitforce.c

- Clear bitforce buffer on init as previously. - Add some headroom to the number of curls available per pool to allow for longpoll and sendwork curls. - Revert "Revert "Change BFL driver thread initialising to a constant 100ms delay between devices instead of a random arrangement."" - Revert "Remove bitforce_thread_init" - Show the correct base units on GPU summary. - Differentiate between the send return value being a bool and the get return value when managing them in bitforce scanhash. - 23a8c60 Revert "bitforce: Skip out of sending work if work restart requested" Version 2.6.1 - July 30, 2012 - Display scrypt as being built in as well. - Fix build warning about KL_SCRYPT when built without scrypt support. - Remove the low hash count determinant of hardware being sick. A low hash rate can be for poor network connectivity or scrypt mining, neither of which are due to a sick device. - api.c poolpriority changes Version 2.6.0 - July 29, 2012 - Display kilohash when suitable, but store the global mhash value still truly in megahashes to not break the API output. - Don't try and print curses output for devices that won't fit on the screen. - Add scrypt documentation in the form of a separate readme. - Fix build error without scrypt enabled. - Limit total number of curls recruited per pool to the number of mining threads to prevent blasting the network when we only have one pool to talk to. - bitforce: Skip out of sending work if work restart requested - Keep a counter of enabled pools and use that instead of iterating over the pool list. Use that value to ensure we don't set the last remaining active pool to the rejecting state. - fpgautils: add support for 57.6 kBd serial - miner.php add a socket RCV timeout for if cgminer is hung and the API thread is still running - Limit thread concurrency for scrypt to 5xshaders if shaders is specified. - Simplify repeated use of gpus[gpu]. in ocl.c - Find the nearest power of 2 maximum alloc size for the scrypt buffer that can successfully be allocated and is large enough to accomodate the thread concurrency chosen, thus mapping it to an intensity. - Don't make opt_scrypt mandatory blocking with opencl code. - Update kernel versions reflecting changes in the API. - Make the thread concurrency and lookup gap options hidden on the command line and autotune parameters with a newly parsed --shaders option. - Fix target testing with scrypt kernel as it would have been missing shares below target. - Bugfix: Use a mutex to control non-curses output - Simplify code to a single vprintf path for curses-less printing - Move opt_quiet check to my_log_curses, so it works for curses-less builds - Use log_generic for vapplog to cut down on code duplication - Add space to log output now that there is more screen real estate available. - BFL force all code to timeout to avoid hanging - Bugfix: Copy argv[0] given to dirname() - Always create the largest possible padbuffer for scrypt kernels even if not needed for thread_concurrency, giving us some headroom for intensity levels. - Use the detected maximum allocable memory on a GPU to determine the optimal scrypt settings when lookup_gap and thread_concurrency parameters are not given.

- Check the maximum allocable memory size per opencl device. - Add debugging output if buffer allocation fails for scrypt and round up bufsize to a multiple of 256. - Nonce testing for btc got screwed up, leading to no accepted shares. Fix it. - Display size of scrypt buffer used in debug. - Allow intensities up to 20 if scrypt is compiled in. - Add name to scrypt kernel copyright. - Allow lookup gap and thread concurrency to be passed per device and store details in kernel binary filename. - Ignore negative intensities for scrypt. - Change the scale of intensity for scrypt kernel and fix a build warning. - Correct target value passed to scrypt kernel. - Use 256 output slots for kernels to allow 1 for each worksize. - Test the target in the actual scrypt kernel itself saving further calculations. - Reinstate GPU only opencl device detection. - Decrease lookup gap to 1. Does not seem to help in any way being 2. - Fix build. - Make pad0 and pad1 local variable in scrypt kernel. - Constify input variable in scrypt kernel. - Send correct values to scrypt kernel to get it finally working. - Create command queue before compiling program in opencl. - Detach pthread from within the api thread in case it is terminated due to not being instantiated before pthread_cancel is called from main, leading to a segfault. - Debug output per thread hashrate is out by a factor of 1000. - Initialise mdplatform. - Find the gpu platform with the most devices and use that if no platform option is passed. - Allow more platforms to be probed if first does not return GPUs. - Fix external scrypt algo missing. - Limit scrypt to 1 vector. - Handle KL_SCRYPT in config write. - Get rid of stuff. - Don't enqueuewrite buffer at all for pad8 and pass work details around for scrypt in dev_blk. - Set the correct data for cldata and prepare for pad8 fixes. - Bugfix: Fix build without curses but with OpenCL - Find the gpu platform with the most devices and use that if no platform option is passed. - Allow more platforms to be probed if first does not return GPUs. - Get rid of spaces in arrays in scrypt kernel. - Start with smaller amount of hashes in cpu mining to enable scrypt to return today sometime. - Show Khash hashrates when scrypt is in use. - Free the scratchbuf memory allocated in scrypt and don't check if CPUs are sick since they can't be. Prepare for khash hash rates in display. - Add cpumining capability for scrypt. - Set scrypt settings and buffer size in ocl.c code to be future modifiable. - Cope with when we cannot set intensity low enough to meet dynamic interval by inducing a forced sleep. - Make dynamic and scrypt opencl calls blocking. - Calculate midstate in separate function and remove likely/unlikely macros since they're dependent on pools, not code design. - bitforce: Use "full work" vs "nonce range" for kernel name - Display in debug mode when we're making the midstate locally. - Fix nonce submission code for scrypt. - Make sure goffset is set for scrypt and drop padbuffer8 to something manageable for now. - Set up buffer8 for scrypt.

- Build fix for opt scrypt. - Don't check postcalc nonce with sha256 in scrypt. - Don't test nonce with sha and various fixes for scrypt. - Make scrypt buffers and midstate compatible with cgminer. - Use cgminer specific output array entries in scrypt kernel. - Provide initial support for the scrypt kernel to compile with and mine scrypt with the --scrypt option. - Enable completely compiling scrypt out. - Begin import of scrypt opencl kernel from reaper. - bitforce_get_result returns -1 on error now. - Check return value of read in BFgets - Bugfix: Make our Windows nanosleep/sleep replacements standards-compliant (which fixes nmsleep) and include compat.h for bitforce (for sleep) - rpc: Use a single switch statement for both stringifications of cgpu->status - Fix whitespace mangling. - miner.php fix rig # when miners fail - Only try to shut down work cleanly if we've successfully connected and started mining. - Use switch statement for cgpu->status and fix spelling. - Abbrv. correction - Bugfix: Don't declare devices SICK if they're just busy initialising - Bugfix: Calculate nsec in nmsleep correctly - Bugfix: Adapt OpenCL scanhash errors to driver API change (errors are now -1, not 0) - Remove superfluous ave_wait - Put kname change for broken nonce-range back in - Add average wait time to api stats - Change BFL driver thread initialising to a constant 100ms delay between devices instead of a random arrangement. - Spelling typo. - Time opencl work from start of queueing a kernel till it's flushed when calculating dynamic intensity. - Modify te scanhash API to use an int64_t and return -1 on error, allowing zero to be a valid return value. - Check for work restart after the hashmeter is invoked for we lose the hashes otherwise contributed in the count. - Remove disabled: label from mining thread function, using a separate mt_disable function. - Style changes. - Missed one nonce-range disabling. - Add average return time to api stats - miner.php allow rig names in number buttons - Remove bitforce_thread_init The delay thing does nothing useful... when long poll comes around, all threads restart at the same time anyway. - Change timeouts to time-vals for accuracy. - fix API support for big endian machines - Cope with signals interrupting the nanosleep of nmsleep. - Use standard cfsetispeed/cfsetospeed to set baud rate on *nix - miner.php split() flagged deprecated in PHP 5.3.0 - More BFL tweaks. Add delay between closing and reopening port. Remove buffer clear in re-init Add kernel type (mini-rig or single) - Make long timeout 10seconds on bitforce for when usleep or nanosleep just can't be accurate... Version 2.5.0 - July 6, 2012 - Fix --benchmark not working since the dynamic addition of pools and pool stats. - Make disabling BFL nonce range support a warning since it has to be explicitly

enabled on the command line now. - miner.php allow renaming table headers - Make bitforce nonce range support a command line option --bfl-range since enabling it decrease hashrate by 1%. - Add sanity checking to make sure we don't make sleep_ms less than 0 in bitforce. - The fastest minirig devices need a significantly smaller starting sleep time. - Use a much shorter initial sleep time to account for faster devices and nonce range working, and increase it if nonce range fails to work. - Use nmsleep instead of usleep in bitforce. - Provide a ms based sleep function that uses nanosleep to avoid the inaccuracy of usleep on SMP systems. - delay_time_ms is always set so need not be initialised in bitforce. - Increase bitforce timeout to 10 seconds. - Add more hysteresis and poll ~5 times to allow for timer delays in bitforce devices. - miner.php allow alternating line colours (off by default) - Display the actual duration of wait when it is greater than the cutoff. - Set nonce to maximum once we determine nonce range support is broken. - Initial wait time is always known so no need to zero it beforehand in bitforce. - No point counting wait time until the work is actually sent to bitforce devices. - Use string comparison functions instead of explicit comparisons. - Account for wait_ms time when nonce_range is in use on BFL. - Split nonces up into 1/5 chunks when nonce range is supported. - limit clear buffer iterations. - Ad fd check to clear buffer. - miner.php remove incorrect 'DATE' error message - miner.php allow summary header in custom pages - Disable nonce range support in BFL when broken support is detected. - Restart_wait is only called with a ms value so incorporate that into the function. - Only try to adjust dev width when curses is built in. - miner.php define custom sum fields as a simple array - Fix off-by-one error in nonce increment in bfl. - Use BE when setting nonce in bitforce nonce range work. - Enable nonce range in the normal init sequence for bfl. - Queue extra work at 2/3 differently depending on whether we're using nonce range or not. - Initially enable support for nonce range support on bfl, splitting nonces up into 3/4 size and only disable it if it fails on work submit. - Attempt to detect nonce range support in BFL by sending work requring its support. - Limit retrying on busy for up to BITFORCE_TIMEOUT_MS - Attempt to initialise while bitforce device returns BUSY. - Extend length of string that can be passed to BFL devices. - Fix signedness warning. - Adjust device width column to be consistent. - Use cgpu-> not gpus[] in watchdog thread. - Add api stats (sleep time) - Timing tweaks Added long and short timeouts, short for detecting throttling, long to give up totally. Reset sleep time when device re-initialised Still check results after timeout Back up a larger time if result on first poll. - Add API Notify counter 'Comms Error' - Style police on api.c - Do all logging outside of the bitforce mutex locking to avoid deadlocks. - Remove applog call from bfwrite to prevent grabbing nested mutexes. - Bitforce style changes. - Minor style changes.

- Remove needless roundl define. - Made JSON error message verbose. - Fine-tune timing adjustment. Also remove old work_restart timing. - Check for gpu return times of >= 0, not just 0, to fix intensity dropping to -10. - Restart is zeroed in the mining thread so no need to do it inside the bitforce code. - More improvements to comms. BFL return nothing when throttling, so should not be considered an error. Instead repeat with a longer delay. - Polling every 10ms there's not much point checking the pthread_cond_timedwait as it just adds overhead. Simply check the value of work_restart in the bfl main polling loop. - Use a pthread conditional that is broadcast whenever work restarts are required. Create a generic wait function waiting a specified time on that conditional that returns if the condition is met or a specified time passed to it has elapsed. Use this to do smarter polling in bitforce to abort work, queue more work, and check for results to minimise time spent working needlessly. - Add busy time to wait time. - api.c put version up to 1.14 - Add tiny delay after writing to BFL Change BFL errors to something more human readable Send work busy re-tries after 10ms delay Version 2.4.4 - July 1, 2012 - Fix builds on non gnu platforms. - api.c ensure old mode is always available when not using --api-groups + quit() on param errors - Implement rudimentary X-Mining-Hashrate support. - Detect large swings in temperature when below the target temperature range and change fan by amounts dependant on the value of tdiff. - Adjust the fanspeed by the magnitude of the temperature difference when in the optimal range. - Revert "Restarting cgminer from within after ADL has been corrupted only leads to a crash. Display a warning only and disable fanspeed monitoring." - api.c fix json already closed - implement and document API option --api-groups - Put upper bounds to under 2 hours that work can be rolled into the future for bitcoind will deem it invalid beyond that. - define API option --api-groups - api.c allow unwell devices to be enabled so they can be cured - miner.php - fix/enable autorefresh for custom pages - miner.php allow custom summary pages - new 'Mobile' summary - Work around pools that advertise very low expire= time inappropriately as this leads to many false positives for stale shares detected. - Only show ztex board count if any exist. - There is no need for work to be a union in struct workio_cmd - fpgautils.c include a debug message for all unknown open errors - Don't keep rolling work right up to the expire= cut off. Use 2/3 of the time between the scantime and the expiry as cutoff for reusing work. - Log a specific error when serial opens fail due to lack of user permissions - Increase GPU timing resolution to microsecond and add sanity check to ensure times are positive. - Opencl code may start executing before the clfinish order is given to it so get the start timing used for dynamic intensity from before the kernel is queued. - fpgautils.c - set BAUD rate according to termio spec - fpgautils.c - linux ordering back to the correct way - miner.php remove unneeded '.'s - miner.php add auto refresh options

- miner.php add 'restart' next to 'quit' - miner.php make fontname/size configurable with myminer.php - Make the pools array a dynamically allocated array to allow unlimited pools to be added. - Make the devices array a dynamically allocated array of pointers to allow unlimited devices. - Dynamic intensity for GPUs should be calculated on a per device basis. Clean up the code to only calculate it if required as well. - Use a queueing bool set under control_lock to prevent multiple calls to queue_request racing. - Use the work clone flag to determine if we should subtract it from the total queued variable and provide a subtract queued function to prevent looping over locked code. - Don't decrement staged extras count from longpoll work. - Count longpoll's contribution to the queue. - Increase queued count before pushing message. - Test we have enough work queued for pools with and without rolltime capability. - As work is sorted by age, we can discard the oldest work at regular intervals to keep only 1 of the newest work items per mining thread. - Roll work again after duplicating it to prevent duplicates on return to the clone function. - Abstract out work cloning and clone $mining_threads copies whenever a rollable work item is found and return a clone instead. - api.c display Pool Av in json - Take into account average getwork delay as a marker of pool communications when considering work stale. - Work out a rolling average getwork delay stored in pool_stats. - Getwork delay in stats should include retries for each getwork call. - Walk through the thread list instead of searching for them when disabling threads for dynamic mode. - Extend nrolltime to support the expiry= parameter. Do this by turning the rolltime bool into an integer set to the expiry time. If the pool supports rolltime but not expiry= then set the expiry time to the standard scantime. - When disabling fanspeed monitoring on adl failure, remove any twin GPU association. This could have been leading to hangs on machines with dual GPU cards when ADL failed. - modminer: Don't delay 2nd+ FPGAs during work restart - Disable OpenCL code when not available. - Fix openwrt crashing on regeneratehash() by making check_solve a noop. - FPGA - allow device detect override without an open failure - Fix sign warning. Version 2.4.3 - June 14, 2012 - can_roll and should_roll should have no bearing on the cycle period within the miner_thread so remove it. - Check for strategy being changed to load balance when enabling LPs. - Check that all threads on the device that called get_work are waiting on getwork before considering the pool lagging. - Iterate over each thread belonging to each device in the hashmeter instead of searching for them now that they're a list. - When using rotate pool strategy, ensure we only select from alive enabled pools. - Start longpoll from every pool when load balance strategy is in use. - Add mandatory and block fields to the work struct. Flag any shares that are detected as blocks as mandatory to submit, along with longpoll work from a previously rejecting pool. - Consider the fan optimal if fanspeed is dropping but within the optimal speed

window. - Fix typo in some API messages (succeess/success) - api.c MMQ stat bugs - Bugfix: Fix warnings when built without libudev support - Bugfix: slay a variety of warnings - Bugfix: modminer: Fix unsigned/signed comparison and similar warnings - API add ModMinerQuad support - Bugfix: Honour forceauto parameter in serial_detect functions - modminer: Temperature sensor improvements - modminer: Make log messages more consistent in format - Only adjust GPU speed up if the fanspeed is within the normal fanrange and hasn't been turned to maximum speed under overheat conditions. - ModMiner use valid .name - New driver: BTCFPGA ModMiner - Abstract generally useful FPGA code into fpgautils.c - API add stats for pool getworks - miner.php option to hide specific fields from the display - miner.php add version numbers to the summary page - Update debian configs to v2.4.2 - Add API and FPGA READMEs into Makefile to be included in source distribution. - Icarus - fix unit64_t printf warnings Version 2.4.2 - June 2, 2012 - API.class compiled with Java SE 6.0_03 - works with Win7x64 - miner.php highlight devs too slow finding shares (possibly failing) - API update version to V1.11 and document changes - API save default config file if none specified - api.c save success incorrectly returns error - api.c replace BUFSIZ (linux/windows have different values) - Move RPC API content out of README to API-README - Open a longpoll connection if a pool is in the REJECTING state as it's the only way to re-enable it automatically. - Use only one longpoll as much as possible by using a pthread conditional broadcast that each longpoll thread waits on and checks if it's the current pool before - If shares are known stale, don't use them to decide to disable a pool for sequential rejects. - Restarting cgminer from within after ADL has been corrupted only leads to a crash. Display a warning only and disable fanspeed monitoring. - Icarus: fix abort calculation/allow user specified abort - Icarus: make --icarus-timing hidden and document it in FPGA-README - Icarus: high accuracy timing and other bitstream speed support - add-MIPSEB-to-icarus-for-BIG_ENDIAN - work_decode only needs swab32 on midstate under BIG ENDIAN - add compile command to api-example.c - save config bugfix: writing an extra ',' when no gpus - Add dpkg-source commits Version 2.4.1 - May 6, 2012 - In the unlikely event of finding a block, display the block solved count with the pool it came from for auditing. - Display the device summary on exit even if a device has been disabled. - Use correct pool enabled enums in api.c. - Import Debian packaging configs - Ensure we test for a pool recovering from idle so long as it's not set to disabled.

- Fix pool number display. - Give cgminer -T message only if curses is in use. - Reinit_adl is no longer used. - API 'stats' allow devices to add their own stats also for testing/debug - API add getwork stats to cgminer - accesable from API 'stats' - Don't initialise variables to zero when in global scope since they're already initialised. - Get rid of unitialised variable warning when it's false. - Move a pool to POOL_REJECTING to be disabled only after 3 minutes of continuous rejected shares. - Some tweaks to reporting and logging. - Change FPGA detection order since BFL hangs on an ICA - API support new pool status - Add a temporarily disabled state for enabled pools called POOL_REJECTING and use the work from each longpoll to help determine when a rejecting pool has started working again. Switch pools based on the multipool strategy once a pool is re-enabled. - Removing extra debug - Fix the benchmark feature by bypassing the new networking code. - Reset sequential reject counter after a pool is disabled for when it is re-enabled. - Icarus - correct MH/s and U: with work restart set at 8 seconds - ztex updateFreq was always reporting on fpga 0 - Trying harder to get 1.15y working - Specifying threads on multi fpga boards extra cgpu - Missing the add cgpu per extra fpga on 1.15y boards - API add last share time to each pool - Don't try to reap curls if benchmarking is enabled. Version 2.4.0 - May 3, 2012 - Only show longpoll warning once when it has failed. - Convert hashes to an unsigned long long as well. - Detect pools that have issues represented by endless rejected shares and disable them, with a parameter to optionally disable this feature. - Bugfix: Use a 64-bit type for hashes_done (miner_thread) since it can overflow 32-bit on some FPGAs - Implement an older header fix for a label existing before the pthread_cleanup macro. - Limit the number of curls we recruit on communication failures and with delaynet enabled to 5 by maintaining a per-pool curl count, and using a pthread conditional that wakes up when one is returned to the ring buffer. - Generalise add_pool() functions since they're repeated in add_pool_details. - Bugfix: Return failure, rather than quit, if BFwrite fails - Disable failing devices such that the user can attempt to re-enable them - Bugfix: thread_shutdown shouldn't try to free the device, since it's needed afterward - API bool's and 1TBS fixes - Icarus - minimise code delays and name timer variables - api.c V1.9 add 'restart' + redesign 'quit' so thread exits cleanly - api.c bug - remove extra ']'s in notify command - Increase pool watch interval to 30 seconds. - Reap curls that are unused for over a minute. This allows connections to be closed, thereby allowing the number of curl handles to always be the minimum necessary to not delay networking. - Use the ringbuffer of curls from the same pool for submit as well as getwork threads. Since the curl handles were already connected to the same pool and are immediately available, share submission will not be delayed by getworks. - Implement a scaleable networking framework designed to cope with any sized

network requirements, yet minimise the number of connections being reopened. Do this by create a ring buffer linked list of curl handles to be used by getwork, recruiting extra handles when none is immediately available. - There is no need for the submit and getwork curls to be tied to the pool struct. - Do not recruit extra connection threads if there have been connection errors to the pool in question. - We should not retry submitting shares indefinitely or we may end up with a huge backlog during network outages, so discard stale shares if we failed to submit them and they've become stale in the interim. Version 2.3.6 - April 29, 2012 - Shorten stale share messages slightly. - Protect the freeing of current_hash under mutex_lock to prevent racing on it when set_curblock is hit concurrently. - Change default behaviour to submitting stale, removing the --submit-stale option and adding a --no-submit-stale option. - Make sure to start the getwork and submit threads when a pool is added on the fly. This fixes a crash when a pool is added to running cgminer and then switched to. - Faster hardware can easily outstrip the speed we can get work and submit shares when using only one connection per pool. - Test the queued list to see if any get/submits are already queued and if they are, start recruiting extra connections by generating new threads. - This allows us to reuse network connections at low loads but recuit new open connections as they're needed, so that cgminer can scale to hardware of any size. Version 2.3.5 - April 28, 2012 - Restarting cgminer leads to a socket that can't be bound for 60 seconds, so increase the interval that API binding waits to 30 seconds to minimise the number of times it will retry, spamming the logs. - Give a longpoll message for any longpoll that detects a block change, primary or backup, and also display which pool it was. - Decrease utility display to one decimal place. - Small cosmetic output alignment. - Add pool number to stale share message. - Add space to log output now that there is more screen real estate available. - Indentation clean up. - Merge branch 'master' of github.com:ckolivas/cgminer - Remove thread id display from rejected shares as well. - Merge pull request #185 from Diapolo/diakgcn - add goffset support for diakgcn with -v 1 and update kernel version - Set have_longpoll to true when there is at least one pool with longpoll. - Don't display the thread ID since it adds no useful information over the device number. - Don't display the first 8 bytes of a share since they will always be zero at >= 1 difficulty. - work->longpoll is reset across test_work_current so we need to recheck what pool it belongs to. - Use longpolls from backup pools with failover-only enabled just to check for block changes, but don't use them as work. - Start longpoll only after we have tried to extract the longpoll URL. - Check for submitold flag on resubmit of shares, and give different message for stale shares on retry. - Check for submitold before submitstale.

- Don't force fresh curl connections on anything but longpoll threads. - Create one longpoll thread per pool, using backup pools for those pools that don't have longpoll. - Use the work created from the longpoll return only if we don't have failover-enabled, and only flag the work as a longpoll if it is the current pool. - This will work around the problem of trying to restart the single longpoll thread on pool changes that was leading to race conditions. - It will also have less work restarts from the multiple longpolls received from different pools. - Remove the ability to disable longpoll. It is not a useful feature and will conflict with planned changes to longpoll code. - Remove the invalid entries from the example configuration file. - Add support for latest ATI SDK on windows. - Export missing function from libztex. - miner.php change socktimeoutsec = 10 (it only waits once) - Bugfix: Make initial_args a const char** to satisfy exec argument type warning (on Windows only) - miner.php add a timeout so you don't sit and wait ... forever - Create discrete persistent submit and get work threads per pool, thus allowing all submitworks belonging to the same pool to reuse the same curl handle, and all getworks to reuse their own handle. - Use separate handles for submission to not make getwork potentially delay share submission which is time critical. - This will allow much more reusing of persistent connections instead of opening new ones which can flood routers. - This mandated a rework of the extra longpoll support (for when pools are switched) and this is managed by restarting longpoll cleanly and waiting for a thread join. - miner.php only show the current date header once - miner.php also add current time like single rig page - miner.php display rig 'when' table at top of the multi-rig summary page - README - add some Ztex details - api.c include zTex in the FPGA support list - api.c ensure 'devs' shows PGA's when only PGA code is compiled - cgminer.c sharelog code consistency and compile warning fix - README correct API version number - README spelling error - api.c combine all pairs of sprintfs() - api.c uncomment and use BLANK (and COMMA) - Code style cleanup - Annotating frequency changes with the changed from value - README clarification of 'notify' command - README update for API RPC 'devdetails' - api.c 'devdetails' list static details of devices - Using less heap space as my TP-Link seems to not handle this much Version 2.3.4 - April 25, 2012 - Extensively document the cause of GPU device issues and the use of --gpu-map. - Support for share logging - Detect poorly performing combination of SDK and phatk kernel and add verbose warning at startup. - Icarus update to new add_cgpu() - Icarus driver working with Linux and Windows - api.c fix unused variable compile warning - Display all OpenCL devices when -n is called as well to allow debugging of differential mapping of OpenCL to ADL. - Add a --gpu-map option which will allow arbitrarily mapping ADL devices to

OpenCL devices for instances where association by enumeration alone fails. - Increase upper limit on number of extra items to queue as some FPGA code can't yet reliably keep many devices busy. - Display configuration file information when -c option is passed and only when file exists on loading default config file. - Display configuration file loaded, if any, and debug output if configuration file parsing failed. - Add missing ztex header to Makefile for distribution. - Document long-form COM port device names on Windows, required to specify serial ports above 9 - Include ztex bitstreams firmware in distribution and install if configured in. - Style police on driver-ztex.c - work_restart should only be changed by cgminer.c now - Shut down the api cleanly when the api thread is cancelled. This should allow the api socket to be closed successfully to next be reopened with app_restart. - Make a union for cgpu device handles, and rename "device" to "device_ztex" since it's Ztex-specific - Initialise name variable. - Remove unnecessary check for variable that always has memory allocated. - Bugfix: Missing "break" no-op in default case - Make the status window and log window as large as can fit on startup, rechecking to see if it can be enlarged after the fact. This allows any number of devices to be displayed provided the window is made long enough without corrupting the output. - Style police on libztex.c. - API add removepool like the screen interface - api.c escape required characters in return strings + pools returns the username - Set lp_path to NULL after free for consistency. - Removing dmalloc import left behind by mistake - Fixing leak in resp_hdr_cb - miner.php warning highlight GPU stats if they are zero (e.g. ADL not enabled) - miner.php highlight any device that isn't 'Enabled' - miner.php highlight any Status that isn't 'Alive' - miner.php optionally support multiple rigs - Initial Ztex support 1.15x board. Version 2.3.3 - April 15, 2012 - Don't even display that cpumining is disabled on ./configure to discourage people from enabling it. - Do a complete cgminer restart if the ATI Display Library fails, as it does on windows after running for some time, when fanspeed reporting fails. - Cache the initial arguments passed to cgminer and implement an attempted restart option from the settings menu. - Disable per-device status lines when there are more than 8 devices since screen output will be corrupted, enumerating them to the log output instead at startup. - Reuse Vals[] array more than W[] till they're re-initialised on the second sha256 cycle in poclbm kernel. - Minor variable alignment in poclbm kernel. - Make sure to disable devices with any status not being DEV_ENABLED to ensure that thermal cutoff code works as it was setting the status to DEV_RECOVER. - Re-initialising ADL simply made the driver fail since it is corruption over time within the windows driver that's responsible. Revert "Attempt to re-initialise ADL should a device that previously reported fanspeed stops reporting it." - Microoptimise poclbm kernel by ordering Val variables according to usage frequency.

Version 2.3.2 - March 31, 2012 - Damping small changes in hashrate so dramatically has the tendency to always make the hashrate underread so go back to gentle damping instead. - Revert the crossover of variables from Vals to W in poclbm kernel now that Vals are the first declared variables so they're used more frequently. - Vals variables appearing first in the array in poclbm is faster. - Change the preferred vector width to 1 for Tahiti only, not all poclbm kernels. - Use a time constant 0.63 for when large changes in hashrate are detected to damp change in case the large change is an aliasing artefact instead of a real chang - Only increment stale counter if the detected stales are discarded. - Attempt to re-initialise ADL should a device that previously reported fanspeed stops reporting it. - Move the ADL setup and clearing to separate functions and provide a reinit_adl function to be used when adl fails while running. - Use slightly more damping on the decay time function in the never-ending quest to smooth off the hashmeter. - Set the starting fanspeed to a safe and fairly neutral 50% when autofan is enabled. - Provide locking around updates of cgpu hashrates as well to prevent multiple threads accessing data fields on the same device. - Display the beginning of the new block in verbose mode in the logs. - Reinstate old diablo kernel variable ordering from 120222, adding only goffset and vector size hint. The massive variable ordering change only helped one SDK on - Change the version number on the correct kernels. - api.c devicecode/osinfo incorrectly swapped for json - Add extensive instructions on how to make a native windows build. - Update version numbers of poclbm and diablo kernels as their APIs have also changed. - Use global offset parameter to diablo and poclbm kernel ONLY for 1 vector kernels. - Use poclbm preferentially on Tahiti now regardless of SDK. - Remove unused constant passed to poclbm. - Clean up use of macros in poclbm and use bitselect everywhere possible. - Add vector type hint to diablo kernel. - Add worksize and vector attribute hints to the poclbm kernel. - Spaces for non-aligned variables in poclbm. - More tidying of poclbm. - Swap Vals and W variables where they can overlap in poclbm. - More tidying of poclbm. - Tidy up first half of poclbm. - Clean up use of any() by diablo and poclbm kernels. - Minor variable symmetry changes in poclbm. - Put additions on separate lines for consistency in poclbm. - Consolidate last use of W11 into Vals4 in poclbm. - Change email due to SPAM - api.c miner.php add a '*' to the front of all notify counters - simplifies future support of new counters - miner.php add display 'notify' command - Small change to help arch's without processor affinity - Fix bitforce compile error - api.c notify should report disabled devices also - of course - API returns the simple device history with the 'notify' command - code changes for supporting a simple device history - api.c Report an OS string in config to help with device issues

- api.c fix Log Interval - integer in JSON - api.c config 'Device Code' to show list of compiled devices + README - api.c increase buffer size close to current code allowable limit - removed 8-component vector support from kernel, as this is not supported in CGMINER anyway - forgot to update kernel modification date, fixed ;) - reordered an addition in the kernel, which results in less instructions used in the GPU ISA code for GCN - miner.php: option for readonly or check privileged access - Ignore reduntant-with-build options --disable-gpu, --no-adl, and --no-restart - miner.php: ereg_replace is DEPRECATED so use preg_replace instead - Make curses TUI support optional at compile-time. - Bugfix: AC_ARG_WITH provides withval instead of enableval - miner.php split devs output for different devices - api.c: correct error messages - icarus.c modify (regular) timeout warning to only be debug - icarus.c set the windows TODO timeout - Allow specifying a specific driver for --scan-serial - optimized nonce-check and output code for -v 2 and -v 4 - Bugfix: Check for libudev header (not just library) in configure, and document optional dependency - Add API support for Icarus and Bitforce - Next API version is 1.4 (1.3 is current) - README/api.c add "When" the request was processed to STATUS - Bugfix: ZLX to read BitFORCE temp, not ZKX -.- Use libudev to autodetect BitFORCE GPUs, if available - Use the return value of fan_autotune to set fan_optimal instead of passing it as a pointer. - Pass the lasttemp from the device we're using to adjust fanspeed in twin devices. - fix the name to 3 chars, fix the multi-icarus support - Bugfix: "-S auto" is the default if no -S is specified, and there is no such delay in using it - README add information missing from --scan-serial - Update README RPC API Version comment - Bugfix: Allow enabling CPU even without OpenCL support - Change failed-to-mine number of requested shares messge to avoid segfault on recursive calling of quit(). - Get rid of extra char which is just truncated in poclbm kernel. - only small code formating changes - removed vec_step() as this could lead to errors on older SDKs - unified code for generating nonce in kernel and moved addition of base to the end -> faster Version 2.3.1 - February 24, 2012 - Revert input and output code on diakgcn and phatk kernels to old style which worked better for older hardware and SDKs. - Add a vector*worksize parameter passed to those kernels to avoid one op. - Increase the speed of hashrate adaptation. - Only send out extra longpoll requests if we want longpolls. - API implement addpool command - API return the untouched Total MH also (API now version 1.3) - Add enable/disablepool to miner.php example and reduce font size 1pt Version 2.3.0 - February 23, 2012 - Consider extra longpoll work items as staged_extra so as to make sure we queue more work if queueing regular work items as longpolls.

- Use diablo kernel on all future SDKs for Tahiti and set preferred vector width to 1 on poclbm kernel only. - Explicitly type the constants in diakgcn kernel as uint, to be in line with poclbm kernel. - Reset all hash counters at the same time as resetting start times to get accurate hashrates on exiting which is mandatory for benchmarking. - Report thread out before it starts to avoid being flagged as sick when waiting for the first work item. - Don't disable and re-enable devices as they may recover and in the meantime have their status set to OFF. - API new commands enablepool and disablepool (version already incremented) - Tolerate new-format temperature readings for bitforce - Modify cgminer.c pool control to allow API to call it - Bugfix: Fix BitFORCE driver memory leak in debug logging - Extra byte was being unused in poclbm leading to failure on some platforms. - Explicitly type the constants in poclbm kernel as uint. - Don't save 'include' when saving the configuration - Allow configuration file to include another recursively - Use the SDK and hardware information to choose good performing default kernels. - Move phatk kernel to offset vector based nonce bases as well. - Add a --benchmark feature which works on a fake item indefinitely to compare device performance without any server or networking influence. - Allow writing of multiple worksizes to the configuration file. - Allow writing of multiple vector sizes to the configuration file. - Allow writing of multiple kernels to the configuration file. - Allow multiple different kernels to be chosen per device. - Allow the worksize to be set per-device. - Allow different vectors to be set per device. - If we're well below the target temperature, increase gpu engine speed back to maximum in case we have gotten lost between profiles during an idle period. - We should be setting the value of fan_optimal, not its address. - As all kernels will be new versions it's an opportunity to change the .bin format and make it simpler. Specifying bitalign is redundant and long can be l. - Use any() in kernel output code. - Put the nonce for each vector offset in advance, avoiding one extra addition in the kernel. - Reset times after all mining threads are started to make estimating hashrates easier at startup. - Bugfix: allow no-exec (NX) stack - Fix minor warning. - fix the bitforce.c code style follow 1TBS - fix icarus.c compile warning - small changes to speedup no vec for AMD 898.1 OCL runtime - Update licensing to GPL V3. - Reset the longpoll flag after it's been used once to prevent it restarting work again. - Begin import of DiabloMiner kernel. - Modify API debug messages to say API instead of DBG - When API shuts down cgminer don't kill itself - Don't make rolled work from the longpoll be seen as other longpoll work items. - API add 'privileged' command so can verify access level - Set the lp_sent variable under lock since there will almost always be a race on setting this variable, potentially leading to multiple LPs being sent out. - API restrict access to all non display commands by default - Update API version to 1.2 for new 'Log Interval' - API add --log Interval to 'config' reply - --api-allow special case 0/0 means all

Version 2.2.7 - February 20, 2012 - Send out extra longpolls when we have switched pools and the longpoll thread is still bound to the old one. This is particularly useful with p2pool where longpolls do not correlate with main bitcoin block change and would have led to high reject rates on failover. - Store whether a work item is the result of a longpoll or not in struct work and use it to help determine block changes directly from the work longpoll bool. - Keep track of when a longpoll has been sent for a pool and if the current pool is requesting work but has not sent a longpoll request, convert one of the work items to a longpoll. - Store the longpoll url in the pool struct and update it from the pool_active test in case it changes. This is to allow further changes to longpoll management on switching pools. - Re-check for a longpoll supporting pool every 30 seconds if none is found initially. - Report threads as busy waiting on getwork on startup to avoid them being flagged sick on startup during slow networking. - Allow devices that are disabled due to overheating to be flagged as recovering instead of disabling them and re-enable them if they're below ideal temperatures - Tahiti prefers worksize 64 with poclbm. - No need to expressly retain the opencl program now that the zero binary issue is fixed. This actually fixes cgminer to work with the latest SDK included with the ATI catalyst driver 12.2. - Show error code on any opencl failure status. - Add detection for version 898.1 SDK as well but only give SDK 2.6 warning once on startup instead of with each device initialisation. - Always use a fresh connection for longpoll as prolonged persistent connections can fail for many reasons. - Keep track of intended engine clock speed and only adjust up if it's higher than the last intended speed. This avoids setting the clock speed to one relative to a lower profile one by mistake. - Use gpu-memdiff on startup if an engine clockspeed is set and a memdiff value is set. - Revert "Adjust engine speed up according to performance level engine setting, not the current engine speed." - ineffectual. - Freeze the queues on all threads that are sent the pause message to prevent them trying to start up again with saved pings in their queues. - Updates to diakgcn kernel/ - Consolidate all screen updates to the watchdog thread and touch both windows before refresh. - Curses will be disabled in clean_up so don't do it early in kill_work, and disable_adl so that GPU settings may be restored to normal in case shutting down curses leads to instability on windows. - Stop the mining threads before trying to kill them. - Plain refresh() does not give reliably screen updates so get rid of all uses of it. - First release with working diakgcn kernel. Version 2.2.6 - February 16, 2012 - Provide warning on each startup about sdk 2.6 - Fix unused warnings on win32. - bitforce: Simplify BFopen WIN32 ifdef/else - Fix initialization warning with jansson 1.3 - bitforce: Cleanup extraneous TODO that isn't needed - Move tcsetattr (and new tcflush) into *nix BFopen to simplify things a bit - Add message explaining 2nd thread disabling for dynamic mode and how to tune it. - Move logwindow down once number of devices is known.

- Automatically choose phatk kernel for bitalign non-gcn ATI cards, and then only select poclbm if SDK2.6 is detected. - Allow the refresh interval to be adjusted in dynamic intensity with a --gpu-dyninterval parameter. - Make curses display visible right from the beginning and fix the window sizes so the initial messages don't get lost once the status window is drawn. - The amount of work scanned can fluctuate when intensity changes and since we do this one cycle behind, we increment the work more than enough to prevent repeati - bitforce: Set a 30 second timeout for serial port on Windows, since the default is undefined - Use PreVal4addT1 instead of PreVal4 in poclbm kernel. - Import PreVal4 and PreVal0 into poclbm kernel. - Import more prepared constants into poclbm kernel. - Keep variables in one array but use Vals[] name for consistency with other kernel designs. - Replace constants that are mandatorily added in poclbm kernel with one value. - Remove addition of final constant before testing for result in poclbm kernel. - Hand optimise variable addition order. - Hand optimise first variable declaration order in poclbm kernel. - Radical reordering machine based first pass to change variables as late as possible, bringing their usage close together. - fix strcpy NULL pointer if env HOME unset. - bitforce: Disable automatic scanning when at least one device is specified manually - Unroll all poclbm additions to enable further optimisations. Version 2.2.5 - February 13, 2012 - Make output buffer write only as per Diapolo's suggestion. - Constify nonce in poclbm. - Use local and group id on poclbm kernel as well. - Microoptimise phatk kernel on return code. - Adjust engine speed up according to performance level engine setting, not the current engine speed. - Try to load a binary if we've defaulted to the poclbm kernel on SDK2.6 - Use the poclbm kernel on SDK2.6 with bitalign devices only if there is no binary available. - Further generic microoptimisations to poclbm kernel. - The longstanding generation of a zero sized binary appears to be due to the OpenCL library putting the binary in a RANDOM SLOT amongst 4 possible binary locations. Iterate over each of them after building from source till the real binary is found and use that. - Fix harmless warnings with -Wsign-compare to allow cgminer to build with -W. - Fix missing field initialisers warnings. - Put win32 equivalents of nanosleep and sleep into compat.h fixing sleep() for adl.c. - Restore compatibility with Jansson 1.3 and 2.0 (api.c required 2.1) - Modularized logging, support for priority based logging - Move CPU chipset specific optimization into device-cpu Version 2.2.4 - February 11, 2012 - Fix double definition of A0 B0 to zeroA zeroB. - Retain cl program after successfully loading a binary image. May decrease failures to build kernels at startup. - Variable unused after this so remove setting it. - BFI INT patching is not necessarily true on binary loading of files and not

true on ATI SDK2.6+. Report bitalign instead. - Various string fixes for reject reason. - Generalize --temp-cutoff and implement support for reading temperature from BitFORCE FPGAs - Change message from recovered to alive since it is used on startup as well as when a pool has recovered. - Start mining as soon as any pool is found active and rely on the watchpool thread to bring up other pools. - Delayed responses from testing pools that are down can hold up the watchdog thread from getting to its device testing code, leading to false detection of the GPU not checking in, and can substantially delay auto gpu/auto fan management leading to overheating. Move pool watching to its own thread. - Bugfix: BitFORCE index needs to be static to count correctly - Space out retrieval of extra work according to the number of mining threads. - Make shutdown more robust. Enable the input thread only after the other threads exist. Don't kill off the workio thread and use it to exit main() only if there is an unexpected problem. Use kill_work() for all anticipated shutdowns where possible. Remove unused thread entry. - Change poclbm version number. - One array is faster than 2 separate arrays so change to that in poclbm kernel. - Microoptimisations to poclbm kernel which increase throughput slightly. - Import diablominer kernel. Currently disabled as not working. - Import diapolo kernel. Currently disabled as not working. - Conflicting entries of cl_kernel may have been causing problems, and automatically chosen kernel type was not being passed on. Rename the enum to cl_kernels and store the chosen kernel in each clState. - Set cl_amd_media_ops with the BITALIGN flag and allow non-bitselect devices to build. - ALlow much longer filenames for kernels to load properly. - Allow different kernels to be used by different devices and fix the logic fail of overcorrecting on last commit with !strstr. - Fix kernel selection process and build error. - queue_phatk_kernel now uses CL_SET_VARG() for base-nonce(s), too - added OpenCL >= 1.1 detection code, in preparation of OpenCL 1.1 global offset parameter support - Use K array explicitly to make it clear what is being added. - Work items have a tendency to expire at exactly the same time and we don't queue extra items when there are plenty in the queue, regardless of age. Allow extra work items to be queued if adequate time has passed since we last requested work even if over the limit. - Discard work when failover-only is enabled and the work has come from a different pool. - Missing include to build on newer mingw32. - Move from the thread safe localtime_r to regular localtime which is the only one supported on newer pthread libraries on mingw32 to make it compile with the newer ming. Thread safety is of no importance where localtime is used in this code. - Define in_addr_t in windows if required - sys/wait.h not required in windows - Allow API to restrict access by IP address - Add pool switching to example miner.php - Display X-Reject-Reason, when provided - Remove the test for whether the device is on the highest profil level before raising the GPU speed as it is ineffectual and may prevent raising the GPU speed. - Remove unnecessary check for opt_debug one every invocation of applog at LOG_DEBUG level and place the check in applog(). Version 2.2.3 - February 6, 2012

- Revert "Rewrite the convoluted get_work() function to be much simpler and roll work as much as possible with each new work item." This seems to cause a race on work in free_work(). Presumably other threads are still accessing the structure. Version 2.2.2 - February 6, 2012 - Provide support for the submitold extension on a per-pool basis based on the value being detected in a longpoll. - Don't send a ping to a dynamic device if it's not enabled as that will just enable it for one pass and then disable it again. - Rewrite the convoluted get_work() function to be much simpler and roll work as much as possible with each new work item. - Roll as much work as possible from the work returned from a longpoll. - Rolling work on each loop through the mining thread serves no purpose. - Allow to stage more than necessary work items if we're just rolling work. - Replace divide_work with reuse_work function used twice. - Give rolled work a new ID to make sure there is no confusion in the hashtable lookups. - Remove now-defunct hash_div variables. - Remove unused get_dondata function. - Silence ADL warnings. - Silence unused parameter warnings. - Stagger the restart of every next thread per device to keep devices busy ahead of accessory threads per device. - Deprecate the --donation feature. Needlessly complex, questionable usefulness, depends on author's server and a central pool of some kind, and was not heavily adopted. - It's devices that report back now, not threads, update message. - Continue auto-management of fan and engine speeds even if a device is disabled for safety reasons. - No need to check we're highest performance level when throttling GPU engine speed. - Abstract out tests for whether work has come from a block that has been seen before and whether a string is from a previously seen block. - Probe but don't set the timeout to 15 seconds as some networks take a long time to timeout. - Remove most compiler warnings from api.c - Add last share's pool info in cgpu_info - Allow the OpenCL platform ID to be chosen with --gpu-platform. - Iterate over all platforms displaying their information and number of devices when --ndevs is called. - Deprecate main.c - Some networks can take a long time to resolve so go back to 60 second timeouts instead of 15. - Only enable curses on failure if curses is desired. - Fix warnings in bitforce.c - Bugfix: Need to open BitForce tty for read-write - Fix various build issues. - Modularize code: main.c -> device-cpu + device-gpu - Fix phatk kernel not working on non-bitalign capable devices (Nvidia, older ATI). - Update poclbm kernel for better performance on GCN and new SDKs with bitalign support when not BFI INT patching. Update phatk kernel to work properly for non BFI INT patched kernels, providing support for phatk to run on GCN and non-ATI cards. - Return last accepted share pool/time for devices - Display accepted share pool/time for CPUs - Bug intensity always shows GPU 0

- Update example web miner.php to use new API commands Version 2.2.1 - January 30, 2012 NOTE - The GPU Device reordering in 2.2.0 by default was considered a bad idea so the original GPU ordering is used by default again unless reordering is explicitly requested. - Fix bitforce failing to build into cgminer. - Add missing options to write config function. - Add a --gpu-reorder option to only reorder devices according to PCI Bus ID when requested. - Fix for midstate support being broken on pools that supported no-midstate work by ensuring numbers are 32 bits in sha2.c - Set virtual GPUs to work when ADL is disabled or all mining will occur on GPU 0. - Add information about paused threads in the menu status. - Disable all but the first thread on GPUs in dynamic mode for better interactivity. - Set the latest network access time on share submission for --net-delay even if we're not delaying that submission for further network access. - Clear adl on exiting after probing values since it may attempt to overclock. - As share submission is usually staggered, and delays can be costly, submit shares without delay even when --net-delay is enabled. - Display GPU number and device name when ADL is successfully enabled on it. - Display GPU ordering remapping in verbose mode. - Don't fail in the case the number of ADL and OpenCL devices do not match, and do not attempt to reorder devices unless they match. Instead give a warning about - Display error codes should ADL not return ADL_OK in the more critical function calls. - Fix unused warning. - Fix compile warnings in api.c - Add extensive ADL based device info in debug mode. - Make --ndevs display verbose opencl information as well to make debugging version information easier. - Display information about the opencl platform with verbose enabled. - Explicitly check for nvidia in opencl platform strings as well. Version 2.2.0 - January 29, 2012 NOTE: GPU Device order will change with this release with ATI GPUs as cgminer now can enumerate them according to their Bus ID which means the values should now correlate with their physical position on the motherboard. - Default to poclbm kernel on Tahiti (7970) since phatk does not work, even though performance is sub-standard so that at least it will mine successfully by defau - Retain cl program after every possible place we might build the program. - Update ADL SDK URL. - Fix potential overflow. - Map GPU devices to virtual devices in their true physical order based on BusNumber. - Change the warning that comes with failure to init cl on a device to be more generic and accurate. - Advertise longpoll support in X-Mining-Extensions - Detect dual GPU cards by iterating through all GPUs, finding ones without fanspeed and matching twins with fanspeed one bus ID apart.

- Do not attempt to build the program that becomes the kernel twice. This could have been leading to failures on initialising cl. - Some opencl compilers have issues with no spaces after -D in the compiler options. - Allow intensity up to 14. - Use calloced stack memory for CompilerOptions to ensure sprintf writes to the beginning of the char. - Whitelist 79x0 cards to prefer no vectors as they perform better without. - Adjust fan speed gently while in the optimal range when temperature is drifting to minimise overshoot in either direction. - Detect dual GPU cards via the indirect information of - 1st card has a fan controller. 2nd card does not have a fan controller, cards share the same device name - Instead of using the BFI_INT patching hack on any device reporting cl_amd_media_ops, create a whitelist of devices that need it. This should enable GCN architec - Fixed API compiling issue on OS X - Add more explanation of JSON format and the 'save' command - Return an error if using ADL API commands when it's not available - Read off lpThermalControllerInfo from each ADL device. - Add ADL_Overdrive5_ThermalDevices_Enum interface. - Add API commands: config, switchpool, gpu settings, save - Implement socks4 proxy support. - Fix send() for JSON strings - Introduce a --net-delay option which guarantees at least 250ms between any networking requests to not overload slow routers. - Generalise locking init code. - Allow invalid values to be in the configuration file, just skipping over them provided the rest of the file is valid JSON. This will allow older configurat - Allow CPU mining explicitly enable only if other mining support is built in. - BitForce FPGA support - Configure out building and support of all CPU mining code unless --enable-cpumining is enabled. - Allow parsed values to be zero which will allow 0 values in the config file to work. - Advertise that we can make our own midstate, so the pool can skip generating it for us - Refactor the CPU scanhash_* functions to use a common API. Fixes bugs. - Don't consider a pool lagging if a request has only just been filed. This should decrease the false positives for "pool not providing work fast enough". - Invalidating work after longpoll made hash_pop return no work giving a false positive for dead pool. Rework hash_pop to retry while finds no staged work u - Remove TCP_NODELAY from curl options as many small packets may be contributing to network overload, when --net-delay is enabled. - Refactor miner_thread to be common code for any kind of device - Simplify submit_nonce loop and avoid potentially missing FOUND - 1 entry. Reported by Luke-Jr. - Micro-optimisation in sha256_sse2 code courtesy of Guido Ascioti guido.ascioti@gmail.com - Refactor to abstract device-specific code Version 2.1.2 - January 6, 2012 - If api-description is specified, save it when writing the config file - Adjust utility width to be constant maximum as well. - Add percent signs to reject ratio outputs - Should the donation pool fail, don't make the fallover pool behave as though the primary pool is lagging. - Use an alternative pool should the donation getwork fail.

Version 2.1.1 - January 1, 2012 - Include API examples in distribution tarball. - Don't attempt to pthread_join when cancelling threads as they're already detached and doing so can lead to a segfault. - Give more generic message if slow pool at startup is the donation pool. - Continue to attempt restarting GPU threads if they're flagged dead at 1 min. intervals. - Don't attempt to restart sick flagged GPUs while they're still registering activity. - Make curl use fresh connections whenever there is any communication issue in case there are dead persistent connections preventing further comms from working. - Display pool in summary if only 1 pool. - Adjust column width of A/R/HW to be the maximum of any device and align them. Version 2.1.0 - December 27, 2011 - Major infrastructure upgrade with RPC interface for controlling via sockets encoded with/without JSON courtesy of Andrew Smith. Added documentation for use of the API and sample code to use with it. - Updated linux-usb-cgminer document. - Rewrite of longpoll mechanism to choose the current pool wherever possible to use for the longpoll, or any pool that supports longpoll if the current one does not. - Display information about longpoll when the chosen server has changed. - Fix the bug where longpoll generated work may have been sent back to the wrong pool, causing rejects. - Fix a few race conditions on closing cgminer which caused some of the crashes on exit. - Only adjust gpu engine speed in autotune mode if the gpu is currently at the performance level of that being adjusted. - Various fixes for parsing/writing of configuration files. - Do not add blank lines for threads of unused CPUs. - Show which pool is unresponsive on startup. - Only show GPU management menu item if GPUs are in use. - Align most device columns in the curses display. Version 2.0.8 - November 11, 2011 - Make longpoll do a mandatory flushing of all work even if the block hasn't changed, thus supporting longpoll initiated work change of any sort and merged mining. - Byteswap computed hash in hashtest so it can be correctly checked. This fixes the very rare possibility that a block solve on solo mining was missed. - Add x86_64 w64 mingw32 target - Allow a fixed speed difference between memory and GPU clock speed with --gpu-memdiff that will change memory speed when GPU speed is changed in autotune mode. - Don't load the default config if a config file is specified on the command line. - Don't build VIA on apple since -a auto bombs instead of gracefully ignoring VIA failing. - Build fix for dlopen/dlclose errors in glibc.

Version 2.0.7 - October 17, 2011 - Support work without midstate or hash1, which are deprecated in bitcoind 0.5+ - Go to kernel build should we fail to clCreateProgramWithBinary instead of failing on that device. This should fix the windows problems with devices not initialising. - Support new configuration file format courtesy of Chris Savery which can write the config file from the menu and will load it on startup. - Write unix configuration to .cgminer/cgminer.conf by default and prompt to overwrite if given a filename from the menu that exists. Version 2.0.6 - October 9, 2011 - Must initialise the donorpool mutex or it fails on windows. - Don't make donation work interfere with block change detection allowing donation to work regardless of the block chain we're mining on. - Expire shares as stale with a separate timeout from the scantime, defaulting to 120 seconds. - Retry pools after a delay of 15 seconds if none can be contacted on startup unless a key is pressed. - Don't try to build adl features without having adl. - Properly check shares against target difficulty - This will no longer show shares when solo mining at all unless they're considered to be a block solve. - Add altivec 4 way (cpu mining) support courtesy of Gilles Risch. - Try to use SSL if the server supports it. - Display the total solved blocks on exit (LOL if you're lucky). - Use ADL activity report to tell us if a sick GPU is still busy suggesting it is hard hung and do not attempt to restart it. Version 2.0.5 - September 27, 2011 - Intensity can now be set to dynamic or static values per-device. - New donation feature --donation sends a proportion of shares to author's account of choice, but is disabled by default! - The hash being displayed and block detection has been fixed. - Devices not being mined on will not attempt to be ADL managed. - Intensity is now displayed per GPU device. - Make longpoll attempt to restart as often as opt_retries specifies. - We weren't rolling work as often as we could. - Correct some memory management issues. - Build fixes. - Don't mess with GPUs if we don't have them. Version 2.0.4 - September 23, 2011 - Confused Longpoll messages should be finally fixed with cgminer knowing for sure who found the new block and possibly avoiding a rare crash. - Display now shows the actual hash and will say BLOCK! if a block is deemed solved. - Extra spaces, which would double space lines on small terminals, have been removed. - Fan speed change is now damped if it is already heading in the correct direction to minimise overshoot. - Building without opencl libraries is fixed. - GPUs are autoselected if there is only one when in the GPU management menu. - GPU menu is refreshed instead of returning to status after a GPU change.

Version 2.0.3 - September 17, 2011 - Various modes of failure to set fanspeeds and adl values have been addressed and auto-fan should work now on most hardware, and possibly other values which previously would not have worked. - Fixed a crash that can occur on switching pools due to longpoll thread races. - Use ATISTREAMSDKROOT if available at build time. - Fanspeed management is returned to the driver default on exit instead of whatever it was when cgminer was started. - Logging of events deemed WARNING or ERR now will display even during periods where menu input is being awaited on. Version 2.0.2 - September 11, 2011 - Exit cleanly if we abort before various threads are set up or if they no longer exist. - Fix a rare crash in HASH_DEL due to using different mutexes to protect the data. - Flag devices that have never started and don't allow enabling of devices without restarting them. - Only force the adapter speed to high if we've flagged this device as being managed. - Flag any devices with autofan or autogpu as being managed. - Use a re-entrant value to store what fanspeed we're trying to set in case the card doesn't support small changes. Force it to a multiple of 10% if it fails on trying to speed up the fan. - Do not bother resetting values to old ones if changes to GPU parameters report failure, instead returning a failure code only if the return value from get() differs. - Remove redundant check. - Only display supported values from fanspeed on change settings. - Missing bracket from output. - Display fan percentage on devices that only support reporting percent and not RPM. - Properly substitute DLOPEN flags to build with ADL support when -ldl is needed and not when opencl is not found. Version 2.0.1 - September 9, 2011 - Fix building on 32bit glibc with dlopen with -lpthread and -ldl - ByteReverse is not used and the bswap opcode breaks big endian builds. Remove it. - Ignore whether the display is active or not since only display enabled devices work this way, and we skip over repeat entries anwyay. - Only reset values on exiting if we've ever modified them. - Flag adl as active if any card is successfully activated. - Add a thermal cutoff option as well and set it to 95 degrees by default. - Change the fan speed by only 5% if it's over the target temperature but less than the hysteresis value to minimise overshoot down in temperature. - Add a --no-adl option to disable ADL monitoring and GPU settings. - Only show longpoll received delayed message at verbose level. - Allow temperatures greater than 100 degrees. - We should be passing a float for the remainder of the vddc values. - Implement accepting a range of engine speeds as well to allow a lower limit to be specified on the command line. - Allow per-device fan ranges to be set and use them in auto-fan mode. - Display which GPU has overheated in warning message.

- Allow temperature targets to be set on a per-card basis on the command line. - Display fan range in autofan status. - Setting the hysteresis is unlikely to be useful on the fly and doesn't belong in the per-gpu submenu. - With many cards, the GPU summaries can be quite long so use a terse output line when showing them all. - Use a terser device status line to show fan RPM as well when available. - Define max gpudevices in one macro. - Allow adapterid 0 cards to enumerate as a device as they will be non-AMD cards, and enable ADL on any AMD card. - Do away with the increasingly confusing and irrelevant total queued and efficiency measures per device. - Only display values in the log if they're supported and standardise device log line printing. Version 2.0.0 - September 6, 2011 Major feature upgrade - GPU monitoring, (over)clocking and fan control for ATI GPUs. New command line switches: --auto-fanAutomatically adjust all GPU fan speeds to maintain a target temperature --auto-gpuAutomatically adjust all GPU engine clock speeds to maintain a target temperature --gpu-engine <arg> Set the GPU engine (over)clock in Mhz - one value for all or separate by commas for per card. --gpu-fan <arg> Set the GPU fan percentage - one value for all or separate by commas for per card. --gpu-memclock <arg> Set the GPU memory (over)clock in Mhz - one value for all or separate by commas for per card. --gpu-powertune <arg> Set the GPU powertune percentage - one value for all or separate by commas for per card. --gpu-vddc <arg> Set the GPU voltage in Volts - one value for all or separate by commas for per card. --temp-hysteresis <arg> Set how much the temperature can fluctuate outside limits when automanaging speeds (default: 3) --temp-overheat <arg> Set the overheat temperature when automatically managing fan and GPU speeds (default: 85) --temp-target <arg> Set the target temperature when automatically managing fan and GPU speeds (default: 75) - Implement ATI ADL support for GPU parameter monitoring now and setting later (temp, fan, clocks etc.). - Check for the presence of the ADL header files in ADL_SDK. - Import adl_functions.h from amd overdrive ctrl. - Implement a setup function that tries to detect GPUs that support the ADL and link in the parameters into the gpus struct. - Put a summary of monitoring information from the GPU menu. - Implement changing memory speed and voltage on the fly. - Implement fan speed setting. - Minor corrections to set fan speed by percentage. - Make sure to read off the value in RPM only. - Implement auto fanspeed adjustment to maintain a target temperature and fanspeed below 85%, with an overheat check that will speed the fan up to 100%. - Add an --auto-fan command line option to allow all GPUs to have autofan enabled from startup. - Add a gpu autotune option which adjusts GPU speed to maintain a target temperature within the bounds of the default GPU speed and any overclocking set.

- Avoid a dereference if the longpoll thread doesn't exist. - Clean up by setting performance profiles and fan settings to startup levels on exit. - Add a small amount of hysteresis before lowering clock speed. - Allow target, overheat and hysteresis temperatures to be set from command line. - Combine all stats collating into one function to avoid repeating function calls on each variable. - Add gpu statistics to debugging output via the watchdog thread. - Implement menus to change temperature limits. - Implement setting the GPU engine clock speed of all devices or each device as a comma separated value. - Implement setting the GPU memory clock speed of all devices or each device as a comma separated value. - Implement setting the GPU voltage of all devices or each device as a comma separated value. - Implement setting the GPU fan speed of all devices or each device as a comma separated value. - Add support for monitoring powertune setting. - Implement changing of powertune value from the GPU change settings menu. - Get the value of powertune in get_stats. - Implement setting the GPU powertune value of all devices or each device as a comma separated value. - Remove the safety checks in speed setting since confirmation is done first in the menu, then show the new current values after a short pause. - Force the speed to high on startup and restore it to whatever the setting was on exit. - Add temperature to standard output where possible and use more compact output. - Move and print at the same time in curses to avoid random trampling display errors. - Update the status window only from the watchdog thread, do not rewrite the top status messages and only refresh once all the status window is complete, clearing the window each time to avoid corruption. - Set a safe starting fan speed if we're automanaging the speeds. - Provide locking around all adl calls to prevent races. - Lower profile settings cannot be higher than higher profile ones so link any drops in settings. - Add new needed text files to distribution. - Queue requests ignoring the number of staged clones since they get discarded very easily leading to false positives for pool not providing work fast enough. - Include libgen.h in opt.c to fix win32 compilation warnings. - Fix compilation warning on win32. - Add the directory name from the arguments cgminer was called from as well to allow it running from a relative pathname. - Add a --disable-adl option to configure and only enable it if opencl support exists. - Retry before returning a failure to get upstream work as a failure to avoid false positives for pool dead. - Retry also if the decoding of work fails. - Use the presence of X-Roll-Ntime in the header as a bool for exists unless N is found in the response. Version 1.6.2 - September 2, 2011 - Add --failover-only option to not leak work to backup pools when the primary pool is lagging. - Change recommendation to intensity 9 for dedicated miners. - Fix the bouncing short term value by allowing it to change dynamically when the latest value is very different from the rolling value, but damp the change

when it gets close. - Use the curses_lock to protect the curses_active variable and test it under lock. - Go back to requesting work 2/3 of the way through the current scantime with CPU mining as reports of mining threads running out of work have occurred with only 5 seconds to retrieve work. - Add start and stop time scheduling for regular time of day running or once off start/stop options. - Print summary on quit modes. - Put some sanity checks on the times that can be input. - Give a verbose message when no active pools are found and pause before exiting. - Add verbose message when a GPU fails to initialise, and disable the correct GPU. - Cryptopp asm32 was not correctly updated to the incremental nonce code so the hash counter was bogus. - Get rid of poorly executed curl check. - If curl does not have sockopts, do not try to compile the json_rpc_call_sockopt_cb function, making it possible to build against older curl libraries. - Most people expect /usr/local when an unspecified prefix is used so change to that. - Rename localgen occasions to getwork fail occasions since localgen is unrelated now. Version 1.6.1 - August 29, 2011 - Copy cgminer path, not cat it. - Switching between redrawing windows does not fix the crash with old libncurses, so redraw both windows, but only when the window size hasn't changed. - Reinstate minimum 1 extra in queue to make it extremely unlikely to ever have 0 staged work items and any idle time. - Return -1 if no input is detected from the menu to prevent it being interpreted as a 0. - Make pthread, libcurl and libcurses library checks mandatory or fail. - Add a --disable-opencl configure option to make it possible to override detection of opencl and build without GPU mining support. - Confusion over the variable name for number of devices was passing a bogus value which likely was causing the zero sized binary issue. - cgminer no longer supports default url user and pass so remove them. - Don't show value of intensity since it's dynamic by default. - Add options to explicitly enable CPU mining or disable GPU mining. - Convert the opt queue into a minimum number of work items to have queued instead of an extra number to decrease risk of getting idle devices without increasing risk of higher rejects. - Statify tv_sort. - Check for SSE2 before trying to build 32 bit SSE2 assembly version. Prevents build failure when yasm is installed but -msse2 is not specified. - Add some defines to configure.ac to enable exporting of values and packaging, and clean up output. - Give convenient summary at end of ./configure. - Display version information and add --version command line option, and make sure we flush stdout. - Enable curses after the mining threads are set up so that failure messages won't be lost in the curses interface. - Disable curses after inputting a pool if we requested no curses interface. - Add an option to break out after successfully mining a number of accepted shares.

- Exit with a failed return code if we did not reach opt_shares. - The cpu mining work data can get modified before we copy it if we submit it async, and the sync submission is not truly sync anyway, so just submit it sync. Version 1.6.0 - August 26, 2011 - Make restarting of GPUs optional for systems that hang on any attempt to restart them. Fix DEAD status by comparing it to last live time rather than last attempted restart time since that happens every minute. - Move staged threads to hashes so we can sort them by time. - Create a hash list of all the blocks created and search them to detect when a new block has definitely appeared, using that information to detect stale work and discard it. - Update configure.ac for newer autoconf tools. - Use the new hashes directly for counts instead of the fragile counters currently in use. - Update to latest sse2 code from cpuminer-ng. - Allow LP to reset block detect and block detect lp flags to know who really came first. - Get start times just before mining begins to not have very slow rise in average. - Add message about needing one server. - We can queue all the necessary work without hitting frequent stales now with the time and string stale protection active all the time. This prevents a pool being falsely labelled as not providing work fast enough. - Include uthash.h in distro. - Implement SSE2 32 bit assembly algorithm as well. - Fail gracefully if unable to open the opencl files. - Make cgminer look in the install directory for the .cl files making make install work correctly. - Allow a custom kernel path to be entered on the command line. - Bump threshhold for lag up to maximum queued but no staged work. - Remove fragile source patching for bitalign, vectors et. al and simply pass it with the compiler options. - Actually check the value returned for the x-roll-ntime extension to make sure it isn't saying N. - Prevent segfault on exit for when accessory threads don't exist. - Disable curl debugging with opt protocol since it spews to stderr. Version 1.5.8 - August 23, 2011 - Minimise how much more work can be given in cpu mining threads each interval. - Make the fail-pause progressively longer each time it fails until the network recovers. - Only display the lagging message if we've requested the work earlier. - Clean up the pool switching to not be dependent on whether the work can roll or not by setting a lagging flag and then the idle flag. - Only use one thread to determine if a GPU is sick or well, and make sure to reset the sick restart attempt time. - The worksize was unintentionally changed back to 4k by mistake, this caused a slowdown. Version 1.5.7 - August 22, 2011 - Fix a crash with --algo auto - Test at appropriate target difficulty now. - Add per-device statics log output with --per-device-stats

- Fix breakage that occurs when 1 or 4 vectors are chosen on new phatk. - Make rolltime report debug level only now since we check it every work item. - Add the ability to enable/disable per-device stats on the fly and match logging on/off. - Explicitly tell the compiler to retain the program to minimise the chance of the zero sized binary errors. - Add one more instruction to avoid one branch point in the common path in the cl return code. Although this adds more ALUs overall and more branch points, the common path code has the same number of ALUs and one less jmp, jmps being more expensive. - Explicitly link in ws2_32 on the windows build and update README file on how to compile successfully on windows. - Release cl resources should the gpu mining thread abort. - Attempt to restart a GPU once every minute while it's sick. - Don't kill off the reinit thread if it fails to init a GPU but returns safely. - Only declare a GPU dead if there's been no sign of activity from the reinit thread for 10 mins. - Never automatically disable any pools but just specify them as idle if they're unresponsive at startup. - Use any longpoll available, and don't disable it if switching to a server that doesn't have it. This allows you to mine solo, yet use the longpoll from a pool even if the pool is the backup server. - Display which longpoll failed and don't free the ram for lp_url since it belongs to the pool hdr path. - Make the tcp setsockopts unique to linux in the hope it allows freebsd et. al to compile. Version 1.5.6 - August 17, 2011 - New phatk and poclbm kernels. Updated phatk to be in sync with latest 2.2 courtesy of phateus. Custom modified to work best with cgminer. - Updated output buffer code to use a smaller buffer with the kernels. - Clean up the longpoll management to ensure the right paths go to the right pool and display whether we're connected to LP or not in the status line. Version 1.5.5 - August 16, 2011 - Rework entirely the GPU restart code. Strike a balance between code that re-initialises the GPU entirely so that soft hangs in the code are properly managed, but if a GPU is completely hung, the thread restart code fails gracefully, so that it does not take out any other code or devices. This will allow cgminer to keep restarting GPUs that can be restarted, but continue mining even if one or more GPUs hangs which would normally require a reboot. - Add --submit-stale option which submits all shares, regardless of whether they would normally be considered stale. - Keep options in alphabetical order. - Probe for slightly longer for when network conditions are lagging. - Only display the CPU algo when we're CPU mining. - As we have keepalives now, blaming network flakiness on timeouts appears to have been wrong. Set a timeout for longpoll to 1 hour, and most other network connectivity to 1 minute. - Simplify output code and remove HW errors from CPU stats. - Simplify code and tidy output. - Only show cpu algo in summary if cpu mining. - Log summary at the end as per any other output. - Flush output. - Add a linux-usb-cgminer guide courtesy of Kano.

Version 1.5.4 - August 14, 2011 - Add new option: --monitor <cmd> Option lets user specify a command <cmd> that will get forked by cgminer on startup. cgminer's stderr output subsequently gets piped directly to this command. - Allocate work from one function to be able to initialise variables added later. - Add missing fflush(stdout) for --ndevs and conclusion summary. - Preinitialise the devices only once on startup. - Move the non cl_ variables into the cgpu info struct to allow creating a new cl state on reinit, preserving known GPU variables. - Create a new context from scratch in initCQ in case something was corrupted to maximise our chance of succesfully creating a new worker thread. Hopefully this makes thread restart on GPU failure more reliable, without hanging everything in the case of a completely wedged GPU. - Display last initialised time in gpu management info, to know if a GPU has been re-initialised. - When pinging a sick cpu, flush finish and then ping it in a separate thread in the hope it recovers without needing a restart, but without blocking code elsewhere. - Only consider a pool lagging if we actually need the work and we have none staged despite queue requests stacking up. This decreases significantly the amount of work that leaks to the backup pools. - The can_roll function fails inappropriately in stale_work. - Only put the message that a pool is down if not pinging it every minute. This prevents cgminer from saying pool down at 1 minute intervals unless in debug mode. - Free all work in one place allowing us to perform actions on it in the future. - Remove the extra shift in the output code which was of dubious benefit. In fact in cgminer's implementation, removing this caused a miniscule speedup. - Test each work item to see if it can be rolled instead of per-pool and roll whenever possible, adhering to the 60 second timeout. This makes the period after a longpoll have smaller dips in throughput, as well as requiring less getworks overall thus increasing efficiency. - Stick to rolling only work from the current pool unless we're in load balance mode or lagging to avoid aggressive rolling imitating load balancing. - If a work item has had any mining done on it, don't consider it discarded work. Version 1.5.3 - July 30, 2011 - Significant work went into attempting to make the thread restart code robust to identify sick threads, tag them SICK after 1 minute, then DEAD after 5 minutes of inactivity and try to restart them. Instead of re-initialising the GPU completely, only a new cl context is created to avoid hanging the rest of the GPUs should the dead GPU be hung irrevocably. - Use correct application name in syslog. - Get rid of extra line feeds. - Use pkg-config to check for libcurl version - Implement per-thread getwork count with proper accounting to not over-account queued items when local work replaces it. - Create a command queue from the program created from source which allows us to flush the command queue in the hope it will not generate a zero sized binary any more. - Be more willing to get work from the backup pools if the work is simply being queued faster than it is being retrieved.

Version 1.5.2 - July 28, 2011 - Restarting a hung GPU can hang the rest of the GPUs so just declare it dead and provide the information in the status. - The work length in the miner thread gets smaller but doesn't get bigger if it's under 1 second. This could end up leading to CPU under-utilisation and lower and lower hash rates. Fix it by increasing work length if it drops under 1 second. - Make the "quiet" mode still update the status and display errors, and add a new --real-quiet option which disables all output and can be set once while running. - Update utility and efficiency figures when displaying them. - Some Intel HD graphics support the opencl commands but return errors since they don't support opencl. Don't fail with them, just provide a warning and disable GPU mining. - Add http:// if it's not explicitly set for URL entries. - Log to the output file at any time with warnings and errors, instead of just when verbose mode is on. - Display the correct current hash as per blockexplorer, truncated to 16 characters, with just the time. Version 1.5.1 - July 27, 2011 - Two redraws in a row cause a crash in old libncurses so just do one redraw using the main window. - Don't adjust hash_div only up for GPUs. Disable hash_div adjustment for GPUs. - Only free the thread structures if the thread still exists. - Update both windows separately, but not at the same time to prevent the double refresh crash that old libncurses has. Do the window resize check only when about to redraw the log window to minimise ncurses cpu usage. - Abstract out the decay time function and use it to make hash_div a rolling average so it doesn't change too abruptly and divide work in chunks large enough to guarantee they won't overlap. - Sanity check to prove locking. - Don't take more than one lock at a time. - Make threads report out when they're queueing a request and report if they've failed. - Make cpu mining work submission asynchronous as well. - Properly detect stale work based on time from staging and discard instead of handing on, but be more lax about how long work can be divided for up to the scantime. - Do away with queueing work separately at the start and let each thread grab its own work as soon as it's ready. - Don't put an extra work item in the queue as each new device thread will do so itself. - Make sure to decrease queued count if we discard the work. - Attribute split work as local work generation. - If work has been cloned it is already at the head of the list and when being reinserted into the queue it should be placed back at the head of the list. - Dividing work is like the work is never removed at all so treat it as such. However the queued bool needs to be reset to ensure we *can* request more work even if we didn't initially. - Make the display options clearer. - Add debugging output to tq_push calls. - Add debugging output to all tq_pop calls. Version 1.5.0 - July 26, 2011

- Increase efficiency of slow mining threads such as CPU miners dramatically. Do this by detecting which threads cannot complete searching a work item within the scantime and then divide up a work item into multiple smaller work items. Detect the age of the work items and if they've been cloned before to prevent doing the same work over. If the work is too old to be divided, then see if it can be time rolled and do that to generate work. This dramatically decreases the number of queued work items from a pool leading to higher overall efficiency (but the same hashrate and share submission rate). - Don't request work too early for CPUs as CPUs will scan for the full opt_scantime anyway. - Simplify gpu management enable/disable/restart code. - Implement much more accurate rolling statistics per thread and per gpu and improve accuracy of rolling displayed values. - Make the rolling log-second average more accurate. - Add a menu to manage GPUs on the fly allowing you to enable/disable GPUs or try restarting them. - Keep track of which GPUs are alive versus enabled. - Start threads for devices that are even disabled, but don't allow them to start working. - The last pool is when we are low in total_pools, not active_pools. - Make the thread restart do a pthread_join after disabling the device, only re-enabling it if we succeed in restarting the thread. Do this from a separate thread so as to not block any other code.This will allow cgminer to continue even if one GPU hangs. - Try to do every curses manipulation under the curses lock. - Only use the sockoptfunction if the version of curl is recent enough. Version 1.4.1 - July 24, 2011 - Do away with GET for dealing with longpoll forever. POST is the one that works everywhere, not the other way around. - Detect when the primary pool is lagging and start queueing requests on backup pools if possible before needing to roll work. - Load balancing puts more into the current pool if there are disabled pools. Fix. - Disable a GPU device should the thread fail to init. - Out of order command queue may fail on osx. Try without if it fails. - Fix possible dereference on blank inputs during input_pool. - Defines missing would segfault on --help when no sse mining is built in. - Revert "Free up resources/stale compilers." - didn't help. - Only try to print the status of active devices or it would crash. - Some hardware might benefit from the less OPS so there's no harm in leaving kernel changes that do that apart from readability of the code. Version 1.4.0 - July 23, 2011 - Feature upgrade: Add keyboard input during runtime to allow modification of and viewing of numerous settings such as adding/removing pools, changing multipool management strategy, switching pools, changing intensiy, verbosity, etc. with a simple keypress menu system. - Free up resources/stale compilers. - Kernels are safely flushed in a way that allows out of order execution to work. - Sometimes the cl compiler generates zero sized binaries and only a reboot seems to fix it. - Don't try to stop/cancel threads that don't exist. - Only set option to show devices and exit if built with opencl support. - Enable curses earlier and exit with message in main for messages to not be

lost in curses windows. - Make it possible to enter server credentials with curses input if none are specified on the command line. - Abstract out a curses input function and separate input pool function to allow for live adding of pools later. - Remove the nil arguments check to allow starting without parameters. - Disable/enable echo & cbreak modes. - Add a thread that takes keyboard input and allow for quit, silent, debug, verbose, normal, rpc protocol debugging and clear screen options. - Add pool option to input and display current pool status, pending code to allow live changes. - Add a bool for explicit enabling/disabling of pools. - Make input pool capable of bringing up pools while running. - Do one last check of the work before submitting it. - Implement the ability to live add, enable, disable, and switch to pools. - Only internally test for block changes when the work matches the current pool to prevent interleaved block change timing on multipools. - Display current pool management strategy to enable changing it on the fly. - The longpoll blanking of the current_block data may not be happening before the work is converted and appears to be a detected block change. Blank the current block be - Make --no-longpoll work again. - Abstract out active pools count. - Allow the pool strategy to be modified on the fly. - Display pool information on the fly as well. - Add a menu and separate out display options. - Clean up the messy way the staging thread communicates with the longpoll thread to determine who found the block first. - Make the input windows update immediately instead of needing a refresh. - Allow log interval to be set in the menu. - Allow scan settings to be modified at runtime. - Abstract out the longpoll start and explicitly restart it on pool change. - Make it possible to enable/disable longpoll. - Set priority correctly on multipools. Display priority and alive/dead information in display_pools. - Implement pool removal. - Limit rolltime work generation to 10 iterations only. - Decrease testing log to info level. - Extra refresh not required. - With huge variation in GPU performance, allow intensity to go from -10 to +10. - Tell getwork how much of a work item we're likely to complete for future splitting up of work. - Remove the mandatory work requirement at startup by testing for invalid work being passed which allows for work to be queued immediately. This also removes the requirem - Make sure intensity is carried over to thread count and is at least the minimum necessary to work. - Unlocking error on retry. Locking unnecessary anyway so remove it. - Clear log window from consistent place. No need for locking since logging is disabled during input. - Cannot print the status of threads that don't exist so just queue enough work for the number of mining threads to prevent crash with -Q N. - Update phatk kernel to one with new parameters for slightly less overhead again. Make the queue kernel parameters call a function pointer to select phatk or poclbm. - Make it possible to select the choice of kernel on the command line. - Simplify the output part of the kernel. There's no demonstrable advantage from more complexity. - Merge pull request #18 from ycros/cgminer - No need to make leaveok changes win32 only.

- Build support in for all SSE if possible and only set the default according to machine capabilities. - Win32 threading and longpoll keepalive fixes. - Win32: Fix for mangled output on the terminal on exit. Version 1.3.1 - July 20, 2011 - Feature upgrade; Multiple strategies for failover. Choose from default which now falls back to a priority order from 1st to last, round robin which only changes pools when one is idle, rotate which changes pools at user-defined intervals, and load-balance which spreads the work evenly amongst all pools. - Implement pool rotation strategy. - Implement load balancing algorithm by rotating requests to each pool. - Timeout on failed discarding of staged requests. - Implement proper flagging of idle pools, test them with the watchdog thread, and failover correctly. - Move pool active test to own function. - Allow multiple strategies to be set for multipool management. - Track pool number. - Don't waste the work items queued on testing the pools at startup. - Reinstate the mining thread watchdog restart. - Add a getpoll bool into the thread information and don't restart threads stuck waiting on work. - Rename the idlenet bool for the pool for later use. - Allow the user/pass userpass urls to be input in any order. - When json rpc errors occur they occur in spits and starts, so trying to limit them with the comms error bool doesn't stop a flood of them appearing. - Reset the queued count to allow more work to be queued for the new pool on pool switch. Version 1.3.0 - July 19, 2011 - Massive infrastructure update to support pool failover. - Accept multiple parameters for url, user and pass and set up structures of pool data accordingly. - Probe each pool for what it supports. - Implement per pool feature support according to rolltime support as advertised by server. - Do switching automatically based on a 300 second timeout of locally generated work or 60 seconds of no response from a server that doesn't support rolltime. - Implement longpoll server switching. - Keep per-pool data and display accordingly. - Make sure cgminer knows how long the pool has actually been out for before deeming it a prolonged outage. - Fix bug with ever increasing staged work in 1.2.8 that eventually caused infinite rejects. - Make warning about empty http requests not show by default since many servers do this regularly. Version 1.2.8 - July 18, 2011 - More OSX build fixes. - Add an sse4 algorithm to CPU mining. - Fix CPU mining with other algorithms not working. - Rename the poclbm file to ensure a new binary is built since. - We now are guaranteed to have one fresh work item after a block change and we should only discard staged requests. - Don't waste the work we retrieve from a longpoll.

- Provide a control lock around global bools to avoid racing on them. - Iterating over 1026 nonces when confirming data from the GPU is old code and unnecessary and can lead to repeats/stales. - The poclbm kernel needs to be updated to work with the change to 4k sized output buffers. - longpoll seems to work either way with post or get but some servers prefer get so change to httpget. Version 1.2.7 - July 16, 2011 - Show last 8 characters of share submitted in log. - Display URL connected to and user logged in as in status. - Display current block and when it was started in the status line. - Only pthread_join the mining threads if they exist as determined by pthread_cancel and don't fail on pthread_cancel. - Create a unique work queue for all getworks instead of binding it to thread 0 to avoid any conflict over thread 0's queue. - Clean up the code to make it clear it's watchdog thread being messaged to restart the threads. - Check the current block description hasn't been blanked pending the real new current block data. - Re-enable signal handlers once the signal has been received to make it possible to kill cgminer if it fails to shut down. - Disable restarting of CPU mining threads pending further investigation. - Update longpoll messages. - Add new block data to status line. - Fix opencl tests for osx. - Only do local generation of work if the work item is not stale itself. - Check for stale work within the mining threads and grab new work if positive. - Test for idle network conditions and prevent threads from being restarted by the watchdog thread under those circumstances. - Make sure that local work generation does not continue indefinitely by stopping it after 10 minutes. - Tweak the kernel to have a shorter path using a 4k buffer and a mask on the nonce value instead of a compare and loop for a shorter code path. - Allow queue of zero and make that default again now that we can track how work is being queued versus staged. This can decrease reject rates. - Queue precisely the number of mining threads as longpoll_staged after a new block to not generate local work. Version 1.2.6 - July 15, 2011 - Put a current system status line beneath the total work status line - Fix a counting error that would prevent cgminer from correctly detecting situations where getwork was failing - this would cause stalls sometimes unrecoverably. - Limit the maximum number of requests that can be put into the queue which otherwise could get arbitrarily long during a network outage. - Only count getworks that are real queue requests. Version 1.2.5 - July 15, 2011 Conflicting -n options corrected Setting an intensity with -I disables dynamic intensity setting Removed option to manually disable dynamic intensity Improve display output

- Implement signal handler and attempt to clean up properly on exit - Only restart threads that are not stuck waiting on mandatory getworks - Compatibility changes courtesy of Ycros to build on mingw32 and osx - Explicitly grab first work item to prevent false positive hardware errors due to working on uninitialised work structs - Add option for non curses --text-only output - Ensure we connect at least once successfully before continuing to retry to connect in case url/login parameters were wrong - Print an executive summary when cgminer is terminated - Make sure to refresh the status window Versions -> 1.2.4 Con Kolivas - July 2011. New maintainership of code under cgminer name. Massive rewrite to incorporate GPU mining. Incorporate original oclminer c code. Rewrite gpu mining code to efficient work loops. Implement per-card detection and settings. Implement vector code. Implement bfi int patching. Import poclbm and phatk ocl kernels and use according to hardware type. Implement customised optimised versions of opencl kernels. Implement binary kernel generation and loading. Implement preemptive asynchronous threaded work gathering and pushing. Implement variable length extra work queues. Optimise workloads to be efficient miners instead of getting lots of extra work. - Implement total hash throughput counters, per-card accepted, rejected and hw error count. - Staging and watchdog threads to prevent fallover. - Stale and reject share guarding. - Autodetection of new blocks without longpoll. - Dynamic setting of intensity to maintain desktop interactivity. - Curses interface with generous statistics and information. - Local generation of work (xroll ntime) when detecting poor network connectivity. Version 1.0.2 Linux x86_64 optimisations - Con Kolivas Optimise for x86_64 by default by using sse2_64 algo Detects CPUs and sets number of threads accordingly Uses CPU affinity for each thread where appropriate Sets scheduling policy to lowest possible Minor performance tweaks

Version 1.0.1 - May 14, 2011 - OSX support Version 1.0 - May 9, 2011 jansson 2.0 compatibility correct off-by-one in date (month) display output fix platform detection improve yasm configure bits support full URL, in X-Long-Polling header

Version 0.8.1 - March 22, 2011

- Make --user, --pass actually work - Add User-Agent HTTP header to requests, so that server operators may more easily identify the miner client. - Fix minor bug in example JSON config file Version 0.8 - March 21, 2011 - Support long polling: http://deepbit.net/longpolling.php - Adjust max workload based on scantime (default 5 seconds, or 60 seconds for longpoll) - Standardize program output, and support syslog on Unix platforms - Suport --user/--pass options (and "user" and "pass" in config file), as an alternative to the current --userpass Version 0.7.2 - March 14, 2011 - Add port of ufasoft's sse2 assembly implementation (Linux only) This is a substantial speed improvement on Intel CPUs. - Move all JSON-RPC I/O to separate thread. This reduces the number of HTTP connections from one-per-thread to one, reducing resource usage on upstream bitcoind / pool server. Version 0.7.1 - March 2, 2011 - Add support for JSON-format configuration file. See example file example-cfg.json. Any long argument on the command line may be stored in the config file. - Timestamp each solution found - Improve sha256_4way performance. NOTE: This optimization makes the 'hash' debug-print output for sha256_way incorrect. - Use __builtin_expect() intrinsic as compiler micro-optimization - Build on Intel compiler - HTTP library now follows HTTP redirects Version 0.7 - February 12, 2011 - Re-use CURL object, thereby reuseing DNS cache and HTTP connections - Use bswap_32, if compiler intrinsic is not available - Disable full target validation (as opposed to simply H==0) for now Version 0.6.1 - February 4, 2011 - Fully validate "hash < target", rather than simply stopping our scan if the high 32 bits are 00000000. - Add --retry-pause, to set length of pause time between failure retries - Display proof-of-work hash and target, if -D (debug mode) enabled - Fix max-nonce auto-adjustment to actually work. This means if your scan takes longer than 5 seconds (--scantime), the miner will slowly reduce the number of hashes you work on, before fetching a new work unit. Version 0.6 - January 29, 2011 - Fetch new work unit, if scanhash takes longer than 5 seconds (--scantime) - BeeCee1's sha256 4way optimizations

- lfm's byte swap optimization (improves via, cryptopp) - Fix non-working short options -q, -r Version 0.5 - December 28, 2010 - Exit program, when all threads have exited - Improve JSON-RPC failure diagnostics and resilience - Add --quiet option, to disable hashmeter output. Version 0.3.3 - December 27, 2010 - Critical fix for sha256_cryptopp 'cryptopp_asm' algo Version 0.3.2 - December 23, 2010 - Critical fix for sha256_via Version 0.3.1 - December 19, 2010 - Critical fix for sha256_via - Retry JSON-RPC failures (see --retry, under "minerd --help" output) Version 0.3 - December 18, 2010 - Add crypto++ 32bit assembly implementation - show version upon 'minerd --help' - work around gcc 4.5.x bug that killed 4way performance Version 0.2.2 - December 6, 2010 - VIA padlock implementation works now - Minor build and runtime fixes Version 0.2.1 - November 29, 2010 - avoid buffer overflow when submitting solutions - add Crypto++ sha256 implementation (C only, ASM elided for now) - minor internal optimizations and cleanups Version 0.2 - November 27, 2010 Add script for building a Windows installer improve hash performance (hashmeter) statistics add tcatm 4way sha256 implementation Add experimental VIA Padlock sha256 implementation

Version 0.1.2 - November 26, 2010 many small cleanups and micro-optimizations build win32 exe using mingw RPC URL, username/password become command line arguments remove unused OpenSSL dependency

Version 0.1.1 - November 24, 2010 - Do not build sha256_generic module separately from cpuminer. Version 0.1 - November 24, 2010 - Initial release.