]> git.codecow.com Git - nano-pow.git/commitdiff
Merge branch 'main' into release/v5.1
authorChris Duncan <chris@zoso.dev>
Sat, 14 Mar 2026 08:41:47 +0000 (01:41 -0700)
committerChris Duncan <chris@zoso.dev>
Sat, 14 Mar 2026 08:41:47 +0000 (01:41 -0700)
50 files changed:
.gitignore
AUTHORS.md
CHANGELOG.md
README.md
asconfig.json.license
docs/benchmarks.md
docs/blake2.md
docs/nano-pow.1
docs/nano-pow.service
esbuild.mjs
package-lock.json.license
package.json
package.json.license
scripts/blake2b-gen.js
src/bin/cli.ts
src/bin/nano-pow.sh
src/bin/server.ts
src/lib/config/index.ts
src/lib/generate/cpu/index.ts
src/lib/generate/index.ts
src/lib/generate/wasm/asm/index.ts
src/lib/generate/wasm/asm/tsconfig.json.license
src/lib/generate/wasm/index.ts
src/lib/generate/wasm/worker.ts
src/lib/generate/webgl/index.ts
src/lib/generate/webgl/shaders/downsample.frag
src/lib/generate/webgl/shaders/draw.frag
src/lib/generate/webgl/shaders/index.ts
src/lib/generate/webgl/shaders/quad.vert
src/lib/generate/webgl/shaders/webgl-shaders.d.ts
src/lib/generate/webgpu/index.ts
src/lib/generate/webgpu/shaders/compute.wgsl
src/lib/generate/webgpu/shaders/webgpu-shaders.d.ts
src/lib/index.ts
src/lib/validate/index.ts
src/main.ts
src/types.d.ts
src/utils/api-support/index.ts
src/utils/api-support/wasm.ts
src/utils/api-support/webgl.ts
src/utils/api-support/webgpu.ts
src/utils/bigint.ts
src/utils/cache.ts
src/utils/index.ts
src/utils/logger.ts
src/utils/queue.ts
test/blockhashes.txt.license
test/index.html
test/script.sh
tsconfig.json.license

index 905ca2a207f7320ea93106fa8fa92ba6dc695824..b316cbd70c8ef1ef0db6731a8901e1c03f876cc1 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>\r
+# SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>\r
 # SPDX-License-Identifier: GPL-3.0-or-later\r
 \r
 # Logs\r
index 7c5bfaa7c0bfc844effce2785d35c392589b2b65..c78493b5f2e67d10a1dd76291b2c15cb0247ceeb 100644 (file)
@@ -1,7 +1,7 @@
 <!--
-SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 SPDX-License-Identifier: GPL-3.0-or-later
 -->
 
-Chris Duncan <chris@zoso.dev> (zoso.dev)
+Chris Duncan <chris@codecow.com> (codecow.com)
 Ben Green <ben@latenightsketches.com> (numtel.github.io)
index cd3d5086d77926534c1ba27f905af22ac5d0790a..6c0866752c0e4b8b874178283ac8f50608b879d8 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 SPDX-License-Identifier: GPL-3.0-or-later
 -->
 
@@ -13,24 +13,18 @@ Fix CLI input parsing.
 
 Update dependencies.
 
-
-
 ## v5.1.8
 
 ### Notable Changes
 
 Update dependencies.
 
-
-
 ## v5.1.7
 
 ### Notable Changes
 
 Eliminate self-references to allow esbuild to generate anonymous classes.
 
-
-
 ## v5.1.6
 
 ### Notable Changes
@@ -39,8 +33,6 @@ Export utility method to clear work cache.
 
 Update optional `puppeteer` dependency.
 
-
-
 ## v5.1.5
 
 ### Notable Changes
@@ -53,24 +45,18 @@ bundlers.
 
 Update dev dependencies.
 
-
-
 ## v5.1.4
 
 ### Notable Changes
 
 Adjust types for API support and fix optional options parameter types.
 
-
-
 ## v5.1.3
 
 ### Notable Changes
 
 Fix types for optional properties of NanoPowOptions object.
 
-
-
 ## v5.1.2
 
 ### Notable Changes
@@ -79,16 +65,12 @@ Untrack AssemblyScript build artifacts.
 
 Add missing license headers for REUSE compliance.
 
-
-
 ## v5.1.1
 
 ### Notable Changes
 
 Fix test page CDN URL.
 
-
-
 ## v5.1.0
 
 ### Notable Changes
@@ -121,8 +103,6 @@ Expanded list of test blockhashes for longer testing.
 
 Consolidated npm scripts.
 
-
-
 ## v5.0.5
 
 ### Notable Changes
@@ -132,8 +112,6 @@ compilation and `blob:` Web Workers.
 
 Reverted reduced WASM iteration count since it seems to be a Firefox issue.
 
-
-
 ## v5.0.4
 
 ### Notable Changes
@@ -142,16 +120,12 @@ Fix bug in WASM workers causing it to stop listening after first result.
 
 Reduce WASM module hash iterations to check results more often.
 
-
-
 ## v5.0.3
 
 ### Notable Changes
 
 Bump version due to npm publishing issue.
 
-
-
 ## v5.0.2
 
 ### Notable Changes
@@ -160,8 +134,6 @@ Fix loop in CPU `work_generate` that would block the main thread.
 
 Remove additional logger statements from production builds.
 
-
-
 ## v5.0.1
 
 ### Notable Changes
@@ -170,8 +142,6 @@ Update scripts to work better with systemd services.
 
 Update test webpage import URLs.
 
-
-
 ## v5.0.0
 
 ### Notable Changes
@@ -234,16 +204,12 @@ Improved type checking and removed unnecessary type exports.
 
 Reorganized project structure.
 
-
-
 ## v4.1.7
 
 ### Notable Changes
 
 Update dependencies.
 
-
-
 ## v4.1.6
 
 ### Notable Changes
@@ -282,8 +248,6 @@ Fix test page benchmark results from not being sorted properly.
 
 Update server test script.
 
-
-
 ## v4.1.5
 
 ### Notable Changes
@@ -339,8 +303,6 @@ Check more generate calls in test script, and reduce run size of benchmark.
 
 Tweak error messaging.
 
-
-
 ## v4.1.4
 
 ### Notable Changes
@@ -352,8 +314,6 @@ server.
 
 Adjust log timestamp formatting.
 
-
-
 ## v4.1.3
 
 ### Notable Changes
@@ -367,8 +327,6 @@ processes and subsequent failure, and communicate it to the CLI using IPC.
 
 Fix fast exit failing to clean up resources by handling SIGINT and SIGTERM.
 
-
-
 ## v4.1.2
 
 ### Notable Changes
@@ -376,8 +334,6 @@ Fix fast exit failing to clean up resources by handling SIGINT and SIGTERM.
 Load configuration from file (`$HOME/.nano-pow/config`) and use it to set
 execution options if relevant environment variables are not present.
 
-
-
 ## v4.1.1
 
 ### Notable Changes
@@ -386,8 +342,6 @@ Print server error if it does not launch, typically due to puppeteer issue.
 
 Improve reset process on errors and timeouts.
 
-
-
 ## v4.1.0
 
 ### Notable Changes
@@ -428,8 +382,6 @@ Fix action listed in server response error message.
 
 Prevent unnecessary favicon load in puppeteer source and in test webpage.
 
-
-
 ## v4.0.11
 
 ### Notable Changes
@@ -439,8 +391,6 @@ commonly specify a default port of 3000.
 
 Improve formatting of environment variable documentation.
 
-
-
 ## v4.0.10
 
 ### Notable Changes
@@ -452,16 +402,12 @@ Update documentation.
 
 Remove deprecated functions from type definition file.
 
-
-
 ## v4.0.9
 
 ### Notable Changes
 
 Fix missing crypto module used to compute source hash for CSP.
 
-
-
 ## v4.0.8
 
 ### Notable Changes
@@ -477,9 +423,10 @@ property passed in the `POST` request being processed.
 #### Control server config with environment variables
 
 The server now recognizes the following envars:
-* NANO_POW_DEBUG
-* NANO_POW_EFFORT
-* NANO_POW_PORT (replaces `PORT`)
+
+- NANO_POW_DEBUG
+- NANO_POW_EFFORT
+- NANO_POW_PORT (replaces `PORT`)
 
 ### Other Changes
 
@@ -491,8 +438,6 @@ Add tests to server test script.
 
 Update package configuration files.
 
-
-
 ## v4.0.7
 
 ### Notable Changes
@@ -505,8 +450,6 @@ Fix default effort used by server to match the underlying implementation.
 
 Update README and manual for clarity, completeness, and accuracy.
 
-
-
 ## v4.0.6
 
 ### Notable Changes
@@ -516,8 +459,6 @@ conflicts with GPU.
 
 Fix file paths in server test.
 
-
-
 ## v4.0.5
 
 ### Notable Changes
@@ -525,8 +466,6 @@ Fix file paths in server test.
 Use `npm prepare` script to ensure build artifacts are up-to-date before
 installing locally or publishing.
 
-
-
 ## v4.0.4
 
 ### Notable Changes
@@ -534,8 +473,6 @@ installing locally or publishing.
 Fix CLI file paths for older versions of Node that do not have
 `import.meta.dirname` available.
 
-
-
 ## v4.0.3
 
 ### Notable Changes
@@ -547,8 +484,6 @@ Fix warning in shell script when no arguments are present.
 
 Log IP address instead of static 'http://localhost' value from testing.
 
-
-
 ## v4.0.2
 
 ### Notable Changes
@@ -556,8 +491,6 @@ Log IP address instead of static 'http://localhost' value from testing.
 Fix server file paths for older versions of Node that do not have
 `import.meta.dirname` available.
 
-
-
 ## v4.0.1
 
 ### Notable Changes
@@ -565,8 +498,6 @@ Fix server file paths for older versions of Node that do not have
 Update `nano-pow` command to call shell script which subsequently calls
 `server.js` if called with `nano-pow --server` or `cli.js` as usual if not.
 
-
-
 ## v4.0.0
 
 ### Notable Changes
@@ -598,8 +529,6 @@ Extract help text to separate documentation file.
 
 Fix Typescript types.
 
-
-
 ## v3.2.2
 
 ### Notable Changes
@@ -613,16 +542,12 @@ Fix CLI statements that were causing issues with older versions of node.
 
 Fix getter type.
 
-
-
 ## v3.2.1
 
 ### Notable Changes
 
 Implement hash-based Content Security Policy (CSP) in CLI puppeteer page.
 
-
-
 ## v3.2.0
 
 ### Notable Changes
@@ -662,8 +587,6 @@ Improve build process.
 
 Expand documentation.
 
-
-
 ## v3.1.4
 
 ### Notable Changes
@@ -675,8 +598,6 @@ keep files organized. Documentation and test files are now in top-level folders.
 PoW modules are filed by API instead of by file type. File paths have been
 updated accordingly.
 
-
-
 ## v3.1.3
 
 ### Notable Changes
@@ -727,8 +648,6 @@ Rename file of test blockhashes since they are not seeds.
 
 Update README license section.
 
-
-
 ## v3.1.2
 
 ### Notable Changes
@@ -737,16 +656,12 @@ Made minor changes to CLI inline help and manual.
 
 Added file of blockhashes used in `test.html`.
 
-
-
 ## v3.1.1
 
 ### Notable Changes
 
 Fixed minor issues with CLI inline help and manual.
 
-
-
 ## v3.1.0
 
 ### Notable Changes
@@ -816,16 +731,12 @@ Add more logging when the debug option is used.
 
 Updated dependencies.
 
-
-
 ## v3.0.1
 
 ### Notable Changes
 
 Implemented `esbuild` legal comment retention.
 
-
-
 ## v3.0.0
 
 ### Notable Changes
@@ -883,8 +794,6 @@ Fix minor issues with test page.
 
 Add benchmark results table.
 
-
-
 ## v2.0.0
 
 ### Notable Changes
@@ -899,7 +808,7 @@ Instead of a threshold parameter, `search` and `validate` accept a new options
 object parameter.
 
 ```javascript
-NanoPow.search(blockhash, { threshold: 'fffffc00', effort: 16, debug: true })
+NanoPow.search(blockhash, { threshold: "fffffc00", effort: 16, debug: true });
 ```
 
 **This is a breaking change.** Integrations already using the optional threshold
@@ -914,11 +823,12 @@ pairs of `u32` variables to represent high and low bits of a single `u64`.
 
 Now, the same approach is used but implemented with vectors instead of scalars,
 i.e. `vec2<u32>` instead of `u32`. This has several benefits:
-* Integer pairs of high and low bits are held in memory together, improving
-legibility as well as alignment with the original C reference implementation.
-* Arithmetic and bitwise operations are executed on both high and low bits in
-parallel using one statement instead of three.
-* File size is reduced by over 58%.
+
+- Integer pairs of high and low bits are held in memory together, improving
+  legibility as well as alignment with the original C reference implementation.
+- Arithmetic and bitwise operations are executed on both high and low bits in
+  parallel using one statement instead of three.
+- File size is reduced by over 58%.
 
 ### Other Changes
 
@@ -929,8 +839,6 @@ reported as a match to the input nonce.
 
 Fix a bug with the truncated average benchmark calculation.
 
-
-
 ## v1.2.4
 
 ### Notable Changes
@@ -939,8 +847,6 @@ Fix duplicate code on testing page due to bad merge commit.
 
 Increase WebGPU dispatch size.
 
-
-
 ## v1.2.3
 
 ### Notable Changes
@@ -949,24 +855,18 @@ Add bespoke TypeScript definition file.
 
 Remove usage of package `imports` property and use regular relative paths.
 
-
-
 ## v1.2.2
 
 ### Notable Changes
 
 Compile to `dist/` instead of `build/`.
 
-
-
 ## v1.2.1
 
 ### Notable Changes
 
 Rename bundle output file.
 
-
-
 ## v1.2.0
 
 ### Notable Changes
@@ -987,8 +887,6 @@ Clarify the README with better instructions.
 
 Provide additional context about test progress on the testing webpage.
 
-
-
 ## v1.1.0
 
 ### Notable Changes
@@ -1005,8 +903,6 @@ Fix packaging bugs to eliminate npm errors about imports and types.
 Fix repo cloning so that `git clone https://zoso.dev/nano-pow.git` works as
 expected (thanks to u/the_azarian for helping track this down).
 
-
-
 ## v1.0.0
 
 ### Notable Changes
@@ -1017,11 +913,11 @@ Written in Javascript and WGSL, NanoPow leverages the cutting edge WebGPU API to
 achieve massively increased proof-of-work speed for supported devices directly
 in the browser!
 
-* Faster than any other JavaScript implementation of Nano proof-of-work.
-* Avoids graphical stuttering seen in WebGL implementations.
-* Works entirely offline and locally on the device.
-* Zero external dependencies. Run it in any environment that supports WebGPU
-compute shaders.
-* Released under the GPLv3 license to promote user freedom and FOSS principles.
+- Faster than any other JavaScript implementation of Nano proof-of-work.
+- Avoids graphical stuttering seen in WebGL implementations.
+- Works entirely offline and locally on the device.
+- Zero external dependencies. Run it in any environment that supports WebGPU
+  compute shaders.
+- Released under the GPLv3 license to promote user freedom and FOSS principles.
 
 Full announcement: https://www.reddit.com/r/nanocurrency/comments/1hz841f/announcing_nanopow_local_proofofwork_at/
index 367917b61ae2e94965e3e9c26289e367828d97cb..da5129626781d87d8586e07657a270be353f08eb 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,9 +1,10 @@
 <!--
-SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 SPDX-License-Identifier: GPL-3.0-or-later
 -->
 
 # nano-pow
+
 _Proof-of-work generation and validation with WebGPU/WebGL for Nano cryptocurrency._
 
 NanoPow uses WebGPU to generate proof-of-work nonces meeting the requirements
@@ -14,17 +15,21 @@ as fallbacks.
 All calculations take place client-side, so nonces can be generated offline and
 cached for the next transaction block. For more information about the
 proof-of-work equation defined by Nano, see
-https://docs.nano.org/integration-guides/work-generation/#work-calculation-details
+<https://docs.nano.org/integration-guides/work-generation/#work-calculation-details>
 
 ## Installation
+
 ```console
-npm i nano-pow
+npm i nano-pow
 ```
+
 NanoPow can also be installed globally to add the `nano-pow` command to the
 system environment. To learn more, see [#Executables](#executables).
 
 ## Usage
+
 ### Import
+
 The easiest way to use NanoPow is to import it directly. Based on the features
 available in the environment, NanoPow will try to use its most performant API.
 
@@ -32,124 +37,140 @@ The following two import statements are equivalent, and both are provided to
 accomodate project style preferences:
 
 ```javascript
-import { NanoPow } from 'nano-pow'
+import { NanoPow } from "nano-pow";
 // OR
-import NanoPow from 'nano-pow'
+import NanoPow from "nano-pow";
 ```
 
 Use it directly on a webpage with a script module:
 
 ```html
 <script type="module">
-       (async () => {
-               const { NanoPow } = await import('https://cdn.jsdelivr.net/npm/nano-pow@latest')
-               const { work } = await NanoPow.work_generate(some_hash)
-               console.log(work)
-       })()
+  (async () => {
+    const { NanoPow } =
+      await import("https://cdn.jsdelivr.net/npm/nano-pow@latest");
+    const { work } = await NanoPow.work_generate(some_hash);
+    console.log(work);
+  })();
 </script>
 ```
 
 ### Generate
+
 ```javascript
 // `hash` is a 64-char hex string
-const hash = '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef'
-const { work } = await NanoPow.work_generate(hash)
+const hash = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef";
+const { work } = await NanoPow.work_generate(hash);
 // Result is a 16-char hex string
 ```
 
 ### Validate
+
 ```javascript
 // `work` is a 16-char hex string
-const work = 'fedcba0987654321'
+const work = "fedcba0987654321";
 // `hash` is a 64-char hex string
-const hash = '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef'
-const { valid } = await NanoPow.work_validate(work, hash)
+const hash = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef";
+const { valid } = await NanoPow.work_validate(work, hash);
 // Result is a boolean
 ```
 
 ### Options
+
 ```javascript
 const options = {
-       // default best available in order: webgpu => webgl => wasm => cpu
-       api: 'webgpu',
-       // default FFFFFFF800000000 for send/change blocks
-       difficulty: 'FFFFFFC000000000',
-       // default 4, valid range 1-32
-       effort: 2,
-       // default false
-       debug: true
-}
-const { work } = await NanoPow.work_generate(hash, options)
+  // default best available in order: webgpu => webgl => wasm => cpu
+  api: "webgpu",
+  // default FFFFFFF800000000 for send/change blocks
+  difficulty: "FFFFFFC000000000",
+  // default 4, valid range 1-32
+  effort: 2,
+  // default false
+  debug: true,
+};
+const { work } = await NanoPow.work_generate(hash, options);
 ```
 
 #### What is "effort"?
+
 NanoPow's "effort" metric is an abstraction of various GPU and CPU capabilities.
 Different systems will have different optimal settings, but as a general rule of
 thumb:
 
-* WebGPU must strike a balance between the overhead of dispatching work to the
-GPU and the time it takes to compute the dispatch itself. Start with a low value
-like 2 or 4.
-* WegGL works by drawing to an invisible 2-D canvas that is `effort * 256`
-pixels long on each side. Since PoW speed in this case depends on resolution
-_and_ framerate, push for a value as high as the GPU can support. For example, a
-GPU that can draw 4096 x 4096 at 15 FPS should be set around 16 effort.
-* WASM does not use the GPU at all and instead depends on Web Workers for CPU
-multi-threading capabilities. Set effort equal to the number of physical cores
-in the CPU.
+- WebGPU must strike a balance between the overhead of dispatching work to the
+  GPU and the time it takes to compute the dispatch itself. Start with a low value
+  like 2 or 4.
+- WegGL works by drawing to an invisible 2-D canvas that is `effort * 256`
+  pixels long on each side. Since PoW speed in this case depends on resolution
+  _and_ framerate, push for a value as high as the GPU can support. For example, a
+  GPU that can draw 4096 x 4096 at 15 FPS should be set around 16 effort.
+- WASM does not use the GPU at all and instead depends on Web Workers for CPU
+  multi-threading capabilities. Set effort equal to the number of physical cores
+  in the CPU.
 
 ## Executables
+
 NanoPow can be installed globally and executed from the command line. This is
 useful for systems without a graphical interface.
+
 ```console
-npm -g i nano-pow
-nano-pow --help    # view abbreviated CLI help
-man nano-pow       # view full manual
+npm -g i nano-pow
+nano-pow --help    # view abbreviated CLI help
+man nano-pow       # view full manual
 ```
+
 Ensure proper permissions exist on the
 [npm `prefix`](https://docs.npmjs.com/cli/v11/commands/npm-prefix) directory and
 that `PATH` is also configured accordingly. [nvm](https://github.com/nvm-sh/nvm)
 is a great tool that handles this automatically.
 
 ### Command Line
+
 NanoPow provides a shell command&mdash;`nano-pow`&mdash;to accomodate systems
 without a graphical user interface. It launches a headless Chrome browser using
 `puppeteer` to access the required WebGPU or WebGL APIs. Use the `--global` flag
 when installing to add the executable script to the system.
+
 ```console
-npm i -g nano-pow
+npm i -g nano-pow
 ```
+
 Some examples are provided below, and for full documentation, read the manual
 with `man nano-pow`.
 
 ```console
-# Generate a work value using default settings and debugging output enabled.
-nano-pow --debug 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
+# Generate a work value using default settings and debugging output enabled.
+nano-pow --debug 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
 ```
+
 ```console
-# Generate work using customized behavior with options.
-nano-pow --effort 32 --difficulty FFFFFFC000000000 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
+# Generate work using customized behavior with options.
+nano-pow --effort 32 --difficulty FFFFFFC000000000 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
 ```
+
 ```console
-# Validate an existing work nonce against a blockhash.
+# Validate an existing work nonce against a blockhash.
 nano-pow --validate fedcba9876543210 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
 ```
+
 ```console
-# Process blockhashes in batches to reduce the initial startup overhead.
-nano-pow 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef [...]
-# OR
+# Process blockhashes in batches to reduce the initial startup overhead.
+nano-pow 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef [...]
+# OR
 nano-pow $(cat /path/to/hashes/file)
-# OR
-cat /path/to/hashes/file | nano-pow
+# OR
+cat /path/to/hashes/file | nano-pow
 ```
 
 ### Server
+
 NanoPow also provides a basic work server similar to the one included in the
 official Nano node software. The installed command will launch the server in a
 detached process, and it can also be started manually to customize behavior by
 executing the server script directly.
 
 #### Environment Variables
+
 `NANO_POW_DEBUG`: enable additional logging saved to the HOME directory
 
 `NANO_POW_EFFORT`: increase or decrease demand on the GPU
@@ -157,48 +178,52 @@ executing the server script directly.
 `NANO_POW_PORT`: override the default port 5040
 
 ```console
-# Launch the server and detach from the current session
-NANO_POW_PORT=8080 nano-pow --server
-# View process ID for "NanoPow Server"
-cat ~/.nano-pow/server.pid
-# Display list of server logs
-ls ~/.nano-pow/logs/
-# Find process ID manually
-pgrep NanoPow
+# Launch the server and detach from the current session
+NANO_POW_PORT=8080 nano-pow --server
+# View process ID for "NanoPow Server"
+cat ~/.nano-pow/server.pid
+# Display list of server logs
+ls ~/.nano-pow/logs/
+# Find process ID manually
+pgrep NanoPow
 ```
+
 Work is generated or validated by sending an HTTP `POST` request to the
 configured hostname or IP address of the machine. Some basic help is available
 via `GET` request.
+
 ```console
 $ # Generate a work value
 $ curl -d '{
-       "action": "work_generate",
-       "hash": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
+  "action": "work_generate",
+  "hash": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
 }' localhost:5040
 ```
+
 ```console
 $ # Validate a work value
 $ curl -d '{
-       "action": "work_validate",
-       "work": "e45835c3b291c3d1",
-       "hash": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
+  "action": "work_validate",
+  "work": "e45835c3b291c3d1",
+  "hash": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
 }' localhost:5040
 ```
 
 ## Notes
+
 The `work` field in a Nano transaction block contains an 8-byte nonce that
 satisfies the following equation:
 
 > 𝘣𝘭𝘢𝘬𝘦2𝘣(𝘯𝘰𝘯𝘤𝘦 || 𝘣𝘭𝘰𝘤𝘬𝘩𝘢𝘴𝘩) ≥ 𝘵𝘩𝘳𝘦𝘴𝘩𝘰𝘭𝘥
 
-* 𝘣𝘭𝘢𝘬𝘦2𝘣() is the cryptographic hash function BLAKE2b.
-* 𝘯𝘰𝘯𝘤𝘦, an 8-byte value, is generated for the transaction.
-* || is concatenation.
-* 𝘣𝘭𝘰𝘤𝘬𝘩𝘢𝘴𝘩, a 32-byte value, is either the public key of brand new accounts
-without transactions or the hash of the most recent block in the account chain
-for all other accounts.
-* 𝘵𝘩𝘳𝘦𝘴𝘩𝘰𝘭𝘥 is 0xFFFFFFF800000000 for send/change blocks and 0xFFFFFE0000000000
-for receive/open/epoch blocks.
+- 𝘣𝘭𝘢𝘬𝘦2𝘣() is the cryptographic hash function BLAKE2b.
+- 𝘯𝘰𝘯𝘤𝘦, an 8-byte value, is generated for the transaction.
+- || is concatenation.
+- 𝘣𝘭𝘰𝘤𝘬𝘩𝘢𝘴𝘩, a 32-byte value, is either the public key of brand new accounts
+  without transactions or the hash of the most recent block in the account chain
+  for all other accounts.
+- 𝘵𝘩𝘳𝘦𝘴𝘩𝘰𝘭𝘥 is 0xFFFFFFF800000000 for send/change blocks and 0xFFFFFE0000000000
+  for receive/open/epoch blocks.
 
 The BLAKE2b implementation has been optimized to the extreme for this package
 due to the very narrow use case to which it is applied. The compute shader used
@@ -206,37 +231,43 @@ by the WebGPU implementation is consequently immense, but the goal is to squeeze
 every last bit of speed and performance out of it.
 
 ## Tests
-A few basic tests are availabe in the source repository.
-* `test/index.html` in the source repository contains a web interface to change
-execution options and compare results.
-* `test/script.sh` runs some basic benchmarks to check the CLI, and then it
-starts the `nano-pow` server and sends some validate and generate requests.
+
+A few basic tests are available in the source repository.
+
+- `test/index.html` in the source repository contains a web interface to change
+  execution options and compare results.
+- `test/script.sh` runs some basic benchmarks to check the CLI, and then it
+  starts the `nano-pow` server and sends some validate and generate requests.
 
 ## Building
+
 1. Clone source
 1. Enter the directory
 1. Install dev dependencies
 1. Compile, minify, and bundle
 
 ```console
-$ git clone https://zoso.dev/nano-pow.git
-cd nano-pow
-npm i
+git clone https://codecow.com/nano-pow.git
+cd nano-pow
+npm i
 ```
 
 ## Reporting Bugs
-Email: <bug-nano-pow@zoso.dev>
+
+Email: <bug-nano-pow@codecow.com>
 
 ## Acknowledgements
-[numtel/nano-webgl-pow](https://github.com/numtel/nano-webgl-pow) for his WebGL
-implementation
+
+[numtel/nano-webgl-pow](https://github.com/numtel/nano-webgl-pow) for his
+original WebGL implementation.
 
 ## Licenses
+
 GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
 Portions of this code are also provided under the MIT License: <https://spdx.org/licenses/MIT.html>
 
 ## Donations
+
 Tips are always appreciated and can be sent to the following developer address:
-```
+
 nano_1zosoqs47yt47bnfg7sdf46kj7asn58b7uzm9ek95jw7ccatq37898u1zoso
-```
index 7f56691390fea385678865077ee67125e1dc39ae..b3a54a518915531f3db0887dffde000a0a3ce01f 100644 (file)
@@ -1,2 +1,2 @@
-SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 SPDX-License-Identifier: GPL-3.0-or-later
index 2d9b9e493889d9cdb738ecd533db3020f1d58b42..5989905c9d0f4c2f876000dfecfa240cc9282047 100644 (file)
@@ -1,12 +1,14 @@
 <!--
-SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 SPDX-License-Identifier: GPL-3.0-or-later
 -->
 
 # Benchmarks to compute 16,777,216 nonces
+
 _Each test is 128 samples of one pass (dispatch or frame) at zero difficulty with no early exit_
 
 ## Summary
+
 - Chromium WebGPU and Firefox WebGL are the clear winners
 - Chromium WebGL seems to suffer from an Nvidia driver issue
 - Firefox WebGPU exhibits a strange implementation bottleneck
@@ -21,77 +23,82 @@ _Each test is 128 samples of one pass (dispatch or frame) at zero difficulty wit
   - Firefox supports up to a whopping 8192x8192 which actually makes it competitive with WebGPU
 
 ## All Results
-|  Version  |    System    |   Browser   |    API    |   Total   |   Rate   |  Median  |   Mean   |
-|-----------|--------------|-------------|-----------|-----------|----------|----------|----------|
-| RC        | RTX 3070     | Chromium N  | WebGPU    | 747       | 218.23   | 4.5      | 4.58     |
-| RC        | RTX 3070     | Firefox N   | WebGL     | 1096      | 117.06   | 8.55     | 8.54     |
-| RC        | RTX 3070     | Firefox     | WebGL     | 1174      | 116.57   | 9        | 8.58     |
-| 2.0.0     | RTX 3070     | Chromium N  | WebGPU    | 1339      | 112.02   | ?        | 10.47    |
-| RC        | Intel Xe     | Chromium N  | WebGPU    | 5107      | 25.20    | 39.5     | 39.69    |
-| RC        | Intel Xe     | Firefox     | WebGL     | 7166      | 18.84    | 52       | 53.07    |
-| RC        | Intel Xe     | Firefox N   | WebGL     | 8060      | 16.71    | 63       | 59.83    |
-| RC        | iPhone 12    | Safari      | WebGPU    | 8586      | 14.97    | 67       | 66.79    |
-| 2.0.0     | iPhone 12    | Safari      | WebGPU    | 8765      | 14.69    | 68       | 68.48    |
-| RC        | Intel Xe     | Chromium N  | WebGL     | 9764      | 15.42    | 62.8     | 64.85    |
-| 2.0.0     | Intel Xe     | Chromium N  | WebGPU    | 10103     | 12.63    | ?        | 78.93    |
-| RC        | RTX 3070     | Chromium N  | WebGL     | 10681     | 19.81    | 50.60    | 50.47    |
-| RC        | iPhone 12    | Safari      | WebGL     | 12631     | 10.54    | 95       | 94.86    |
-| RC        | iPad Mini 5  | Safari      | WebGPU    | 14232     | 8.78     | 114      | 113.85   |
-| 2.0.0     | iPad Mini 5  | Safari      | WebGPU    | 14903     | 8.59     | 118      | 116.41   |
-| RC        | iPad Mini 5  | Safari      | WebGL     | 18928     | 6.97     | 145      | 143.40   |
-| RC        | Intel Xe     | Firefox N   | WebGPU    | 25679     | 4.99     | 200      | 200.47   |
-| 2.0.0     | Intel Xe     | Firefox N   | WebGPU    | 25805     | 4.94     | ?        | 201.60   |
-| 2.0.0     | RTX 3070     | Firefox N   | WebGPU    | 25629     | 4.97     | ?        | 200.23   |
-| RC        | RTX 3070     | Firefox N   | WebGPU    | 25633     | 5.00     | 200      | 200.15   |
-| 2.0.0     | RTX 3070     | Firefox     | WebGL     | 35224     | 3.72     | ?        | 275.19   |
-| 2.0.0     | RTX 3070     | Chromium N  | WebGL     | 47603     | 3.06     | ?        | 371.90   |
-| 2.0.0     | RTX 3070     | Firefox N   | WebGL     | Unusable  | N/A      | ?        | N/A      |
-| 2.0.0     | Intel Xe     | Firefox     | WebGL     | Unusable  | N/A      | ?        | N/A      |
-| 2.0.0     | Intel Xe     | Firefox N   | WebGL     | Unusable  | N/A      | ?        | N/A      |
-| 2.0.0     | Intel Xe     | Chromium N  | WebGL     | Unusable  | N/A      | ?        | N/A      |
-| 2.0.0     | iPhone 12    | Safari      | WebGL     | Unusable  | N/A      | ?        | N/A      |
-| 2.0.0     | iPad Mini 5  | Safari      | WebGL     | Unusable  | N/A      | ?        | N/A      |
+
+| Version | System      | Browser    | API    | Total    | Rate   | Median | Mean   |
+| ------- | ----------- | ---------- | ------ | -------- | ------ | ------ | ------ |
+| RC      | RTX 3070    | Chromium N | WebGPU | 747      | 218.23 | 4.5    | 4.58   |
+| RC      | RTX 3070    | Firefox N  | WebGL  | 1096     | 117.06 | 8.55   | 8.54   |
+| RC      | RTX 3070    | Firefox    | WebGL  | 1174     | 116.57 | 9      | 8.58   |
+| 2.0.0   | RTX 3070    | Chromium N | WebGPU | 1339     | 112.02 | ?      | 10.47  |
+| RC      | Intel Xe    | Chromium N | WebGPU | 5107     | 25.20  | 39.5   | 39.69  |
+| RC      | Intel Xe    | Firefox    | WebGL  | 7166     | 18.84  | 52     | 53.07  |
+| RC      | Intel Xe    | Firefox N  | WebGL  | 8060     | 16.71  | 63     | 59.83  |
+| RC      | iPhone 12   | Safari     | WebGPU | 8586     | 14.97  | 67     | 66.79  |
+| 2.0.0   | iPhone 12   | Safari     | WebGPU | 8765     | 14.69  | 68     | 68.48  |
+| RC      | Intel Xe    | Chromium N | WebGL  | 9764     | 15.42  | 62.8   | 64.85  |
+| 2.0.0   | Intel Xe    | Chromium N | WebGPU | 10103    | 12.63  | ?      | 78.93  |
+| RC      | RTX 3070    | Chromium N | WebGL  | 10681    | 19.81  | 50.60  | 50.47  |
+| RC      | iPhone 12   | Safari     | WebGL  | 12631    | 10.54  | 95     | 94.86  |
+| RC      | iPad Mini 5 | Safari     | WebGPU | 14232    | 8.78   | 114    | 113.85 |
+| 2.0.0   | iPad Mini 5 | Safari     | WebGPU | 14903    | 8.59   | 118    | 116.41 |
+| RC      | iPad Mini 5 | Safari     | WebGL  | 18928    | 6.97   | 145    | 143.40 |
+| RC      | Intel Xe    | Firefox N  | WebGPU | 25679    | 4.99   | 200    | 200.47 |
+| 2.0.0   | Intel Xe    | Firefox N  | WebGPU | 25805    | 4.94   | ?      | 201.60 |
+| 2.0.0   | RTX 3070    | Firefox N  | WebGPU | 25629    | 4.97   | ?      | 200.23 |
+| RC      | RTX 3070    | Firefox N  | WebGPU | 25633    | 5.00   | 200    | 200.15 |
+| 2.0.0   | RTX 3070    | Firefox    | WebGL  | 35224    | 3.72   | ?      | 275.19 |
+| 2.0.0   | RTX 3070    | Chromium N | WebGL  | 47603    | 3.06   | ?      | 371.90 |
+| 2.0.0   | RTX 3070    | Firefox N  | WebGL  | Unusable | N/A    | ?      | N/A    |
+| 2.0.0   | Intel Xe    | Firefox    | WebGL  | Unusable | N/A    | ?      | N/A    |
+| 2.0.0   | Intel Xe    | Firefox N  | WebGL  | Unusable | N/A    | ?      | N/A    |
+| 2.0.0   | Intel Xe    | Chromium N | WebGL  | Unusable | N/A    | ?      | N/A    |
+| 2.0.0   | iPhone 12   | Safari     | WebGL  | Unusable | N/A    | ?      | N/A    |
+| 2.0.0   | iPad Mini 5 | Safari     | WebGL  | Unusable | N/A    | ?      | N/A    |
 
 ## RTX 3070
-|  Version  |   Browser   |    API    |   Total   |   Rate   |  Median  |   Mean   |
-|-----------|-------------|-----------|-----------|----------|----------|----------|
-| RC        | Chromium N  | WebGPU    | 747       | 218.23   | 4.5      | 4.58     |
-| RC        | Firefox N   | WebGL     | 1096      | 117.06   | 8.55     | 8.54     |
-| RC        | Firefox     | WebGL     | 1174      | 116.57   | 9        | 8.58     |
-| 2.0.0     | Chromium N  | WebGPU    | 1339      | 112.02   | ?        | 10.47    |
-| RC        | Chromium N  | WebGL     | 10681     | 19.81    | 50.60    | 50.47    |
-| 2.0.0     | Firefox N   | WebGPU    | 25629     | 4.97     | ?        | 200.23   |
-| RC        | Firefox N   | WebGPU    | 25633     | 5.00     | 200      | 200.15   |
-| 2.0.0     | Firefox     | WebGL     | 35224     | 3.72     | ?        | 275.19   |
-| 2.0.0     | Chromium N  | WebGL     | 47603     | 3.06     | ?        | 371.90   |
-| 2.0.0     | Firefox N   | WebGL     | Unusable  | N/A      | ?        | N/A      |
+
+| Version | Browser    | API    | Total    | Rate   | Median | Mean   |
+| ------- | ---------- | ------ | -------- | ------ | ------ | ------ |
+| RC      | Chromium N | WebGPU | 747      | 218.23 | 4.5    | 4.58   |
+| RC      | Firefox N  | WebGL  | 1096     | 117.06 | 8.55   | 8.54   |
+| RC      | Firefox    | WebGL  | 1174     | 116.57 | 9      | 8.58   |
+| 2.0.0   | Chromium N | WebGPU | 1339     | 112.02 | ?      | 10.47  |
+| RC      | Chromium N | WebGL  | 10681    | 19.81  | 50.60  | 50.47  |
+| 2.0.0   | Firefox N  | WebGPU | 25629    | 4.97   | ?      | 200.23 |
+| RC      | Firefox N  | WebGPU | 25633    | 5.00   | 200    | 200.15 |
+| 2.0.0   | Firefox    | WebGL  | 35224    | 3.72   | ?      | 275.19 |
+| 2.0.0   | Chromium N | WebGL  | 47603    | 3.06   | ?      | 371.90 |
+| 2.0.0   | Firefox N  | WebGL  | Unusable | N/A    | ?      | N/A    |
 
 ## Intel Xe integrated graphics
-|  Version  |   Browser   |    API    |   Total   |   Rate   |  Median  |   Mean   |
-|-----------|-------------|-----------|-----------|----------|----------|----------|
-| RC        | Chromium N  | WebGPU    | 5107      | 25.20    | 39.5     | 39.69    |
-| RC        | Firefox     | WebGL     | 7166      | 18.84    | 52       | 53.07    |
-| RC        | Firefox N   | WebGL     | 8060      | 16.71    | 63       | 59.83    |
-| RC        | Chromium N  | WebGL     | 9764      | 15.42    | 62.8     | 64.85    |
-| 2.0.0     | Chromium N  | WebGPU    | 10103     | 12.63    | ?        | 78.93    |
-| RC        | Firefox N   | WebGPU    | 25679     | 4.99     | 200      | 200.47   |
-| 2.0.0     | Firefox N   | WebGPU    | 25805     | 4.94     | ?        | 201.60   |
-| 2.0.0     | Firefox     | WebGL     | Unusable  | N/A      | ?        | N/A      |
-| 2.0.0     | Firefox N   | WebGL     | Unusable  | N/A      | ?        | N/A      |
-| 2.0.0     | Chromium N  | WebGL     | Unusable  | N/A      | ?        | N/A      |
+
+| Version | Browser    | API    | Total    | Rate  | Median | Mean   |
+| ------- | ---------- | ------ | -------- | ----- | ------ | ------ |
+| RC      | Chromium N | WebGPU | 5107     | 25.20 | 39.5   | 39.69  |
+| RC      | Firefox    | WebGL  | 7166     | 18.84 | 52     | 53.07  |
+| RC      | Firefox N  | WebGL  | 8060     | 16.71 | 63     | 59.83  |
+| RC      | Chromium N | WebGL  | 9764     | 15.42 | 62.8   | 64.85  |
+| 2.0.0   | Chromium N | WebGPU | 10103    | 12.63 | ?      | 78.93  |
+| RC      | Firefox N  | WebGPU | 25679    | 4.99  | 200    | 200.47 |
+| 2.0.0   | Firefox N  | WebGPU | 25805    | 4.94  | ?      | 201.60 |
+| 2.0.0   | Firefox    | WebGL  | Unusable | N/A   | ?      | N/A    |
+| 2.0.0   | Firefox N  | WebGL  | Unusable | N/A   | ?      | N/A    |
+| 2.0.0   | Chromium N | WebGL  | Unusable | N/A   | ?      | N/A    |
 
 ## iPhone 12 (A14 Bionic, ??? 4-core GPU)
-|  Version  |   Browser   |    API    |   Total   |   Rate   |  Median  |   Mean   |
-|-----------|-------------|-----------|-----------|----------|----------|----------|
-| RC        | Safari      | WebGPU    | 8586      | 14.97    | 67       | 66.79    |
-| 2.0.0     | Safari      | WebGPU    | 8765      | 14.69    | 68       | 68.48    |
-| RC        | Safari      | WebGL     | 12631     | 10.54    | 95       | 94.86    |
-| 2.0.0     | Safari      | WebGL     | Unusable  | N/A      | ?        | N/A      |
+
+| Version | Browser | API    | Total    | Rate  | Median | Mean  |
+| ------- | ------- | ------ | -------- | ----- | ------ | ----- |
+| RC      | Safari  | WebGPU | 8586     | 14.97 | 67     | 66.79 |
+| 2.0.0   | Safari  | WebGPU | 8765     | 14.69 | 68     | 68.48 |
+| RC      | Safari  | WebGL  | 12631    | 10.54 | 95     | 94.86 |
+| 2.0.0   | Safari  | WebGL  | Unusable | N/A   | ?      | N/A   |
 
 ## iPad Mini 5 (A12 Bionic, G11P 4-core GPU)
-|  Version  |   Browser   |    API    |   Total   |   Rate   |  Median  |   Mean   |
-|-----------|-------------|-----------|-----------|----------|----------|----------|
-| RC        | Safari      | WebGPU    | 14232     | 8.78     | 114      | 113.85   |
-| 2.0.0     | Safari      | WebGPU    | 14903     | 8.59     | 118      | 116.41   |
-| RC        | Safari      | WebGL     | 18928     | 6.97     | 145      | 143.40   |
-| 2.0.0     | Safari      | WebGL     | Unusable  | N/A      | ?        | N/A      |
+
+| Version | Browser | API    | Total    | Rate | Median | Mean   |
+| ------- | ------- | ------ | -------- | ---- | ------ | ------ |
+| RC      | Safari  | WebGPU | 14232    | 8.78 | 114    | 113.85 |
+| 2.0.0   | Safari  | WebGPU | 14903    | 8.59 | 118    | 116.41 |
+| RC      | Safari  | WebGL  | 18928    | 6.97 | 145    | 143.40 |
+| 2.0.0   | Safari  | WebGL  | Unusable | N/A  | ?      | N/A    |
index c47238be61b01a826ba5bf2217a77ebb103da6f6..6d94e270ec47a3f9a3bced7533c47045651041ec 100644 (file)
@@ -1,15 +1,15 @@
 <!--
-SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 SPDX-License-Identifier: GPL-3.0-or-later
 -->
 
 Twelve rounds of G mixing as part of BLAKE2b compression step, each divided into eight subprocesses. Each subprocess applies transformations to `m` and `v` variables based on a defined set of index inputs. The algorithm for each subprocess is defined as ollows:
 
-* r is the current round
-* i is the current subprocess within that round
-* a, b, c, d are elements of `v` at specific indexes
-* sigma is a defined set of array indexes for `m`
-* rotr64 is a right-hand bit rotation function
+- r is the current round
+- i is the current subprocess within that round
+- a, b, c, d are elements of `v` at specific indexes
+- sigma is a defined set of array indexes for `m`
+- rotr64 is a right-hand bit rotation function
 
 ```
 a = a + b
index c19da2aebbf9ee384d76ec253e53e8b14fe1522f..c01bc68050bdd8ed4d7bd5016609aceab13c2daa 100644 (file)
@@ -1,4 +1,4 @@
-\# SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+\# SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 \# SPDX-License-Identifier: GPL-3.0-or-later
 
 .TH nano-pow 1 2025-06-27 "nano-pow v5.1.2"
@@ -169,12 +169,12 @@ $ curl -d '{
 Written by Chris Duncan.
 
 .SH BUGS
-Email <bug-nano-pow@zoso.dev>.
+Email <bug-nano-pow@codecow.com>.
 
 .SH COPYRIGHT
 .PP
 .EX
-Copyright \(co 2025 Chris Duncan <chris@zoso.dev>
+Copyright \(co 2025 Chris Duncan <chris@codecow.com>
 Nano PoW documentation: <https://docs.nano.org/integration-guides/work-generation/#work-calculation-details>
 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
 Portions of this code are also provided under the MIT License: <https://spdx.org/licenses/MIT.html>
index c67d7c7a1dffde45499e5fa55f89c0ba1f24d88f..bb438cd189154e6003b3006691f3d77073646e09 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+# SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 # SPDX-License-Identifier: GPL-3.0-or-later
 
 ## Example systemd service unit file to start the nano-pow server at login.
index d9001325468642e4ee7e9fcc8a274c236c7c8ca1..b58fb407ac784878a1dba7989ebf435085127f3d 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 import { build } from 'esbuild'
index 7f56691390fea385678865077ee67125e1dc39ae..b3a54a518915531f3db0887dffde000a0a3ce01f 100644 (file)
@@ -1,2 +1,2 @@
-SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 SPDX-License-Identifier: GPL-3.0-or-later
index b51b659b17dcabe1afa0d5a55a5b650aeea5fe30..bdff40bd4500511332f73f5df3177df77625fdd7 100644 (file)
                "webgl",
                "webgl2"
        ],
-       "homepage": "https://zoso.dev",
-       "bugs": "bug-nano-pow@zoso.dev",
+       "homepage": "https://codecow.com",
+       "bugs": "bug-nano-pow@codecow.com",
        "license": "(GPL-3.0-or-later AND MIT)",
-       "author": "Chris Duncan <chris@zoso.dev>",
+       "author": "Chris Duncan <chris@codecow.com>",
        "funding": {
                "type": "nano",
                "url": "nano:nano_1zosoqs47yt47bnfg7sdf46kj7asn58b7uzm9ek95jw7ccatq37898u1zoso"
@@ -39,7 +39,7 @@
        "man": "./docs/nano-pow.1",
        "repository": {
                "type": "git",
-               "url": "git+https://zoso.dev/nano-pow.git"
+               "url": "git+https://codecow.com/nano-pow.git"
        },
        "scripts": {
                "benchmark": "npm run build && ./dist/bin/nano-pow.sh --benchmark 10 --debug",
index 7f56691390fea385678865077ee67125e1dc39ae..b3a54a518915531f3db0887dffde000a0a3ce01f 100644 (file)
@@ -1,2 +1,2 @@
-SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 SPDX-License-Identifier: GPL-3.0-or-later
index c47b1e7c7b2741401b98caf14b17ccef5e9bae89..c8070ac1ba9192fd8d98dfb50848004e91744d51 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 import { writeFile } from 'node:fs/promises'
@@ -227,7 +227,7 @@ function generate (api) {
        const main = (() => {
                switch (api) {
                        case 'wasm': {
-                               return `//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+                               return `//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 export function main (seed: u64, h0: u64, h1: u64, h2: u64, h3: u64, difficulty: u64): u64 {
@@ -265,7 +265,7 @@ export function main (seed: u64, h0: u64, h1: u64, h2: u64, h3: u64, difficulty:
                        case 'webgl': {
                                return `#version 300 es
 #pragma vscode_glsllint_stage: frag
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-FileContributor: Ben Green <ben@latenightsketches.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later AND MIT
 
@@ -318,7 +318,7 @@ void main() {
 `
                        }
                        case 'webgpu': {
-                               return `//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+                               return `//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 // Input buffers
index ccd35cb4b808734ab29b99f6daad7ad97ba2cc84..a9e72a5fff615d66917249cafbe4064aea9385df 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env node
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 import { Serializable, spawn } from 'node:child_process'
@@ -56,7 +56,7 @@ If validating a nonce, it must be a 16-character hexadecimal value.
 Effort must be a decimal number between 1-32.
 Difficulty must be a hexadecimal string between 0-FFFFFFFFFFFFFFFF.
 
-Report bugs: <bug-nano-pow@zoso.dev>
+Report bugs: <bug-nano-pow@codecow.com>
 Full documentation: <https://www.npmjs.com/package/nano-pow>
 `)
        process.exit(0)
index 612e8288604bdc866b76db50ca37264a271a6d3f..921b457d8dd45833fb5d3d7e589ae5e557b4e43f 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env bash
-# SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+# SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 # SPDX-License-Identifier: GPL-3.0-or-later
 
 SCRIPT_LINK=$(readlink -f "$0");
index 2973f21155a6b24e44559346a384b65986bfc888..f3d1accb6fc12be1c0389b69b50f98f7af7cca54 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env node
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 import * as http from 'node:http'
@@ -225,7 +225,7 @@ HASH is a big-endian 64-character hexadecimal string.
 WORK is little-endian 16-character hexadecimal string.
 DIFFICULTY is an optional 16-character hexadecimal string (default: FFFFFFF800000000)
 
-Report bugs: <bug-nano-pow@zoso.dev>
+Report bugs: <bug-nano-pow@codecow.com>
 Full documentation: <https://www.npmjs.com/package/nano-pow>
 `)
 }
index 113c32c0f65995a61046e060b72272af642ee2c8..1339822695709939e543174bcd8575e92744ab01 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 import { NanoPowOptions } from '#types'
index 65c292b9ae4679731cbe185e9d42095a4d69f258..ae3a1c301a5dfe4f2b5126104eadd9c733e9ae8e 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 import { NanoPowValidate } from '#lib/validate'
index b3ffdb3460b98f8f474a7c0c54d6b5e8fea455d5..9fd5b9fba38ece35576359f2c00ad35739696c5c 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 export { generate as NanoPowCpu } from '#lib/generate/cpu'
index 06738a3a820a9a2c67e8bd6a201ddca16c821a44..437cb04ea200019efc99e131ebef3637ba41563c 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 export function main (seed: u64, h0: u64, h1: u64, h2: u64, h3: u64, difficulty: u64): u64 {
        let m0 = v128.splat<u64>(0);
index 7f56691390fea385678865077ee67125e1dc39ae..b3a54a518915531f3db0887dffde000a0a3ce01f 100644 (file)
@@ -1,2 +1,2 @@
-SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 SPDX-License-Identifier: GPL-3.0-or-later
index 704d659cdd8bf973d1d01ccb50c506a31aeaecd5..532c2a5123f53675c3cdfc0dc8e673f155d14c98 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 import { NanoPowValidate } from '#lib/validate'
index 2de0fce17ac1c7fdadc0cc143203ca26def1f462..945dd20d9125df387d1ea38ca71896cb7a2503c4 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 //@ts-expect-error
index 16594cf87ab8d445479955c8eb8e16496b4745d4..9dffe9251990c55fb49e2f46190a6601847531ee 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-FileContributor: Ben Green <ben@latenightsketches.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later AND MIT
 
index d9ab53326bcf037ff3c0332dbd1704f6a6ededed..50c33ca20a73f28b42f4b48a7f164c47a91a7423 100644 (file)
@@ -1,6 +1,6 @@
 #version 300 es
 #pragma vscode_glsllint_stage: frag
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 #ifdef GL_FRAGMENT_PRECISION_HIGH
index deb4009e26016b679e2d4c7bec692064a8b6ab1b..e3404109410614002cf16b3ecdf695a21ee22ddc 100644 (file)
@@ -1,6 +1,6 @@
 #version 300 es
 #pragma vscode_glsllint_stage: frag
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-FileContributor: Ben Green <ben@latenightsketches.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later AND MIT
 // hash - Array of 32-bit integers comprising a 32-byte Nano block hash
index a780471c84f314d5a8fcea42e6e3b346e56dd561..67de527812c5725b009ca8b6a79f508e17cb1a10 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 import { default as downsampleSource } from './downsample.frag'
index 949140906e21b511b009bb86ecd9dff76697f07f..41b9cf0e0bd28b6632c7cd2f78612d02bcb1a3eb 100644 (file)
@@ -1,6 +1,6 @@
 #version 300 es
 #pragma vscode_glsllint_stage: vert
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-FileContributor: Ben Green <ben@latenightsketches.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later AND MIT
 
index b444737229c3c72579a789720e06304f482f6a8a..ef1ff09b805d1b319204bb450e9fd8baf06ebc8c 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 declare module '*.frag' {
index 45b83ccd081a79c4eb105a0fff715ba108280fda..9c021cc0d7919408aac8c0a868d1b4abc126c0c3 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 import { default as NanoPowGpuComputeShader } from './shaders/compute.wgsl'
index f3cf8033bd2ec517096bbf7c4a1e9463bbfb8e7d..88cc24ca6cd7121601683b961d180d458c3efb38 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 // Input buffers
 struct INPUT {
index 935dff6fb5fc7bc11bd55878c11c9cc26ad54834..8ff5db33607c16742dc9f2fb72683f6e905a386b 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 declare module '*.wgsl' {
index 12d0bedd0a36c9bc8d34c4313159b88139e94262..5945b9b834d98809353fa2007635c089bf414149 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 import { NanoPowValidate } from '#lib/validate'
index 3ed148221831afb4332319a95c5e8ac5a455cc42..f1970978d9c70aac1a13c1f821c1d78be8fa0828 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 import { WorkValidateResponse } from '#types'
index 4e920d9c69570cf96a3d8cfab6af84f149f211d4..63c0df81af138d566652305a12d420eaeb0cc1e1 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 import { work_generate, work_validate } from './lib'
index 1ea3a54eccc7caae01b8af6fbacaff595f72f130..53862e9fb14ed3f568b02679bbe0ba1ee4d6f7ed 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 declare global {
index 534ce72d2b749e3177caa3bff15c36e772b99b64..3f5be3406d2d441a331d42f7df9db2914f4dba47 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 import { wasm } from './wasm'
index 947976e566d52183dc04ed617a1f44c74d1bdf52..5fe04f755038a76a84b52aa27e7bad18f26a5128 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 const wasm = { isSupported: false }
index 4d382184c1b3f23818807a43f06f6027c0e998f4..c31c4efe65ba4643d0407e2e405779804feedaad 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 const webgl = { isSupported: false }
index a45243d03019344819c86d3d5c38be04e24030a5..dfdf96986ddcf27ac0a51b6cb3eb83c64da11d52 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 const webgpu = { isSupported: false }
index 2f3033b77d07edaf7b34ae9b3597c95fb7b21463..3360b88cd77373c5106c52a20549527c5627a765 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 export function bigintAsUintNArray (int: bigint, bits: number, length: number = 0) {
index 8c77c0b1a05fdad91346fece5c99f1ffed3e8c0b..5d446f82a23ec4a52c6a662ad483e9a202151549 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 import { WorkGenerateResponse } from "#types"
index 0015a049e4146be38ec7b875038ae6a6b74c9fbf..be5fa8333b19a65141d8947108987872b4cbb151 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 import { Cache } from '.'
index fc5653f6787c0979a3bd12a99d50dacead684a87..e902a5bece52914cf14139c35feaf6c90b8ac933 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 /**
index 8bd26cba20835e97f3d7402a4c11b9f00e7fac60..6bcc04c20e90e0a817745d99aff9850407e02381 100644 (file)
@@ -1,4 +1,4 @@
-//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 /**
index 7f56691390fea385678865077ee67125e1dc39ae..b3a54a518915531f3db0887dffde000a0a3ce01f 100644 (file)
@@ -1,2 +1,2 @@
-SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 SPDX-License-Identifier: GPL-3.0-or-later
index bdb0fdf2510c2c74ad7515f4ebe5e352bc72efff..3540d2bf34cf2ccc6a60ef2f761fd9e3082d7e41 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 SPDX-License-Identifier: GPL-3.0-or-later
 -->
 
@@ -344,7 +344,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
        <h3>Scoring</h3>
        <label for="runs">Score Runs</label>
        <input id="runs" type="number" value="1" autofocus />
-       <button id="btnStartScore">Score </button>
+       <button id="btnStartScore">Score &#x2757;</button>
        <hr />
        <h3 id="status">WAITING</h3>
        <hr />
index c8251079fea951d64e5145d732f4c243b1712501..f3dfd320508f9186a0d517338792482276f88b4a 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env bash
-# SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+# SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 # SPDX-License-Identifier: GPL-3.0-or-later
 
 set -euo pipefail
index 7f56691390fea385678865077ee67125e1dc39ae..b3a54a518915531f3db0887dffde000a0a3ce01f 100644 (file)
@@ -1,2 +1,2 @@
-SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+SPDX-FileCopyrightText: 2025 Chris Duncan <chris@codecow.com>
 SPDX-License-Identifier: GPL-3.0-or-later