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.
* [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
* [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-CodesFixes#759 once merged.
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
* 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
* 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
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.
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
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
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