Pages:
Author

Topic: [ANN] Stratum mining protocol - ASIC ready - page 26. (Read 146166 times)

-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
New version of cgminer, 2.8.2, fixing the variable difficulty bug has been released. Also new to this version of cgminer is support for the stratum commands client.reconnect and client.get_version.
Looks like the windows version is broken still. Sigh  Undecided
Linux users it should work fine.
Fixed in 2.8.3.
sr. member
Activity: 467
Merit: 250
Thanks again for the proxy, loving it.. two small feature requests:

1. Fail over/back/load balance/etc for multiple servers.

2. syslog facility/target?


3. Show diff per share submitted in console?

Quote
2012-10-11 16:56:14,510 INFO proxy stratum_listener.submit # [91ms] Share from 'miner5' accepted

sr. member
Activity: 467
Merit: 250
Some numbers (my Intel Atom netbook):
Original sources: 10000 getworks generated in 26.482 sec, 377 gw/s
C extension: 10000 getworks generated in 3.481 sec, 2872 gw/s

Beagleboard XM (~equivalent of Raspberry Pi):
C extension: 10000 getworks generated in 12.270 sec, 814 gw/s



Xeon 3.2 (older) under ESXi/debian6
10000 getworks generated in 1.186 sec, 8430 gw/s

Opteron 865 1.8ghz under openVZ/debian6
10000 getworks generated in 0.934 sec, 10709 gw/s

Xeon W3505 under Mint12
10000 getworks generated in 0.529 sec, 18886 gw/s
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
New version of cgminer, 2.8.2, fixing the variable difficulty bug has been released. Also new to this version of cgminer is support for the stratum commands client.reconnect and client.get_version.
Looks like the windows version is broken still. Sigh  Undecided
Linux users it should work fine.
member
Activity: 243
Merit: 10
Here is an UpStart Script for the Proxy Application, Tested on Ubuntu 12.04 LTS
http://pastebin.com/S2xw5FR1
Code:
description "Stratum Mining Proxy"
author TheSeven
start on filesystem
stop on runlevel [!2345]
start on started stratum
stop on stopped stratum
oom never
expect daemon
respawn
respawn limit 10 60 # 10 times in 60 seconds
kill timeout 120
 
script
# Application Username
user=fpga
# Installation Directory
basedir=/home/$user/stratum
# Python Directory
python=/usr/bin/python
# Script Name
script=mining_proxy.py
# Stratum Pool Server Address
host=stratum.btcguild.com
# Stratum Pool Server Port
port=9332
# Application PID File
pidfile=$basedir/mining-proxy.pid
# Don't change anything below here unless you know what you're doing
[[ -e $pidfile && ! -d "/proc/$(cat $pidfile)" ]] && rm $pidfile
[[ -e $pidfile && "$(cat /proc/$(cat $pidfile)/cmdline)" != $cmd* ]] && rm $pidfile
exec start-stop-daemon --start -c $user --chdir $basedir --pidfile $pidfile --startas $python -b -m -- $script -o $host -p $port
end script
Written by TheSeven
legendary
Activity: 1386
Merit: 1097
Mining proxy version 1.1.0 has been released. I'll upload windows binaries later today, now I'm on Linux only.

New version has C extension module for speeding up midstate calculations, so it is helpful for big mining operations running getwork miners.

There's also --test parameter, which run performance self test for getworks.

Some numbers (my Intel Atom netbook):
Original sources: 10000 getworks generated in 26.482 sec, 377 gw/s
C extension: 10000 getworks generated in 3.481 sec, 2872 gw/s

Beagleboard XM (~equivalent of Raspberry Pi):
C extension: 10000 getworks generated in 12.270 sec, 814 gw/s

So proxy is now fast enough to run many THash/s mining operation with getwork miners on hardware worth less than 100$.

To compile midstate C extension, just type "make" in midstatec directory. Proxy will auto-detect the module on next run.

Edit: I forgot to mention that all github users have tu run "setup.py develop" or "setup.py install" every time they fetch new version!
legendary
Activity: 1386
Merit: 1097
Thank you ckolivas!
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
New version of cgminer, 2.8.2, fixing the variable difficulty bug has been released. Also new to this version of cgminer is support for the stratum commands client.reconnect and client.get_version.
sr. member
Activity: 467
Merit: 250
dlasher, can you confirm that this bug happen also when proxy is NOT in the chain? I'd like to know if there's something broken in proxy.

I can't confirm it, because I don't have any single miners fast enough to get above diff=2 without a proxy.
legendary
Activity: 1386
Merit: 1097
Ok, bug in cgminer is confirmed, we're working on the fix.
I also double checked the proxy and no related bug has been found.
legendary
Activity: 1386
Merit: 1097
dlasher, can you confirm that this bug happen also when proxy is NOT in the chain? I'd like to know if there's something broken in proxy.
sr. member
Activity: 467
Merit: 250
Let me know if there's debug options/versions/etc I can try to identify the issue.
What strikes me as useful is testing:
  • after 2.8+proxy goes bad, restart ONLY cgminer - no change in behavior
  • cgminer 2.7 with proxy - didn't test
  • cgminer 2.8 without proxy - works fine

My first step this morning was to shut off the proxy, and let cgminer fail down to stratum pools directly, and back to diff=1 shares. Which works fine, because, as it turns out, there's evidently a cgminer bug with 2.8.1, with miners getting stuck, when they're using >DIFF=4.

Several users at btcguild have confirmed seeing the issue.

https://bitcointalksearch.org/topic/m.1263116

legendary
Activity: 2576
Merit: 1186
Let me know if there's debug options/versions/etc I can try to identify the issue.
What strikes me as useful is testing:
  • after 2.8+proxy goes bad, restart ONLY cgminer
  • cgminer 2.7 with proxy
  • cgminer 2.8 without proxy
sr. member
Activity: 467
Merit: 250
Slush:

I think I've found a bug, but i have no idea how to identify or fix it.

I've been mining with cgminer 2.8.1 + stratum behind proxy, to btcguild for a while.. (and with 2.7 behind proxy before that), and  it's been very stable, solid. Once everything smooths out, my miners were all taking 16-diff shares.

Last night about 20:30 PST, my reported hashrate dropped to half, and cgminer was only working 4-diff shares. All cgminer derived graphs (cacti/etc) showed no change, but btcguilds page showed the drop:


Graphs from btcguild.com btw --- love that pool!


I left it alone for a couple hours, thinking it would stablize, and it didn't, so about midnight, I dropped back to cgminer 2.7.6, no stratum, and bypassed the proxy. Voila, hashrate resumes.

Let it run that way all night, then shifted back to proxy+stratum again this morning. Hashrate dropped to half, and I'm stuck at 4-diff shares. Talked to Eleuthria at length, initially blaming the btcguild in some way.

He's convinced that cgminer/proxy are  'disconnected' somehow on share-diff. The proxy is submitted 2-diff, but handing-out 4-diff shares to my miners. His logs show half my normal rate of submitted shares.

At present I'm back to bypassing the proxy, and running a non-stratum version of cgminer.

This behavior has survived proxy restart/reboot, cgminer restart/reboot,etc. I'm on latest GIT of both cgminer and mining-proxy.

Let me know if there's debug options/versions/etc I can try to identify the issue.

sr. member
Activity: 467
Merit: 250


Thanks again for the proxy, loving it.. two small feature requests:

1. Fail over/back/load balance/etc for multiple servers.

2. syslog facility/target?



legendary
Activity: 1386
Merit: 1097
Interesting error thrown tonight, not sure what to make of it:

It is just an ugly error message about stale share. It doesn't break anything and I'll fix it in upcoming release.
sr. member
Activity: 467
Merit: 250

Interesting error thrown tonight, not sure what to make of it:

Quote
2012-10-09 20:06:58,826 INFO proxy stratum_listener.submit # [59ms] Share from 'my-miner6' REJECTED: (-2, u'stale', None)
2012-10-09 20:06:58,827 ERROR protocol protocol.process_failure # [Failure instance: Traceback (failure with no frames): : (-2, u'stale', None)
]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1043, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/local/lib/python2.7/dist-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/src/stratum-mining-proxy-rev1.0/mining_libs/stratum_listener.py", line 163, in submit
    result = (yield self._f.rpc('mining.submit', [worker_name, job_id, tail+extranonce2, ntime, nonce]))
RemoteServiceException: (-2, u'stale', None)
legendary
Activity: 1386
Merit: 1097
Oh, stop panicking, I'm an idiot. Problem was in my balancer setup, it is fixed.

So there's no known issue in Stratum proxy, my apologies.
legendary
Activity: 1386
Merit: 1097
I just found a bug in Stratum 1.0.0 + stratum-enabled miner (cgminer/poclbm). I'm working on bugfix right now, but users using Stratum proxy 1.0.0 on my pool should check their miners, because they most likely crashed during pool app restart 10 minutes ago.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Stratum support is now in an official cgminer release, version 2.8.0:

https://bitcointalksearch.org/topic/m.1252632

Awesome work ckolivas
I sent a 5btc donation from the pool, I know our miners will appreciate it when we have stratum support Smiley
Coming soontm
Thanks! Glad someone appreciates the effort  Grin It was quite a bit of work...

Thanks for your work ckolivas.  Before I send it, please just confirm that the donation should be sent to the address in your sig: 148KkS2vgVi4VzUi4JcKzM2PMaMVPi3nnq
Much appreciated, thanks.  Smiley
Pages:
Jump to: