Author

Topic: bitHopper: Python Pool Hopper Proxy - page 162. (Read 355689 times)

full member
Activity: 196
Merit: 100
July 23, 2011, 03:56:08 PM
Are you using autominer? Otherwise. Hmmm. It doesn't appear for me. i'll look through logs though.
sr. member
Activity: 302
Merit: 250
July 23, 2011, 03:48:26 PM
anyone know why this would happen? Im guessing this is propably phoenix related, not bithopper? This is after running more than 30hrs without problems:
Code:
[23/07/2011 19:39:06] Result: 8ba20c64 accepted              
[23/07/2011 19:39:20] Result: 7ddd8caa accepted             
[23/07/2011 19:39:23] Result: 18558e4d accepted             
[393.75 Mhash/sec] [9000 Accepted] [860 Rejected] [RPC (+LP)]./miner2.sh: line 3: 15173 Killed                  ./phoenix.py -u http://x:x@localhost:8336/ DEVICE=1 -k phatk VECTORS BFI_INT AGGRESSION=11 FASTLOOP=false WORKSIZE=256 -a 50
root@linuxcoin:/home/user#
running Phoenix 1.50. Thanks
full member
Activity: 196
Merit: 100
July 23, 2011, 03:24:25 PM
When it happens, tell us and we'll switch it to a backup server.
sr. member
Activity: 302
Merit: 250
July 23, 2011, 03:21:12 PM
Your awsome c00w, I'm sending some coins your way.

Also nofeemining is going to a score based system (where every share is equal to 50BTC/difficulty) not sure what thats called, but its happening soon.
full member
Activity: 196
Merit: 100
July 23, 2011, 03:18:02 PM
ahitman:

Code:
[polmine]
name: polmine.pl
mine_address: polmine.pl:8347
api_address:https://polmine.pl/?action=statistics
role:mine  
api_method:re
api_key: stkich:[ 0-9]*
api_index:16,-5
api_strip:' '
#CHANGE THIS
#https://polmine.pl
user: xxx
pass: xxx

Oh and I added it to pool.cfg.default
full member
Activity: 196
Merit: 100
July 23, 2011, 03:12:30 PM
Do you have mtred in pool.cfg? I'm going to change it but the current start server is mtred.

EDIT: Actually its the last pool parsed in the latest version. Update?
bb
member
Activity: 84
Merit: 10
July 23, 2011, 03:11:10 PM
2)bb nothing is happening?
You need to mv pools.cfg.default to pools.cfg
I should probably have a error output telling people that.

Unfortunately it's not that trivial. :-)

Code:
$ ls /opt/bitHopper-4 | grep pool
pool.cfg
pool.cfg.default
pool.py
pool.pyc
sr. member
Activity: 302
Merit: 250
July 23, 2011, 03:01:10 PM
I like the idea of having something like this in the pool.cfg file, but only because I dont know what a json_ec is.
Code:
[polmine]
name: polmine.pl
mine_address: polmine.pl:8347
api_address:https://polmine.pl/?action=statistics
role:mine 
api_method:re
api_shares: int(re.search(r"stkich:[ 0-9]*", response).group(0)[16:-5].replace(' ',''))
#CHANGE THIS
#https://polmine.pl
user: xxx
pass: xxx

How do I add methods?

edit: also above method would require the api_index
full member
Activity: 165
Merit: 100
July 23, 2011, 02:46:46 PM
The expected value of a share in a (properly implemented) PPLNS pool is exactly 1.0 (relative to solo or PPS).

Once a share is submitted, the fundamental question of its value is: how many blocks will be found before N more shares have been submitted. This can be modeled as a Poisson process with the expected number of blocks equal to N / difficulty. (If N is the difficulty, you'd expect to find one block. If N is twice the difficulty, you'd expect to find two blocks, and so on.) If (for example), N is one-half the difficulty, you'd expect a share to be paid approximately as follows:

  • No payout: ~60.65%
  • 1 payout: ~30.33%
  • 2 payouts: ~7.58%
  • 3 payouts: ~1.26%
  • 4 or more payouts: ~0.18%

Regardless of the value of N or the difficulty, the expected value will sum out to 1, however.

To make it relevant for this thread, PPLNS pools should be used only as backups, and definitely not as hopping targets.
You're completely right, PPLNS isn't hoppable. (Although PPLNS is subject to a share-withholding attack)
legendary
Activity: 910
Merit: 1000
Quality Printing Services by Federal Reserve Bank
July 23, 2011, 02:45:01 PM
Can you add http://mining.bitcoin.cz/ to the list?
full member
Activity: 196
Merit: 100
July 23, 2011, 02:43:06 PM
1)Pool.cfg is less flexible?
Well you can still add methods if you need some custom python code.
see json_ec. So no. Its actually more flexible.

2)bb nothing is happening?
You need to mv pools.cfg.default to pools.cfg
I should probably have a error output telling people that.

3)Cmd api_method?
Awesome. Can I get a copyright release burp?

4)Different triple mining code?
I'm going to test that but that works? Really? What I have now for re works also.
hero member
Activity: 742
Merit: 500
July 23, 2011, 01:44:40 PM
enmaku read my last post

Yeah, I see that now. I already fixed it myself, but in a different way - I added one more replace() to pools.py line 241:
Code:
parsed = response.replace('\n', '').replace('\r','').replace('\t','').replace(' ','')

Took care of the extra spaces they added in the middle of the number as well as the space between the and

Glancing over yours I can kind of see how it's working, regex isn't my strong suit so if I can fix it ANYWHERE but the regex I'll gladly do so  Grin
full member
Activity: 176
Merit: 100
July 23, 2011, 01:39:59 PM
enmaku read my last post
newbie
Activity: 53
Merit: 0
July 23, 2011, 01:38:51 PM
The expected value of a share in a (properly implemented) PPLNS pool is exactly 1.0 (relative to solo or PPS).

Once a share is submitted, the fundamental question of its value is: how many blocks will be found before N more shares have been submitted. This can be modeled as a Poisson process with the expected number of blocks equal to N / difficulty. (If N is the difficulty, you'd expect to find one block. If N is twice the difficulty, you'd expect to find two blocks, and so on.) If (for example), N is one-half the difficulty, you'd expect a share to be paid approximately as follows:

  • No payout: ~60.65%
  • 1 payout: ~30.33%
  • 2 payouts: ~7.58%
  • 3 payouts: ~1.26%
  • 4 or more payouts: ~0.18%

Regardless of the value of N or the difficulty, the expected value will sum out to 1, however.

To make it relevant for this thread, PPLNS pools should be used only as backups, and definitely not as hopping targets.
hero member
Activity: 742
Merit: 500
July 23, 2011, 01:35:26 PM
Getting regex failures on triple with Ryouiki's latest. Did they change their stats page or something?
legendary
Activity: 924
Merit: 1004
Firstbits: 1pirata
July 23, 2011, 01:10:30 PM
I'm trying to add polmine.pl to "pool.cfg" in last version (0dd8833) without success, I think the problem comes from the spaces in page source, just guessing

[polmine]
name: polmine.pl
mine_address: polmine.pl:8347
api_address:https://polmine.pl/?action=statistics
api_method:re
api_key:stkich:\d+
api_index:16,-5
role:mine
#CHANGE THIS
#https://polmine.pl/?action=signup
user: x
pass: x

any help would be appreciated



edit: minor changes
full member
Activity: 165
Merit: 100
July 23, 2011, 12:40:07 PM
Very nice work, Streblo!
Thanks, this pool math is really interesting to me because the results are sometimes bizzare!


edit: Streblo!
I love the explanation. And I'm adding ppln.
Sounds good. Remember, the quick'n'dirty method with the factor of ~2 for shares adjustment only works with M=0.5. Though, I (or anybody with the mathematica link) can easily calculate numbers for arbitrary M.


Amazing streblo. Really great stuff.
The thing I'm still unclear on though (and maybe I'm just dense) is:
Based on your analysis, given the situation of hopping two pools having different speeds, should I stay with the faster pool even though it is further from share 1 and then hop to slower later. Or do I hop to pool 2 immediately after it solves a block. It seems to me the downside is getting stuck in a slow pool and missing the spread of shares to other available pools ( even backup)
Assuming you switch pools with no increase stales and you have accurate round_shares information, ALWAYS send shares to the pool with least number of shares (unless, of course, all pools are above x=.428, in which case you should solo mine [read: use a "backup" pool]).


nice work streblo, just managed to put my concepts straight thanks. I added you on my future donations list if you don't mind
Thanks man!



Although this should REALLY go in a seperate topic... What's your understanding of PPLNS?
I got it like this, that you _always_ consider the last N shares and don't reset at block boundaries. Yes, this means you can get paid twice or more often for a single share but also that you can be not paid at all for some others. I suspect you do in your model reset your shares when a block was found. Is this true?
Hmm, should I start another topic? I started a similar thread in Mining->Pools, but that is more for a new payout system which I call normalized Proportional Payout (nPP), which is almost identical to proportional, except it cannot be exploited by hoppers.

I don't see how his model could include anything from previous rounds - I think it resets at boundaries. That just means the model gives a low bound for speedup/efficiency.

I'd really like some details (that i probably won't follow!) though. Or at least more details about
Quote
PPLNS strongly deviates from proportional only during rounds which pay (per share) below the statistical average. Because the hopper "suffers" from PPLNS only during sub-par rounds, the absolute difference between proportional and PPLNS is small.
because it's tantalising me. I'd like to know why the gamma functions allow us to model the PPLNS behaviour.
You are correct, this analysis resets at the pools found block boundaries. I could run Monte Carlo simulations of the PPLNS system, because handling multiple payouts per share (technically, upto N times!) would be quite difficult, I suspect.
Yes, this analysis does include reseting shares after the pool finds a block (not when the system finds a block). Whoops. I don't included: multiple blocks found per share or the decreased payout from including the last N shares (including previous round(s)). These effects work in opposite directions, although I don't know which one is stronger.

PP expectation value was calculated by taking the payout (1/(n+x)) multiplied by the distribution of number of shares (x) required to find a block, and integrating over all possibilities.
n shares are already submitted
the payout after x more shares are submitted (1/(x+n))
probability of a pool solving a block after x shares = exp(-x)
PP = Integrate exp(-x)/(x+n) from x=0 to Infinity = exp(x) E1(x) = exp(x) Gamma(0,y) (this is the incomplete gamma function)

PPLNS (when incorrectly resetting shares after every block)
n shares are already submitted
the payout after x more shares are submitted: 1/(x+n) (x < M)
PPLNS = Integrate exp(-x)/(x+n) from x=0 to M = exp(x) ( Gamma(0,x) - Gamma(0,M+x)) (x < M)


Cheers

1FQoC3zsos22QxZC35fMfP8JteMK9nEQPU
bb
member
Activity: 84
Merit: 10
July 23, 2011, 11:00:23 AM
With the newest version I am getting this error:

Code:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/web/http.py", line 1371, in dataReceived
    finishCallback(data[contentLength:])
  File "/usr/lib/python2.7/dist-packages/twisted/web/http.py", line 1585, in _finishRequestBody
    self.allContentReceived()
  File "/usr/lib/python2.7/dist-packages/twisted/web/http.py", line 1641, in allContentReceived
    req.requestReceived(command, path, version)
  File "/usr/lib/python2.7/dist-packages/twisted/web/http.py", line 807, in requestReceived
    self.process()
--- ---
  File "/usr/lib/python2.7/dist-packages/twisted/web/server.py", line 125, in process
    self.render(resrc)
  File "/usr/lib/python2.7/dist-packages/twisted/web/server.py", line 132, in render
    body = resrc.render(self)
  File "/usr/lib/python2.7/dist-packages/twisted/web/resource.py", line 210, in render
    return m(request)
  File "/opt/bitHopper-4/bitHopper.py", line 370, in render_POST
    return bitHopper_Post(request)
  File "/opt/bitHopper-4/bitHopper.py", line 227, in bitHopper_Post
    bithopper_global.log_msg('RPC request [' + rep + "] submitted to " + str(pool_server['name']))
exceptions.TypeError: 'NoneType' object is not subscriptable

When this happened, current in line 212 in bitHopper.py was 'mtred', however, pool_server in line 213 turned out to be None.

The mtred entry in the config file looks ok.
donator
Activity: 2058
Merit: 1007
Poor impulse control.
July 23, 2011, 10:29:35 AM
I don't see how his model could include anything from previous rounds - I think it resets at boundaries. That just means the model gives a low bound for speedup/efficiency.

I'd really like some details (that i probably won't follow!) though. Or at least more details about
Quote
PPLNS strongly deviates from proportional only during rounds which pay (per share) below the statistical average. Because the hopper "suffers" from PPLNS only during sub-par rounds, the absolute difference between proportional and PPLNS is small.
because it's tantalising me. I'd like to know why the gamma functions allow us to model the PPLNS behaviour.

legendary
Activity: 924
Merit: 1004
Firstbits: 1pirata
July 23, 2011, 10:11:53 AM
nice work streblo, just managed to put my concepts straight thanks. I added you on my future donations list if you don't mind

@c00w kudos to you to man, I was waiting for this to happen coz my python skills really suck and many times I was just breaking the script after editing, it's a more portable now... thanks really , btw I already have you on donation list
Jump to: