]> zoso.dev Git - nano-pow.git/commitdiff
Update README describing new validate function.
authorChris Duncan <chris@zoso.dev>
Sun, 12 Jan 2025 07:54:00 +0000 (23:54 -0800)
committerChris Duncan <chris@zoso.dev>
Sun, 12 Jan 2025 07:54:00 +0000 (23:54 -0800)
README.md

index 64c1591b43e323f7412034ad783fab7eb70e0124..bf6e8c0cf83bbd3d47748a7f86b5e685ba0c128f 100644 (file)
--- a/README.md
+++ b/README.md
@@ -27,11 +27,16 @@ import { NanoPowGpu, NanoPowGl } from 'nano-pow'
 // `hash` is a 64-char hex string
 // `threshold` is optional and defaults to "0xFFFFFFF8"
 const workGpu = await NanoPowGpu.search(hash, threshold)
+// or if WebGPU is unsupported
 const workGl = await NanoPowGl.search(hash, threshold)
 ```
 
 You may also embed it in the global namespace by targeting `dist/global.min.js`
 
+## Validation
+NanoPow can also validate previously-generated work values against a block hash.
+Currently this is only implemented in the WebGPU tool and not WebGL.
+
 ## Notes
 The `work` field in a Nano transaction block contains an 8-byte nonce that
 satisfies the following equation:
@@ -59,12 +64,6 @@ due to the very narrow use case to which it is applied. The compute shader is
 consequently immense, but the goal is to squeeze every last bit of speed and
 performance out of it.
 
-## Validating work
-Although the nonces generated by this package have been tested extensively, a
-validation function is not currently implemented. There are other tools
-available to perform this trivial task, but if there is demand for it, then it
-can be delivered in a future update.
-
 ## Tests
 `test.html` in the source repository contains some basic tests to compare the
 speed of this tool. Feel free to check out how your system fares.