From 86597f99af58b67b21b7662f48328935c2593a72 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Wed, 12 Mar 2025 14:09:52 -0700 Subject: [PATCH] Fix subtle but important carry bit bug that allowed valid nonces to be generated that were technically incorrect but close enough to the correct value that it wasn't caught until now. --- src/shaders/compute.wgsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shaders/compute.wgsl b/src/shaders/compute.wgsl index 54e7440..ba68f9e 100644 --- a/src/shaders/compute.wgsl +++ b/src/shaders/compute.wgsl @@ -1598,9 +1598,9 @@ fn main(id: vec3) { vDE = (vDE >> ROTATE_16) | (vDE << ROTATE_16).yxwz; // s0 = vAB + vFC; - // vAB = s0 + (vec4(s0 < vAB).yxwz & CARRY); + // vAB = s0 + (vec4(s0 < vAB) & CARRY).yxwz; s1 = v89 + vDE; - v89 = s1 + (vec4(s1 < v89).yxwz & CARRY); + v89 = s1 + (vec4(s1 < v89) & CARRY).yxwz; // v56 ^= vAB; // v74 ^= v89; -- 2.34.1