Skip to content

Commit

Permalink
fix revert
Browse files Browse the repository at this point in the history
  • Loading branch information
laisolizq committed Nov 25, 2022
1 parent f9fafbd commit 459619a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main/opcodes/create-terminate-context.zkasm
Original file line number Diff line number Diff line change
Expand Up @@ -991,15 +991,17 @@ opREVERT:
$ => D :MLOAD(retCallLength)
C => A
D => B
$ :LT,JMPC(opREVERT32)
$ :LT,JMPC(preREVERT32)
D => C

; copy from memory current CTX to memory origin CTX
preREVERT32:
$ => B :MLOAD(retCallOffset)

opREVERT32:
; checks zk-counters
%MAX_CNT_STEPS - STEP - 400 :JMPN(outOfCountersStep)

$ => B :MLOAD(retCallOffset)
C - 1 :JMPN(opREVERTend)
C - 32 :JMPN(opREVERTfinal)
; load first 32 bytes from memory at current CTX
Expand Down

0 comments on commit 459619a

Please sign in to comment.