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: 4676
Merit: 1858
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: 4676
Merit: 1858
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: 4676
Merit: 1858
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: 4480
Merit: 1664
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: 4480
Merit: 1664
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: 4676
Merit: 1858
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 ...
|
|
|
|
|
dmaxl
Newbie
Offline
Activity: 1
Merit: 0
|
 |
June 12, 2014, 02:34:50 AM |
|
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 ...
I'll save you some time because I ran into this same issue, albeit with litecoin but the cause should be the same. The cause is the sanity checks introduced by commit e1c5050734123973b99d181c45e74b2cbb00272e. Empty string extranonce1 values now cause an error in util.c near line 2581: nonce1 = json_array_string(res_val, 1); if (!valid_hex(nonce1)) { applog(LOG_INFO, "Failed to get valid nonce1 in initiate_stratum"); free(sessionid); goto out; }
P2pool doesn't implement extranonce1 and sends an empty string, causing initiate_stratum to fail and cgminer to fallback to longpoll, which doesn't work with p2pool. Arguably this is more of a p2pool problem, but a possible workaround would be to restore previous behavior which just checks that nonce1 != NULL.
|
|
|
|
-ck (OP)
Legendary
Offline
Activity: 4480
Merit: 1664
Ruu \o/
|
 |
June 12, 2014, 02:42:30 AM |
|
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 ...
I'll save you some time because I ran into this same issue, albeit with litecoin but the cause should be the same. The cause is the sanity checks introduced by commit e1c5050734123973b99d181c45e74b2cbb00272e. Empty string extranonce1 values now cause an error in util.c near line 2581: nonce1 = json_array_string(res_val, 1); if (!valid_hex(nonce1)) { applog(LOG_INFO, "Failed to get valid nonce1 in initiate_stratum"); free(sessionid); goto out; }
P2pool doesn't implement extranonce1 and sends an empty string, causing initiate_stratum to fail and cgminer to fallback to longpoll, which doesn't work with p2pool. Arguably this is more of a p2pool problem, but a possible workaround would be to restore previous behavior which just checks that nonce1 != NULL. Thanks for that, it's more lenient now in git.
|
Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel 2% Fee Solo mining at solo.ckpool.org -ck
|
|
|
iglasses
Legendary
Offline
Activity: 1148
Merit: 1000
|
 |
June 12, 2014, 03:33:03 AM |
|
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. Well don't I feel like a dam fool. Thanks though! ig
|
I only have a signature because I'm allowed.
|
|
|
kano
Legendary
Offline
Activity: 4676
Merit: 1858
Linux since 1997 RedHat 4
|
 |
June 12, 2014, 09:29:49 AM |
|
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 ...
I'll save you some time because I ran into this same issue, albeit with litecoin but the cause should be the same. The cause is the sanity checks introduced by commit e1c5050734123973b99d181c45e74b2cbb00272e. Empty string extranonce1 values now cause an error in util.c near line 2581: nonce1 = json_array_string(res_val, 1); if (!valid_hex(nonce1)) { applog(LOG_INFO, "Failed to get valid nonce1 in initiate_stratum"); free(sessionid); goto out; }
P2pool doesn't implement extranonce1 and sends an empty string, causing initiate_stratum to fail and cgminer to fallback to longpoll, which doesn't work with p2pool. Arguably this is more of a p2pool problem, but a possible workaround would be to restore previous behavior which just checks that nonce1 != NULL. Unfortunately, that's not the actual problem. That's simply an unnecessary warning on the screen that ckolivas has now removed due to your help pointing it out. I did mean this seriously: ... indeed everything exploded into a mess of errors both on the S2 and p2pool ... I've not had time to track it down yet ...
|
|
|
|
plekhanov
Newbie
Offline
Activity: 20
Merit: 0
|
 |
June 12, 2014, 11:18:54 PM |
|
I tried building 4.3.5 on Centos 6.4 x86_64 (2.6.32-431.17.1.el6.x86_64) with Antminer S1 support. The build stops in the bitmain driver:
CC cgminer-driver-bitmain.o driver-bitmain.c: In function 'bitmain_read': driver-bitmain.c:940: error: 'struct bitmain_info' has no member named 'device_fd' driver-bitmain.c: In function 'bitmain_write': driver-bitmain.c:971: error: 'struct bitmain_info' has no member named 'device_fd' driver-bitmain.c: In function 'bitmain_parse_results': driver-bitmain.c:1316: error: request for member 'min' in something not a structure or union make[2]: *** [cgminer-driver-bitmain.o] Error 1
|
|
|
|
|