Bitcoin Forum
March 19, 2024, 03:32:56 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
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 355541 times)
Sukrim
Legendary
*
Offline Offline

Activity: 2618
Merit: 1006


View Profile
August 01, 2011, 03:49:36 AM
Last edit: August 01, 2011, 04:00:22 AM by Sukrim
 #1861

"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://www.coinlend.org <-- automated lending at various exchanges.
https://www.bitfinex.com <-- Trade BTC for other currencies and vice versa.
1710819176
Hero Member
*
Offline Offline

Posts: 1710819176

View Profile Personal Message (Offline)

Ignore
1710819176
Reply with quote  #2

1710819176
Report to moderator
Each block is stacked on top of the previous one. Adding another block to the top makes all lower blocks more difficult to remove: there is more "weight" above each block. A transaction in a block 6 blocks deep (6 confirmations) will be very difficult to remove.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1710819176
Hero Member
*
Offline Offline

Posts: 1710819176

View Profile Personal Message (Offline)

Ignore
1710819176
Reply with quote  #2

1710819176
Report to moderator
1710819176
Hero Member
*
Offline Offline

Posts: 1710819176

View Profile Personal Message (Offline)

Ignore
1710819176
Reply with quote  #2

1710819176
Report to moderator
1710819176
Hero Member
*
Offline Offline

Posts: 1710819176

View Profile Personal Message (Offline)

Ignore
1710819176
Reply with quote  #2

1710819176
Report to moderator
macboy80
Member
**
Offline Offline

Activity: 102
Merit: 10


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

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
Merit: 100


View Profile
August 01, 2011, 04:03:07 AM
Last edit: August 01, 2011, 04:24:20 AM by djex
 #1863

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

Activity: 302
Merit: 250


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

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
Merit: 250


moOo


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

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
Merit: 10


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

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: 2618
Merit: 1006


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

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://www.coinlend.org <-- automated lending at various exchanges.
https://www.bitfinex.com <-- Trade BTC for other currencies and vice versa.
iopq
Hero Member
*****
Offline Offline

Activity: 658
Merit: 500


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

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
Merit: 10


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

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
Merit: 1000


Quality Printing Services by Federal Reserve Bank


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

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: 658
Merit: 500


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

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 (OP)
Full Member
***
Offline Offline

Activity: 196
Merit: 100


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

@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: 2618
Merit: 1006


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

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://www.coinlend.org <-- automated lending at various exchanges.
https://www.bitfinex.com <-- Trade BTC for other currencies and vice versa.
c00w (OP)
Full Member
***
Offline Offline

Activity: 196
Merit: 100


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

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: 2618
Merit: 1006


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

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://www.coinlend.org <-- automated lending at various exchanges.
https://www.bitfinex.com <-- Trade BTC for other currencies and vice versa.
c00w (OP)
Full Member
***
Offline Offline

Activity: 196
Merit: 100


View Profile
August 01, 2011, 07:36:25 AM
Last edit: August 01, 2011, 07:54:47 AM by c00w
 #1876

@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
Sukrim
Legendary
*
Offline Offline

Activity: 2618
Merit: 1006


View Profile
August 01, 2011, 07:53:59 AM
 #1877

I think I already found one weird spot:
Code:
        self.servers[pool]['err_api_count'] += 1
        if self.servers[pool]['err_api_count'] > 1:
^ this does nothing if the error count is just 1.

I rewrote it to set the share count to "difficulty" instead of 10**10 on errors, I doubt that this would have any adverse effects. Just look at my newest fork.

https://www.coinlend.org <-- automated lending at various exchanges.
https://www.bitfinex.com <-- Trade BTC for other currencies and vice versa.
c00w (OP)
Full Member
***
Offline Offline

Activity: 196
Merit: 100


View Profile
August 01, 2011, 07:55:50 AM
 #1878

Um that is because certain people wanted it to not be disabled on the first error. I bow to people who complain enough on issues which are minor.

1HEmzeuVEKxBQkEenysV1yM8oAddQ4o2TX
Sukrim
Legendary
*
Offline Offline

Activity: 2618
Merit: 1006


View Profile
August 01, 2011, 08:04:31 AM
 #1879

Hm, only problem is if the response has an error from the beginning. Well, I'll undo my "fix" then in this place and make sure further above that you at least get an integer as share count... Wink

https://www.coinlend.org <-- automated lending at various exchanges.
https://www.bitfinex.com <-- Trade BTC for other currencies and vice versa.
c00w (OP)
Full Member
***
Offline Offline

Activity: 196
Merit: 100


View Profile
August 01, 2011, 08:07:26 AM
 #1880

Tommorow I'll add an api_error and an api_delagger. should fix some of these problems.

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:  

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