Bitcoin Forum

Bitcoin => Mining software (miners) => Topic started by: flower1024 on August 05, 2011, 03:41:11 AM



Title: poclbm patch for json based remote control (eg famous bitHopper)
Post by: flower1024 on August 05, 2011, 03:41:11 AM
this is used to control your miner through an JSON-WebPage (eg. the datasite of the famous bitHopper).

grab it here: https://github.com/flower1024/poclbm (make sure to get the master branch)

Instead of a server you provide a link to a json file like this:
(capitalized means you should change that)
Code:
{
    "current": "POOLNAME",
    "servers": {
        "POOLNAME": {
            "user": "#MINER USER#",
            "pass": "#MINER PASS#",
            "role": "#BACKUP | DISABLE | ???#",
            "mine_address": "#POOL MINE ADDRESS#:#POOL MINE PORT#",
        }
}

role could be:
disable      don't user this server (for whatever reason)
backup      just like the normal poclbm backups. if the current pool fails it'll cycle through the backups
???         no meaning, could be "mine"

Example
Code:
{
    "current": "rfc",
    "servers": {
        "mtred": {
            "mine_address": "mtred.com:8337",
            "pass": "minerpass",
            "role": "mine",
            "user": "miner.user",
        },
        "rfc": {
            "mine_address": "pool.rfcpool.com:8332",
            "pass": "minerpass",
            "role": "backup",
            "user": "miner_user",
        }
    },
}

cmd-example (for bitHopper):
Code:
python -O poclbm.py http://localhost:8337/data -d 1 -v -w64 -f10 --phatk2

05/08/2011 04:57:56, reading serverlist from bitHopper http://localhost:8000/data
05/08/2011 04:57:56, adding backup USER @ pool.rfcpool.com:8332
05/08/2011 04:57:56, adding backup USER @ su.mining.eligius.st:8337
05/08/2011 04:57:56, adding server USER @ polmine.pl:8347
05/08/2011 04:57:56, adding server USER @ api2.bitcoin.cz:8332
05/08/2011 04:57:56, adding server USER @ mtred.com:8337
05/08/2011 04:57:56, adding server USER @ pool.rfcpool.com:8332
05/08/2011 04:57:56, adding server USER @ eu1.triplemining.com:8344
05/08/2011 04:57:56, adding server USER @ ozco.in:8332
05/08/2011 04:57:56, adding server USER @ pool.bitclockers.com:8332
05/08/2011 04:57:56, Setting server (USER @ rfcpps)
rfcpps 05/08/2011 04:57:56, Kernel: phatk2
rfcpps 05/08/2011 04:58:02, LP connected to rfcpps
rfcpps [389.713 MH/s (~412 MH/s)] [Rej: 0/77 (0.00%)]

atm the server list is not updated. just the "current" field is interpreted every three seconds. it switches without rejects.

if you have any ideas how to improve this please let me know :)


Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: joulesbeef on August 07, 2011, 03:25:08 AM
you say it grabs the pools, why cant it grab the username and passes as well?

do i copy this into the bithopper dir? do I run bithopper and then this? and if so why does this need my user names again?



Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: flower1024 on August 07, 2011, 03:27:43 AM
you say it grabs the pools, why cant it grab the username and passes as well?

do i copy this into the bithopper dir? do I run bithopper and then this? and if so why does this need my user names again?



it also takes username and passes from the bithopper link.

you just start it with a link to bitHopper json file (eg http://localhost:8337/data) and it will connect to the pool which is current in bithopper.

all needed data is provided through the bithopper json interface - so bithopper don't need to be modified and you can start it from wherever you want (even on another machine).

don't get confused that i didn't change the help message. just look for the working command line in my initial post.

edit: made it a little more clear


Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: joulesbeef on August 07, 2011, 04:11:28 AM
ahh see i didnt know bithopper had that
i thought you wanted me to try remake a json file.
awesome.. i'll check it out


Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: joulesbeef on August 07, 2011, 04:26:37 AM
well first it told me it was missing numby.. i googled and installed that.
they it said it was missing pyopencl and being on windows, it told me i wasnt going to finish this tonight


Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: flower1024 on August 07, 2011, 04:32:26 AM
well first it told me it was missing numby.. i googled and installed that.
they it said it was missing pyopencl and being on windows, it told me i wasnt going to finish this tonight

its just a classic poclbm with a few addons. i guess i should make a windows exe (this would include all the needed dependencies) - but i never done that before.

on linux it should run flawlessly


Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: simonk83 on August 07, 2011, 04:42:20 AM
well first it told me it was missing numby.. i googled and installed that.
they it said it was missing pyopencl and being on windows, it told me i wasnt going to finish this tonight

its just a classic poclbm with a few addons. i guess i should make a windows exe (this would include all the needed dependencies) - but i never done that before.


That'd be great if you can be bothered :)


Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: joulesbeef on August 07, 2011, 04:53:28 AM
we can pester sukrim he made one for bithopper.
i'm nearly there i think.. downloading visual studios express 2008.


Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: flower1024 on August 07, 2011, 04:56:51 AM
we can pester sukrim he made one for bithopper.
i'm nearly there i think.. downloading visual studios express 2008.

the biggest problem is pyopencl on win7 x64
but i can't support you on that as i never got pyopencl it working on my win7 x64 machine (didn't try very hard though)


Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: joulesbeef on August 07, 2011, 05:44:39 AM
Code:
ok got past that and decorator
saw this ..


[quote]olmine 07/08/2011 01:39:24, Kernel: phatk2.1
:\Python27\lib\site-packages\pyopencl\__init__.py:173: UserWarning: Build succe
ded, but resulted in non-empty logs:
uild on <pyopencl.Device 'Cypress
         ' at 0x2d03ac8> succeeded, but said:

:\Users\JOULES~1\AppData\Local\Temp\OCL7BF6.tmp.cl(155): warning: variable
         "t1" was set but never used
       u t1;
         ^

4:64
 warn("Build succeeded, but resulted in non-empty logs:\n"+message)

and now getting miner idle errors.. it just wont connect


connecting using

Code:
python -O poclbm.py http://localhost:8337/data -d 0 -v -w128 -f10 --phatk2

tried both phatks


Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: joulesbeef on August 07, 2011, 05:49:13 AM
and i found this site handy to get all the dependencies already compiled (http://www.lfd.uci.edu/~gohlke/pythonlibs/)
farken google tried to steer me down the path of pain a few times


Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: joulesbeef on August 07, 2011, 06:16:26 AM
it's working now.. still get that message and some miner idle messages but it seems to be running well now.
yeah might have spoken too soon...
bithopper says i am running at 0mh and isnt updating any shares

but you screen seems to suggest shares are being done
Code:
bmunion 07/08/2011 02:21:42, warning: job finished, miner is idle


bmunion [312.977 MH/s (~198 MH/s)] [Rej: 1/18 (5.56%)]

but as you can see i get the idle errors.



Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: user7516 on August 07, 2011, 07:31:54 AM
I can't run your poclbm:
Code:
C:\Python27\Lib\flower1024-poclbm-b77e028>"C:\Python27\python.exe" -O "C:\Python27\Lib\flower1024-poclbm-b77e028\poclbm.py" http://localhost:8337/data -d 1 -v -w64 -f10 --phatk2

07/08/2011 11:24:14, reading serverlist from bitHopper http://localhost:8337/data
07/08/2011 11:24:14, adding server user7516.1 @ arsbitcoin.com:8344
07/08/2011 11:24:14, adding server user7516.1 @ bitcoinmonkey.com:8332
07/08/2011 11:24:14, adding server user7516501 @ polmine.pl:8347
07/08/2011 11:24:14, adding server user7516.1 @ api2.bitcoin.cz:8332
07/08/2011 11:24:14, adding server user7516_1 @ digbtc.net:8332
07/08/2011 11:24:14, adding server user7516 @ mtred.com:8337
07/08/2011 11:24:14, adding server mSzTUg @ bitcoins.lc:8080
07/08/2011 11:24:14, adding server user7516 @ bitcoinpool.com:8334
07/08/2011 11:24:14, adding server user7516_1 @ pool.rfcpool.com:8332
Traceback (most recent call last):
  File "C:\Python27\Lib\flower1024-poclbm-b77e028\poclbm.py", line 70, in <module>
    miner = BitcoinMiner(devices[options.device], options, VERSION, HttpTransport.HttpTransport)
  File "C:\Python27\Lib\flower1024-poclbm-b77e028\BitcoinMiner.py", line 45, in __init__
    self.transport = transport(self, self.options.phatk2 or self.options.phatk2_1)
  File "C:\Python27\Lib\flower1024-poclbm-b77e028\HttpTransport.py", line 20, in __init__
    super(HttpTransport, self).__init__(miner)
  File "C:\Python27\Lib\flower1024-poclbm-b77e028\Transport.py", line 53, in __init__
    say_line("adding server " + js["servers"][srv]["user"] + " @ " + js["servers"][srv]["mine_address"])
KeyError: 'mine_address'


Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: flower1024 on August 07, 2011, 10:47:11 AM
it's working now.. still get that message and some miner idle messages but it seems to be running well now.
yeah might have spoken too soon...
bithopper says i am running at 0mh and isnt updating any shares

but you screen seems to suggest shares are being done
Code:
bmunion 07/08/2011 02:21:42, warning: job finished, miner is idle


bmunion [312.977 MH/s (~198 MH/s)] [Rej: 1/18 (5.56%)]

but as you can see i get the idle errors.



as is said: shares can't be reported to bithopper as all is submitted directly.


Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: flower1024 on August 07, 2011, 10:49:02 AM
I can't run your poclbm:
Code:
C:\Python27\Lib\flower1024-poclbm-b77e028>"C:\Python27\python.exe" -O "C:\Python27\Lib\flower1024-poclbm-b77e028\poclbm.py" http://localhost:8337/data -d 1 -v -w64 -f10 --phatk2

07/08/2011 11:24:14, reading serverlist from bitHopper http://localhost:8337/data
07/08/2011 11:24:14, adding server user7516.1 @ arsbitcoin.com:8344
07/08/2011 11:24:14, adding server user7516.1 @ bitcoinmonkey.com:8332
07/08/2011 11:24:14, adding server user7516501 @ polmine.pl:8347
07/08/2011 11:24:14, adding server user7516.1 @ api2.bitcoin.cz:8332
07/08/2011 11:24:14, adding server user7516_1 @ digbtc.net:8332
07/08/2011 11:24:14, adding server user7516 @ mtred.com:8337
07/08/2011 11:24:14, adding server mSzTUg @ bitcoins.lc:8080
07/08/2011 11:24:14, adding server user7516 @ bitcoinpool.com:8334
07/08/2011 11:24:14, adding server user7516_1 @ pool.rfcpool.com:8332
Traceback (most recent call last):
  File "C:\Python27\Lib\flower1024-poclbm-b77e028\poclbm.py", line 70, in <module>
    miner = BitcoinMiner(devices[options.device], options, VERSION, HttpTransport.HttpTransport)
  File "C:\Python27\Lib\flower1024-poclbm-b77e028\BitcoinMiner.py", line 45, in __init__
    self.transport = transport(self, self.options.phatk2 or self.options.phatk2_1)
  File "C:\Python27\Lib\flower1024-poclbm-b77e028\HttpTransport.py", line 20, in __init__
    super(HttpTransport, self).__init__(miner)
  File "C:\Python27\Lib\flower1024-poclbm-b77e028\Transport.py", line 53, in __init__
    say_line("adding server " + js["servers"][srv]["user"] + " @ " + js["servers"][srv]["mine_address"])
KeyError: 'mine_address'


hey,

 it looks like your bithopper configuration lacks the mine_address for rfcpool.
just look in bithoppers pools.py if all pools have a valid mine_address


Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: flower1024 on August 07, 2011, 11:23:00 AM
Quote
I'm getting lots of error's like this (on Ubuntu 10.10 64 bit):

/tmp/OCLgKNyWT.cl(197): error: bad argument type to opencl builtin function:
          expected type "uint2", actual type "int"
     W[27] = P1(27) + P3(27);
             ^

Error limit reached.
100 errors detected in the compilation of "/tmp/OCLgKNyWT.cl".
Compilation terminated.

hm, that does look like a poclbm error.
could you try if this https://github.com/progranism/poclbm poclbm works for you? (i used it as a base; this error seems to be not related to my changes)


Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: user7516 on August 07, 2011, 12:06:00 PM
hey,

 it looks like your bithopper configuration lacks the mine_address for rfcpool.
just look in bithoppers pools.py if all pools have a valid mine_address

I can run your mod only after I commented (i.e. disabled) BTCPool24, bmunion, btcworld, nofeemining and poolmunity in user.cfg. All this pools have a valid mine_adress in pools.cfg. I have about 0.3% of rejected shares with your mod and this is excellent (tested about 1000 shares)! But your mod is not perfect: idle states after every share:

http://img12.imageshack.us/img12/289/clipboardimage8.png


Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: bitcoindaddy on August 07, 2011, 12:41:46 PM
Quote
I'm getting lots of error's like this (on Ubuntu 10.10 64 bit):

/tmp/OCLgKNyWT.cl(197): error: bad argument type to opencl builtin function:
          expected type "uint2", actual type "int"
     W[27] = P1(27) + P3(27);
             ^

Error limit reached.
100 errors detected in the compilation of "/tmp/OCLgKNyWT.cl".
Compilation terminated.

hm, that does look like a poclbm error.
could you try if this https://github.com/progranism/poclbm poclbm works for you? (i used it as a base; this error seems to be not related to my changes)

I removed the phatk2 parameter and it works now. No rejects at all on bitclockers.


Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: joulesbeef on August 07, 2011, 05:27:17 PM

Quote
as is said: shares can't be reported to bithopper as all is submitted directly.

i knew that but it was late... still the idles bug me.


Code:
bitclockers 07/08/2011 14:40:40, warning: job finished, miner is idle





bitclockers [313.832 MH/s (~22 MH/s)] [Rej: 1/2 (50.00%)]


and seem to have issues with bitclockers


Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: flower1024 on August 07, 2011, 10:08:01 PM
strange. i dont have any issues with them.

what do you see if you run a normal poclbm with them? i just added hopping code, i did not even touch the normal poclbm pool network code.


Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: joulesbeef on August 07, 2011, 11:27:47 PM
maybe I am being throttled.. maybe it was a bad day at bitclockers.. as you see i only did 3 shares which isnt quite a test. i'll give it a more thorough test soon


are the miner idle warnings normal after each share?


Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: flower1024 on August 07, 2011, 11:30:10 PM
no, you shouldn't see any miner idle warnings.
miner idle means your miner was not able to get more work.

would like to now if you see this error with stock poclbm too.


Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: joulesbeef on August 08, 2011, 05:29:06 AM
sorry took me so long to get back here.. was trying to break c00ws stuff, you understand.

yep it is a problem between me an poclbm


Code:
0
08/08/2011 01:27:51, 672d82e9, accepted
08/08/2011 01:27:55, warning: job finished, miner is idle
282257 khash/s


so no worries on your end.




Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: hawks5999 on August 09, 2011, 10:45:47 PM
flower - i've got some bandwidth to test out your mod.

Installing dependencies right now but quick question:
If there is an error in the json data will it kill your poclbm.

Currently getting this:
https://github.com/c00w/bitHopper/issues/164


Parse error on line 425: ...pi_key": "<span id="&quot;rs_round_shar -----------------------^ Expecting '}', ':', ',', ']'


but it's on a disabled mine so I'm hoping it doesn't matter


Title: Re: poclbm patch for json based remote control (eg famous bitHopper)
Post by: hawks5999 on August 09, 2011, 10:56:34 PM
Appears that maybe it does break it:

Code:
Traceback (most recent call last):
  File "poclbm.py", line 70, in <module>
    miner = BitcoinMiner(devices[options.device], options, VERSION, HttpTranspor
t.HttpTransport)
  File "C:\BTC\flower1024-poclbm-current\BitcoinMiner.py", line 45, in __init__
    self.transport = transport(self, self.options.phatk2 or self.options.phatk2_
1)
  File "C:\BTC\flower1024-poclbm-current\HttpTransport.py", line 20, in __init__

    super(HttpTransport, self).__init__(miner)
  File "C:\BTC\flower1024-poclbm-current\Transport.py", line 53, in __init__
    say_line("adding server " + js["servers"][srv]["user"] + " @ " + js["servers
"][srv]["mine_address"])
KeyError: 'mine_address'