Commit Graph

61 Commits

Author SHA1 Message Date
rog1121
ae5f6e4386 Cronsjobs Permissions 2014-03-01 18:04:31 -07:00
rog1121
93981f6044 Various Fixes 2014-03-01 17:57:43 -07:00
Sebastian Grewe
aac80502e1 [FIX] Bail findblocks on block insertion errors
Fixes #1857 once merged.
2014-02-28 09:09:29 +01:00
Sebastian Grewe
93b7fb6de2 [IMPROVED] Findblocks log formatting 2014-02-15 15:43:13 +01:00
Andy Mornes
ac3bea9f1a [FIX] Correcting user ID for new block emails
Also adding the currency to the notifications as well.
2014-02-13 13:26:48 -06:00
Andy Mornes
91a57903ce New Block Notification additions
Adding the block number, finder, amount, and difficulty to the new block
notification email
2014-02-12 00:18:00 -06:00
Sebastian Grewe
7cf3fb27fb [UPDATE] Allow global notification settings
Fixes #1232 and allows further expansion in the future.
Addresses #1672 too.
2014-02-06 11:13:22 +01:00
danbi
f7548857ee Update findblock.php
Make the E0005 error non-fatal, in order to prevent cronjobs being disabled in this condition.
Usually it is resolved on the next run.
2014-01-26 17:25:26 +02:00
Sebastian Grewe
643c21d3a7 [UPDATE] Logfile cleanup
* [REMOVED] Do not show row headers at each cron run
* [REMOVED] Extra newlines in notification cron
2014-01-25 21:35:02 +01:00
Sebastian Grewe
19094e73e3 Merge pull request #1271 from drainx/next
JSON-RPC
2014-01-09 22:11:35 -08:00
drainx
5a1c693fa6 Move from XML-RPC to JSON-RPC. 2014-01-06 17:34:54 -06:00
Sebastian Grewe
418728071b [UPDATE] Allow deletion of accounts
Updated backend and theme to be able to deal with deleted accounts

    * Backends will skip any users that have no account_id associated with
      their shares
    * Updated round stats theme to show users as unknown if none can be found

    This will not fully address the issue of account deletion but at least
    wont break the system anymore.
2014-01-06 12:26:57 +01:00
Ilya Vassilevsky
1faf82fac7 Fix a typo 2013-12-25 16:44:52 +04:00
huri
96b700ab36 Fixed assignment bug in findblock cron 2013-12-12 23:55:49 +01:00
Sebastian Grewe
385387f393 [IMPROVE] More verbose logs on addBlock errors 2013-11-25 09:15:31 +01:00
Sebastian Grewe
0c1d1010f8 [FIX] Re-added executable bit on findblock 2013-11-20 09:29:36 +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
5f0e8638dd [UPDATE] E0003 SQL logging 2013-11-11 17:36:01 +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
ae45939fea [IMPROVED] Re-factored monitoring criticals/errors
* [ADDED] new monitoring method : endCronjob
* [IMPROVED] Use newly added error codes
* [ADDED] mail notifications, enabled by default
* [ADDED] cron disable on fatal errors with exit code != 0
* [ADDED] Command line swtich: -f = Force running crons even if disabled
* [ADDED] Disabled status in monitoring site

This will improve error handling in our cronjobs. Fatal errors now
require manual intervention by explicityly running crons with the force
option (`-f`). Until they are forced to run, crons will stay disabled.

Fixes #773 once merged
2013-11-05 07:28:07 +01:00
Sebastian Grewe
5cbb469b56 [FIX] Default to 0 if no prev upstream share available 2013-10-30 14:11:08 +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
Sebastian Grewe
43fa4358c2 [IMPROVED] Allow running crons with full path
Crons can now be called from any directory and will be executed inside
their working directory. Allows for more flexibility, e.g. taking out
the statistics cron and running it directly.
2013-09-30 09:46:34 +02:00
Sebastian Grewe
f0921264f8 Fixing proof-of-stake detection
Fixes #569
2013-08-19 09:36:25 +02:00
Sebastian Grewe
68f2d72cac use regexp detection 2013-08-12 08:48:30 +02:00
Sebastian Grewe
6dfce75df8 Skip proof-of-stake blocks in findblock cron
* Do not add proof-of-stake blocks to database

Fixes #569
2013-08-07 08:47:22 +02:00
Sebastian Grewe
89c539e6fd Fixing notifications for findblocks cron
If disabled, findblocks would still send out notifications.

Thanks @feeleep75 for the heads up.

Fixes #522
2013-07-25 13:41:13 +02:00
Sebastian Grewe
760f1a679e Allow admin to disable notification system
This addresses #497 and allows the admins to disable notifications
through the admin panel. Might be used by those relying on clients using
the API instead.

Once merged it will fix #497.
2013-07-23 13:06:38 +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
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
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
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
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
b021440ab7 Removed debug exit on findblock cron 2013-07-04 09:12:11 +02:00
Sebastian Grewe
3ab9d5252f Merge pull request #341 from TheSerapher/issue-308
Adding dynamic block value support in PPS
2013-07-03 23:53:24 -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
cb7f114cbc Adding dynamic block value support in PPS
This will add the block reward typw to PPS systems. Prior to this, each
PPS value was hard coded to 50. Not only are other coins not based on
this but changing it would require code. Changed it that

* Default for fixed type is config reward
* Default for block type is **previous** blocks amount
** Fallback for first round is the fixed reward value

See in-line documentation of dist configuration. This should help new
pool owners to get setup and clarify things.

Fixes #308
2013-07-01 17:45:23 +02:00
Sebastian Grewe
8dbc8c6a9b Display fixed or block reward in findblock cron
Fixes #76
2013-06-25 08:57:40 +02:00
Sebastian Grewe
2204b6d9f3 Adding support to pay out full block amount
* Configuration setting added: `reward_type`
* Default behaviour: `fixed` payout by `reward` setting
* Optional: `block` to payout full block amount to users

Fixes #76
2013-06-25 08:52:30 +02:00
Sebastian Grewe
b08c02d384 Sent notifications for all enabled users
* Data was not properly addressed in aAccounts array

Fixes #214
2013-06-18 14:34:29 +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
Sebastian Grewe
d3fa335e2c Ensure we are able to fetch the upstream share
* If a block was found but the upstream share is not inserted, bail out
* Next run should find the upstream share if it was added properly

Should address #189 but maybe not a fix yet.
2013-06-18 09:30:13 +02:00
Sebastian Grewe
37beca9385 removing left over debug in findblock 2013-06-10 10:27:39 +02:00
Sebastian Grewe
4e284895a8 Adding support for block finder bonus
* Added new configuration option `block_bonus`, see `global.inc.dist.php`, default 0
* Added new transaction types: `Bonus` and `Orphan_Bonus`
* Changes transaction table structure, added upgrade SQL
* Changed findblock cron to credit bonus to finder
* Modified transactions class to reflect changes

Fixes #148
2013-06-10 10:11:56 +02:00
Sebastian Grewe
79d9c9714d wrong method call 2013-06-09 14:31:00 +02:00
Sebastian Grewe
4ea8b6c695 Adding new notification system for new blocks
* Modified findblocks cron
* Modified notifications cron for new structure
* Improved notification class
* Added new template for new_block type
* Moved idle_worker type template
* Added new_block type to notification settings
2013-06-09 14:26:18 +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
596b0eac93 Moving shares per block into findblock cron
To better support more payout systems I have moved the share calculation
for a block into the findblock cron. This way these statistics are
always available and not depending on the actual payout method.
2013-06-06 21:31:05 +02:00