]> zoso.dev Git - nano-pow.git/log
nano-pow.git
6 weeks agoReset CPU buffer in compute shader in additioa to resetting GPU buffer on each dispatch.
Chris Duncan [Thu, 13 Mar 2025 15:40:18 +0000 (08:40 -0700)]
Reset CPU buffer in compute shader in additioa to resetting GPU buffer on each dispatch.

6 weeks agoSkip irrelevant compute instructions.
Chris Duncan [Thu, 13 Mar 2025 15:39:52 +0000 (08:39 -0700)]
Skip irrelevant compute instructions.

6 weeks agoFix incorrect final digest XOR in threshold comparison to properly use initialized...
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.

6 weeks agoFlip compute shader UBO property order to be consistent with GL draw shader and to...
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.

6 weeks agoReturn actual hash result from compute shader in addition to nonce value in order...
Chris Duncan [Thu, 13 Mar 2025 15:23:17 +0000 (08:23 -0700)]
Return actual hash result from compute shader in addition to nonce value in order to assist with debugging.

6 weeks agoMerge cli into main
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.

6 weeks agoDocument CLI in README.
Chris Duncan [Thu, 13 Mar 2025 00:56:25 +0000 (17:56 -0700)]
Document CLI in README.

6 weeks agoUpdate dependencies.
Chris Duncan [Thu, 13 Mar 2025 00:42:55 +0000 (17:42 -0700)]
Update dependencies.

6 weeks agoWrite man page and update package file.
Chris Duncan [Thu, 13 Mar 2025 00:38:26 +0000 (17:38 -0700)]
Write man page and update package file.

6 weeks agoMove validate parsing. Add CLI help text. Whitespace.
Chris Duncan [Wed, 12 Mar 2025 23:31:47 +0000 (16:31 -0700)]
Move validate parsing. Add CLI help text. Whitespace.

6 weeks agoAdd bug report email to README.
Chris Duncan [Wed, 12 Mar 2025 23:30:46 +0000 (16:30 -0700)]
Add bug report email to README.

6 weeks agoAdd CLI support for validate calls. Add some debug logging. Remove display of block...
Chris Duncan [Wed, 12 Mar 2025 21:44:54 +0000 (14:44 -0700)]
Add CLI support for validate calls. Add some debug logging. Remove display of block hash from console output.

6 weeks agoAdjust debug logging.
Chris Duncan [Wed, 12 Mar 2025 21:34:53 +0000 (14:34 -0700)]
Adjust debug logging.

6 weeks agoAdd debug logging to GPU.
Chris Duncan [Wed, 12 Mar 2025 21:18:25 +0000 (14:18 -0700)]
Add debug logging to GPU.

6 weeks agoRefactor initialization to be extremely clear about how it is configured and why.
Chris Duncan [Wed, 12 Mar 2025 21:15:55 +0000 (14:15 -0700)]
Refactor initialization to be extremely clear about how it is configured and why.

6 weeks agoFix subtle but important carry bit bug that allowed valid nonces to be generated...
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.

6 weeks agoAdd tests against max value threshold. Fix validator switching between APIs.
Chris Duncan [Wed, 12 Mar 2025 21:06:55 +0000 (14:06 -0700)]
Add tests against max value threshold. Fix validator switching between APIs.

6 weeks agoFix test page validation not using same options as search.
Chris Duncan [Tue, 11 Mar 2025 21:37:43 +0000 (14:37 -0700)]
Fix test page validation not using same options as search.

6 weeks agoLog options passed to functions if debugging.
Chris Duncan [Tue, 11 Mar 2025 21:21:17 +0000 (14:21 -0700)]
Log options passed to functions if debugging.

6 weeks agoFix threshold comparison in compute shader.
Chris Duncan [Tue, 11 Mar 2025 21:15:02 +0000 (14:15 -0700)]
Fix threshold comparison in compute shader.

6 weeks agoFix command arguments being popped one too many times.
Chris Duncan [Tue, 11 Mar 2025 21:05:04 +0000 (14:05 -0700)]
Fix command arguments being popped one too many times.

6 weeks agoRemove performance logging now that we know GPU is working.
Chris Duncan [Tue, 11 Mar 2025 20:58:23 +0000 (13:58 -0700)]
Remove performance logging now that we know GPU is working.

6 weeks agoFix JSdoc parameter and comment.
Chris Duncan [Tue, 11 Mar 2025 20:37:19 +0000 (13:37 -0700)]
Fix JSdoc parameter and comment.

6 weeks agoFix JSDoc and parameter typings.
Chris Duncan [Tue, 11 Mar 2025 20:25:14 +0000 (13:25 -0700)]
Fix JSDoc and parameter typings.

6 weeks agoRemove test logging now that GPU is working.
Chris Duncan [Tue, 11 Mar 2025 18:12:19 +0000 (11:12 -0700)]
Remove test logging now that GPU is working.

6 weeks agoFix GPU failure due to script executing too fast for GPU adapter to be available...
Chris Duncan [Tue, 11 Mar 2025 18:10:34 +0000 (11:10 -0700)]
Fix GPU failure due to script executing too fast for GPU adapter to be available by adding a wait function.

6 weeks agoApply fix for WebGPU not loading in about:blank page but also rejecting HTML content...
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.

6 weeks agoTest empty string instead of undefined against regexp.
Chris Duncan [Tue, 11 Mar 2025 17:58:09 +0000 (10:58 -0700)]
Test empty string instead of undefined against regexp.

6 weeks agoLog number of hashes processed.
Chris Duncan [Tue, 11 Mar 2025 01:31:35 +0000 (18:31 -0700)]
Log number of hashes processed.

6 weeks agoRemove early exit in case many block hashes are passed. Do some basic time logging...
Chris Duncan [Tue, 11 Mar 2025 01:29:17 +0000 (18:29 -0700)]
Remove early exit in case many block hashes are passed. Do some basic time logging to test CLI.

6 weeks agoAdd support for multiple hashes.
Chris Duncan [Mon, 10 Mar 2025 23:29:44 +0000 (16:29 -0700)]
Add support for multiple hashes.

6 weeks agoScrap CLI GPU for now, make a different branch for fixing it.
Chris Duncan [Sun, 9 Mar 2025 20:18:02 +0000 (13:18 -0700)]
Scrap CLI GPU for now, make a different branch for fixing it.

6 weeks agoAdd required environment shebang. Fix file read path. Expand logging of output to...
Chris Duncan [Sun, 9 Mar 2025 20:08:46 +0000 (13:08 -0700)]
Add required environment shebang. Fix file read path. Expand logging of output to try troubleshooting WebGPU.

6 weeks agoUse file contents injected directly into HTML string to load NanoPow into puppeteer...
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.

6 weeks agoAdd copyright notice.
Chris Duncan [Sun, 9 Mar 2025 07:37:37 +0000 (23:37 -0800)]
Add copyright notice.

6 weeks agoMerge v3.0.1 from main.
Chris Duncan [Sun, 9 Mar 2025 07:36:45 +0000 (23:36 -0800)]
Merge v3.0.1 from main.

6 weeks agoPatch version. v3.0.1
Chris Duncan [Sun, 9 Mar 2025 07:21:27 +0000 (23:21 -0800)]
Patch version.

6 weeks agoUpdate dependencies.
Chris Duncan [Sun, 9 Mar 2025 07:20:47 +0000 (23:20 -0800)]
Update dependencies.

6 weeks agoImplement esbuild legal comments.
Chris Duncan [Sun, 9 Mar 2025 07:18:38 +0000 (23:18 -0800)]
Implement esbuild legal comments.

6 weeks agoRemove bundle from repo.
Chris Duncan [Sun, 9 Mar 2025 06:22:37 +0000 (22:22 -0800)]
Remove bundle from repo.

6 weeks agoReconstruct dist/ directory when building.
Chris Duncan [Sun, 9 Mar 2025 06:17:38 +0000 (22:17 -0800)]
Reconstruct dist/ directory when building.

6 weeks agoRefactor Deno cli for puppeteer.
Chris Duncan [Sun, 9 Mar 2025 06:12:14 +0000 (22:12 -0800)]
Refactor Deno cli for puppeteer.

6 weeks agoCreate GL canvas as part of initialization call.
Chris Duncan [Sun, 9 Mar 2025 04:05:05 +0000 (20:05 -0800)]
Create GL canvas as part of initialization call.

7 weeks agoStart setting up CLI structure. Code originally intended for deno is being migrated...
Chris Duncan [Sat, 8 Mar 2025 09:10:15 +0000 (01:10 -0800)]
Start setting up CLI structure. Code originally intended for deno is being migrated to puppeteer.

7 weeks agoOnly set GPU lost promise callback if lost actually exists as a property on the device.
Chris Duncan [Sat, 8 Mar 2025 09:05:50 +0000 (01:05 -0800)]
Only set GPU lost promise callback if lost actually exists as a property on the device.

7 weeks agoRemove deprecated file reference.
Chris Duncan [Tue, 4 Mar 2025 20:29:13 +0000 (12:29 -0800)]
Remove deprecated file reference.

8 weeks agoUpload bundle.
Chris Duncan [Sat, 1 Mar 2025 07:11:27 +0000 (23:11 -0800)]
Upload bundle.

8 weeks agoRelease version. v3.0.0
Chris Duncan [Sat, 1 Mar 2025 06:52:32 +0000 (22:52 -0800)]
Release version.

8 weeks agoUpdate dependencies.
Chris Duncan [Sat, 1 Mar 2025 06:51:43 +0000 (22:51 -0800)]
Update dependencies.

8 weeks agoLicense benchmarks file to comply with REUSE.
Chris Duncan [Sat, 1 Mar 2025 06:48:28 +0000 (22:48 -0800)]
License benchmarks file to comply with REUSE.

8 weeks agoRemove references to polluting global namespace. Update README. Delete unneeded bench...
Chris Duncan [Sat, 1 Mar 2025 06:47:30 +0000 (22:47 -0800)]
Remove references to polluting global namespace. Update README. Delete unneeded benchmarks.

8 weeks agoUpload new bundle.
Chris Duncan [Sat, 1 Mar 2025 06:41:48 +0000 (22:41 -0800)]
Upload new bundle.

8 weeks agoFix duplicate constant declaration from branch merge. Add notes to benchmarks sheet...
Chris Duncan [Sat, 1 Mar 2025 06:29:49 +0000 (22:29 -0800)]
Fix duplicate constant declaration from branch merge. Add notes to benchmarks sheet about browser canvases.

8 weeks agoOverhaul both WebGPU and WebGL to use vec4 for parallel operation hinting on supporte...
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.

8 weeks agoSave desktop benchmarks.
Chris Duncan [Fri, 28 Feb 2025 14:52:52 +0000 (06:52 -0800)]
Save desktop benchmarks.

8 weeks agoSave iPhone benchmarks.
Chris Duncan [Fri, 28 Feb 2025 06:28:21 +0000 (22:28 -0800)]
Save iPhone benchmarks.

8 weeks agoSave benchmarks from 2.0.0 for comparison to upcoming release candidate.
Chris Duncan [Fri, 28 Feb 2025 05:40:52 +0000 (21:40 -0800)]
Save benchmarks from 2.0.0 for comparison to upcoming release candidate.

8 weeks agoAdd more tests for checking validation.
Chris Duncan [Wed, 26 Feb 2025 20:42:38 +0000 (12:42 -0800)]
Add more tests for checking validation.

2 months agoTest bundle with template literal for compute shader instead of quoted string.
Chris Duncan [Sun, 16 Feb 2025 21:28:09 +0000 (13:28 -0800)]
Test bundle with template literal for compute shader instead of quoted string.

2 months agoReupload bundle.
Chris Duncan [Wed, 12 Feb 2025 06:29:30 +0000 (22:29 -0800)]
Reupload bundle.

2 months agoRename random input for clarity of intent.
Chris Duncan [Tue, 11 Feb 2025 21:43:20 +0000 (13:43 -0800)]
Rename random input for clarity of intent.

2 months agoComment out early exit for mobile testing.
Chris Duncan [Sun, 9 Feb 2025 22:47:56 +0000 (14:47 -0800)]
Comment out early exit for mobile testing.

2 months agoFix testing URL.
Chris Duncan [Sat, 8 Feb 2025 20:07:02 +0000 (12:07 -0800)]
Fix testing URL.

2 months agoUpload bundle for mobile testing.
Chris Duncan [Sat, 8 Feb 2025 20:03:33 +0000 (12:03 -0800)]
Upload bundle for mobile testing.

2 months agoUse hex for v indexing to shorten names.
Chris Duncan [Wed, 5 Feb 2025 05:23:43 +0000 (21:23 -0800)]
Use hex for v indexing to shorten names.

2 months agoRemove or simplify extraneous swizzles.
Chris Duncan [Wed, 5 Feb 2025 05:21:37 +0000 (21:21 -0800)]
Remove or simplify extraneous swizzles.

2 months agoRestore early exit for testing.
Chris Duncan [Fri, 7 Feb 2025 23:13:19 +0000 (15:13 -0800)]
Restore early exit for testing.

2 months agoUpload bundle for testing.
Chris Duncan [Fri, 7 Feb 2025 22:53:45 +0000 (14:53 -0800)]
Upload bundle for testing.

2 months agoTest workgroup size of 32 since Nvidia card is able to take advantage of L1 cache...
Chris Duncan [Fri, 7 Feb 2025 22:53:30 +0000 (14:53 -0800)]
Test workgroup size of 32 since Nvidia card is able to take advantage of L1 cache this way.

2 months agoFix copypasta bug.
Chris Duncan [Wed, 5 Feb 2025 14:20:28 +0000 (06:20 -0800)]
Fix copypasta bug.

2 months agoFound the culprit. Atomic exchange is actually 40ms slower than atomic load, so rever...
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.

2 months agoLog loading errors for WebGPU in addition to WebGL.
Chris Duncan [Wed, 5 Feb 2025 13:58:27 +0000 (05:58 -0800)]
Log loading errors for WebGPU in addition to WebGL.

2 months agoShort-circuit 'and' does not appear to be working, at least within this select statement.
Chris Duncan [Wed, 5 Feb 2025 13:56:46 +0000 (05:56 -0800)]
Short-circuit 'and' does not appear to be working, at least within this select statement.
This reverts commit 79e20147888328156f07667ed5430c218455adbb.

2 months agoReplace another if statement with select.
Chris Duncan [Wed, 5 Feb 2025 13:40:14 +0000 (05:40 -0800)]
Replace another if statement with select.

2 months agoUse select instead of if statement.
Chris Duncan [Wed, 5 Feb 2025 13:38:28 +0000 (05:38 -0800)]
Use select instead of if statement.

2 months agoTechnically, a valid nonce can be equal to the threshold, so fix the final comparison.
Chris Duncan [Wed, 5 Feb 2025 05:02:37 +0000 (21:02 -0800)]
Technically, a valid nonce can be equal to the threshold, so fix the final comparison.

2 months agoBenchmarking shows vec4 version actually ended up being slower, probably due to incre...
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.

2 months agoMove temp variables to be near other declarations in main.
Chris Duncan [Tue, 4 Feb 2025 21:38:32 +0000 (13:38 -0800)]
Move temp variables to be near other declarations in main.

2 months agoExpand documentation. Remove unused variables.
Chris Duncan [Tue, 4 Feb 2025 21:36:28 +0000 (13:36 -0800)]
Expand documentation. Remove unused variables.

2 months agoSkip a couple unnecessary computations in the final G round. Implement literal of...
Chris Duncan [Tue, 4 Feb 2025 21:27:19 +0000 (13:27 -0800)]
Skip a couple unnecessary computations in the final G round. Implement literal of iv[0] used in digest.

2 months agoFinish reordering G round computation. Compiles and validates.
Chris Duncan [Tue, 4 Feb 2025 21:18:11 +0000 (13:18 -0800)]
Finish reordering G round computation. Compiles and validates.

2 months agoReorder eigth through tenth G round computation. Compiles and validates.
Chris Duncan [Tue, 4 Feb 2025 21:13:01 +0000 (13:13 -0800)]
Reorder eigth through tenth G round computation. Compiles and validates.

2 months agoReorder fifth through seventh G round computation. Compiles and validates.
Chris Duncan [Tue, 4 Feb 2025 21:05:14 +0000 (13:05 -0800)]
Reorder fifth through seventh G round computation. Compiles and validates.

2 months agoReorder third and fourth G round computation. Compiles and validates.
Chris Duncan [Tue, 4 Feb 2025 19:30:44 +0000 (11:30 -0800)]
Reorder third and fourth G round computation. Compiles and validates.

2 months agoReorder second G round computation. Compiles and validates.
Chris Duncan [Tue, 4 Feb 2025 17:53:49 +0000 (09:53 -0800)]
Reorder second G round computation. Compiles and validates.

2 months agoReorder G round computation to try allowing compiler to improve instruction schedulin...
Chris Duncan [Tue, 4 Feb 2025 13:57:56 +0000 (05:57 -0800)]
Reorder G round computation to try allowing compiler to improve instruction scheduling and reduce assignment statements. Compiles and validates.

2 months agoDeprecate unused zero vec4. Rename zero vec2 for brevity.
Chris Duncan [Tue, 4 Feb 2025 13:44:31 +0000 (05:44 -0800)]
Deprecate unused zero vec4. Rename zero vec2 for brevity.

2 months agoDeprecate x and y temp vars for final two rounds.
Chris Duncan [Tue, 4 Feb 2025 13:38:14 +0000 (05:38 -0800)]
Deprecate x and y temp vars for final two rounds.

2 months agoDeprecate x and y temp vars for ninth and tenth round.
Chris Duncan [Tue, 4 Feb 2025 13:34:27 +0000 (05:34 -0800)]
Deprecate x and y temp vars for ninth and tenth round.

2 months agoDeprecate x and y temp vars for sixth through eighth round.
Chris Duncan [Tue, 4 Feb 2025 03:54:31 +0000 (19:54 -0800)]
Deprecate x and y temp vars for sixth through eighth round.

2 months agoDeprecate x and y temp vars for fifth round.
Chris Duncan [Tue, 4 Feb 2025 03:02:11 +0000 (19:02 -0800)]
Deprecate x and y temp vars for fifth round.

2 months agoDeprecate x and y temp vars for fourth round.
Chris Duncan [Tue, 4 Feb 2025 02:55:20 +0000 (18:55 -0800)]
Deprecate x and y temp vars for fourth round.

2 months agoUpdate comments.
Chris Duncan [Tue, 4 Feb 2025 00:35:59 +0000 (16:35 -0800)]
Update comments.

2 months agoDeprecate x and y temp vars for third round.
Chris Duncan [Tue, 4 Feb 2025 00:33:03 +0000 (16:33 -0800)]
Deprecate x and y temp vars for third round.

2 months agoFill in comment headings with m[sigma] notes.
Chris Duncan [Tue, 4 Feb 2025 00:26:31 +0000 (16:26 -0800)]
Fill in comment headings with m[sigma] notes.

2 months agoDeprecate x and y temp vars for first two rounds.
Chris Duncan [Mon, 3 Feb 2025 23:36:40 +0000 (15:36 -0800)]
Deprecate x and y temp vars for first two rounds.

2 months agoCompress v naming convention using hex convention.
Chris Duncan [Mon, 3 Feb 2025 23:19:56 +0000 (15:19 -0800)]
Compress v naming convention using hex convention.

2 months agoConvert eight sequential rounds of vec2 G mixing into parallelized four rounds of...
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.

2 months agoCopy benchmark.
Chris Duncan [Mon, 3 Feb 2025 05:24:44 +0000 (21:24 -0800)]
Copy benchmark.

2 months agoCopy benchmark.
Chris Duncan [Mon, 3 Feb 2025 05:20:00 +0000 (21:20 -0800)]
Copy benchmark.