]> zoso.dev Git - nano-pow.git/log
nano-pow.git
3 days agoReduce workgroup size to 64 and update comments with reasoning. next/fixups
Chris Duncan [Tue, 22 Apr 2025 21:17:11 +0000 (14:17 -0700)]
Reduce workgroup size to 64 and update comments with reasoning.

3 days agoCache NanoPow as puppeteer handle for further evaluate calls.
Chris Duncan [Tue, 22 Apr 2025 21:16:55 +0000 (14:16 -0700)]
Cache NanoPow as puppeteer handle for further evaluate calls.

3 days agoUse switch-case to evaluate NanoPow work call instead of repeatedly serializing argum...
Chris Duncan [Tue, 22 Apr 2025 20:49:36 +0000 (13:49 -0700)]
Use switch-case to evaluate NanoPow work call instead of repeatedly serializing arguments.

3 days agoReduce compute shader file size by shrinking doc comments.
Chris Duncan [Tue, 22 Apr 2025 20:48:42 +0000 (13:48 -0700)]
Reduce compute shader file size by shrinking doc comments.

3 days agoEliminate a call to Math.random() by using sliding 32-bit randomness.
Chris Duncan [Tue, 22 Apr 2025 18:50:09 +0000 (11:50 -0700)]
Eliminate a call to Math.random() by using sliding 32-bit randomness.

3 days agoReduce waiting period on work calls.
Chris Duncan [Tue, 22 Apr 2025 18:48:52 +0000 (11:48 -0700)]
Reduce waiting period on work calls.

4 days agoRestore required Chromium flag.
Chris Duncan [Tue, 22 Apr 2025 16:19:29 +0000 (09:19 -0700)]
Restore required Chromium flag.

4 days agoCheck for object prototype pollution and update variable names.
Chris Duncan [Tue, 22 Apr 2025 15:19:55 +0000 (08:19 -0700)]
Check for object prototype pollution and update variable names.

4 days agoAll nginx connections are local, so use forwarding header to get client IP and listen...
Chris Duncan [Tue, 22 Apr 2025 15:18:49 +0000 (08:18 -0700)]
All nginx connections are local, so use forwarding header to get client IP and listen explicitly on localhost.

4 days agoTweak error messaging.
Chris Duncan [Tue, 22 Apr 2025 15:16:52 +0000 (08:16 -0700)]
Tweak error messaging.

4 days agoRemove unnecessary Chromium flags.
Chris Duncan [Tue, 22 Apr 2025 15:16:27 +0000 (08:16 -0700)]
Remove unnecessary Chromium flags.

4 days agoAvoid request clearing interval never firing due to misconfigured negative constant.
Chris Duncan [Tue, 22 Apr 2025 15:16:05 +0000 (08:16 -0700)]
Avoid request clearing interval never firing due to misconfigured negative constant.

4 days agoLimit server connections.
Chris Duncan [Tue, 22 Apr 2025 15:15:11 +0000 (08:15 -0700)]
Limit server connections.

4 days agoAllow zero difficulty.
Chris Duncan [Tue, 22 Apr 2025 15:14:45 +0000 (08:14 -0700)]
Allow zero difficulty.

4 days agoThrow error if nonce seed returned by compute shader does not match work to validate.
Chris Duncan [Tue, 22 Apr 2025 15:14:11 +0000 (08:14 -0700)]
Throw error if nonce seed returned by compute shader does not match work to validate.

4 days agoFix threshold check when high bits are equal to difficulty and low bits must be checked.
Chris Duncan [Tue, 22 Apr 2025 14:10:53 +0000 (07:10 -0700)]
Fix threshold check when high bits are equal to difficulty and low bits must be checked.

4 days agoConcatenate log variables to reduce memory footprint.
Chris Duncan [Tue, 22 Apr 2025 13:22:54 +0000 (06:22 -0700)]
Concatenate log variables to reduce memory footprint.

4 days agoReturn if server requests have already been intercepted by puppeteer. Properly call...
Chris Duncan [Tue, 22 Apr 2025 13:22:18 +0000 (06:22 -0700)]
Return if server requests have already been intercepted by puppeteer. Properly call continue if intercepted request is not of interest. Delay listening until NanoPow exists.

4 days agoIntercept dummy https request to get a secure context and set up page content instead...
Chris Duncan [Tue, 22 Apr 2025 03:23:38 +0000 (20:23 -0700)]
Intercept dummy https request to get a secure context and set up page content instead of writing a dummy file to the file system.

4 days agoShorten HTTP 400 response lines. Reject post requests with no data.
Chris Duncan [Tue, 22 Apr 2025 03:22:37 +0000 (20:22 -0700)]
Shorten HTTP 400 response lines. Reject post requests with no data.

4 days agoFix incorrect difficulty regexp.
Chris Duncan [Tue, 22 Apr 2025 03:21:25 +0000 (20:21 -0700)]
Fix incorrect difficulty regexp.

4 days agoReset request tokens on regular interval.
Chris Duncan [Tue, 22 Apr 2025 03:21:09 +0000 (20:21 -0700)]
Reset request tokens on regular interval.

4 days agoDeclare bind group once and reuse.
Chris Duncan [Tue, 22 Apr 2025 03:20:30 +0000 (20:20 -0700)]
Declare bind group once and reuse.

4 days agoReuse DataView for reading mapped result data.
Chris Duncan [Mon, 21 Apr 2025 17:53:48 +0000 (10:53 -0700)]
Reuse DataView for reading mapped result data.

5 days agoReduce benchmark to 100 for testing.
Chris Duncan [Mon, 21 Apr 2025 15:09:33 +0000 (08:09 -0700)]
Reduce benchmark to 100 for testing.

5 days agoExtend test script a bit.
Chris Duncan [Mon, 21 Apr 2025 15:09:12 +0000 (08:09 -0700)]
Extend test script a bit.

5 days agoRestrict server header size and quantity. Allow all localhost requests without token...
Chris Duncan [Mon, 21 Apr 2025 13:18:20 +0000 (06:18 -0700)]
Restrict server header size and quantity. Allow all localhost requests without token limit.

5 days agoReject server request if headers indicate content is larger than max allowed. Destroy...
Chris Duncan [Mon, 21 Apr 2025 13:01:21 +0000 (06:01 -0700)]
Reject server request if headers indicate content is larger than max allowed. Destroy idle connections which try to hog resources.

5 days agoAvoid altering client request payload, and increase MAX_BODY_SIZE to compensate.
Chris Duncan [Sun, 20 Apr 2025 22:52:16 +0000 (15:52 -0700)]
Avoid altering client request payload, and increase MAX_BODY_SIZE to compensate.

5 days agoBlock requests missing IP address. Add rate limit of 10 requests per minute which...
Chris Duncan [Sun, 20 Apr 2025 22:21:12 +0000 (15:21 -0700)]
Block requests missing IP address. Add rate limit of 10 requests per minute which is bypassed for CLI.

5 days agoCompile and cache shader prior to actual compute dispatch.
Chris Duncan [Sun, 20 Apr 2025 22:20:17 +0000 (15:20 -0700)]
Compile and cache shader prior to actual compute dispatch.

5 days agoAdd debug logging for server process spawned by CLI.
Chris Duncan [Sun, 20 Apr 2025 22:19:37 +0000 (15:19 -0700)]
Add debug logging for server process spawned by CLI.

7 days agoDefault to a more generic error message if action is unknown.
Chris Duncan [Fri, 18 Apr 2025 20:48:56 +0000 (13:48 -0700)]
Default to a more generic error message if action is unknown.

7 days agoFix infinite device load check.
Chris Duncan [Fri, 18 Apr 2025 20:37:39 +0000 (13:37 -0700)]
Fix infinite device load check.

7 days agoUsing navigator in Node can cause a crash, so use Intl instead for logging.
Chris Duncan [Fri, 18 Apr 2025 20:33:38 +0000 (13:33 -0700)]
Using navigator in Node can cause a crash, so use Intl instead for logging.

12 days agoPatch version. next/fifo-queue v4.1.4
Chris Duncan [Mon, 14 Apr 2025 16:33:51 +0000 (09:33 -0700)]
Patch version.

12 days agoSave server logs by day instead of by execution. Display server process ID on every...
Chris Duncan [Mon, 14 Apr 2025 16:32:52 +0000 (09:32 -0700)]
Save server logs by day instead of by execution. Display server process ID on every log entry instead of just once when starting server. Adjust log timestamp formatting.

12 days agoPatch version. v4.1.3
Chris Duncan [Mon, 14 Apr 2025 15:34:40 +0000 (08:34 -0700)]
Patch version.

12 days agoUse SIGHUP to reload config except PORT which requires relaunching the server. Refact...
Chris Duncan [Mon, 14 Apr 2025 15:27:45 +0000 (08:27 -0700)]
Use SIGHUP to reload config except PORT which requires relaunching the server. Refactor CLI to spawn server as child process and get port from OS dynamically using IPC. Fix fast exit by handling SIGINT and SIGTERM ourselves.

13 days agoPatch version. v4.1.2
Chris Duncan [Sun, 13 Apr 2025 07:16:12 +0000 (00:16 -0700)]
Patch version.

13 days agoLoad config file from NanoPow home directory and use it to set execution options...
Chris Duncan [Sun, 13 Apr 2025 07:15:12 +0000 (00:15 -0700)]
Load config file from NanoPow home directory and use it to set execution options unless relevant environment variables are present.

13 days agoPatch version. v4.1.1
Chris Duncan [Sun, 13 Apr 2025 05:05:46 +0000 (22:05 -0700)]
Patch version.

13 days agoPrint server error if it does not launch, typically due to puppeteer issue. Reset...
Chris Duncan [Sun, 13 Apr 2025 04:59:01 +0000 (21:59 -0700)]
Print server error if it does not launch, typically due to puppeteer issue. Reset on error reading from GPU instead of trying an infinite dispatch loop. Reduce interval for checking that GPU is not busy to half a second. Reset initialization flag when resetting NanoPowGpu. Fix abort call on timeout in cli. Extend CLI abort timeout to a full minute to accomodate low-power devices. Fix whitespace for inline help.

2 weeks agoUpdate version. v4.1.0
Chris Duncan [Sat, 12 Apr 2025 05:28:53 +0000 (22:28 -0700)]
Update version.

2 weeks agoSimplify GPU compute by reverting to vec2 and implementing G function since performan...
Chris Duncan [Sat, 12 Apr 2025 05:13:42 +0000 (22:13 -0700)]
Simplify GPU compute by reverting to vec2 and implementing G function since performance difference is almost nonexistent and the real benefit comes from native u64 types which do not yet exist in WGSL. Increase workgroup size to best value 96 found during testing on RTX 3070. Create --benchmark CLI argument. Store seed and blockhash in fast shared workgroup memory. Add benchmark convenience npm script. Fix documentation in inline help and manual page. Fix CLI default port collision with server default port. Change timestamp on server log files. Test concurrent curl requests to server. Fix action listed in server response error message. Update puppeteer and test page HTML with blank favicon to prevent unnecessary load.

4 weeks agoPatch version. next/cache-work v4.0.11
Chris Duncan [Fri, 28 Mar 2025 13:41:38 +0000 (06:41 -0700)]
Patch version.

4 weeks agoSwitch default port to 5040 (product of 'xno' as digits). Improve formatting of envir...
Chris Duncan [Fri, 28 Mar 2025 13:37:31 +0000 (06:37 -0700)]
Switch default port to 5040 (product of 'xno' as digits). Improve formatting of environment variable section of documentation.

4 weeks agoPatch version. v4.0.10
Chris Duncan [Fri, 28 Mar 2025 05:54:47 +0000 (22:54 -0700)]
Patch version.

4 weeks agoReorder typings in generally descending order.
Chris Duncan [Fri, 28 Mar 2025 05:53:28 +0000 (22:53 -0700)]
Reorder typings in generally descending order.

4 weeks agoRemove deprecated methods from types.
Chris Duncan [Fri, 28 Mar 2025 05:51:29 +0000 (22:51 -0700)]
Remove deprecated methods from types.

4 weeks agoRemove deprecated property from test page.
Chris Duncan [Fri, 28 Mar 2025 05:44:05 +0000 (22:44 -0700)]
Remove deprecated property from test page.

4 weeks agoIn README, remove npm prefix example, remove second-person perspective, and add envir...
Chris Duncan [Fri, 28 Mar 2025 05:28:15 +0000 (22:28 -0700)]
In README, remove npm prefix example, remove second-person perspective, and add environment variables.

4 weeks agoComplete conversion from threshold to difficulty.
Chris Duncan [Fri, 28 Mar 2025 04:27:35 +0000 (21:27 -0700)]
Complete conversion from threshold to difficulty.

4 weeks agoPatch version. v4.0.9
Chris Duncan [Thu, 27 Mar 2025 21:52:02 +0000 (14:52 -0700)]
Patch version.

4 weeks agoFix missing crypto module required by older versions of Node.
Chris Duncan [Thu, 27 Mar 2025 21:50:41 +0000 (14:50 -0700)]
Fix missing crypto module required by older versions of Node.

4 weeks agoPatch version. v4.0.8
Chris Duncan [Thu, 27 Mar 2025 21:13:10 +0000 (14:13 -0700)]
Patch version.

4 weeks agoOverhaul server to consolidate work methods into one function. Overhaul CLI to spin...
Chris Duncan [Thu, 27 Mar 2025 21:03:44 +0000 (14:03 -0700)]
Overhaul server to consolidate work methods into one function. Overhaul CLI to spin up server and request work instead of using its own puppeteer instance since testing found the server overhead to be negligible in comparison to puppeteer. Remove size getter from GL. Fix types and related imports. Add more environment variables to control server behavior. Add tests to server test script. Update package configuration files.

4 weeks agoPatch version. v4.0.7
Chris Duncan [Wed, 26 Mar 2025 15:07:42 +0000 (08:07 -0700)]
Patch version.

4 weeks agoIgnore all arguments when starting server and use envvars instead. Read NANO_POW_EFFO...
Chris Duncan [Wed, 26 Mar 2025 15:04:11 +0000 (08:04 -0700)]
Ignore all arguments when starting server and use envvars instead. Read NANO_POW_EFFORT from environment when starting server. Update test script to use port 3001 to test custom value. Pass NanoPowOptions object into puppeteer evaluate calls. Update README to use destructuring assignment for output clarity and to use new method names. Add more command line guidance to README. Fix default effort used by server to match the actual implementation and fix README accordingly. Add --server documentation to manual. Fix threshold/difficulty ranges throughout documentation and remove mention of u32 threshold workaround from README. Whitespace.

4 weeks agoUpdate changelog with v3 patch notes.
Chris Duncan [Sun, 23 Mar 2025 07:39:44 +0000 (00:39 -0700)]
Update changelog with v3 patch notes.

4 weeks agoPatch version. v4.0.6
Chris Duncan [Sun, 23 Mar 2025 07:06:26 +0000 (00:06 -0700)]
Patch version.

4 weeks agoRevert setTimeout workaround now that initialization has been improved.
Chris Duncan [Sun, 23 Mar 2025 07:02:16 +0000 (00:02 -0700)]
Revert setTimeout workaround now that initialization has been improved.

4 weeks agoFix test script reference to server process ID.
Chris Duncan [Sun, 23 Mar 2025 06:48:50 +0000 (23:48 -0700)]
Fix test script reference to server process ID.

4 weeks agoCheck for API support manually before re-exporting them in barrel. Only initialize...
Chris Duncan [Sun, 23 Mar 2025 06:42:18 +0000 (23:42 -0700)]
Check for API support manually before re-exporting them in barrel. Only initialize each API once methods are called.

4 weeks agoGive cli and server a moment before querying for GPU.
Chris Duncan [Sat, 22 Mar 2025 21:36:06 +0000 (14:36 -0700)]
Give cli and server a moment before querying for GPU.

5 weeks agoPatch version. v4.0.5
Chris Duncan [Sat, 22 Mar 2025 06:57:04 +0000 (23:57 -0700)]
Patch version.

5 weeks agoPatch version. v4.0.4
Chris Duncan [Sat, 22 Mar 2025 06:45:29 +0000 (23:45 -0700)]
Patch version.

5 weeks agoFix cli file paths for older versions of Node.
Chris Duncan [Sat, 22 Mar 2025 06:44:07 +0000 (23:44 -0700)]
Fix cli file paths for older versions of Node.

5 weeks agoPatch version. v4.0.3
Chris Duncan [Sat, 22 Mar 2025 06:32:35 +0000 (23:32 -0700)]
Patch version.

5 weeks agoLog IP address when server starts instead of constant localhost value.
Chris Duncan [Sat, 22 Mar 2025 06:20:22 +0000 (23:20 -0700)]
Log IP address when server starts instead of constant localhost value.

5 weeks agoQuote bash variables.
Chris Duncan [Sat, 22 Mar 2025 01:21:27 +0000 (18:21 -0700)]
Quote bash variables.

5 weeks agoAdd node crypto module for older versions.
Chris Duncan [Sat, 22 Mar 2025 00:47:34 +0000 (17:47 -0700)]
Add node crypto module for older versions.

5 weeks agoPatch version. v4.0.2
Chris Duncan [Fri, 21 Mar 2025 21:21:56 +0000 (14:21 -0700)]
Patch version.

5 weeks agoFix server file paths for older versions of Node.
Chris Duncan [Fri, 21 Mar 2025 21:19:39 +0000 (14:19 -0700)]
Fix server file paths for older versions of Node.

5 weeks agoUpdate package lockfile.
Chris Duncan [Fri, 21 Mar 2025 20:55:44 +0000 (13:55 -0700)]
Update package lockfile.

5 weeks agoPatch version. v4.0.1
Chris Duncan [Fri, 21 Mar 2025 20:11:52 +0000 (13:11 -0700)]
Patch version.

5 weeks agoUpdate bin to call shell script which starts server if specified or CLI as usual...
Chris Duncan [Fri, 21 Mar 2025 20:10:50 +0000 (13:10 -0700)]
Update bin to call shell script which starts server if specified or CLI as usual if not.

5 weeks agoAllow server to be executed when installed globally.
Chris Duncan [Fri, 21 Mar 2025 18:35:18 +0000 (11:35 -0700)]
Allow server to be executed when installed globally.

5 weeks agoRelease version. v4.0.0
Chris Duncan [Fri, 21 Mar 2025 17:15:12 +0000 (10:15 -0700)]
Release version.

5 weeks agoAdd node to environment in case server is executed outside of npm script.
Chris Duncan [Fri, 21 Mar 2025 16:47:10 +0000 (09:47 -0700)]
Add node to environment in case server is executed outside of npm script.

5 weeks agoImplement server.
Chris Duncan [Fri, 21 Mar 2025 16:40:23 +0000 (09:40 -0700)]
Implement server.
Add executable start a Node server, accept POST requests in same JSON format as Nano node specs, and process similarly to CLI using puppeteer. Remove migration compatibility layer introduced in v3.2.0. Extract help text to separate documentation file. Write basic test script to check server. Refactor threshold to expect 64-bit values only. Fix Typescript types.

5 weeks agoPatch version. v3.2.1
Chris Duncan [Fri, 21 Mar 2025 14:20:11 +0000 (07:20 -0700)]
Patch version.

5 weeks agoUpdate dependencies.
Chris Duncan [Fri, 21 Mar 2025 14:16:41 +0000 (07:16 -0700)]
Update dependencies.

5 weeks agoReimplement CSP and generate script hash to use for puppeteer page content. Get GPU...
Chris Duncan [Fri, 21 Mar 2025 14:15:50 +0000 (07:15 -0700)]
Reimplement CSP and generate script hash to use for puppeteer page content. Get GPU types to resolve Typescript warning.

5 weeks agoUpdate version. v3.2.0
Chris Duncan [Thu, 20 Mar 2025 21:59:42 +0000 (14:59 -0700)]
Update version.

5 weeks agoSet up for v4
Chris Duncan [Thu, 20 Mar 2025 21:56:55 +0000 (14:56 -0700)]
Set up for v4
Add two new methods which align with Nano node RPC actions. Return more data from hash result. Indicate a more specific `threshold` by passing a full 16-character string to the new `work_` methods. Changed `NanoPowGl.size` property to return total pixel count. Add typings for request and response objects consumed by new `work_` methods. Add more tests for receive threshold edge cases. Improve build process. Expand documentation.

5 weeks agoPatch version. v3.1.4
Chris Duncan [Sun, 16 Mar 2025 06:31:31 +0000 (23:31 -0700)]
Patch version.

5 weeks agoFix package per npm cli feedback.
Chris Duncan [Sun, 16 Mar 2025 06:29:22 +0000 (23:29 -0700)]
Fix package per npm cli feedback.

5 weeks agoReorganize source directory structure.
Chris Duncan [Sun, 16 Mar 2025 06:22:33 +0000 (23:22 -0700)]
Reorganize source directory structure.
Put documentation and test files into top-level folders. Divide PoW modules by API instead of by file type. Update file paths accordingly. Replace a duplicate sample blockhash.

5 weeks agoPatch version. v3.1.3
Chris Duncan [Sat, 15 Mar 2025 19:46:54 +0000 (12:46 -0700)]
Patch version.

5 weeks agoUpdated cli to accept input from stdin like redirects and pipes. Add JSON output...
Chris Duncan [Sat, 15 Mar 2025 19:22:11 +0000 (12:22 -0700)]
Updated cli to accept input from stdin like redirects and pipes. Add JSON output option to cli. Updated documentation for new cli features. Refactor gl draw shader to align with gpu compute shader on blake2b initialization. Update README license section. Rename file of test blockhashes since they are not work seeds.

6 weeks agoPatch version. v3.1.2
Chris Duncan [Thu, 13 Mar 2025 23:49:12 +0000 (16:49 -0700)]
Patch version.

6 weeks agoFix additional help documentation. Add small sample file of blockhashes used in test...
Chris Duncan [Thu, 13 Mar 2025 23:48:14 +0000 (16:48 -0700)]
Fix additional help documentation. Add small sample file of blockhashes used in test page so they can be used to test cli.

6 weeks agoFix man page formatting.
Chris Duncan [Thu, 13 Mar 2025 23:35:19 +0000 (16:35 -0700)]
Fix man page formatting.

6 weeks agoPatch version. v3.1.1
Chris Duncan [Thu, 13 Mar 2025 17:55:23 +0000 (10:55 -0700)]
Patch version.

6 weeks agoBreak up man page sections for legibility. Use macros for code examples. Add link...
Chris Duncan [Thu, 13 Mar 2025 17:53:35 +0000 (10:53 -0700)]
Break up man page sections for legibility. Use macros for code examples. Add link to Nano PoW docs. Add description of output.

6 weeks agoUpdate version. v3.1.0
Chris Duncan [Thu, 13 Mar 2025 17:05:02 +0000 (10:05 -0700)]
Update version.

6 weeks agoAdd SPDX comments to man page for REUSE compliance.
Chris Duncan [Thu, 13 Mar 2025 17:02:17 +0000 (10:02 -0700)]
Add SPDX comments to man page for REUSE compliance.

6 weeks agoRestore basic performance timing to CLI when debugging.
Chris Duncan [Thu, 13 Mar 2025 16:54:05 +0000 (09:54 -0700)]
Restore basic performance timing to CLI when debugging.

6 weeks agoAt just 2.8 KiB, the Terms page is the most lightweight chrome:// URL, so use it...
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.