Fix nonce advancement logic and update CUDA miner env settings

This commit is contained in:
rob thijssen
2025-09-14 15:31:46 +03:00
parent 737de2113a
commit f37e70e1b1
2 changed files with 8 additions and 4 deletions

View File

@@ -719,8 +719,9 @@ impl CudaEngine {
}
// Advance by covered window and continue to next batch, honoring cancel between batches
let attempts = active_threads * (effective_iters as u64);
// Advance by attempted nonces this batch; CPU handled +1 before the G2 loop
hash_count = hash_count.saturating_add(attempts);
current = current.saturating_add(U512::from(1u64 + attempts));
current = current.saturating_add(U512::from(attempts));
if cancel.load(AtomicOrdering::Relaxed) {
break;
}
@@ -807,7 +808,9 @@ impl CudaEngine {
}
}
// Not found in this window (no additional advance; already advanced per batch)
// Not found in this window
// Advance by the single CPU step consumed at the beginning of this outer loop iteration
current = current.saturating_add(U512::from(1u64));
continue;
} else {
// G1 launch: computes y for (current + t + 1) for each thread t in [0, num_threads)

View File

@@ -5,8 +5,9 @@ MINER_CUDA_IMAGE=ptx
MINER_CUDA_ITERS=8192
MINER_CUDA_THREADS=4096
MINER_CUDA_BLOCK_DIM=256
MINER_CUDA_BATCHES=32
MINER_CUDA_BATCHES=4
MINER_CUDA_SAMPLER=1
MINER_CUDA_DESIRED_ITERS=1024
MINER_CUDA_DESIRED_ITERS=64
MINER_CUDA_VERIFY=2048
MINER_CUDA_FORCE_WIN=0
RUST_LOG=miner=debug