Chris Duncan [Thu, 9 Jan 2025 14:59:46 +0000 (06:59 -0800)]
If reset is called, cpuBuffer is destroyed, so it does not make sense to then unmap it, so do that in the try block. Also try searching again after resetting.
Chris Duncan [Thu, 9 Jan 2025 13:55:48 +0000 (05:55 -0800)]
Reset busy flag on device loss. Tighten try-catch block when getting results from GPU. Add reset function so it can be called automatically on device loss or manually on other errors.
Chris Duncan [Thu, 9 Jan 2025 08:08:53 +0000 (00:08 -0800)]
Implement busy flag to prevent concurrent initializations and searches. Rewrite init as async function. Explicitly destroy buffers if device is lost. Setup buffers and pipeline in separate function call. Refactor search into a while loop instead of recursive promises. Unmap CPU buffer as soon as possible. Do not retry search on caught error.
Chris Duncan [Wed, 8 Jan 2025 20:35:11 +0000 (12:35 -0800)]
Inline G mix 2 of round 0. Interestingly, we can skip some instructions this way due to addition of zero doing nothing to mix values, but the operation itself will be left visible for documentation and possible troubleshooting. Also note that pow values are verified working at this commit.
Chris Duncan [Wed, 8 Jan 2025 16:21:09 +0000 (08:21 -0800)]
Add sectional comments to clearly delineate G mix rounds as this moves into inlining the G mix function which will be otherwise difficult to read and navigate.
Chris Duncan [Wed, 8 Jan 2025 15:10:08 +0000 (07:10 -0800)]
Overhaul project structure by separating NanoPow code from its worker interface, consolidating test and performance code into one directory, creating additional import path mappings, and renaming files in general.
Chris Duncan [Tue, 7 Jan 2025 22:33:28 +0000 (14:33 -0800)]
Implement device lost promise property to handle loss gracefully by reinitializing. Adjust try-catch error logging message and just retry search instead of reinitializing class.
Chris Duncan [Tue, 7 Jan 2025 22:11:52 +0000 (14:11 -0800)]
Fix class reference used for static members within static context when this should be used. Small change to initialization so class can be reloaded if necessary. Implement try-catch if getting data from GPU throws so we can reinitialize.
Chris Duncan [Tue, 7 Jan 2025 21:38:18 +0000 (13:38 -0800)]
Throttle back workgroup size since apparently this value works with GPUs better and we're still checking over a billion nonces per dispatch; the probability of finding a nonce at this level is over 99.9%
Chris Duncan [Tue, 7 Jan 2025 20:32:19 +0000 (12:32 -0800)]
Merge redundant find function with calculate to form search function like PowGpu. Implement more of a promise-based pipeline through PowGl calculations.
Chris Duncan [Mon, 6 Jan 2025 22:31:16 +0000 (14:31 -0800)]
Throw more specific error during search call. Revert workload again since research is saying mobile devices should be able to handle workgroups of 256.
Chris Duncan [Mon, 6 Jan 2025 20:54:37 +0000 (12:54 -0800)]
Eliminate redundant find function. Rename #calculate to search in order to both better represent its purpose as well as work around Safari limitation on private class methods.