Bitcoin Forum
April 23, 2024, 04:34:16 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: poclbm patch for json based remote control (eg famous bitHopper)  (Read 3251 times)
flower1024 (OP)
Legendary
*
Offline Offline

Activity: 1428
Merit: 1000


View Profile
August 05, 2011, 03:41:11 AM
Last edit: August 05, 2011, 10:36:21 AM by flower1024
 #1

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
Huh         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 Smiley
1713890056
Hero Member
*
Offline Offline

Posts: 1713890056

View Profile Personal Message (Offline)

Ignore
1713890056
Reply with quote  #2

1713890056
Report to moderator
1713890056
Hero Member
*
Offline Offline

Posts: 1713890056

View Profile Personal Message (Offline)

Ignore
1713890056
Reply with quote  #2

1713890056
Report to moderator
"I'm sure that in 20 years there will either be very large transaction volume or no volume." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713890056
Hero Member
*
Offline Offline

Posts: 1713890056

View Profile Personal Message (Offline)

Ignore
1713890056
Reply with quote  #2

1713890056
Report to moderator
joulesbeef
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


moOo


View Profile
August 07, 2011, 03:25:08 AM
 #2

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?


mooo for rent
flower1024 (OP)
Legendary
*
Offline Offline

Activity: 1428
Merit: 1000


View Profile
August 07, 2011, 03:27:43 AM
Last edit: August 07, 2011, 03:43:45 AM by flower1024
 #3

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
joulesbeef
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


moOo


View Profile
August 07, 2011, 04:11:28 AM
 #4

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

mooo for rent
joulesbeef
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


moOo


View Profile
August 07, 2011, 04:26:37 AM
 #5

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

mooo for rent
flower1024 (OP)
Legendary
*
Offline Offline

Activity: 1428
Merit: 1000


View Profile
August 07, 2011, 04:32:26 AM
 #6

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
simonk83
Hero Member
*****
Offline Offline

Activity: 798
Merit: 1000


View Profile
August 07, 2011, 04:42:20 AM
 #7

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 Smiley
joulesbeef
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


moOo


View Profile
August 07, 2011, 04:53:28 AM
 #8

we can pester sukrim he made one for bithopper.
i'm nearly there i think.. downloading visual studios express 2008.

mooo for rent
flower1024 (OP)
Legendary
*
Offline Offline

Activity: 1428
Merit: 1000


View Profile
August 07, 2011, 04:56:51 AM
 #9

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)
joulesbeef
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


moOo


View Profile
August 07, 2011, 05:44:39 AM
 #10

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

mooo for rent
joulesbeef
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


moOo


View Profile
August 07, 2011, 05:49:13 AM
 #11

and i found this site handy to get all the dependencies already compiled
farken google tried to steer me down the path of pain a few times

mooo for rent
joulesbeef
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


moOo


View Profile
August 07, 2011, 06:16:26 AM
 #12

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.


mooo for rent
user7516
Newbie
*
Offline Offline

Activity: 41
Merit: 0


View Profile
August 07, 2011, 07:31:54 AM
 #13

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'
flower1024 (OP)
Legendary
*
Offline Offline

Activity: 1428
Merit: 1000


View Profile
August 07, 2011, 10:47:11 AM
 #14

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.
flower1024 (OP)
Legendary
*
Offline Offline

Activity: 1428
Merit: 1000


View Profile
August 07, 2011, 10:49:02 AM
 #15

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
flower1024 (OP)
Legendary
*
Offline Offline

Activity: 1428
Merit: 1000


View Profile
August 07, 2011, 11:23:00 AM
 #16

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)
user7516
Newbie
*
Offline Offline

Activity: 41
Merit: 0


View Profile
August 07, 2011, 12:06:00 PM
 #17

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
bitcoindaddy
Hero Member
*****
Offline Offline

Activity: 481
Merit: 500


View Profile
August 07, 2011, 12:41:46 PM
 #18

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.
joulesbeef
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


moOo


View Profile
August 07, 2011, 05:27:17 PM
Last edit: August 07, 2011, 07:11:04 PM by joulesbeef
 #19


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

mooo for rent
flower1024 (OP)
Legendary
*
Offline Offline

Activity: 1428
Merit: 1000


View Profile
August 07, 2011, 10:08:01 PM
 #20

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.
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!