Commit Graph

202 Commits

Author SHA1 Message Date
Sebastian Grewe
253d6e8a47 Fixing username regexp during registration
Fixes wrong regext of #453
2013-07-14 21:08:03 +02:00
Sebastian Grewe
15753f5eca Merge pull request #455 from typal/issue-452
fucked up...
2013-07-14 01:15:21 -07:00
typ
ed5e320ff6 fucked up... 2013-07-14 02:43:44 +02:00
Sebastian Grewe
d190866315 Merge pull request #454 from TheSerapher/issue-419
Adding anonymous account support
2013-07-13 10:43:21 -07:00
typ
0775eaf8c1 add check for non alpa/-/_ chars 2013-07-13 16:41:51 +02:00
Sebastian Grewe
8ec1d2cab3 Adding anonymous account support
* Added anonymous flag to accounts table
* Added checkbox for anonymous flag in edit account page
* Updated user class to support new flag
* Updated statistics class to support anonymous and donations
* Updated all templates showing usernames to show anonymous instead
* Added new SQL `ALTER TABLE` file for upgrading the table

Fixes #419 once merged.
2013-07-12 10:33:42 +02:00
Sebastian Grewe
ab620f1fe0 Merge pull request #443 from TheSerapher/issue-432
Get rid of Orphan transaction types
2013-07-12 00:46:45 -07:00
Sebastian Grewe
a9ae72cd50 Merge pull request #445 from IainKay/issue-434
Issue 434
2013-07-11 13:06:41 -07:00
Iain Kay
dfbaf621de When destroying a users session on the server we now also remove all session data immediately, rather than relying on garbage collection, and we destroy the cookie on the users browser. 2013-07-11 19:41:50 +00:00
Ilya Stromberg
8f4b4ed970 Fix code style 2013-07-11 19:35:23 +04:00
Ilya Stromberg
15e89ad4d3 (#409) Do not use Memcached if it switched off via config 2013-07-11 19:11:03 +04:00
Sebastian Grewe
5b50422675 Fixing XSS for user registration 2013-07-11 15:49:08 +02:00
Sebastian Grewe
dfde017267 Get rid of Orphan transaction types
This fixes #432 and puts orphans on the same system as unconfirmed
transactions.
2013-07-11 14:26:53 +02: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
fdf97c8832 fixing config access in share class for archive purge 2013-07-10 14:24:15 +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
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
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
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
c9df482683 Merge branch 'next' into issue-392 2013-07-08 08:47:35 +02:00
Sebastian Grewe
6193604598 Fallback call if upstream share not found properly
Implemented a fallback method in case no upstream share can be found for
a block. This will result in same strange behaviour especially if a
later block has properly added a valid share and this will be used for a
previous block. At least now even the last block will be properly found
and marked as discovered by a user, even though no actual upstream share
was involved in this.

This is a dirty workaround for pools having payout issues. After all
blocks are processed and assuming upstream shares continue to work as
expected, this will *skip* broken blocks/shares.

Workaround fix for #392
2013-07-07 22:24:52 +02:00
Sebastian Grewe
6dc795fd77 Improved cron logging via logfiles
* Added 3rd party logger library KLogger
* Adjusted all cronjobs from verbose output to logging
* Added new logs folder for crons to write to
* Added new .gitignore for logs folder data
* Updated blocks class to only fetch blocks with no share_id
* Adjusted findblocks to use no blocks class method
2013-07-07 22:04:43 +02:00
Sebastian Grewe
6f3c5bb95e Merge pull request #398 from TheSerapher/issue-312-24h-hashrates
Issue 312 24h hashrates
2013-07-07 11:54:26 -07:00
Sebastian Grewe
2586aca34e Revert "Fixing issue with delayed inserts for shares"
This reverts commit 752b3e810f.
2013-07-07 19:52:24 +02:00
Sebastian Grewe
748b63d908 Merge pull request #395 from TheSerapher/issue-389
Enforce unique account emails

Fixes #389
2013-07-07 10:40:47 -07:00
Sebastian Grewe
9d50c9a222 User proper archive table for union
Addresses #312
2013-07-07 19:39:58 +02:00
Sebastian Grewe
752b3e810f Fixing issue with delayed inserts for shares
When shares are inserted with a delay for performance optimizations,
this will cause block timestamps to be completely off with share
timestamps. Hence the timestamp limited search is now removed, it would
cause too many issues for Stratum users/pools.

Addresses #392
2013-07-06 23:11:28 +02:00
Sebastian Grewe
307c7ee23f Enforce unique account emails
* display an error if user tries to re-use an email address
* moved SQL files to indicate the order of SQL import
* added unique email index SQL file

This will address #389, still needs email validation.
2013-07-06 17:47:50 +02:00
Sebastian Grewe
89af793a28 Fixing pool hashrate graph
Should fix #312 completely.
2013-07-06 17:32:58 +02:00
Sebastian Grewe
380e802c75 fixing stmt issue 2013-07-06 08:34:41 +02:00
Sebastian Grewe
ab85af19a1 Re-add shares archive table for 24h hashrates
This should fix #312 and fix #256 where hashrates are reset on quick rounds.
Users are not able to properly view their past 24h hashrates.

Will be merged once confirmed working.
2013-07-05 23:23:19 +02:00
Sebastian Grewe
9b81d48e72 Fix PHP Warning on user login
While at it, I also extracted the hash function into it's own getHash
method. This will allow easy changes to hashing for string in the
future.

Fixes #382
2013-07-05 22:56:22 +02:00
Sebastian Grewe
b3479a9c04 Adding further IFNULL checks to statistics class 2013-07-04 13:25:11 +02:00
Sebastian Grewe
e963072740 Merge pull request #368 from TheSerapher/issue-367
Issue 367
2013-07-04 04:03:11 -07:00
Sebastian Grewe
c9915ce628 Removed var_dump debug output 2013-07-04 13:02:36 +02:00
Sebastian Grewe
463b97ea50 Do not return null on empty valid/invalid shares 2013-07-04 13:01:29 +02:00
Sebastian Grewe
dfa8d285ce Properly allow '0' as a workername or password
This fixes #347 as recommended at

http://de3.php.net/manual/en/function.empty.php

We allow anything else than an empty string.
2013-07-04 12:50:17 +02:00
Sebastian Grewe
8056ce9f87 Adding input check for AP and Donation
Fixes #354
2013-07-04 12:42:03 +02:00
Sebastian Grewe
acba30a888 Merge pull request #363 from TheSerapher/issue-331
Adding shares archive table back in for hash calcs
2013-07-04 01:41:50 -07:00
Sebastian Grewe
f4ce22bee8 Skip bogus upstream shares
This will fix an issue with blocks being assigned upstream shares that
are marked as valid but are not the actual solution for a block.

Only shares inserted when or after the block timestamp are now looked
at. This will ensure other shares inserted earlier and marked as
upstream valid are skipped.

This will not fix edge cases where many shares are inserted at the same
time and are all in the same timeframe of the block. Then the first
valid share in that time is used.

This worked fine on a testnet with a number of blocks found and false
shares inserted by hand.

Fixes #352
2013-07-03 15:01:08 +02:00
Sebastian Grewe
4c3c690f1c Merge pull request #351 from TheSerapher/issue-346
Fix PHP warning in notification class
2013-07-03 05:27:04 -07:00
Sebastian Grewe
ce5a8f7240 Fix PHP Warnings on Password Reset page
* Added HTML5 required to username field
* Added empty string check to resetPassword method

Fixes #348
2013-07-03 14:25:14 +02:00
Sebastian Grewe
382fddb528 Remove PHP Warnings from worker page
* Added HTML5 required flags for username/passwords
* Added empty string check in addWorker method

Fixes #347
2013-07-03 14:21:05 +02:00