From: Chris Duncan Date: Thu, 13 Mar 2025 15:29:40 +0000 (-0700) Subject: Fix incorrect final digest XOR in threshold comparison to properly use initialized... X-Git-Tag: v3.1.0~6 X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=079ddb7e7c0f43cb8dac99658e4d30a3f703cfe9;p=nano-pow.git Fix incorrect final digest XOR in threshold comparison to properly use initialized state instead of using default state without the necessary parameter block. --- 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);