From 92f92e25d536ce3a4359745fabcd19f0890cd968 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 22 Aug 2026 06:57:33 -0400 Subject: [PATCH] Try reduced power proof on CRCError --- src/Gpu.cpp | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/Gpu.cpp b/src/Gpu.cpp index 70ea4d14..204b88ea 100644 --- a/src/Gpu.cpp +++ b/src/Gpu.cpp @@ -2259,18 +2259,22 @@ fs::path Gpu::saveProof(const Args& args, ProofSet& proofSet) { bool problem_proof = false; for ( ; ; ) { for (int retry = 0; retry == 0 || (retry == 1 && !problem_proof); ++retry) { - auto [proof, hashes] = proofSet.computeProof(this); - fs::path const tmpFile = proof.file(args.proofToVerifyDir); - proof.save(tmpFile); - - fs::path proofFile = proof.file(args.proofResultDir); - - bool const ok = Proof::load(tmpFile).verify(this, hashes); - log("Proof '%s' verification %s\n", tmpFile.string().c_str(), ok ? "OK" : "FAILED"); - if (ok) { - fancyRename(tmpFile, proofFile); - log("Proof '%s' generated\n", proofFile.string().c_str()); - return proofFile; + try { + auto [proof, hashes] = proofSet.computeProof(this); + fs::path const tmpFile = proof.file(args.proofToVerifyDir); + proof.save(tmpFile); + + fs::path proofFile = proof.file(args.proofResultDir); + + bool const ok = Proof::load(tmpFile).verify(this, hashes); + log("Proof '%s' verification %s\n", tmpFile.string().c_str(), ok ? "OK" : "FAILED"); + if (ok) { + fancyRename(tmpFile, proofFile); + log("Proof '%s' generated\n", proofFile.string().c_str()); + return proofFile; + } + } catch (const CRCError&) { + break; } } problem_proof = true;