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.
This will allow us to start checking a blockhash against a solution
submitted to the database.
Details on this in the ticket. Just a WIP to save file states.
Addresses #405
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
If we have a block with NO `share_id` we abort the entire process. Less
of an issue with proportional since PPS is still being paid out, but a
block round will never actually end.
This will allow for manual intervention by the user. Otherwise blocks
found after the one having issues might trigger the payout process and
pay out shares of the old block in a more recently found one.
Please use #392 for further help on this, I have yet to replicate the
unknown block finder issue with the proper amount of upstream 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
* 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