PatMan
|
|
June 11, 2014, 08:57:30 AM |
|
Kano is king!!! You da man Will begin testing straight away & report back - many, many thanks Kano!!
|
|
|
|
ManeBjorn
Legendary
Offline
Activity: 1288
Merit: 1004
|
|
June 11, 2014, 09:22:13 AM |
|
Did support for the R-Box make it into this release? I did not see it listed but I was hoping it made it in there. Thanks again. New release: Version 4.3.5, 10th June 2014
Please note linux x86_64 builds are now based on ubuntu 14.04
Human readable changelog:
- Fixed the problem where if there was no internet connection at startup for long enough, it would never connect to anything and the display would not refresh to tell you of it. - Fixed some crashes due to trying to act on corrupted USB messages. You will now get error messages about invalid memcpy sizes instead when there is a corrupt message. This means you have hardware issues. - Fixed the disable-libcurl build. - Added some checking of messages received via stratum to prevent security issues or crashes from corrupt/malicious intermediate pools. - Driver updates for cointerra, minion, hashfast, A1, antminer S1.
Full changelog:
- Cointerra driver updates. - Sleep before retrying in the test pool thread after a pool has died - Use valid_ascii testing for job_id since it need not be hex only - Only show slow/down message till pool is flagged idle - Do some random sanity checking for stratum message parsing - Keep looking for when a pool comes to life at startup and touch the logwin so the message is not invisible - Fix no libcurl build - Added Drillbit Thumb to udev rules. - Avoid dereference on getting API stats on partially initialised HFA instances - A1: add support for updated product variants, small fixes - Add one more usbutils fix - Convert uses of usbutils memcpy to cg_memcpy - Add a sanity checking memcpy function which checks for overflows - minion - count force use reread - minion - add a disabled ioctl() test - minion - add more checking of SPI results for corruption - minion - optional (disabled) ioctl() debug - Increase S1 overheat to 75 degrees C - Add ruby api-example to API-README - minion - allow core selection at runtime - API - lcd all-in-one brief summary
|
|
|
|
BenTuras
|
|
June 11, 2014, 11:18:46 AM |
|
I have a rather technical question about using cgminer with Bitfury based hardware (The OneStringMiner boards I am selling). In driver-bitfury.c, the target that is sent to the boards is always ffffffff, no matter what the difficulty is on the pool. I think the value of ffffffff corresponds to a difficulty of 2. If the pool is set or gets to a higher difficulty, a lot of shares are thrown away because they are above target. This means a lot of useless traffic between the boards and the host computer running cgminer.
In order to prevent this, I changed the above mentioned ffffffff to 0fffffff to lower the number of shares that are thrown away. A simple trick with a drawback, the speeds shown by cgminer is now incorrect. Not a big issue, but it would be nice if the values would be correct. Also 0fffffff corresponds with a fixed pool difficulty. It would be better if this would be changed automatically when the pool sets a new difficulty.
Of course, the speed that I see on the pool is correct, because that's calculated by the pool software.
What's the best way to improve this ?
|
|
|
|
-ck (OP)
Legendary
Offline
Activity: 4284
Merit: 1645
Ruu \o/
|
|
June 11, 2014, 11:35:52 AM |
|
From the protocol document: target <target number>
The 'target' command tells the firmware the desired difficulty of returned blocks. The target number is a 32 bit hexadecimal number, which gives the upper limit of the hash. The firmware compares the target value with the 7th word of the hash (the 8th word must be zero). If the target number equals FFFFFFFF, the firmware returns difficulty 1 shares. If the target value equals 7FFFFFFE, the firmware only returns difficulty 2 shares. For any given difficulty, target should be FFFFFFFF / difficulty.
As for cgminer, the hashrate reported is based on shares returned via bitfury_rate * a fixed value for one full nonce range (0xffffffff) by the number of info->nonces returned which increments in parse_bxf_submit. As the full nonce range is hardcoded in the bitfury rate function, it would need a rewrite to support variable difficulty being changed on the fly or if you want to play with a hardcoded value for your own use, just change the full nonce range to how much bigger you're aiming for, so if you halve the target diff you double the value. As you can see it affects a lot of different types of devices and the code for associating a changing diff with the nonce range would need quite some rework still.
|
Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel 2% Fee Solo mining at solo.ckpool.org -ck
|
|
|
IYFTech
|
|
June 11, 2014, 12:01:03 PM |
|
Hello guys, First off, thanks to Kano for all his work on the S1 & S2's - it is appreciated - thanks I've been testing out the newly released S2 firmware on one of my S2's in the hope it would improve it's compatibility with p2pool, but I'm unable to even connect with my local node using the "stratum+tcp" prefix using both the IP address or the web address - the pool shows up as "dead" on the S2 web interface. I've also tried using "http" which gives me 100% stales & just the IP address:port but still am unable to connect - can you give me any pointers at all? Cheers guys.
|
|
|
|
BenTuras
|
|
June 11, 2014, 12:04:02 PM |
|
As for cgminer, the hashrate reported is based on shares returned via bitfury_rate * a fixed value for one full nonce range (0xffffffff) by the number of info->nonces returned which increments in parse_bxf_submit. As the full nonce range is hardcoded in the bitfury rate function, it would need a rewrite to support variable difficulty being changed on the fly or if you want to play with a hardcoded value for your own use, just change the full nonce range to how much bigger you're aiming for, so if you halve the target diff you double the value. As you can see it affects a lot of different types of devices and the code for associating a changing diff with the nonce range would need quite some rework still.
So, if I understand you correctly I need to make the following changes to driver-bitfury.c : sprintf(buf, "target ffffffff\n"); into sprintf(buf, "target %08lx\n",(0xffffffff/pool_difficulty)); ret = (double)0xffffffff * nonce_rate; into ret = (double)(0xffffffff/pool_difficulty) * nonce_rate; info->nonces++; (occurs twice) into info->nonces += pool_difficulty; I do understand that I also need to take into account that more than one OneStringMiner could be connected and that they could be mining on different difficulty, but normal use will be one or more connected miners mining on the same pool on the same account and hence the same difficulty. I also understand that if you change it for one device, you will be asked/want to change it for all. To me it looks like a valuable change, given the waste of traffic that now occurs.
|
|
|
|
mdude77
Legendary
Offline
Activity: 1540
Merit: 1001
|
|
June 11, 2014, 12:33:37 PM |
|
I've created an AntMinerS2 firmware. Master cgminer code - and no changes/hacks (that are required for the S1)
Thanks! I applied it to one of my S2s. Results haven't been good. It won't connect at all to p2pool. On the p2pool side, it throws a TON of errors I've never seen before. I then pointed it to my slush proxy for Eligius. Every single hash is rejected. "u'high-hash'". Going back to prior firmware... M
|
I mine at Kano's Pool because it pays the best and is completely transparent! Come join me!
|
|
|
PatMan
|
|
June 11, 2014, 12:42:27 PM |
|
Yup, same here - unable to connect to p2pool node. I'm also seeing some HUGE hash rate variation - anything between 2000Gh/s(!) to 600Gh/s - but the average rate is slightly higher than the standard firmware. I'll keep playing.......
|
|
|
|
mdude77
Legendary
Offline
Activity: 1540
Merit: 1001
|
|
June 11, 2014, 12:44:50 PM |
|
Yup, same here - unable to connect to p2pool node. I'm also seeing some HUGE hash rate variation - anything between 2000Gh/s(!) to 600Gh/s - but the average rate is slightly higher than the standard firmware. I'll keep playing.......
I couldn't get any hashrate to p2pool or slush's proxy. I like the additional visual changes to the status page.. however the avg hashrate was unintelligible (said something like 16423), and the 5m hashrate was blank. API response on hashrate was also gone/unintelligible. M
|
I mine at Kano's Pool because it pays the best and is completely transparent! Come join me!
|
|
|
kano
Legendary
Offline
Activity: 4606
Merit: 1851
Linux since 1997 RedHat 4
|
|
June 11, 2014, 02:31:52 PM |
|
Hello guys, First off, thanks to Kano for all his work on the S1 & S2's - it is appreciated - thanks I've been testing out the newly released S2 firmware on one of my S2's in the hope it would improve it's compatibility with p2pool, but I'm unable to even connect with my local node using the "stratum+tcp" prefix using both the IP address or the web address - the pool shows up as "dead" on the S2 web interface. I've also tried using "http" which gives me 100% stales & just the IP address:port but still am unable to connect - can you give me any pointers at all? Cheers guys. OK, I'll fix my p2pool tomorrow and point it at it and see what's up. Also note: the hash rate should initially vary a lot since the shares returned will be 2^N that is below the pool difficulty. So e.g. mining at difficulty 60 would set the S2 to mine at difficulty 32 (2^N below 60) - so the driver would only get a reply from the boards every time they find a difficulty 32 nonce or better (similar to the original driver) This means that the cgminer code that calculates the stats will get 1/32 of the results (of diff 32) to determine the hash rate and thus it takes longer to average out. I set an upper limit of 4096 to ensure results are coming back and thus we can see it's all working (but the bitmain driver doesn't have a limit) Normally give it at least 10 minutes, if not an hour, to show the proper hash rate. Another of my changes there vs the Bitmain driver, is to use the lowest difficulty of all the work sent in a batch. Bitmain's version uses the first difficulty, which since a batch of work is 64 work items, there is the tiny possibility that some work would be different to the first work item. Also note that the bitmain driver discards stale shares ... so on p2pool where a stale block is actually a valid block 95% of the time, the bitmain driver throws those blocks away ... literally. I of course don't do that Another change is that I fully check all the share's returned. However, this means that if a pool starts of at 1diff, it will indeed get a lot of problems (due to lack of CPU) until the difficulty rises high enough. If that happens, blame the pool for allowing 1diff No pool should be doing that now since anyone mining only with hardware that slow is wasting theirs and the pool's time. I'll let you know tomorrow how I fare with p2pool
|
|
|
|
kano
Legendary
Offline
Activity: 4606
Merit: 1851
Linux since 1997 RedHat 4
|
|
June 11, 2014, 02:36:09 PM |
|
Yup, same here - unable to connect to p2pool node. I'm also seeing some HUGE hash rate variation - anything between 2000Gh/s(!) to 600Gh/s - but the average rate is slightly higher than the standard firmware. I'll keep playing.......
I couldn't get any hashrate to p2pool or slush's proxy. I like the additional visual changes to the status page.. however the avg hashrate was unintelligible (said something like 16423), and the 5m hashrate was blank. API response on hashrate was also gone/unintelligible. M 5m I purposely show blank until ... 5m has passed. The API is the standard cgminer API - not the bitmain hacked changed API with the wrong field names and different field scales.
|
|
|
|
PatMan
|
|
June 11, 2014, 02:40:34 PM Last edit: June 11, 2014, 03:03:46 PM by PatMan |
|
Thanks kano.
Does your version allow for all the standard cgminer options in the conf file? ie: failover-only : "true", queue : "0" etc?
|
|
|
|
mdude77
Legendary
Offline
Activity: 1540
Merit: 1001
|
|
June 11, 2014, 03:00:18 PM |
|
However, this means that if a pool starts of at 1diff, it will indeed get a lot of problems (due to lack of CPU) until the difficulty rises high enough. If that happens, blame the pool for allowing 1diff No pool should be doing that now since anyone mining only with hardware that slow is wasting theirs and the pool's time. Maybe that's why p2pool is completely non functional? I'm pretty sure it starts at 1. I didn't try manually setting it higher. Maybe also why the stratum proxy fails hard with difficulty errors? M
|
I mine at Kano's Pool because it pays the best and is completely transparent! Come join me!
|
|
|
kano
Legendary
Offline
Activity: 4606
Merit: 1851
Linux since 1997 RedHat 4
|
|
June 11, 2014, 03:02:17 PM Last edit: June 11, 2014, 03:26:27 PM by kano |
|
Thanks kano.
Does your version allow for all the standard cgminer options in the conf file? ie: failover-only etc?
Yes it is simply cgminer 4.3.5 no changes. Master cgminer git has the S2 code in it. The Web interface may wipe out any options you add to it, if you later use the web interface to update the cgminer.conf There is one way around this: Create a script file /config/cgminer #!/bin/sh # myopt="--load-balance --queue 320 --bitmain-hwerror --api-description MyAntS2" /usr/bin/cgminer "$@" $myopt
Then chmod +x /config/cgminerFrom now on, the S2 will run that script and thus any changes you put in there will not be lost on a reboot You can even completely override the settings that way by not using "$@" "$@" means put there all the options that were passed in. The default settings are: --bitmain-dev /dev/bitmain-asic --bitmain-options 115200:32:8:40:196:5f06 --bitmain-checkn2diff --bitmain-hwerror --queue 320 plus the options/pools in the /config/cgminer.conf Also, never remove "--bitmain-hwerror" since it all goes to crap if you do. Edit: oh I guess I should have said, that the /config/cgminer change only works with my 'firmware' I changed it like that on purpose due to the fact the that S2 filesystem doesn't save changes - the only permanent writable areas are /config/ and /mnt/mmc/ /mnt/mmc/ is where the 'firmware' is Don't leave anything in there though, since it isn't very big. On the other hand! /config/ is 1.5GB to store a few K of data Warning about /config/ The Bitmain factory reset deletes everything in there. My factory reset deletes everything in /config/ but not in sub directories - so files in sub directories will survive a reset.
|
|
|
|
-ck (OP)
Legendary
Offline
Activity: 4284
Merit: 1645
Ruu \o/
|
|
June 11, 2014, 03:26:42 PM |
|
To me it looks like a valuable change, given the waste of traffic that now occurs.
This is a gross exaggeration for any existing hardware that uses the bifury protocol on cgminer which produces only tiny amounts of traffic. Scaling device internal diff to pool diff will just make the hashrate calculation more and more inaccurate but not have any significant effect on performance or decrease CPU utilisation. Your OSM devices max out at 32GH which produces only 7 shares per second - even an RPi wouldn't register any measurable CPU usage processing those to filter out and send only the suitable shares to the pool. That's not to say the change won't eventually be required and welcome, just that it is not something I have time to work on at the moment since there is no benefit to existing miners.
|
Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel 2% Fee Solo mining at solo.ckpool.org -ck
|
|
|
PatMan
|
|
June 11, 2014, 04:02:00 PM |
|
Thanks for the info Kano. Just to clarify, in order to override the default "--queue 320" options, I can simply add "--queue 0" (required for p2pool) to the script you mentioned in /config/cgminer - this will then override the default commands? Have I got that right? Or, can I simply add "-Q 0" after the password on the web interface as with the S1 fix? Of course, I wont do this until you've investigated the p2pool issue. Just planning ahead
|
|
|
|
iglasses
Legendary
Offline
Activity: 1148
Merit: 1000
|
|
June 11, 2014, 04:22:48 PM |
|
Can someone tell me what the heck I am doing wrong...I am trying to use the enable ants1 command at startup but I'm obviously not formatting it correctly because I keep getting 'unrecognized option'.
I am trying to use it like this... cgminer --enable-ants1
What am I missing here?
|
I only have a signature because I'm allowed.
|
|
|
-ck (OP)
Legendary
Offline
Activity: 4284
Merit: 1645
Ruu \o/
|
|
June 11, 2014, 04:29:52 PM |
|
Can someone tell me what the heck I am doing wrong...I am trying to use the enable ants1 command at startup but I'm obviously not formatting it correctly because I keep getting 'unrecognized option'.
I am trying to use it like this... cgminer --enable-ants1
What am I missing here?
The --enable-ants1 option is for when you build cgminer, not when you run it.
|
Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel 2% Fee Solo mining at solo.ckpool.org -ck
|
|
|
Kuma
Member
Offline
Activity: 107
Merit: 10
|
|
June 11, 2014, 05:01:53 PM |
|
Hi Kano, your FW for S2 works great on Ozco.in and Ghash.io pools but its nearly impossible to use Eligius pool. Anyway thanks a lot.
|
|
|
|
kano
Legendary
Offline
Activity: 4606
Merit: 1851
Linux since 1997 RedHat 4
|
|
June 12, 2014, 12:48:50 AM |
|
Thanks for the info Kano. Just to clarify, in order to override the default "--queue 320" options, I can simply add "--queue 0" (required for p2pool) to the script you mentioned in /config/cgminer - this will then override the default commands? Have I got that right? Or, can I simply add "-Q 0" after the password on the web interface as with the S1 fix? Of course, I wont do this until you've investigated the p2pool issue. Just planning ahead The S1 hack wont work on the S2. The S2 uses a real cgminer.conf and updates it via the web interface - so it really would put it "in" the password So yes you'll need to do the script override. You can simply make the line: myopt="-Q 0" and then it will use all the parameters supplied by the init script but add -Q 0 on the end to override the previous --queue However, yes I tried p2pool early (3am) this morning and indeed everything exploded into a mess of errors both on the S2 and p2pool Will look into that ...
|
|
|
|
|