Skip to content

Commit

Permalink
redo invalid opcode
Browse files Browse the repository at this point in the history
  • Loading branch information
krlosMata committed May 3, 2022
1 parent b61feb3 commit 3fe0b54
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions main/opcodes.zkasm
Original file line number Diff line number Diff line change
Expand Up @@ -2096,10 +2096,16 @@ opSELFDESTRUCT:
:JMP(endCode)

opINVALID:
; Equivalent to REVERT with 0,0 as stack parameters
; Remaining gas is consumed
0 => GAS
; Abort execution
:JMP(endCode)
$ => GAS :MLOAD(gasCTX)
CTX - 1 :JMPC(opINVALIDend)
$ => SP :MLOAD(lastSP)
$ => PC :MLOAD(lastPC)
:JMP(readCode)

opINVALIDend:
:JMP(endCode)

invalidStaticTx:
$ => CTX :MLOAD(originCTX) ;last ctx
Expand Down

0 comments on commit 3fe0b54

Please sign in to comment.