Commit Graph

344 Commits

Author SHA1 Message Date
Sebastian Grewe
5bf2cd0202 Merge pull request #442 from TheSerapher/issue-430
Issue 430
2013-07-11 08:56:50 -07:00
Sebastian Grewe
09c0087775 Add tickerupdate to cron monitoring
Fixes #439
2013-07-11 16:50:24 +02:00
Sebastian Grewe
e0d43141b5 Merge pull request #438 from TheSerapher/issue-431
Adding last runtime to monitoring page
2013-07-11 07:45:38 -07:00
Sebastian Grewe
5c0d992134 fixing smarty cache key generation 2013-07-11 15:58:30 +02:00
Sebastian Grewe
5b50422675 Fixing XSS for user registration 2013-07-11 15:49:08 +02:00
Sebastian Grewe
739bd9c7b6 Properly cache on a per-user basis
This will fix an issue with templates of other users being applied to
different users logged in. Basically the first cached page would be
displayed for all users.

Created a new cache key for smarty to allow the user ID to be reference
in the cache key. Hence each user has their own cached file which will
be used.

Improved caching by creating subdirectories for cached files. This way
we won't run into a file limit per directory with a lot of cached files.

This fixes #430 and the mentioned issue in that report.
2013-07-11 13:45:54 +02:00
Sebastian Grewe
875572813b Adding last runtime to monitoring page
Displays the date/time of the last successful run.

Fixes #431
2013-07-11 13:25:22 +02:00
Sebastian Grewe
ed573e6e46 Merge pull request #428 from TheSerapher/issue-418
Issue 418
2013-07-11 03:35:50 -07:00
Sebastian Grewe
1344f39f96 Ensure we set workers to 0
If no workers are found false is returned. Smarty is not able to set a
default on `false` values so we have to set it to 0 if the query failed.

Fixes #418
2013-07-11 11:43:48 +02:00
Sebastian Grewe
83c979b260 Merge pull request #427 from TheSerapher/issue-309
Issue 309
2013-07-11 02:35:24 -07:00
Sebastian Grewe
25b12d204a Better description what type uses what for PPLNS
Fixes #422
2013-07-11 09:19:30 +02:00
Sebastian Grewe
72d91ff6c3 adding proper account balance warning back in 2013-07-11 09:16:31 +02:00
Sebastian Grewe
39cfdc78e0 onliner security check 2013-07-11 09:15:36 +02:00
Sebastian Grewe
17829cfd4a always assign default content 2013-07-11 09:13:50 +02:00
Sebastian Grewe
09efdfc172 fixing merge commit with origin 2013-07-11 09:05:41 +02:00
Sebastian Grewe
65c6318b02 fixing empty variable when using cache 2013-07-11 09:03:47 +02:00
Sebastian Grewe
e0275566ae disable smarty cache by default in dist 2013-07-11 09:02:34 +02:00
Sebastian Grewe
bffeea07c9 Adding cache detection to many pages
This will allow pages to skip loading data from backends like the
database or the wallet RPC server. If a cached page is detected and
valid, all dynamic content generation will be skipped completely.

Other pages that have not been adjusted in this commit will still fetch
backend data all the time. This will ensure clients always see the most
recent data, like worker information or account changes.

This should fix #309 completely but needs some testing.
2013-07-11 09:02:34 +02:00
Sebastian Grewe
0e6edc562c Add detailed smarty cache documentation to config
Instead of just making it availble document the smarty cache feature.

It might work for users, but it's advised to rely on the memcache
instead.

Fixes #309
2013-07-11 08:58:19 +02:00
Sebastian Grewe
426268f71d adjust smarty configurations 2013-07-11 08:58:19 +02:00
Sebastian Grewe
e9311f08a5 Adding cache lifetime option to smarty config
* Renamed configuration array to `smarty` => `cache`
* Added `smarty` => `cache_lifetime` to expire cache files properly

This should be safe to use, be aware that each page request is cached!
That includes any POST/GET calls to the site.

It does help in speeding up the site, up to 100% on some requests. For a
high traffic site it probably makes sense to enable this option with a
low cache lifetime to ensure most recent data.

Addresses #309
2013-07-11 08:58:19 +02:00
Sebastian Grewe
6632920fa1 Add detailed smarty cache documentation to config
Instead of just making it availble document the smarty cache feature.

It might work for users, but it's advised to rely on the memcache
instead.

Fixes #309
2013-07-11 08:58:19 +02:00
Sebastian Grewe
aace0dd014 More descriptive PPLNS options
Fixes #421 and #422
2013-07-11 08:57:11 +02:00
Sebastian Grewe
fdf97c8832 fixing config access in share class for archive purge 2013-07-10 14:24:15 +02:00
Sebastian Grewe
993ddaf3bc fixing 24h shares retention in dist config 2013-07-10 14:17:20 +02:00
Sebastian Grewe
271f7f8381 Better monitoring layout 2013-07-10 11:39:16 +02:00
Sebastian Grewe
ceeed45bb3 Adding statistics cron to monitoring
Useful to trace cron runtimes in order to adjust caching times for long
rounds.

Addresses #145 and adds a new cron to monitoring page
2013-07-10 11:26:06 +02:00
Sebastian Grewe
0c014da726 unknown index PHP warning fix 2013-07-10 10:44:10 +02:00
Sebastian Grewe
94d9c1eb4c Added cronjob monitoring to admin panel
* Added monitoring class to deal with monitoring events
* Added event calls to all important cronjobs
* Added cron_end include file for monitoring cleanups on successful runs
* Added Monitoring to autoloader
* Modified account page to check for running auto_payout in monitoring
* Added monitoring to Navigation bar
* Added monitoring controller page

Fixes #415
2013-07-10 10:40:11 +02:00
Sebastian Grewe
223195c08a Merge pull request #414 from TheSerapher/issue-409
Ensure people know what the memcache setting does
2013-07-09 14:23:10 -07:00
Sebastian Grewe
70644b4299 Merge pull request #413 from TheSerapher/issue-408
Issue 408
2013-07-09 14:22:33 -07:00
Sebastian Grewe
b4b6b118bf Ensure to return 0 if no valid/invalid shares are found 2013-07-09 23:19:36 +02:00
Sebastian Grewe
ecf3db3a5b Removed BETWEEN call for round shares
Now shares are calculated proper with

`id > ? AND id <= ?`

as boundaries. This will ensure the upstream result is also calculated
for the round.

Addresses #143
2013-07-09 22:41:21 +02:00
Sebastian Grewe
8808913ca5 Fixing Sidebar estimations on PPLNS
This will address a new issue in #143, estimates where not displayed
properly when pplns was active.

Fixes #143
2013-07-09 22:02:12 +02:00
Sebastian Grewe
ba240000ab Latest version for PPLNS payouts
* Rebased with next to add logging functions
* Added block method to fetch specific block
* Modified getArchive shares method to be more constistent
* Added new global configuration
* Adjusted smarty globals with new configuration
* More verbose pplns cron with logging
* Re-target the round in case of PPLNS not being matched by archive

Fixes #143
2013-07-09 21:59:44 +02:00
Sebastian Grewe
2f2acdad6d First working version of PPLNS payouts
* Based PPLNS on Prop Payout script
* Using defaults from prop payout, no class adjustments
* Added more methods required for PPLNS
* Added block methods for dynamic payout calculations
* Added PPLNS Sidebar that also displays the PPLNS Target
 * Shares beyond this target will not be included in payouts
 * Shares missing to this target will be added from archives
* Enabled archiving by default for PPLNS
* Added configuration options for PPLNS
 * Documented the usage for PPLNS, defaults are sane
* Added pplns_payout to run-crons

Addresses #143 and if accepted will fix it
2013-07-09 21:59:44 +02:00
Sebastian Grewe
dc51d874a7 Adding block height to blockupdate output
This should make tracing block updates easier.
2013-07-09 21:26:06 +02:00
Sebastian Grewe
da1649f319 Merge pull request #411 from TheSerapher/issue-405
Issue 405
2013-07-09 12:18:21 -07:00
Sebastian Grewe
9e878b06d5 Ensure people know what the memcache setting does
Even though memcache can be disabled, the memcache library is a
requirement as listed in the README.md. I clarified that in the
configuration file itself to ensure people install it even though they
might be disabling it for debugging purpose.

Fixes #409
2013-07-09 16:29:00 +02:00
Sebastian Grewe
5acebc37d3 Allow guest access to pages with config options
This will allow pool owners to make certain pages public accessible
without user registration or login. Please check the config dist file
for details.

Fixes #408
2013-07-09 16:13:43 +02:00
Sebastian Grewe
b33f572774 adding missing PHP closing tag 2013-07-09 16:13:30 +02:00
Sebastian Grewe
52e02a545b fixing issue with upstream shares not being found 2013-07-09 15:43:42 +02:00
Sebastian Grewe
abef09b08c Added blockhash solution checking
Stratum of @moopless supports blockhash as a solution. Check for that
one first.

Addresses #405
2013-07-09 14:50:23 +02:00
Sebastian Grewe
7f759708c8 Adding share type to log output
This will display which detection mechanism caught the share.
Fixed stratum detection

Fixes #405
2013-07-09 11:43:12 +02:00
Sebastian Grewe
e4f8537165 removing debug output 2013-07-09 11:34:49 +02:00
Sebastian Grewe
f6b350370d Adding solution detections for blocks
This will finally fix all block finding issues with a 4 way detection.
The find upstream method will continue to try other ways to find a
proper share until they are all exhausted or a match was found.

* Use stratum solution, create scrypt hash from block header
* Use pushpoold solution, create solution string from block header
* Use first available upstream share in timerange of block time
* Use *any* first available valid share older than time of block

This will fix #405 - no more unknown blocks. Ever.
2013-07-09 11:27:20 +02:00
Sebastian Grewe
7f32bbb7ba Adding more descriptive message for txfee
Fixes #400
2013-07-09 08:58:46 +02:00
Sebastian Grewe
4c531360c1 fixing empty variable when using cache 2013-07-09 08:54:20 +02:00
Sebastian Grewe
0f69032fd3 Adding 3rd party Scrypt library
This will allow us to start checking a blockhash against a solution
submitted to the database.

Details on this in the ticket. Just a WIP to save file states.

Addresses #405
2013-07-08 17:10:58 +02:00
Sebastian Grewe
d25387f0b5 Disable caching check on Smarty globals
This will ensure data is available for those pages relying on global
data. A better step might be to load template specific data always on
the pages that require the data instead of relying on global data to be
available.

Fixes #309
2013-07-08 14:41:52 +02:00