Commit Graph

66 Commits

Author SHA1 Message Date
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
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
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
2586aca34e Revert "Fixing issue with delayed inserts for shares"
This reverts commit 752b3e810f.
2013-07-07 19:52:24 +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
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
34509051e2 Properly detect if we did find an upstream share
Avoid returning true even if no share was found.

Addresses #189
2013-06-18 09:30:13 +02:00