Chris Duncan [Thu, 13 Mar 2025 16:31:26 +0000 (09:31 -0700)]
At just 2.8 KiB, the Terms page is the most lightweight chrome:// URL, so use it for CLI instead of chrome://newtab which is over 25 times larger at 74.0 KiB.
Chris Duncan [Thu, 13 Mar 2025 15:29:40 +0000 (08:29 -0700)]
Fix incorrect final digest XOR in threshold comparison to properly use initialized state instead of using default state without the necessary parameter block.
Chris Duncan [Thu, 13 Mar 2025 15:28:30 +0000 (08:28 -0700)]
Flip compute shader UBO property order to be consistent with GL draw shader and to allow properties to be added later without messing up alignment too much.
Chris Duncan [Thu, 13 Mar 2025 01:34:01 +0000 (18:34 -0700)]
Merge cli into main
Create command line tool using puppeteer that can be executed when
installed globally.
Write man page for cli.
Fix subtle bug in final XOR line of compute shader only observed when
using max threshold value.
Added test cases to check for max threshold bug in the future.
Reorganize compute shader v initialization to improve clarity.
Add more debugging output when flag is enabled.
Delay GL canvas initialization to allow it to fail gracefully in
unsupported environments.
Fix JSdoc comments.
Add bug report email to README.
Update dependencies.
Chris Duncan [Wed, 12 Mar 2025 21:09:52 +0000 (14:09 -0700)]
Fix subtle but important carry bit bug that allowed valid nonces to be generated that were technically incorrect but close enough to the correct value that it wasn't caught until now.
Chris Duncan [Tue, 11 Mar 2025 18:03:56 +0000 (11:03 -0700)]
Apply fix for WebGPU not loading in about:blank page but also rejecting HTML content overwrites in trusted chrome:// pages. Switch from complete overwrite of content to script injection.
Chris Duncan [Sun, 9 Mar 2025 09:20:49 +0000 (01:20 -0800)]
Use file contents injected directly into HTML string to load NanoPow into puppeteer browser page instance. Add flags marked by Chrome dev team. WebGPU still does not seem to work; this is using WebGL, but it is at least working.
Chris Duncan [Sat, 1 Mar 2025 06:19:48 +0000 (22:19 -0800)]
Overhaul both WebGPU and WebGL to use vec4 for parallel operation hinting on supported hardware. Refactor WebGL BLAKE2b to simplify pixel-coordinate-based nonce variation, to unroll main G mix function loop for performance, and to better differentiate between search and validate processes. Simplify vertex shader now that it is only required for drawing the fullscreen quad and not for pixel coordinates. Create new downsampling fragment shader which enables larger canvases and more nonces per frame without introducing lag due to synchronous readback. Maintain canvas between draw calls unless effort has changed. Attempt to handle WebGL context loss, with improved reset function, by reinitializing class. Reduce promise stack increases when waiting for query result. Fix color buffer clearing by using correct API function. Improve nonce seed generation in both WebGL and WebGPU by switching from crypto random to insecure random which is OK in the context of PoW. Reduce garbage collection by reusing static variables. Add debugging throughout that obeys user-provided debug flag which is now stored as a static variable as well. Add Typescript typings for new WebGL types. Fix minor issues with test page. Add benchmark results table.
Chris Duncan [Wed, 5 Feb 2025 14:18:33 +0000 (06:18 -0800)]
Found the culprit. Atomic exchange is actually 40ms slower than atomic load, so revert to conditional load-and-store. Makes sense, it's doing two operations.
Chris Duncan [Wed, 5 Feb 2025 05:01:41 +0000 (21:01 -0800)]
Benchmarking shows vec4 version actually ended up being slower, probably due to increased overhead and register pressure. Revert to vec2 implementation.
Chris Duncan [Mon, 3 Feb 2025 23:15:59 +0000 (15:15 -0800)]
Convert eight sequential rounds of vec2 G mixing into parallelized four rounds of vec4 G. Read threshold direct from uniform to save a redundant assignment. Fix test page validation executing on every single input event. Delete benchmark file since it is completely outdated. Delete bundle to be reuploaded after tweaking new build. Update comment documentation.