Skip to content

Commit

Permalink
Fix SHA counter bug in mainGenerator10. Reviewed by Feli.
Browse files Browse the repository at this point in the history
  • Loading branch information
fractasy committed Aug 1, 2024
1 parent 92c7cac commit 038e9c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main_generator/main_generator_10.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2401,8 +2401,8 @@ string generate(const json &rom, uint64_t forkID, string forkNamespace, const st
{
code += " if (!proverRequest.input.bNoCounters)\n";
code += " {\n";
#ifdef CHECK_MAX_CNT_ASAP
code += " pols.cntSha256F[" + string(bFastMode?"0":"nexti") + "] = fr.add(pols.cntSha256F[" + string(bFastMode?"0":"i") + "], fr.fromU64(ctx.incCounter));\n";
#ifdef CHECK_MAX_CNT_ASAP
code += " if (fr.toU64(pols.cntSha256F[" + string(bFastMode?"0":"nexti") + "]) > " + (string)rom["constants"]["MAX_CNT_SHA256_F_LIMIT"]["value"] + ")\n";
code += " {\n";
code += " zkPC=" + to_string(zkPC) +";\n";
Expand Down

0 comments on commit 038e9c0

Please sign in to comment.