Commit Graph

76 Commits

Author SHA1 Message Date
Sebastian Grewe
67a4713cf0 [REMOVED] Baseline Share calculations
* We now track diff1 shares instead of converting into a baselined value
* PPS has been adjusted to payout shares directly
* Estimated Shares in coin_base adjusted
2014-03-21 11:51:34 +01:00
xisi
b728b680ca blah blah 2014-01-28 07:26:08 -05:00
Sebastian Grewe
702ed49704 [ADDED] Account lock status
* Lock 1: user confirmation/unlock pending, count shares
* Lock 2: Admin disabled, ignore shares

This further addresses #1332 and should allow proper dropping of shares
for banned accounts.
2014-01-26 11:17:33 +01:00
Sebastian Grewe
e4627fc51d [IMPROVED] Ignore locked account shares
* Updated getRoundShares to honor locked accounts
* Updated getSharesForAccounts and getArchiveShares

This will fix #1332 and ignore locked user accounts in share
calculations for payouts.
2014-01-26 11:17:33 +01:00
Neozonz
44e0fa6745 Reverted 2014-01-19 09:35:39 -05:00
Neozonz
38f5daba6b Search blocks by desc and order by for deletes 2014-01-19 06:00:14 -05:00
Sebastian Grewe
731985b30f [IMPROVED] Token expiration timers
* Added new SQL file to update tokentypes table
* Added new function to base class
* Renamed function in base class used in shares class
* Added new error code
* Added new cronjob to delete expired tokens
* Added new cronjob to run-cron scripts and monitoring page
* Added new function to tokentype class
* Added new function to token class

Will address #1181 once merged.
2013-12-31 22:31:47 +01:00
Sebastian Grewe
ac1a561f7b [IMPROVED] Better handling of archived shares
Please check the appropriate ticket #1021 for details of the changes
made. Tested locally with shares created via INSERT.

Fixes #1021 after merge.
2013-12-19 09:34:45 +01:00
Sebastian Grewe
cef176c754 [FIX] Wrong parameter count 2013-12-17 09:48:07 +01:00
Sebastian Grewe
35ab40cbb7 [FIX] Inifite loop on archive_cleanup
Fixes an infinite loop in cleaning up the archive table:

* Shares come in faster than defined in cleanup sleep timeout

Will use an upper limit ID which would match the delete query at the
initial state. Skips archiving if no ID is found (e.g. no rows match the
archive purge conditions).

This will fix #997 once merged.
2013-12-16 16:50:39 +01:00
Sebastian Grewe
847c1283b6 [CHANGE] Adjusted purge defaults 2013-12-10 16:59:53 +01:00
Sebastian Grewe
ab2326a557 [IMPROVED] Use limits for DELETE statements
This will address #886. Long rounds can cause a system to become
very unresponsive due to high SQL/IO load when doing cleanups of
shares and archived tables.

* Run DELETE from shares with LIMIT
* Run DELETE from shares_archive with LIMIT
* Configure DELETE behaviour via config file
* Only archive shares that are really required (PROP, PPS)

Should greatly improve round ends on PROP and PPS after large rounds,
also improves PPLNS though archving will still take some time unless
we limit the share amount artificially. Shares could be needed though,
so we don't.
2013-12-10 16:59:52 +01:00
root
3c580ad8d0 [UPDATE] latest 2013-11-18 12:43:17 +01:00
root
510c076452 [FEATURE] blockfinder statistics 2013-11-18 12:43:17 +01:00
Sebastian Grewe
21acec83d0 [FIX] Proper error on missing shares 2013-11-17 16:36:30 +01:00
Sebastian Grewe
f67e63b6fc [REFACTOR] Refactored classes for error handling
* [ADDED] More error codes
* [MODIFIED] Class updates to use Base Class all the time
* [MODIFIED] Cronjobs have been slightly adjusted
* [ADDED] More base class features
2013-11-05 14:34:31 +01:00
Sebastian Grewe
172444d3d8 [IMPROVED] Added logging failed SQL queries to payouts 2013-11-05 07:28:07 +01:00
Sebastian Grewe
83ee00259f [FIX] Fixed typo in cron logs 2013-11-02 18:57:15 +01:00
Sebastian Grewe
c6dd4086ff Merge pull request #764 from TheSerapher/payout-fixes
Payout fixes
2013-10-28 05:20:19 -07:00
Sebastian Grewe
a2472284a8 [FIX] Proper fetch Archive Shares
Is now in-line with getMininumShareId.
2013-10-27 03:28:41 +01:00
Sebastian Grewe
20a9fc3e28 Revert "[FIX] Fixed potential PPLNS issue"
This reverts commit ee46e65fca.
2013-10-27 02:51:03 +01:00
Sebastian Grewe
ee46e65fca [FIX] Fixed potential PPLNS issue
* getMinimumShareId did not use Share Counts but Weights
2013-10-26 02:35:51 +02:00
Sebastian Grewe
ac5c0fce95 [IMPROVED] Out of Order Share detection
* [ADDED] Allow findblocks to detect and fix out of order shares
* [IMPROVED] Share class extends Base class for common functions
* [IMPROVED] Added more debugging and logging output to cronjob
* [ADDED] Added various new methods to blocks, share, base classes

For an overview of errors thrown in crons, please check:

https://github.com/TheSerapher/php-mpos/wiki/Error-Codes

Fixes #759 once merged.
2013-10-24 12:04:00 +02:00
Sebastian Grewe
1387bbdf44 [MERGE] Merge conflict NEXT 2013-09-18 16:34:52 +02:00
Sebastian Grewe
a0fa71b264 [IMPROVEMENT] Adding incremental round/user shares
This will address #510. It needs thorough testing and is a WiP but
is a start to improve cron runtime and DB loads.
2013-09-18 09:45:52 +02:00
Sebastian Grewe
5e1c3ae372 fixing issue mentioned in #145 with payouts 2013-09-12 13:22:39 +02:00
Sebastian Grewe
6eec747be6 fixing PPLNS payouts one last time 2013-08-22 16:16:04 +02:00
Sebastian Grewe
db754c146e Revert "Revert "adjusting pplns target to baseline shares""
Reverting the revert .... :-/

This reverts commit 2d27132725.
2013-08-22 15:20:46 +02:00
Sebastian Grewe
2d27132725 Revert "adjusting pplns target to baseline shares"
* Shares are already baselined when calculating rounds

This reverts commit c9a8f8dc65.
2013-08-22 14:51:30 +02:00
Sebastian Grewe
c9a8f8dc65 adjusting pplns target to baseline shares 2013-08-22 14:39:46 +02:00
Sebastian Grewe
ae1a5c8ed3 Use baseline shares for share class 2013-08-22 11:30:13 +02:00
obigal
1819a47bf4 Vardiff/pushpool and pps payout support 2013-08-07 09:44:11 +02:00
obigal
360bd22dc6 Updates 2013-08-07 09:42:06 +02:00
obigal
6f3a7c5b50 Update share.class.php 2013-08-07 09:40:25 +02:00
obigal
84e22ae4a9 Update share.class.php 2013-08-07 09:36:26 +02:00
obigal
f4451aee1c Update share.class.php 2013-08-07 09:33:41 +02:00
obigal
691611eb13 Update share.class.php 2013-08-07 09:30:39 +02:00
obigal
ef234fe80b Vardiff/pushpool and pps payout support 2013-08-07 09:29:48 +02:00
obigal
c3a63d58ce Updates 2013-08-07 09:29:48 +02:00
obigal
5607103d81 Update share.class.php 2013-08-07 09:29:48 +02:00
obigal
657839014a Update for pushpool compatibility 2013-08-07 09:29:48 +02:00
obigal
b2a898e292 Update share.class.php 2013-08-07 09:29:48 +02:00
obigal
fd427f77de Update share.class.php 2013-08-07 09:29:47 +02:00
obigal
7378e593bd Update share.class.php 2013-08-07 09:29:47 +02:00
Sebastian Grewe
3cfef93580 WiP to disable fees for specific accounts
* added new account table column: `no_fee`
* honor `no_fee` flag during payout process
* added upgrade SQL file for this feature

Address #260
2013-07-23 10:56:45 +02:00
Sebastian Grewe
fdf97c8832 fixing config access in share class for archive purge 2013-07-10 14:24:15 +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