]> zoso.dev Git - libnemo.git/commitdiff
Yep, it was an issue.
authorChris Duncan <chris@zoso.dev>
Mon, 6 Jan 2025 15:00:38 +0000 (07:00 -0800)
committerChris Duncan <chris@zoso.dev>
Mon, 6 Jan 2025 15:00:38 +0000 (07:00 -0800)
src/lib/workers/powgpu.ts

index aa9cbea9058c29c6f6a98f91280f634e83819596..65df379f7069e28d2737201cdfc799f2e1b8aa57 100644 (file)
@@ -199,11 +199,10 @@ export class PowGpu extends WorkerInterface {
 
                        /**
                        * Initialize (nonce||blockhash) concatenation
-                       * NOTE: blake2b reference uses uint64_t whereas we have u32
-                       * Array length might need to increase from 16 to 32 because of this
-                       * Unsure why it works anyway now since it should throw out-of-range error?
+                       * Reference implementation uses uint64_t whereas we have u32
+                       * Array length increased from original 16 to 32 to compensate
                        */
-                       var m: array<u32, 16>;
+                       var m: array<u32, 32>;
                        m[0u] = ubo.random;
                        m[1u] = ubo.random ^ id;
                        m[2u] = ubo.blockhash[0u].x;