Pages:
Author

Topic: del (Read 6745 times)

full member
Activity: 121
Merit: 100
del
July 21, 2011, 05:20:08 PM
#38
There's a lot of great stuff here. In the interests of saving time for everyone, would those of you who have updated code be interested in starting a fresh Multipool fork on github?

Yeah.. bitHopper isn't really suiting my needs considering I have a bunch of workers I need to track individually, I'll put a bounty as well as make a fork this weekend.
donator
Activity: 2058
Merit: 1007
Poor impulse control.
July 11, 2011, 01:49:07 AM
#37
There's a lot of great stuff here. In the interests of saving time for everyone, would those of you who have updated code be interested in starting a fresh Multipool fork on github?
newbie
Activity: 20
Merit: 0
July 09, 2011, 05:22:28 PM
#36
Wouldn't you know it.  Bitcoins.lc just change their authentication, preventing the rewards subroutine from logging in.   The two lines with "_csrf_protect_token" need to change to "_csrf_token" to fix this.  If they change it again,  look at the login page's source and pick out the new token name, from the login section.

Here is the code again with the changes.
Code:
sub bitcoinslc_rewards {
    print "parsing bitcoin.lc rewards\n";
    my $url1='https://www.bitcoins.lc/';
    my $url2='https://www.bitcoins.lc/transactions';
    my $pool=$pools{"bitcoins-lc"};
    $pool->{rounds_time}=shared_clone({}) unless $pool->{rounds_time};

    foreach my $account (values %{$accounts{"bitcoins-lc"}}) {
$_=wget($url1, "--keep-session-cookies --save-cookie bitcoins-lc-cookie.txt");
if (!$_){
    print "error: unable to fetch bitcoins-lc login page $url1\n";
    return;
}
m{.* name="_csrf_token" value="(\w.*)"};
my $token=$1;
my $ok=($token=~/^[a-z0-9]+$/);

if ($ok){
    $_=wget($url1, "'--post-data=_csrf_token=$token&action=login&email=$account->{web_user}&password=$account->{web_pass}&login=Proceed'", "--load-cookies bitcoins-lc-cookie.txt", "--keep-session-cookies --save-cookie bitcoins-lc-cookie2.txt");
    $ok=!!$_;
}
if ($ok){
    $_=wget($url2, "--load-cookies bitcoins-lc-cookie2.txt");
    $ok=!!$_;
}

my @lines;
if ($ok){
    @lines=split/\n/;
    $ok=@lines; # puts the number of lines in $ok
}
if (!$ok){
    print "error: cannot login into/parse stats page for bitcoin-lc using account $account->{name}\n";
    return;
}
@lines = grep { /Your Transactions/ .. /div id="rightcol"/ } @lines;
if (!@lines) {
   print "error: no lines matched between Your Transactions and div id=rightcol; code needs changed!\n";
   return;
}

my @new_rounds;
my $blockid = 0;
my $date;
my $shares = 0;
my $reward = 0;
my $epoch = 0;

foreach (@lines){
    if (/Received Block (\d+) - (.*)<\/span>/) {
$blockid = $1;
$date = $2;
$date =~ s/ (\d\d?) (...) / $2 $1 /;
$epoch=qx(date -d '$date' +%s); chomp $epoch;
    }
    if (/Based upon (\d+) valid shares/) {
$shares = $1;
next if (!$blockid);
    }
    if (/

\+([\d.]+)/) {
$reward = $1;
if ($blockid) {
    #print "Debug: block $blockid, date '$date', epoch '$epoch', shares $shares, amount $reward\n";
    $ok=($blockid=~/^[a-z0-9]+$/ and $reward=~/^\d+\.\d+$/ and $epoch=~/^\d+$/ and $shares=~/^\d+$/);

    if (!$ok){
print "error parsing stats page for bitcoins-lc using account $account->{name}: line=$_\n";
foreach my $round (@new_rounds){
    delete $account->{rounds}->{$round};
}
return;
    }

    my $round=$pool->{rounds_time}->{$epoch};
    if (!$round){
$round=guess_round($epoch, $pool, $epoch);
next if !$round;
$pool->{rounds}->{$round}=shared_clone({time => $epoch, shares => $shares});
$pool->{rounds_time}->{$epoch} = $round;
    }
    if (!$account->{rounds}->{$round}){
$account->{rounds}->{$round}=shared_clone({earned => $reward, shares_web => $shares});
push @new_rounds, $round;
    }    

    # Then reset data
    $blockid = $shares = $reward = $epoch = 0;
    $date = "";
} else {
    next;
}
    }
    last if (/Recent Transactions/);
}
consolidate_rounds($account, @new_rounds);
    }
}

newbie
Activity: 20
Merit: 0
July 09, 2011, 11:01:52 AM
#35
Here is code for a bitcoinslc_rewards() subroutine.  I've been running it for two days on my local multipool to check the functionality.  It seems to get completed shares successfully, but shares don't exactly lineup correctly with the correct completed blocks.  This is somewhat the intended functionality of multipool where it assigns the rewards to the closest block by time.  Unfortunately the times in the database for completed blocks and the times on the Bitcoins.lc website don't line up exactly, so the block numbering is a bit off.  Running it modifies the database with the completed rewards, so be careful, and check it out first without sending multipool work from your miner.  See if you like how the rewards function is working.  If you don't like it, remove the call to bitcoinslc_rewards(), and reload from your previous datafile.

I'm not a perl programmer, and I mainly just copied the code from other rewards subroutines, and received some help from other forum members on the parsing.  Thanks!  If anyone comes up with an improved version, please post it.  Better yet would be if MultiPool himself/herself or someone else could setup a git repository that could be contributed to.

See updated code below. V
newbie
Activity: 20
Merit: 0
July 09, 2011, 10:40:04 AM
#34
still no go.

It is might be a problem between your miner and bitcoind.  Try just mining solo with your miner and see if that works.  Make sure bitcoind is in server mode.
donator
Activity: 2058
Merit: 1007
Poor impulse control.
July 09, 2011, 06:50:50 AM
#33
still no go.
donator
Activity: 2058
Merit: 1007
Poor impulse control.
July 09, 2011, 06:16:32 AM
#32
Is bitcoind for solo?
yes(aka running your own pool)
Is there some way just to run it locally without solo so I don't get this error?
you must run solo

Originally Multipool didn't have solo, he only added it to give miners a fallback. Eligius is a better 1.0 fallback now. Why is solo still required? bitcoind is the only thing preventing me from getting this working.
donator
Activity: 2058
Merit: 1007
Poor impulse control.
July 09, 2011, 05:03:01 AM
#31
I checked bitcoin.conf, bitcoind.conf, accounts conf - all correct but I still get the "unable to communicate with bitcoind" and wont run. Is bitcoind for solo? Is there some way just to run it locally without solo so I don't get this error?
donator
Activity: 2058
Merit: 1007
Poor impulse control.
July 09, 2011, 12:20:23 AM
#30
I'm getting "error unable to communicate with bitcoind"

I made sure the config file for bitcoin has the same username and password as bitcoind.conf and it's set up as per the example above. Anyone else had this problem? I can't be the only one to have made whatever dumb misake I made.
check Multipool.PL code around line 35 make sure you have the config OK (bitcoind runs on local port etc etc)

Is this the line you meant?


my $longpoll=$production?"http://(space)multipool(to breake the url).hpc.tw:$longpoll_port/longpoll":"http://127.0.0.1:$longpoll_port/longpoll";
donator
Activity: 2058
Merit: 1007
Poor impulse control.
July 08, 2011, 07:20:24 AM
#29
I'm getting "error unable to communicate with bitcoind"

I made sure the config file for bitcoin has the same username and password as bitcoind.conf and it's set up as per the example above. Anyone else had this problem? I can't be the only one to have made whatever dumb misake I made.
donator
Activity: 2058
Merit: 1007
Poor impulse control.
July 08, 2011, 01:56:19 AM
#28
Just read how their system works. The only "danger" is that after a lot of unlucky rounds users start to go away from the pool and it is left with a dept that will/can not be paid if noone's mining any more.

It would be nice to have an indicator on Eligius' page if the pool currently has earned more or less than expected (and also how much more/less) to be able to counter this threat, if necessary. I think that's about it though. You can hop in and out as much as you like, everyone should get paid fairly (eventually!).

I've read from when Luke-Jr started with max PPS, but I like chart porn, and I love it when you actually get a real world indication of an underlying algorithm, finding just how close results are to what theory says they should be. Sometimes there are subtle surprises you wouldn't think of when just running the system through in your mind - results of real world application are the gold standard. And I really want to see how close that is to reality.
newbie
Activity: 20
Merit: 0
July 08, 2011, 12:18:37 AM
#27
I believe there is an error in the deepbit_rewards() subroutine, which is miscalculating the epoch, and corrupting the database.  I fixed this by removing "UTC" from that epoch conversion.  The DeepBit web site is using local time, not UTC.  This doesn't fix the corruption that already happened to the database, but should fix things going forward.
newbie
Activity: 20
Merit: 0
July 07, 2011, 11:30:16 PM
#26
Sukrim gave a good summary.  Generally Eligius should have a a utility of 1.0 (unless they have had a series of long rounds and run out of credits, then they switch to proportional like most other pools.)  Oddly my Multipool stats pages gives them an efficiency of 0.826 based on four non-pending blocks.  It might be because of their server problems and upgrades.  

Eventually readily available pool hopping software like MultiPool should drive all pools to adopt similar scoring strategies to Eligius.  Before this, there was only a limited group of people doing pool hopping at the expense of everyone else.  This kind of software levels the playing field, and pushes the pools to improve their scoring systems.
legendary
Activity: 2618
Merit: 1007
July 07, 2011, 10:53:46 PM
#25
Just read how their system works. The only "danger" is that after a lot of unlucky rounds users start to go away from the pool and it is left with a dept that will/can not be paid if noone's mining any more.

It would be nice to have an indicator on Eligius' page if the pool currently has earned more or less than expected (and also how much more/less) to be able to counter this threat, if necessary. I think that's about it though. You can hop in and out as much as you like, everyone should get paid fairly (eventually!).
donator
Activity: 2058
Merit: 1007
Poor impulse control.
July 07, 2011, 10:48:41 PM
#24
Here are the changes I made to fix eligius.

Changed all references to "eligius-eu", to "eligius".

Changed:
my $url1='http://eligius.st/~luke-jr/raw/'.($pool_name eq "eligius-eu"?"eu":"us").'/blocks/';
  to
my $url1='http://eligius.st/~luke-jr/raw/3/blocks/';

And removed:
eligius_rewards("eligius-eu");

In pool.config set the eligius URL to:
http://eligius.st/~luke-jr/raw/3/blocks/

I also used a new utility function with a constant utility since eligius now uses SMPPS instead of proportional rewards.  It should be the default if all other pools have a lower utility.

These have worked for me.  The website shows what I have earned.

Warning though, they are changing their servers around, so the code may need to be updated with new server names in the near future.

So you didn't change the regexp to show results on the multipool summary? Ah well - that's what I was after. I really did want to see if eligius doesn't penalise or reward hoppers, there's been so much discussion about it.
legendary
Activity: 2618
Merit: 1007
July 07, 2011, 10:37:27 PM
#23
Eligius should in theory always be 1.0 (would be only different in the longer run if someone maliciously implements a withholding winning shares attack and has some massive hashrate there). Solo should be ~1.002, as transaction fees are ~0.2% of the 50 BTC currently on average. I guess that's neglectable though and you're probably currently better off with a SMPPS pool.
gno
newbie
Activity: 28
Merit: 0
July 07, 2011, 11:07:48 AM
#22
I also used a new utility function with a constant utility since eligius now uses SMPPS instead of proportional rewards.  It should be the default if all other pools have a lower utility.


edit...

so a new function that just returns the same utility all the time? 

What number did you decide on?
newbie
Activity: 20
Merit: 0
July 07, 2011, 10:40:44 AM
#21
Here are the changes I made to fix eligius.

Changed all references to "eligius-eu", to "eligius".

Changed:
my $url1='http://eligius.st/~luke-jr/raw/'.($pool_name eq "eligius-eu"?"eu":"us").'/blocks/';
  to
my $url1='http://eligius.st/~luke-jr/raw/5/blocks/';

And removed:
eligius_rewards("eligius-eu");

In pool.config set the eligius URL to:
http://eligius.st/~luke-jr/raw/5/blocks/

I also used a new utility function with a constant utility since eligius now uses SMPPS instead of proportional rewards.  It should be the default if all other pools have a lower utility.

These have worked for me.  The website shows what I have earned.

Warning though, they are changing their servers around, so the code may need to be updated with new server names in the near future.

Edit: New url for new server "5".
donator
Activity: 2058
Merit: 1007
Poor impulse control.
July 07, 2011, 10:01:12 AM
#20
I changed the eligius rewards func to look at http://eligius.st/~luke-jr/raw/3/blocks/ .  Eligius hasn't hit a block yet so I don't know if it will work or not.  Smiley



can you post the function if it works?

 Cheers!
gno
newbie
Activity: 28
Merit: 0
July 07, 2011, 08:02:19 AM
#19
I changed the eligius rewards func to look at http://eligius.st/~luke-jr/raw/3/blocks/ .  Eligius hasn't hit a block yet so I don't know if it will work or not.  Smiley

Pages:
Jump to: