Bitcoin Forum
December 11, 2016, 06:13:45 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: « 1 ... 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 [758] 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 ... 830 »
  Print  
Author Topic: OFFICIAL CGMINER mining software thread for linux/win/osx/mips/arm/r-pi 4.9.2  (Read 4827862 times)
This is a self-moderated topic. If you do not want to be moderated by the person who started this topic, create a new topic.
-ck
Moderator
Legendary
*
Offline Offline

Activity: 2002


Ruu \o/


View Profile WWW
June 11, 2014, 11:35:52 AM
 #15141

From the protocol document:

Code:
       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.

Primary developer/maintainer for cgminer and ckpool/ckproxy.
Pooled mine at kano.is, solo mine at solo.ckpool.org
-ck
1481436825
Hero Member
*
Offline Offline

Posts: 1481436825

View Profile Personal Message (Offline)

Ignore
1481436825
Reply with quote  #2

1481436825
Report to moderator
1481436825
Hero Member
*
Offline Offline

Posts: 1481436825

View Profile Personal Message (Offline)

Ignore
1481436825
Reply with quote  #2

1481436825
Report to moderator
1481436825
Hero Member
*
Offline Offline

Posts: 1481436825

View Profile Personal Message (Offline)

Ignore
1481436825
Reply with quote  #2

1481436825
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
IYFTech
Hero Member
*****
Offline Offline

Activity: 686


WANTED: Active dev to fix & re-write p2pool in C


View Profile
June 11, 2014, 12:01:03 PM
 #15142

Hello guys,

First off, thanks to Kano for all his work on the S1 & S2's - it is appreciated - thanks  Smiley

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.

-- Smiley  Thank you for smoking  Smiley --  If you paid VAT to dogie for items you should read this thread:  https://bitcointalk.org/index.php?topic=1018906.0
BenTuras
Hero Member
*****
Offline Offline

Activity: 826



View Profile
June 11, 2014, 12:04:02 PM
 #15143

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.

I am selling in stock OneStringMiner boards, based on the Bitfury chips. Have a look here: https://bitcointalk.org/index.php?topic=495536.0
mdude77
Legendary
*
Offline Offline

Activity: 1358


View Profile
June 11, 2014, 12:33:37 PM
 #15144

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

MMinerMonitor author, monitor/auto/schedule reboots/alerts/remote/MobileMiner for Ants and Spondoolies! Latest (5.2). MPoolMonitor author, monitor stats/workers for most pools, global BTC stats (current/nxt diff/USD val/hashrate/calc)! Latest (v4.2) 
Buyer beware of Bitmain hardware and services.
PatMan
Hero Member
*****
Offline Offline

Activity: 924


Watch out for the "Neg-Rep-Dogie-Police".....


View Profile WWW
June 11, 2014, 12:42:27 PM
 #15145

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.......

"When one person is deluded it is called insanity - when many people are deluded it is called religion" - Robert M. Pirsig.  I don't want your coins, I want change.
Amazon UK BTC payment service - https://bitcointalk.org/index.php?topic=301229.0 - with FREE delivery!
http://www.ae911truth.org/ - http://rethink911.org/ - http://rememberbuilding7.org/
mdude77
Legendary
*
Offline Offline

Activity: 1358


View Profile
June 11, 2014, 12:44:50 PM
 #15146

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

MMinerMonitor author, monitor/auto/schedule reboots/alerts/remote/MobileMiner for Ants and Spondoolies! Latest (5.2). MPoolMonitor author, monitor stats/workers for most pools, global BTC stats (current/nxt diff/USD val/hashrate/calc)! Latest (v4.2) 
Buyer beware of Bitmain hardware and services.
kano
Legendary
*
Offline Offline

Activity: 1932


Linux since 1997 RedHat 4


View Profile
June 11, 2014, 02:31:52 PM
 #15147

Hello guys,

First off, thanks to Kano for all his work on the S1 & S2's - it is appreciated - thanks  Smiley

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 Smiley

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 Tongue
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

Pool: https://kano.is BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CKPool and CGMiner developer, IRC FreeNode #ckpool and #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
kano
Legendary
*
Offline Offline

Activity: 1932


Linux since 1997 RedHat 4


View Profile
June 11, 2014, 02:36:09 PM
 #15148

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.

Pool: https://kano.is BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CKPool and CGMiner developer, IRC FreeNode #ckpool and #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
PatMan
Hero Member
*****
Offline Offline

Activity: 924


Watch out for the "Neg-Rep-Dogie-Police".....


View Profile WWW
June 11, 2014, 02:40:34 PM
 #15149

Thanks kano.

Does your version allow for all the standard cgminer options in the conf file? ie: failover-only : "true", queue : "0" etc?

"When one person is deluded it is called insanity - when many people are deluded it is called religion" - Robert M. Pirsig.  I don't want your coins, I want change.
Amazon UK BTC payment service - https://bitcointalk.org/index.php?topic=301229.0 - with FREE delivery!
http://www.ae911truth.org/ - http://rethink911.org/ - http://rememberbuilding7.org/
mdude77
Legendary
*
Offline Offline

Activity: 1358


View Profile
June 11, 2014, 03:00:18 PM
 #15150

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 Tongue
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

MMinerMonitor author, monitor/auto/schedule reboots/alerts/remote/MobileMiner for Ants and Spondoolies! Latest (5.2). MPoolMonitor author, monitor stats/workers for most pools, global BTC stats (current/nxt diff/USD val/hashrate/calc)! Latest (v4.2) 
Buyer beware of Bitmain hardware and services.
kano
Legendary
*
Offline Offline

Activity: 1932


Linux since 1997 RedHat 4


View Profile
June 11, 2014, 03:02:17 PM
 #15151

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
Code:
#!/bin/sh
#
myopt="--load-balance --queue 320 --bitmain-hwerror --api-description MyAntS2"
/usr/bin/cgminer "$@" $myopt
Then chmod +x /config/cgminer
From 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 Smiley
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.

Pool: https://kano.is BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CKPool and CGMiner developer, IRC FreeNode #ckpool and #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
-ck
Moderator
Legendary
*
Offline Offline

Activity: 2002


Ruu \o/


View Profile WWW
June 11, 2014, 03:26:42 PM
 #15152

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.

Primary developer/maintainer for cgminer and ckpool/ckproxy.
Pooled mine at kano.is, solo mine at solo.ckpool.org
-ck
PatMan
Hero Member
*****
Offline Offline

Activity: 924


Watch out for the "Neg-Rep-Dogie-Police".....


View Profile WWW
June 11, 2014, 04:02:00 PM
 #15153

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  Wink

"When one person is deluded it is called insanity - when many people are deluded it is called religion" - Robert M. Pirsig.  I don't want your coins, I want change.
Amazon UK BTC payment service - https://bitcointalk.org/index.php?topic=301229.0 - with FREE delivery!
http://www.ae911truth.org/ - http://rethink911.org/ - http://rememberbuilding7.org/
iglasses
Legendary
*
Offline Offline

Activity: 1008


View Profile
June 11, 2014, 04:22:48 PM
 #15154

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
Moderator
Legendary
*
Offline Offline

Activity: 2002


Ruu \o/


View Profile WWW
June 11, 2014, 04:29:52 PM
 #15155

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.

Primary developer/maintainer for cgminer and ckpool/ckproxy.
Pooled mine at kano.is, solo mine at solo.ckpool.org
-ck
Kuma
Member
**
Offline Offline

Activity: 107



View Profile
June 11, 2014, 05:01:53 PM
 #15156

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 Offline

Activity: 1932


Linux since 1997 RedHat 4


View Profile
June 12, 2014, 12:48:50 AM
 #15157

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  Wink
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 ...

Pool: https://kano.is BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CKPool and CGMiner developer, IRC FreeNode #ckpool and #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
kano
Legendary
*
Offline Offline

Activity: 1932


Linux since 1997 RedHat 4


View Profile
June 12, 2014, 01:57:37 AM
 #15158

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.

I'm banned from posting in Eligius since wizkid didn't like people knowing the crap their pool does and deleted my posts.
So ... Eligius is low priority.

I still wonder why Eligius keeps such a high balance ...
https://blockchain.info/address/18d3HV2bm94UyY4a9DrPfoZ17sXuiDQq2B >400BTC
https://blockchain.info/address/1ChANGeATMH8dFnj39wGTjfjudUtLspzXr >200BTC
https://blockchain.info/address/14qgRxmyWwRweGY4mfjB5FRxr3Ak8Weu1w 1000 BTC
https://blockchain.info/address/1BRoZJLeLaR9T4PP2m1FJ5isqgQmhzMKBn 99.999 BTC

https://blockchain.info/address/18g3xd6WiEn6Wc88EK2B3oMnG7Y6KKwehM
That's an interesting payout

This one is interesting how it splits up a large amount into smaller and smaller amounts
https://blockchain.info/address/16qN6Xcm9tKoDTfeLjan5dgCEsDhWTxizK

Pool: https://kano.is BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CKPool and CGMiner developer, IRC FreeNode #ckpool and #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
dmaxl
Newbie
*
Offline Offline

Activity: 1


View Profile
June 12, 2014, 02:34:50 AM
 #15159

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:
Code:
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
Moderator
Legendary
*
Offline Offline

Activity: 2002


Ruu \o/


View Profile WWW
June 12, 2014, 02:42:30 AM
 #15160

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:
Code:
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.

Primary developer/maintainer for cgminer and ckpool/ckproxy.
Pooled mine at kano.is, solo mine at solo.ckpool.org
-ck
Pages: « 1 ... 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 [758] 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 ... 830 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!