From 079ddb7e7c0f43cb8dac99658e4d30a3f703cfe9 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Thu, 13 Mar 2025 08:29:40 -0700 Subject: [PATCH] Fix incorrect final digest XOR in threshold comparison to properly use initialized state instead of using default state without the necessary parameter block. --- src/shaders/compute.wgsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shaders/compute.wgsl b/src/shaders/compute.wgsl index d96aca4..17f0aad 100644 --- a/src/shaders/compute.wgsl +++ b/src/shaders/compute.wgsl @@ -1662,7 +1662,7 @@ fn main(id: vec3) { * Set nonce if it passes the threshold and no other thread has set it. * Only high bits are needed for comparison since threshold low bits are zero. */ - if ((BLAKE2B_IV[0u].y ^ v01.y ^ v89.y) >= ubo.threshold && atomicLoad(&work.found) == 0u) { + if ((BLAKE2B_INIT[0u].y ^ v01.y ^ v89.y) >= ubo.threshold && atomicLoad(&work.found) == 0u) { atomicStore(&work.found, 1u); work.nonce = m0; work.result = (BLAKE2B_INIT[0u] ^ v01.xy ^ v89.xy); -- 2.34.1