Commit Graph

31 Commits

Author SHA1 Message Date
Andrea Baccega
7fd258fab4 Fixed documentation typos. 2014-01-07 15:56:47 +01:00
root
510c076452 [FEATURE] blockfinder statistics 2013-11-18 12:43:17 +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
04e2bf5932 [IMPROVED] More testing of error handling, block class 2013-11-05 08:19:16 +01: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
obigal
66296a8f36 pplns_payout block average fix when multiple blocks found during a payout run 2013-10-02 16:42:03 -04:00
Sebastian Grewe
f87a7fc380 Merge branch 'next' into issue-145 2013-09-06 10:55:31 +02:00
Sebastian Grewe
0e27cda093 Fix: Blocks not being confirmed
Fixes an issue introduce with #610.
2013-08-26 11:11:52 +02:00
Sebastian Grewe
6522fb2747 fixing merge conflicts 2013-08-22 11:54:17 +02:00
Sebastian Grewe
1c24820735 Adding network_confirmations to configuration
* Added new configuration option `$config['network_confirmations']` to
  dist config
* Default to 120 if not set

This will allow us to define a different confirmation level for user
transactions but still display blocks at their approriate unconfirmed
value when displaying them in the wallet information for admins. Risky
for pool owners but still a viable option.

Fixes #610
2013-08-22 11:45:40 +02:00
Sebastian Grewe
7e4c5dab4e Adding unconfirmed blocks to wallet
First attempt addressing #610, still missing a detection for the actual
confirmation limit required for each block in case one lowers it in the
config.
2013-08-19 09:31:53 +02:00
obigal
ef234fe80b Vardiff/pushpool and pps payout support 2013-08-07 09:29:48 +02:00
Sebastian Grewe
c94c1be7be Using proper SQL query by @CaptainAK
Proposed fix did not work, using proper Query now.
Thank @CaptainAK for the fix!

Fixes #492
2013-07-21 08:35:57 +02:00
Sebastian Grewe
440ca027a2 Fixing PPLNS target calculation on blockavg
This will fix #492 with PPLNS targets not taking the blocks in proper
order.
2013-07-21 08:12:40 +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
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
4691e077e2 Ensure no old blocks shares are counter for new ones
When finding more than a single block between runs it added shares to a
new block from a previous one. Properly fetch the last highest share ID
from the database prior to scanning for shares assigned to a block.

Fixes #124
2013-06-06 22:27:34 +02:00
Sebastian Grewe
a7bc6fc342 Changed backend logics for block finding and payout
* Findblocks cronjob changes
 * Find & Store upstream share
  * Use last found `share_id` as starting ID or `0`
 * Find & Store upstream finder
  * Use last found `share_id` as starting ID or `0`
* Use stored information when running propotional payout
 * Fetch current checked blocks upstream share from block table
 * Fetch previous upstream share of previous block from block table
 * Calculated payouts in that range of IDs
* Updated `block.class.php` to store share_id in block and fetch highest `share_id`
2013-05-31 14:23:29 +02:00
Sebastian Grewe
b5ab1a02fb Adding more in-line documentation and some cleanup 2013-05-30 09:55:21 +02:00
Sebastian Grewe
d44c236f2b Adding support for orphan blocks
* Adjusted blockupdate cronjob
 * Fetch block information via `gettransaction`
* Adjusted block class
 * Only getAllUnconfirmed where confirmations > -1
* Adjusted transaction class
 * added setOrphan method to mark orphaned transactions
* If block is orphaned
 * Mark all related transactions as Orphan_*type*
 * Set confirmations of block to -1 so it is ignored and marked as orphan
* Change transaction template, added listing for orphan transactions
* Add orphan status to block listings template
2013-05-27 14:44:40 +02:00
Sebastian Grewe
e791d27671 added getTableName method 2013-05-16 14:47:51 +02:00
Sebastian Grewe
ece3d8fd25 adding block statistics, added finder and round shares for blocks, updates transactions for new columns, updated template and pool statistics code 2013-05-13 09:21:41 +02:00
Sebastian Grewe
47ac213779 adding search method for unconfirmed blocks, add updateConfirmations method for blocks 2013-05-12 16:55:18 +02:00
Sebastian Grewe
365a91e407 ensure we only check for unaccounted blocks 2013-05-11 17:14:43 +02:00
Sebastian Grewe
a995ab640d Merge pull request #7 from TheSerapher/sharecounter-cron
Sharecounter cron
2013-05-11 00:15:58 -07:00
Sebastian Grewe
3971ea797c further work on sharecounter cron, almost all features available now 2013-05-11 09:15:19 +02:00
Sebastian Grewe
59c53a5d3d adding more output to findblocks 2013-05-11 08:00:35 +02:00
Sebastian Grewe
6486a72b1b allow searching blocks in reverse order for sharecounter 2013-05-10 22:36:27 +02:00
Sebastian Grewe
ef4b9fd21d adding new cronjob to find generated or immature blocks, changed project to allow scripts to run outside of webroot 2013-05-10 19:46:54 +02:00