A stable and bugfix release with new drivers. I recommend all 4.x users update.

Human readable changelog:

- Zero stats will now show the correct average hashrate per device.- Fixed the high CPU usage which led to eventually slowing down of hashrates over time.- Respect the -Q value by slightly changing its meaning to be the highest value it can reach, defaulting to 9999. Regular users need not do anything with this value.- Fixed the hex32 api values (currently only hashfast serial number) returning invalid JSON over the API.- New driver - BXM for an upcoming two bitfury chip USB stick courtesy of Goodney, along with an overclocking option with --bxm-bits - New driver - merged the bitmain S1 driver - Try harder to shut cgminer down fully on quit/restart/--shares end.- Fix cgminer shutting down and hanging when a grossly invalid stratum message is received.- Fix cointerra hashrate display to show a share based hashrate so that the displayed hashrate should match the pool hashrate.- Hashfast improvements:. Dramatic decrease in CPU usage for all existing firmwares since they don't internally nroll time.. Latest version now works with older 0.2 firmwares. Only decrease the clockspeed if a device fails in less than an hour at its current clockspeed. New feature allows per-device settings:

Code:

--hfa-options <arg> Set hashfast options name:clock (comma separated)

This command allows you to set options for each discrete hashfast device byits name (if the firmware has naming support, i.e. version 0.3+). Currentlythis takes only one option, the clock speed, although future options may beadded.e.g.:--hfa-options "rabbit:650,turtle:550"

Would set a device named rabbit to clock speed 650 and the one named turtle to550. Starting the device at a speed where it is most stable will give morereliable hashrates long term and prevent it interacting with other devices,rather than depending on the clockdown feature in cgminer.

- Other low level bugfixes and improvements and anticipatory changes.

Full changelog:

- 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 perdevice by name comma separated, with a function that can be expanded with moreoptions 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 doit internally as an optimisation.- Export the roll_work function to be usable by driver code and make itcompatible 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 notrequired.- Store the hardware and firmware revision in the info struct for easy use inthe hfa driver.- Only decrease the hfa clock rate if the device has been running for less thanan 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 chipon 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 tocleanly shut down and use a completion timeout for the __kill_work inapp_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 spitx the size of a normal payload.- Store usb11 and tt flags as booleans in cgusbdev allowing them to bediscretely 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 withusing 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 theefficiency- Add support for bitmain devices- Perfect function of BitMain Multi Chain- Add support for Bitmain Multi Chain and Single Chain and optimize theefficiency- Add support for bitmain devices

Quick question about compiling cgminer, please. I tweak a few of the constants in the Klondike driver for use with my devices, and I recompile every couple of days, trying different things. Since I'm using an RPi, compiling takes about 30-45 minutes total. Right now, I use a small shell script with the following lines, based on a combination of advice from Kano's blog post and a troubleshooting guide I use for Klondikes:

Quick question about compiling cgminer, please. I tweak a few of the constants in the Klondike driver for use with my devices, and I recompile every couple of days, trying different things. Since I'm using an RPi, compiling takes about 30-45 minutes total. Right now, I use a small shell script with the following lines, based on a combination of advice from Kano's blog post and a troubleshooting guide I use for Klondikes:

Obviously, this takes a while to run. How much of this has to be rerun every time I tweak the code, and how much of it only needs to be run once?

Thanks.

autogen is only rarely required with a significant git update so you can skip that and do CFLAGS="-g -W -Wall -O2" ./configure --enable-icarus --enable-klondikeI note you're not adding any optimisation flags like O2 but you probably should unless you're debugging a real issue.

Quick question about compiling cgminer, please. I tweak a few of the constants in the Klondike driver for use with my devices, and I recompile every couple of days, trying different things. Since I'm using an RPi, compiling takes about 30-45 minutes total. Right now, I use a small shell script with the following lines, based on a combination of advice from Kano's blog post and a troubleshooting guide I use for Klondikes:

Obviously, this takes a while to run. How much of this has to be rerun every time I tweak the code, and how much of it only needs to be run once?

Thanks.

autogen is only rarely required with a significant git update so you can skip that and do CFLAGS="-g -W -Wall -O2" ./configure --enable-icarus --enable-klondikeI note you're not adding any optimisation flags like O2 but you probably should unless you're debugging a real issue.

Awesome, thanks! I'll give it a try with 4.1.0.

Like I said, I'm a newb at compilation. I was going by the instructions in the two linked guides. I noted that in the README file, you have:

CFLAGS="-O2 -Wall -march=native" ./configure ...

But I honestly don't know what the various CFLAGS values do. Hence I figured it's safer to go with what others have confirmed works on a Pi, at least until I learn more about the flags.

Ckolivias, when you get a chance could you check your windows cross compile text file to see if there is something not listed I need to do. When I run it through as written I get a cannot find version of curl needed and when I point it to where curl is in the win deps folder it then says compiler doesn't work.

Also maybe if your using mxe cross compiler add some details to how to use that. There's a tutorial for it but I'm not sure where the intended program to compiles goes and if the win deps folder can be used or have to copy all of that into a specific folder.

hi,how can i update the cgminer version from a antminer s1? Normally the software is deployed with a new firmware.

thanks

Yeah I can build binaries and ipk files now.I'm not 100% sure of building a complete firmware file, that will come a little later.

The luci web code that displays the stats doesn't work with the correct API code, so I'll see if I can sort that out today and hack a binary that works with both the luci code and of course includes the correct API output for anyone who accesses it.

Pool: https://kano.is Here on Bitcointalk: Forum BTC: 1KanoPb8cKYqNrswjaA8cRDk4FAS9eDMLUFreeNode IRC: irc.freenode.net channel #kano.isMajority developer of the ckpool codeHelp keep Bitcoin secure by mining on pools with full block verification on all blocks - and NO empty blocks!