Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Handle evm error cases in circuit #597

Closed
29 tasks
DreamWuGit opened this issue Jul 4, 2022 · 3 comments
Closed
29 tasks

Handle evm error cases in circuit #597

DreamWuGit opened this issue Jul 4, 2022 · 3 comments

Comments

@DreamWuGit
Copy link
Collaborator

DreamWuGit commented Jul 4, 2022

currently evm circuit defines the error types as following. in step.rs to represents evm execution possible errors:

// Error cases:

  • ErrorInvalidOpcode
  • ErrorStackOverflow
  • ErrorStackUnderflow
  • ErrorWriteProtection
  • ErrorDepth
  • ErrorInsufficientBalance
  • ErrorContractAddressCollision
  • ErrorInvalidCreationCode
  • ErrorMaxCodeSizeExceeded
  • ErrorInvalidJump
  • ErrorReturnDataOutOfBound
  • ErrorOutOfGasConstant. [in progress]
  • ErrorOutOfGasStaticMemoryExpansion
  • ErrorOutOfGasDynamicMemoryExpansion
  • ErrorOutOfGasMemoryCopy
  • ErrorOutOfGasAccountAccess
  • ErrorOutOfGasCodeStore
  • ErrorOutOfGasLOG
  • ErrorOutOfGasEXP
  • ErrorOutOfGasSHA3
  • ErrorOutOfGasEXTCODECOPY
  • ErrorOutOfGasSLOAD
  • ErrorOutOfGasSSTORE
  • ErrorOutOfGasCALL
  • ErrorOutOfGasCALLCODE
  • ErrorOutOfGasDELEGATECALL
  • ErrorOutOfGasCREATE2
  • ErrorOutOfGasSTATICCALL
  • ErrorOutOfGasSELFDESTRUCT.

use this issue to trace overall status for evm circuit implementation , better to create new sub issue for each one when implements.

@ed255
Copy link
Member

ed255 commented Jul 4, 2022

@DreamWuGit are you planning on working on this?

Apart from the work related to the circuits, handling the error cases also will require support from the circuit input builder; as it currently will likely panic if a step generates an error situation (see this issue for example #506): so we need to adapt it to generate the proper associated ops for each error case.

@DreamWuGit
Copy link
Collaborator Author

DreamWuGit commented Jul 5, 2022

@ed255 thanks ! I am starting working on out of gas errors now, I have seen you mentioned issue, will try fix :) since this would be really a big issue for many error cases listed, feel free to pick some and left comments here or mark item [in progress] above so that we can collaborate in parallel .

@ChihChengLiang
Copy link
Collaborator

close in favor of tracking in #477

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

3 participants