Skip to content

Commit

Permalink
fix revert
Browse files Browse the repository at this point in the history
  • Loading branch information
laisolizq committed Nov 24, 2022
1 parent 8428afa commit 0f0e89f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"devDependencies": {
"@0xpolygonhermez/zkevm-proverjs": "github:0xPolygonHermez/zkevm-proverjs#5cf87a1ea5f05dec875eb6d9934580a2f83c8438",
"@0xpolygonhermez/zkevm-testvectors": "github:0xPolygonHermez/zkevm-testvectors#feature/fix-jump-tests",
"@0xpolygonhermez/zkevm-testvectors": "github:0xPolygonHermez/zkevm-testvectors#feature/fix-revert-test",
"chai": "^4.3.6",
"chalk": "^3.0.0",
"eslint": "^8.25.0",
Expand Down

0 comments on commit 0f0e89f

Please sign in to comment.