Skip to content

Commit

Permalink
Fix FullTracer::onOpcode() for STOP opcode
Browse files Browse the repository at this point in the history
  • Loading branch information
fractasy committed Sep 2, 2024
1 parent 1bfd4d1 commit a0f82b9
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/main_sm/fork_1/main/full_tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,7 @@ void FullTracer::onOpcode(Context &ctx, const RomCommand &cmd)
// If is an ether transfer, don't add stop opcode to trace
bool bAddOpcode = true;
if ( (singleInfo.op == 0x00 /*STOP*/) &&
( (prevStep==NULL) || ( (opCreate.find(prevStep->opcode) != opCreate.end()) && (prevStep->gas_cost <= 32000))))
( (prevStep==NULL) || ( (opCreate.find(prevStep->opcode) != opCreate.end()) && (prevStep->gas_cost <= 32000) && (prevStep->error == ""))))
{
getVarFromCtx(ctx, false, ctx.rom.bytecodeLengthOffset, auxScalar);
if (auxScalar == 0)
Expand Down
2 changes: 1 addition & 1 deletion src/main_sm/fork_10/main/full_tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2132,7 +2132,7 @@ zkresult FullTracer::onOpcode(Context &ctx, const RomCommand &cmd)
// If is an ether transfer, don't add stop opcode to trace
bool bAddOpcode = true;
if ( (singleInfo.op == 0x00 /*STOP*/) &&
( (prevStep==NULL) || ( (opCreate.find(prevStep->opcode) != opCreate.end()) && (prevStep->gas_cost <= 32000))))
( (prevStep==NULL) || ( (opCreate.find(prevStep->opcode) != opCreate.end()) && (prevStep->gas_cost <= 32000) && (prevStep->error == ""))))
{
zkr = getVarFromCtx(ctx, false, ctx.rom.bytecodeLengthOffset, auxScalar);
if (zkr != ZKR_SUCCESS)
Expand Down
2 changes: 1 addition & 1 deletion src/main_sm/fork_12/main/full_tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2132,7 +2132,7 @@ zkresult FullTracer::onOpcode(Context &ctx, const RomCommand &cmd)
// If is an ether transfer, don't add stop opcode to trace
bool bAddOpcode = true;
if ( (singleInfo.op == 0x00 /*STOP*/) &&
( (prevStep==NULL) || ( (opCreate.find(prevStep->opcode) != opCreate.end()) && (prevStep->gas_cost <= 32000))))
( (prevStep==NULL) || ( (opCreate.find(prevStep->opcode) != opCreate.end()) && (prevStep->gas_cost <= 32000) && (prevStep->error == ""))))
{
zkr = getVarFromCtx(ctx, false, ctx.rom.bytecodeLengthOffset, auxScalar);
if (zkr != ZKR_SUCCESS)
Expand Down
2 changes: 1 addition & 1 deletion src/main_sm/fork_2/main/full_tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1292,7 +1292,7 @@ void FullTracer::onOpcode(Context &ctx, const RomCommand &cmd)
// If is an ether transfer, don't add stop opcode to trace
bool bAddOpcode = true;
if ( (singleInfo.op == 0x00 /*STOP*/) &&
( (prevStep==NULL) || ( (opCreate.find(prevStep->opcode) != opCreate.end()) && (prevStep->gas_cost <= 32000))))
( (prevStep==NULL) || ( (opCreate.find(prevStep->opcode) != opCreate.end()) && (prevStep->gas_cost <= 32000) && (prevStep->error == ""))))
{
getVarFromCtx(ctx, false, ctx.rom.bytecodeLengthOffset, auxScalar);
if (auxScalar == 0)
Expand Down
2 changes: 1 addition & 1 deletion src/main_sm/fork_3/main/full_tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1292,7 +1292,7 @@ void FullTracer::onOpcode(Context &ctx, const RomCommand &cmd)
// If is an ether transfer, don't add stop opcode to trace
bool bAddOpcode = true;
if ( (singleInfo.op == 0x00 /*STOP*/) &&
( (prevStep==NULL) || ( (opCreate.find(prevStep->opcode) != opCreate.end()) && (prevStep->gas_cost <= 32000))))
( (prevStep==NULL) || ( (opCreate.find(prevStep->opcode) != opCreate.end()) && (prevStep->gas_cost <= 32000) && (prevStep->error == ""))))
{
getVarFromCtx(ctx, false, ctx.rom.bytecodeLengthOffset, auxScalar);
if (auxScalar == 0)
Expand Down
2 changes: 1 addition & 1 deletion src/main_sm/fork_4/main/full_tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,7 @@ zkresult FullTracer::onOpcode(Context &ctx, const RomCommand &cmd)
// If is an ether transfer, don't add stop opcode to trace
bool bAddOpcode = true;
if ( (singleInfo.op == 0x00 /*STOP*/) &&
( (prevStep==NULL) || ( (opCreate.find(prevStep->opcode) != opCreate.end()) && (prevStep->gas_cost <= 32000))))
( (prevStep==NULL) || ( (opCreate.find(prevStep->opcode) != opCreate.end()) && (prevStep->gas_cost <= 32000) && (prevStep->error == ""))))
{
zkr = getVarFromCtx(ctx, false, ctx.rom.bytecodeLengthOffset, auxScalar);
if (zkr != ZKR_SUCCESS)
Expand Down
2 changes: 1 addition & 1 deletion src/main_sm/fork_5/main/full_tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,7 @@ zkresult FullTracer::onOpcode(Context &ctx, const RomCommand &cmd)
// If is an ether transfer, don't add stop opcode to trace
bool bAddOpcode = true;
if ( (singleInfo.op == 0x00 /*STOP*/) &&
( (prevStep==NULL) || ( (opCreate.find(prevStep->opcode) != opCreate.end()) && (prevStep->gas_cost <= 32000))))
( (prevStep==NULL) || ( (opCreate.find(prevStep->opcode) != opCreate.end()) && (prevStep->gas_cost <= 32000) && (prevStep->error == ""))))
{
zkr = getVarFromCtx(ctx, false, ctx.rom.bytecodeLengthOffset, auxScalar);
if (zkr != ZKR_SUCCESS)
Expand Down
2 changes: 1 addition & 1 deletion src/main_sm/fork_6/main/full_tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,7 @@ zkresult FullTracer::onOpcode(Context &ctx, const RomCommand &cmd)
// If is an ether transfer, don't add stop opcode to trace
bool bAddOpcode = true;
if ( (singleInfo.op == 0x00 /*STOP*/) &&
( (prevStep==NULL) || ( (opCreate.find(prevStep->opcode) != opCreate.end()) && (prevStep->gas_cost <= 32000))))
( (prevStep==NULL) || ( (opCreate.find(prevStep->opcode) != opCreate.end()) && (prevStep->gas_cost <= 32000) && (prevStep->error == ""))))
{
zkr = getVarFromCtx(ctx, false, ctx.rom.bytecodeLengthOffset, auxScalar);
if (zkr != ZKR_SUCCESS)
Expand Down
2 changes: 1 addition & 1 deletion src/main_sm/fork_7/main/full_tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2033,7 +2033,7 @@ zkresult FullTracer::onOpcode(Context &ctx, const RomCommand &cmd)
// If is an ether transfer, don't add stop opcode to trace
bool bAddOpcode = true;
if ( (singleInfo.op == 0x00 /*STOP*/) &&
( (prevStep==NULL) || ( (opCreate.find(prevStep->opcode) != opCreate.end()) && (prevStep->gas_cost <= 32000))))
( (prevStep==NULL) || ( (opCreate.find(prevStep->opcode) != opCreate.end()) && (prevStep->gas_cost <= 32000) && (prevStep->error == ""))))
{
zkr = getVarFromCtx(ctx, false, ctx.rom.bytecodeLengthOffset, auxScalar);
if (zkr != ZKR_SUCCESS)
Expand Down
2 changes: 1 addition & 1 deletion src/main_sm/fork_8/main/full_tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2124,7 +2124,7 @@ zkresult FullTracer::onOpcode(Context &ctx, const RomCommand &cmd)
// If is an ether transfer, don't add stop opcode to trace
bool bAddOpcode = true;
if ( (singleInfo.op == 0x00 /*STOP*/) &&
( (prevStep==NULL) || ( (opCreate.find(prevStep->opcode) != opCreate.end()) && (prevStep->gas_cost <= 32000))))
( (prevStep==NULL) || ( (opCreate.find(prevStep->opcode) != opCreate.end()) && (prevStep->gas_cost <= 32000) && (prevStep->error == ""))))
{
zkr = getVarFromCtx(ctx, false, ctx.rom.bytecodeLengthOffset, auxScalar);
if (zkr != ZKR_SUCCESS)
Expand Down
2 changes: 1 addition & 1 deletion src/main_sm/fork_9/main/full_tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2136,7 +2136,7 @@ zkresult FullTracer::onOpcode(Context &ctx, const RomCommand &cmd)
// If is an ether transfer, don't add stop opcode to trace
bool bAddOpcode = true;
if ( (singleInfo.op == 0x00 /*STOP*/) &&
( (prevStep==NULL) || ( (opCreate.find(prevStep->opcode) != opCreate.end()) && (prevStep->gas_cost <= 32000))))
( (prevStep==NULL) || ( (opCreate.find(prevStep->opcode) != opCreate.end()) && (prevStep->gas_cost <= 32000) && (prevStep->error == ""))))
{
zkr = getVarFromCtx(ctx, false, ctx.rom.bytecodeLengthOffset, auxScalar);
if (zkr != ZKR_SUCCESS)
Expand Down

0 comments on commit a0f82b9

Please sign in to comment.