Bitcoin Forum
December 03, 2016, 05:49:22 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 ... 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 [94] 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 ... 205 »
  Print  
Author Topic: bitHopper: Python Pool Hopper Proxy  (Read 332553 times)
macboy80
Member
**
Offline Offline

Activity: 102


View Profile
August 01, 2011, 03:20:30 AM
 #1861

I have just finished tweaking my new modifications to the appearance of the stats page. I still need some help getting the red / yellow / green / blue text to apply to the whole line as well as the graph, but that can wait.

http://imageshack.us/f/6/statskr.jpg

What do you guys think?

EDIT: Picture is missing red for disable / api_disable. Works the same as other colors, though.
1480787362
Hero Member
*
Offline Offline

Posts: 1480787362

View Profile Personal Message (Offline)

Ignore
1480787362
Reply with quote  #2

1480787362
Report to moderator
1480787362
Hero Member
*
Offline Offline

Posts: 1480787362

View Profile Personal Message (Offline)

Ignore
1480787362
Reply with quote  #2

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

Posts: 1480787362

View Profile Personal Message (Offline)

Ignore
1480787362
Reply with quote  #2

1480787362
Report to moderator
1480787362
Hero Member
*
Offline Offline

Posts: 1480787362

View Profile Personal Message (Offline)

Ignore
1480787362
Reply with quote  #2

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

Activity: 476


moOo


View Profile
August 01, 2011, 03:27:49 AM
 #1862

my nofee looks like this


Quote
[nofeemining]
name: nofeemining.com
mine_address: nofeemining.com:8332
api_address: https://www.nofeemining.com/api.php?key%(nofeemining_user_apikey)s
role:mine
api_method:json
api_key:poolRoundShares
url: https://www.nofeemining.com
#CHANGE THIS
#https://www.nofeemining.com/
user: mooooooooooOOOoOOo
pass: cow

and i wasnt using them for backup.. are they pay per share now or something?

macboy80

the colors look fine but something is messing with my eyes in the payout section. besides for that, it looks good.

mooo for rent
Sukrim
Legendary
*
Offline Offline

Activity: 1848


View Profile
August 01, 2011, 03:29:36 AM
 #1863

Just a heads-up for everyone:

You from now on need to edit user.cfg (copy from user.cfg.default), NOT pool.cfg!

Hope that was big enough... Tongue

pool.cfg holds stuff like regexes + URLs that shouldn't matter to users anyways and you can then update easier if there is no change in the number of pools, just in some "backend" stuff.

https://bitfinex.com <-- leveraged trading of BTCUSD, LTCUSD and LTCBTC (long and short) - 10% discount on fees for the first 30 days with this refcode: x5K9YtL3Zb
Mail me at Bitmessage: BM-BbiHiVv5qh858ULsyRDtpRrG9WjXN3xf
joulesbeef
Sr. Member
****
Offline Offline

Activity: 476


moOo


View Profile
August 01, 2011, 03:38:40 AM
 #1864

I just finished copying and pasting  url: fields into each and every one, and did a friends as well and I come back here half an hr later and you split pool.cfg into pool.cfg and user cfg?

I hope your stale rate goes up 2% for making me go through all that!  ;P

mooo for rent
Sukrim
Legendary
*
Offline Offline

Activity: 1848


View Profile
August 01, 2011, 03:49:36 AM
 #1865

"url: ..." fields should already be there for each pool now though, so if that's your concern for your branch, don't worry! Smiley

Edit:
Current binary: http://dl.dropbox.com/u/13293016/bitHopper/bitHopper-2011-08-01_05-39-57-d7df0f8ebf65d01734ec43129f711e042f97a953.7z (based on Python 2.7.1 though as I just remembered, I'm upgrading to 2.7.2 now)
2.7.2 Version: http://dl.dropbox.com/u/13293016/bitHopper/bitHopper-2011-08-01_05-53-50-d7df0f8ebf65d01734ec43129f711e042f97a953.7z

https://bitfinex.com <-- leveraged trading of BTCUSD, LTCUSD and LTCBTC (long and short) - 10% discount on fees for the first 30 days with this refcode: x5K9YtL3Zb
Mail me at Bitmessage: BM-BbiHiVv5qh858ULsyRDtpRrG9WjXN3xf
macboy80
Member
**
Offline Offline

Activity: 102


View Profile
August 01, 2011, 03:51:27 AM
 #1866

macboy80

the colors look fine but something is messing with my eyes in the payout section. besides for that, it looks good.

That's the black text. I was conflicted on white or black, but the real goal would be to have the colored text go all the way across. Here it is with white.



Can anyone help with getting the getColor function to work for the remaining uncolored text? Let me know, and I'll create a fork.
djex
Full Member
***
Offline Offline

Activity: 196


View Profile
August 01, 2011, 04:03:07 AM
 #1867

can anyone help with getting the getColor function to work for the remaining uncolored text? Let me know, and I'll create a fork.

I'll take a look.

Edit:

Ok for the payout color replace line 151 in index.html with

Code:
payout = "<a href='#' onFocus='this.blur();' onClick=\"setPayout('" + srvName + "');\" style='text-decoration:underline;color:" + getColor(payload,srv) + ";'>" + srv["payout"].toFixed(8) + "</a>";

And for the role color replace line 108 of index.html with

Code:
var role = "<a href='#' onClick=\"selectRole('" + srvName + "', '" + srv["role"] + "')\" onFocus='this.blur();' style='text-decoration:underline;color:" + getColor(payload,srv) + ";'>" + srv["role"] + "</a>";

Hope this helps. Smiley

Smiley  : 1LbvSEJwtQZKLSQQVYxQJes8YneQk2yhE3
ahitman
Full Member
***
Offline Offline

Activity: 126


View Profile WWW
August 01, 2011, 04:06:20 AM
 #1868

my nofee looks like this


and i wasnt using them for backup.. are they pay per share now or something?


No, nofee has a second pool up that will pay per share, its a cloud based system hosted on Googles appspot services so it should be pretty stable even if it gets bigger, its in beta now but its working pretty well. The new address for stats and info: http://nofeemining.appspot.com/  and for mining its
Code:
./cgminer -o http://nofeemining.appspot.com -u YOURBITCOINADDRESS -p ANYPASSWORD -I 8
Can someone try to run this on the hopper and see what they get? I got the errors mentioned above: exceptions.AttributeError: 'NoneType' object has no attribute 'connHeaders'
joulesbeef
Sr. Member
****
Offline Offline

Activity: 476


moOo


View Profile
August 01, 2011, 04:23:12 AM
 #1869

Quote
Edit:
Current binary: http://dl.dropbox.com/u/13293016/bitHopper/bitHopper-2011-08-01_05-39-57-d7df0f8ebf65d01734ec43129f711e042f97a953.7z (based on Python 2.7.1 though as I just remembered, I'm upgrading to 2.7.2 now)


looks cool, looks like you need to edit the readme.

so this doesnt have any dependencies? doesnt need python, and all the extras?

mooo for rent
muyoso
Member
**
Offline Offline

Activity: 84



View Profile
August 01, 2011, 04:25:03 AM
 #1870

Let me just say that polmine is awesome.  And who would have thought about Slush??  I am over 200% efficiency at Slush for the day.

I drink it up!
Sukrim
Legendary
*
Offline Offline

Activity: 1848


View Profile
August 01, 2011, 04:29:10 AM
 #1871

Yes, it has a Python interpreter already packaged in the binary, as well as all other python libs. It's fairly easy to do this with any Python program, either with PyInstaller or py2exe (I used PyInstaller) and mybe it helpt more people to hop more easily.

I didn't want to do my own readme, as I'm just repackaging. In the future I plan on putting these releases either on an FTP or on Wuala (I need some room there before though). Dropbox sucks for this kinda stuff, as you can only share individual files, not folders. Then maybe I'll just get my own entry in the README file and that's it ("either install Python and the libraries or use the files at ... provided by Sukrim").

https://bitfinex.com <-- leveraged trading of BTCUSD, LTCUSD and LTCBTC (long and short) - 10% discount on fees for the first 30 days with this refcode: x5K9YtL3Zb
Mail me at Bitmessage: BM-BbiHiVv5qh858ULsyRDtpRrG9WjXN3xf
iopq
Hero Member
*****
Offline Offline

Activity: 644


View Profile
August 01, 2011, 05:39:22 AM
 #1872

Just a heads-up for everyone:

You from now on need to edit user.cfg (copy from user.cfg.default), NOT pool.cfg!

Hope that was big enough... Tongue

pool.cfg holds stuff like regexes + URLs that shouldn't matter to users anyways and you can then update easier if there is no change in the number of pools, just in some "backend" stuff.
this change broke deleting pools

D:\bitHopper>python bithopper.py
[22:37:56] Updating Difficulty
[22:37:57] 1690895.8030524
[22:37:57] Updating NameCoin Difficulty
[22:37:57] 94037.96
Traceback (most recent call last):
  File "bithopper.py", line 227, in <module>
    bithopper_global = BitHopper()
  File "bithopper.py", line 43, in __init__
    self.pool = pool.Pool(self)
  File "D:\bitHopper\pool.py", line 44, in __init__
    self.servers[pool] = dict(parser.items(pool))
  File "D:\sw\python27\lib\ConfigParser.py", line 647, in items
    for option in options]
  File "D:\sw\python27\lib\ConfigParser.py", line 683, in _interpolate
    self._interpolate_some(option, L, rawval, section, vars, 1)
  File "D:\sw\python27\lib\ConfigParser.py", line 715, in _interpolate_some
    option, section, rest, var)
ConfigParser.InterpolationMissingOptionError: Bad value substitution:
        section: [eligius]
        option : url
        key    : user
        rawval :

of course I edited pools.cfg to remove them manually, but this means the splitting of the files didn't help, in fact it complicated the process
I just don't want to see a bunch of disabled pools on http://localhost:8337/stats

macboy80
Member
**
Offline Offline

Activity: 102


View Profile
August 01, 2011, 05:52:25 AM
 #1873

can anyone help with getting the getColor function to work for the remaining uncolored text? Let me know, and I'll create a fork.

I'll take a look.

Edit:

Ok for the payout color replace line 151 in index.html with

Code:
payout = "<a href='#' onFocus='this.blur();' onClick=\"setPayout('" + srvName + "');\" style='text-decoration:underline;color:" + getColor(payload,srv) + ";'>" + srv["payout"].toFixed(8) + "</a>";

And for the role color replace line 108 of index.html with

Code:
var role = "<a href='#' onClick=\"selectRole('" + srvName + "', '" + srv["role"] + "')\" onFocus='this.blur();' style='text-decoration:underline;color:" + getColor(payload,srv) + ";'>" + srv["role"] + "</a>";

Hope this helps. Smiley

Absolutely perfect! I would have never been able to figure that one out. Thanks.

I've created a fork on github. Everybody check out my new stats layout / color scheme. (I also changed and capitalized the pool names in the pool.cfg and user.cfg.default, so just replace those files if you don't want to deal with that.)

https://github.com/macboy80/bitHopper

EDIT: Just updated to comment out disabled pools in pool.cfg and user.cfg.default (Removes disabled pools from the stats) index.html should copy over to latest c00w build without any changes
EskimoBob
Legendary
*
Offline Offline

Activity: 910


Quality Printing Services by Federal Reserve Bank


View Profile
August 01, 2011, 06:09:41 AM
 #1874

After update and restore all usenames passw (thank you foe over writing my pool.cfg Smiley

I get this:

Code:
[09:02:55] Updating Difficulty
[09:02:55] 1690895.8030524
[09:02:55] Updating NameCoin Difficulty
[09:02:56] 94037.96
Traceback (most recent call last):
  File "bitHopper.py", line 227, in <module>
    bithopper_global = BitHopper()
  File "bitHopper.py", line 43, in __init__
    self.pool = pool.Pool(self)
  File "/blah/bitHopper/pool.py", line 45, in __init__
    self.servers[pool]['default_role'] = self.servers[pool]['role']
KeyError: 'role'

While reading what I wrote, use the most friendliest and relaxing voice in your head.
BTW, Things in BTC bubble universes are getting ugly....
iopq
Hero Member
*****
Offline Offline

Activity: 644


View Profile
August 01, 2011, 06:27:16 AM
 #1875

After update and restore all usenames passw (thank you foe over writing my pool.cfg Smiley

I get this:

Code:
[09:02:55] Updating Difficulty
[09:02:55] 1690895.8030524
[09:02:55] Updating NameCoin Difficulty
[09:02:56] 94037.96
Traceback (most recent call last):
  File "bitHopper.py", line 227, in <module>
    bithopper_global = BitHopper()
  File "bitHopper.py", line 43, in __init__
    self.pool = pool.Pool(self)
  File "/blah/bitHopper/pool.py", line 45, in __init__
    self.servers[pool]['default_role'] = self.servers[pool]['role']
KeyError: 'role'
you made a mistake in user.cfg

c00w
Full Member
***
Offline Offline

Activity: 196


View Profile
August 01, 2011, 06:44:24 AM
 #1876

@eskimo
It should work now.

deleting pools in user.py not deleting them in pool.py
It should. I'll look at it and see what I need to do to get it to work.

@macboy80
is your code in the public domain? I'd be glad to move it over to bitHopper when I have the time. Or a pull request would be awesome.

1HEmzeuVEKxBQkEenysV1yM8oAddQ4o2TX
Sukrim
Legendary
*
Offline Offline

Activity: 1848


View Profile
August 01, 2011, 07:04:39 AM
 #1877

After update and restore all usenames passw (thank you foe over writing my pool.cfg Smiley

I get this:

Code:
[09:02:55] Updating Difficulty
[09:02:55] 1690895.8030524
[09:02:55] Updating NameCoin Difficulty
[09:02:56] 94037.96
Traceback (most recent call last):
  File "bitHopper.py", line 227, in <module>
    bithopper_global = BitHopper()
  File "bitHopper.py", line 43, in __init__
    self.pool = pool.Pool(self)
  File "/blah/bitHopper/pool.py", line 45, in __init__
    self.servers[pool]['default_role'] = self.servers[pool]['role']
KeyError: 'role'
You did not set a role for every pool. Did you copy over user.cfg.default and edit it in there? If I jsut rename it to user.cfg it works, so...

And yeah, sorry about the overwriting stuff. I thought it would be obvious to the users anyways.

@c00w
I didn't code it that way that you can just delete pools in user.py - but if you for example check if the key "role" even exists before continuing after reading the config files, you can delete the obsolete pools from the dictionary.

I'm currently working on "backup_latehop" that hops to the backup_latehop pool with the most shares - useful for scored pools maybe (though the chances are actually the same of hitting a block, no matter how late the round is) and in any case a definite help for any backup pool, as people usually tend to leave (irrationally) on long rounds.

https://bitfinex.com <-- leveraged trading of BTCUSD, LTCUSD and LTCBTC (long and short) - 10% discount on fees for the first 30 days with this refcode: x5K9YtL3Zb
Mail me at Bitmessage: BM-BbiHiVv5qh858ULsyRDtpRrG9WjXN3xf
c00w
Full Member
***
Offline Offline

Activity: 196


View Profile
August 01, 2011, 07:12:44 AM
 #1878

Yeah I'm going to fix it so deleting it like that works though. I just need to check for existence of user and if it is not there delete it.

1HEmzeuVEKxBQkEenysV1yM8oAddQ4o2TX
Sukrim
Legendary
*
Offline Offline

Activity: 1848


View Profile
August 01, 2011, 07:33:20 AM
 #1879

I'm currently fighting with "selectsharesResponse" in pool.py: if no (useful) response is given (like btcg currently...), it seems to still continue, even if it can't parse for example a certain json key. This however seems to discourage it THAT much, that it doesn't even try again unless you switch roles...

Should it put pools on "api_disable" in these cases?!

Edit:
My suggestion would be to set the share count at errors to the current difficulty. These 10**10 spikes (if there is a single error) can destroy the whole charts + are not really useful anyways. Actually they can cause mine_friendly and backup_latehop to jump to the wrong pool.

https://bitfinex.com <-- leveraged trading of BTCUSD, LTCUSD and LTCBTC (long and short) - 10% discount on fees for the first 30 days with this refcode: x5K9YtL3Zb
Mail me at Bitmessage: BM-BbiHiVv5qh858ULsyRDtpRrG9WjXN3xf
c00w
Full Member
***
Offline Offline

Activity: 196


View Profile
August 01, 2011, 07:36:25 AM
 #1880

@Sukrim
We don't want it to do api_disable or change the times because of network outages. Only for pool owners messing with us. Especially because there is no automated way to undo an api_disable. You have to do it manually with the website.
If you have a vision for how to clean up the api code send me a message or post it here or on github. My next project is cleaning up the LP code to cut down on rejects and to make it possible to hop without share scraping.

EDIT: On rereading you post I really need an api_error flag.

1HEmzeuVEKxBQkEenysV1yM8oAddQ4o2TX
Pages: « 1 ... 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 [94] 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 ... 205 »
  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!