Skip to content

Commit

Permalink
Fix FullTracer::onOpcode() with no_counters
Browse files Browse the repository at this point in the history
  • Loading branch information
fractasy committed Aug 22, 2024
1 parent b984aa7 commit 2502bb8
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/main_sm/fork_9/main/full_tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1498,15 +1498,6 @@ zkresult FullTracer::onOpcode(Context &ctx, const RomCommand &cmd)

Opcode singleInfo;

if (ctx.proverRequest.input.bNoCounters)
{
full_trace.emplace_back(singleInfo);
#ifdef LOG_TIME_STATISTICS
tms.add("onOpcode", TimeDiff(t));
#endif
return ZKR_SUCCESS;
}

mpz_class auxScalar;

#ifdef LOG_TIME_STATISTICS
Expand Down Expand Up @@ -1534,6 +1525,16 @@ zkresult FullTracer::onOpcode(Context &ctx, const RomCommand &cmd)
#ifdef LOG_TIME_STATISTICS
tmsop.add("getCodeID", TimeDiff(top));
#endif

if (ctx.proverRequest.input.bNoCounters && (codeId != 0xa0 /* LOG0 */))
{
full_trace.emplace_back(singleInfo);
#ifdef LOG_TIME_STATISTICS
tms.add("onOpcode", TimeDiff(t));
#endif
return ZKR_SUCCESS;
}

#ifdef LOG_TIME_STATISTICS
gettimeofday(&top, NULL);
#endif
Expand Down

0 comments on commit 2502bb8

Please sign in to comment.