Fixes issues with coins that did not implement a proper array index into
their `getmininginfo` output. Currently supported keys are
* networkhashps
* hashespersec
* netmhashps
If none of there are found or `getmininginfo` fails itself, we now
default to `0` to ensure the webfrontend still works.
Fixes#847 and also fixes#834 which has not reported back the
required information.
This will skip any updates if we detect the default string in our
settings table. Otherwise the script will return an error and disable
itself.
Fixes#839 once merged
* [ADDED] Block over times stats to blocks stats page
* [CHANGED] Split default block stats page template up into subtemplates
* [IMPROVED] Single SQL Query for all Block Stats over Time
* [UPDATED] Templates for new SQL Data
* [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] 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
* [FIX] Estimated shares on various places
* [ADDED] Calculate estimated shares based on network diff in stats
class
* [UPDATED] Themes updated as needed
Fixes#819 once merged
* [IMPROVED] Removed uneeded data array from round page
* [IMRPOVED] Sorted round shares via User ID as key for easier access
* [IMPROVED] Added share count to transaction list in prop
* [ADDED] New Config Option: Algorithm
* scrypt and sha256d supported right now
* might add SHA coin support across MPOS
* Compatible with previous implementation
* [REMOVED] config option: pps_target
* Replaced by config option: algorithm
* Please update your config, defaults to srypt now!
* [ADDED] Unpaid Shares in Dashboard
* [MODIFIED] User estshares from DB query instead template math
* [ADDED] Proper PPS caclulations to statistics getUserEstimates
* [IMPROVED] Updated themes to use new estimates format in global smarty
* [IMPROVED] Updated PPS Dashboard to update estimates via Ajax
* [IMPROVED] Added PPS estimates to getdashboarddata API
This will require theme updates for those sites relying on the
est_<value> format for user payout estimates!
Fixes#743 once merged.
* [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.
* [FEATURE] Allow in-class checking for user permissions
* [FEATURE] Allow in-class creation of the JSON data for coherence
* [FEATURE} Added API version in JSON data for client side checks
* [IMPROVEMENT] Adjusted all API calls to use the new JSON layout
**NOTE**: This is breaking backwads compatibility with the old API!
Please adjust your client application to support this new version.
The data array should not change much more other than added features.
* [FEATURE] Allow for PoS/PoW Detecion in getdifficulty
* [FEATURE] Allow for SHA detecion in getnetworkhashps
* [IMRPOVEMENT] Added caching for bitcoin values (30s only)
* Will reduce the amount of RPC calls for high load pages
* Allow to redirect to referrer page when access is denied
* Logout user and point towards login, add redirect
* Logout user as usual but added save redirects
* Adjusted templates and page codes
* Adding live-updates for gauges
* Adding new API calls
* Updated statistics to allow custom intervals
* Disabled caching for API calls for now
* Added new hashrate graph with auto-update
Addresses #444
* 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
* Migrated configuration options to admin panel
* Removed configuration options from config file
* Added help text for each configuration option into panel
Addresses #622 and needs extensive testing by pools. A lot has changed
so pool owners might have to adjust their own templates to match this
new system.
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.
* Properly sort the array prior to sending it back
* Sort from current to one hour earlier for proper data display
* Adjusted templates to use new sorted arrays
Fixes#606
* Fix hashrate calculations and include archived shares
* Fix worker activity to only check for our_result = Y shares
* Mark as active if worker has a hashrate > 0, removes a query
Addresses #561, crons need to be updated to remove the active flag from
as the worker activity and check the hashrate instead.
* Added new column to transactions table (`007_transactions.sql`)
* Added setArchived method to mark old transactions as archived
* Honor archived flag in getBalance and getLockedBalance
This will further address and fix#536 once merged.
* Removed getAllTransactions method
* Unified getTransactions for users and admins
* Added filter abilities to user transaction view
This should speed up things a fair bit for transaction heavy pools.
Addresses #536
This will avoid double payouts via the website. Payouts will be
requested by users and processed by a cron. If, for whatever reason,
users do add two requests (it is checked if a payout exists) they would
only have one successful payout until their account balance is back up
to a save value to trigger the payout.
This should fix any issues with manual payouts being exploited through
the website. Will require some testing by others to ensure things work
as expected.
This will allow users to send invitations to other people via email.
Each account will still need to confirm the email address if the option
is enabled.
Addresses #330, will need to allow pool operators to enable this feature
even with registrations turned off.
* Adding mail verification during account registration
* Added new dist file option for mail verification
* Added account confirmation page using tokens
* Added mail class into user class for password resets
* Moved password reset template
* Adjusted account registration page
* Adjusted user class for email confirmation
Also fixed a bug with smarty_cache_key not being used properly if smarty
is disabled. Key still needs to be available even if caching is disabled
Addresses #330 and prepare the ticket for invitation only system.
* Added token type class
* Storing Token Type as ID not varchar
* Added new system to user class and fixed issues with it
* Started on mail verification process in user class
* Updated autoloader
* Updated change password template
Addresses #330
* Added anonymous flag to accounts table
* Added checkbox for anonymous flag in edit account page
* Updated user class to support new flag
* Updated statistics class to support anonymous and donations
* Updated all templates showing usernames to show anonymous instead
* Added new SQL `ALTER TABLE` file for upgrading the table
Fixes#419 once merged.
If no workers are found false is returned. Smarty is not able to set a
default on `false` values so we have to set it to 0 if the query failed.
Fixes#418
* 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
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
* 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
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
* display an error if user tries to re-use an email address
* moved SQL files to indicate the order of SQL import
* added unique email index SQL file
This will address #389, still needs email validation.
This should fix#312 and fix#256 where hashrates are reset on quick rounds.
Users are not able to properly view their past 24h hashrates.
Will be merged once confirmed working.
While at it, I also extracted the hash function into it's own getHash
method. This will allow easy changes to hashing for string in the
future.
Fixes#382
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
If the shares archive table is used via config option, those shares are
included when calculating the users hashrate. This will help on very
short rounds where each round end deletes all shares and users will not
be able to track their hashrates. They will be very jumpy and change to
0 all the time.
Still missing this implementation for the hourly hashrate function to
ensure the graphs are always kept up-to-date.
Addresses #331
* Fix API Key generation not using SALT when creating hash
* This should not affect existing API keys since hashes are compared
* Fix PHP Warning for RECAPTCHA if disabled
Fixes#328
This will allow any admin to enable or disable a pool maintenance mode.
Regular users that are still logged in will not be kicked out (yet). New
users that are trying to login and are not admins will be denied access.
Also added registration option to Admin Settings via WebUI. You can now
disable new accounts via web option or configuration setting.
Fixes#259 but also adds an additional feature.
This will prevent PHP OOM errors due to a large amount of transactions.
You can find navigation arrows at the top and fetch 30 transactions at a
time.
Fixes#267
* Added mobile device detection PHP library
* Call PHP library to decide which theme to use
* Added theme as a configuration option into global config
* Selectable Desktop theme (default: mmcFE)
* Selectable Mobile theme (default: mobile)
* Disable mobile theme support entirely
**NOTE**: This requires updates to the `global.inc.php` so please check
the dist file and update your config before filing a new issue!
Addresses #25
This will fetch all user shares in a single run, not user by user as
done previously. Saves one query and can possibly increase SQL execution
time.
Addresses #246
Warn a user with an error that there have been failed login attempts
for their account. Login errors can be cleared by clicking on the URL in
the message itself.
Fixes#240
This will allow users to change the API url, added coinchose as an
example as pointed out by @vias79 .
* tools class detects the API type
* getPrice returns the price based on API URL parsed
Fixes#236
* Adding dynamic news posts from DB
* Support Adding, Editing, Activating, Deactivating through admin panel
* Display all active posts on news page
* Implemented Markdown Library by Michelf
Fixes#61
This will add back the transaction fees. Prior to this commit the pool
had to cover the transaction fees. Now for each transaction the full
balance is transferred (RPC Daemon will remove the TX Fee) but two
transactions are added. One for the Debig and one TXFee.
Fixes#203.
**Requires database upgrade with supplied SQL file**
This will fix#199 and help on loading times for the website in case
caches are empty. Caches are pre-filled by a cron so the website only
does it as a fall back. Check Ticket for details.
* Currently no GUI, use DB access to change the row entry
* Upgraded Database table `accounts` with upgrade SQL
* Updated `admin` field to `is_admin` as boolean
* Modified pages, classes, templates to support is_admin and is_locked
Addresses #147
* Added SQL code to support both balances
* Added sidebar entries
* Modified auto_payout to use new index
* Mofified account page to use new index
Addresses #140 but needs to be tested!
This commit changed a few things in the backend and classes code:
* Any <type>_PPS transaction does NOT need to be confirmed
* Queries updated for added <type>_PPS transactions
* Template updated to properly display these transactions
Cronjob
* Added pps_payput cron to run payouts based on worker submitted shares
* **IMPORTANT**: Can NOT be run with proportional_payout!
Addresses #70
* 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
* 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
* Adding new SQL upgrade for notifications
* Added support for per user notification settings
* Added account_id to notifications table
* Added new notification_settings table
* Added new account page: notifications
Addresses #144
* Added things to mail templates
* Modified user password reset call for new mail template
* Added BASEPATH to smarty code to ensure templates are compiled in the
proper directory
* Updated mail and notification class
* Updated notification cron
* Added notification cron to run-cron list
Go through all active notifications (active means they are not notified
again) and check if their state has changed. If so, mark as inactive and
allow for re-notification of the same type and data.
* Added main mail class
* notification class extends mail class
* Added mail template for IDLE workers
* Added notification table to SQL structure
This works already but once notified the status is not reset as soon as
a worker is active again. Need to think of a system to do that
automatically.
Addresses #116
* Fixes#130. Removed total shares in favor of the hashrate.
* Fixes hashrate display.
* Added pagination template file to include pagination on other pages in
the future.
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
* Properly calculate hashrate
* Remove number formatting, it breaks the graph
* Not properly in order based on time but displays correct values
Addresses #90
* Check for min/max values set for auto payouts
* Display error messages to the user
* Sanitize values just in case we fall through the validation
* Updated template and class
* New configuration option added! Update your local configs!
Fixes#108
* Users are all fetched from the DB
* Each user is assigned special stats
* Hashrate
* Shares
* Balance
* Est. Payout
* Est. Donation
* Display in sortable and paginated table
This is not well optimized. Each user stats are grabbed individually
via the stats and transaction classes. It would probably make sense to
expand the statistics class to list a full user list with all statistics
available instead to cover this in a single SQL query.
* Added isAdmin to user class
* Run isAdmin on EACH page to ensure admin status hasn't changed
* Added main page with no content
* Added user query page with basic form, no content