Xenland (OP)
Legendary
Offline
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
|
|
June 23, 2011, 09:50:59 AM |
|
$fiveMinutesAgo = time(); $fiveMinutesAgo -= 60*5;
$fiveMinutesAgo = time() - 60 * 5; // WTF @ convulted code... I guess I could save a line of execution by doing the following $fiveMinutesAgo = time()-60*5;
I'm sure I probably save .01 of a nano second that way. In all seriousness tho, I find the original way easier to read when other users edited it they can quickly pick up what exacly is happening
|
|
|
|
peedee
Newbie
Offline
Activity: 28
Merit: 0
|
|
June 23, 2011, 11:20:04 AM |
|
Its actually like this :
$fiveMinutesAgo = time(); $fiveMinutesAgo -= 60*5;
$workers = mysql_query("SELECT count(*) FROM `stats_userMHashHistory` WHERE `timestamp` >= $fiveMinutesAgo AND `mhashes` > 0");
// Verify it worked if (!$workers) echo mysql_error();
$nrworkers = mysql_fetch_array($workers);
Then where ever you want to display the amount of workers :
echo "$nrworkers[0]"
Btw the stats_userMHashHistory table is filling up pretty quickly, especially if the number of workers that have been created increases, I think this will be become a scalability bottleneck.
Just don't use MySQL then. CouchDB or another database type optimized for large databases. What about purging / summarizing? Some stats don't need to be available up to the lowest timeslice level forever. For example : Keep timeslice level data for 1 week Keep hour data for 1 month Keep day data for 3 months Keep month data for 5 years Can make nice graphs out of that and save A LOT of space. A bottleneck will be reached someday, keep adding resources gets expensive / risky so it's better to start summarizing while it's still the early stage than to find out you'll need hour long running jobs to purge / summarize your data later. Or am I missing something and do we need to keep everything we collect ?
|
|
|
|
Xenland (OP)
Legendary
Offline
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
|
|
June 23, 2011, 11:37:31 AM |
|
Its actually like this :
$fiveMinutesAgo = time(); $fiveMinutesAgo -= 60*5;
$workers = mysql_query("SELECT count(*) FROM `stats_userMHashHistory` WHERE `timestamp` >= $fiveMinutesAgo AND `mhashes` > 0");
// Verify it worked if (!$workers) echo mysql_error();
$nrworkers = mysql_fetch_array($workers);
Then where ever you want to display the amount of workers :
echo "$nrworkers[0]"
Btw the stats_userMHashHistory table is filling up pretty quickly, especially if the number of workers that have been created increases, I think this will be become a scalability bottleneck.
Just don't use MySQL then. CouchDB or another database type optimized for large databases. What about purging / summarizing? Some stats don't need to be available up to the lowest timeslice level forever. For example : Keep timeslice level data for 1 week Keep hour data for 1 month Keep day data for 3 months Keep month data for 5 years Can make nice graphs out of that and save A LOT of space. A bottleneck will be reached someday, keep adding resources gets expensive / risky so it's better to start summarizing while it's still the early stage than to find out you'll need hour long running jobs to purge / summarize your data later. Or am I missing something and do we need to keep everything we collect ? This all sounds pretty good idears, I think most of the data wont be neccesary.
|
|
|
|
kr105
|
|
June 23, 2011, 04:03:32 PM |
|
Link not working for 4.1.1:(
|
|
|
|
peedee
Newbie
Offline
Activity: 28
Merit: 0
|
|
June 23, 2011, 04:43:28 PM |
|
Can you update the changelog ?
|
|
|
|
Xenland (OP)
Legendary
Offline
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
|
|
June 23, 2011, 04:56:41 PM |
|
Can you update the changelog ?
Added serverFeePercentage mysql. And fixed the accounts not being rewarded bug Sorry cant have more detailed changelog, but its just me and i cant rememeber every change
|
|
|
|
|
peedee
Newbie
Offline
Activity: 28
Merit: 0
|
|
June 23, 2011, 07:39:13 PM |
|
Estimated Bitcoins does not seem to work for me ?
|
|
|
|
Xenland (OP)
Legendary
Offline
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
|
|
June 23, 2011, 08:24:38 PM |
|
Estimated Bitcoins does not seem to work for me ?
I seem to be experiencing this problem too, It must of broke with some last minute fixes in the display, I'll have a fix up soon, Thanks mate!
|
|
|
|
sergio
|
|
June 24, 2011, 01:22:41 AM |
|
bug reports based on demo, which I believe it is 4.1.2 since I could not find the version number on it.
Under account details --> worker Status it displays { "User":{ "username":"sergio.3", "currSpeed":"0", "status":"Connected" }, "Pool":{ } }
CurrSpeed:0 it seems wrong since the miner it is running.
Under account details --> Overall Stats The requested URL /json/poolstats.php was not found on this server. The file is missing.
The estimated reward for the round seems to be off, since I am the only miner currently running the test and as time goes by the rewards goes down, that would make sense only if there were more miners joining the test.
Under Managed Workers, once a worker has been created the delete option does not work.
Hopefully this bug will be fixed on the next release.
Thanks
|
|
|
|
Xenland (OP)
Legendary
Offline
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
|
|
June 24, 2011, 01:34:52 AM Last edit: June 24, 2011, 01:46:54 AM by Xenland |
|
Ill check it out but i bet scince i JUST sign off my miner it will look like that please tell me if this problem persists after the next round. And i did forget pool stats fixes coming in a few hours bug reports based on demo, which I believe it is 4.1.2 since I could not find the version number on it.
Under account details --> worker Status it displays { "User":{ "username":"sergio.3", "currSpeed":"0", "status":"Connected" }, "Pool":{ } }
CurrSpeed:0 it seems wrong since the miner it is running.
Under account details --> Overall Stats The requested URL /json/poolstats.php was not found on this server. The file is missing.
The estimated reward for the round seems to be off, since I am the only miner currently running the test and as time goes by the rewards goes down, that would make sense only if there were more miners joining the test.
Under Managed Workers, once a worker has been created the delete option does not work.
Hopefully this bug will be fixed on the next release.
Thanks
|
|
|
|
phorensic
|
|
June 24, 2011, 04:45:59 AM |
|
Bug report that doesn't really break anything - "mainstyle.css" line 155 ul#list-nav li { display:inline } Needs to have a ;
|
|
|
|
d3c0n808
|
|
June 24, 2011, 05:28:39 AM |
|
Xenland one question....if your currently working on a block shouldn't the stats say which block number your currently on regardless of wether or not you found a block? I was just wondering because on the test net yours is showing current block and found blocks as well or does the pool have to find the first block? Also in 4.1.2 the estimated is 0, in the previous version 4.1.1 i believe with me mining solo on the pool estimated was 50 which would be correct as im the only worker. Is this a bug or just my webserver F-in up. Sorry to bug ya just wondering
|
|
|
|
Xenland (OP)
Legendary
Offline
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
|
|
June 24, 2011, 05:33:21 AM |
|
Xenland one question....if your currently working on a block shouldn't the stats say which block number your currently on regardless of wether or not you found a block? I was just wondering because on the test net yours is showing current block and found blocks as well or does the pool have to find the first block? Also in 4.1.2 the estimated is 0, in the previous version 4.1.1 i believe with me mining solo on the pool estimated was 50 which would be correct as im the only worker. Is this a bug or just my webserver F-in up. Sorry to bug ya just wondering
Correct you must find at least one block before the blocks found stats page works correctly ill see if i can replace the nasty white area with a nice current block graph in the mean time if that would help
|
|
|
|
sakkaku
|
|
June 24, 2011, 05:36:04 AM |
|
Ahh I see what your saying, all i need to do is add a mysql_real_escape_string() that will be in version 2,
When working with SQL you should escape every variable going in. It doesn't matter if it came from you hand carving it into a piece of stone and transplanting it into the server like an act of god. All it takes is one oops to turn a "safe" variable into an attack vector.
|
|
|
|
Xenland (OP)
Legendary
Offline
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
|
|
June 24, 2011, 05:39:43 AM |
|
Ahh I see what your saying, all i need to do is add a mysql_real_escape_string() that will be in version 2,
When working with SQL you should escape every variable going in. It doesn't matter if it came from you hand carving it into a piece of stone and transplanting it into the server like an act of god. All it takes is one oops to turn a "safe" variable into an attack vector. Wow your response is wayyy late, were at version 4 buddy, try again
|
|
|
|
sakkaku
|
|
June 24, 2011, 05:40:40 AM |
|
Ahh I see what your saying, all i need to do is add a mysql_real_escape_string() that will be in version 2,
When working with SQL you should escape every variable going in. It doesn't matter if it came from you hand carving it into a piece of stone and transplanting it into the server like an act of god. All it takes is one oops to turn a "safe" variable into an attack vector. Wow your response is wayyy late, were at version 4 buddy, try again lol sorry. I'm half asleep >_<
|
|
|
|
Xenland (OP)
Legendary
Offline
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
|
|
June 24, 2011, 05:43:08 AM |
|
Ahh I see what your saying, all i need to do is add a mysql_real_escape_string() that will be in version 2,
When working with SQL you should escape every variable going in. It doesn't matter if it came from you hand carving it into a piece of stone and transplanting it into the server like an act of god. All it takes is one oops to turn a "safe" variable into an attack vector. Wow your response is wayyy late, were at version 4 buddy, try again lol sorry. I'm half asleep >_< its all good! You can check out the updated version here if your intention is to stay up that is: http://173.212.217.202/
|
|
|
|
phorensic
|
|
June 24, 2011, 07:18:57 AM |
|
Can you update the changelog ?
Added serverFeePercentage mysql. And fixed the accounts not being rewarded bug Sorry cant have more detailed changelog, but its just me and i cant rememeber every change "Accounts not being rewarded bug" - I thought it was just me running on testnet that broke things, I solved 14 blocks and all balances were 0, so I have a private pool going now on the real blockchain. Because I have modified your v4.0.1 release *heavily*, do you mind posting a diff or describing how this bug was fixed?
|
|
|
|
Xenland (OP)
Legendary
Offline
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
|
|
June 24, 2011, 07:28:50 AM |
|
Can you update the changelog ?
Added serverFeePercentage mysql. And fixed the accounts not being rewarded bug Sorry cant have more detailed changelog, but its just me and i cant rememeber every change "Accounts not being rewarded bug" - I thought it was just me running on testnet that broke things, I solved 14 blocks and all balances were 0, so I have a private pool going now on the real blockchain. Because I have modified your v4.0.1 release *heavily*, do you mind posting a diff or describing how this bug was fixed? Honestly i dont remeber, i get so many fix/suggestion requests i just cant remeber changes in the code it self. the top half of blockUpdater.php was wierd i keptd hacking at it until i worked correctly. I honestly think it was a misspelling somewere and on top of that the if statements didnt work. When i upload 4.2.2 the stats will get purged after a certain amount of time to save memory.
|
|
|
|
|