-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mega "simple exceptions testing" issue #1435
Comments
Note: go through instruction handling of the HUB section of the spec. Some OpCode have specific exceptions, while others are shared (about 11 in total and 6 shared). The tests should be the minimal ones such that they trigger the relevant exception. CALL, RETURN and CREATE may be tricky. |
|
Do we want tests that trigger several exception, to be sure we trigger the right tracedException one ? |
@letypequividelespoubelles that seems a good idea, as a second step. @OlivierBBB what do you think? |
Main point
We should create tests that trigger, for every single opcode, every single possible exception (including aborting conditions, failure conditions for
CREATE
's, issues with precompiles.)Details
List of ZKEVM exceptions
Accessing
delta
andalpha
stackUnderflowException
If an instruction removes$\delta$ many items from the stack there should be $\delta$ many tests where you initially do $0, 1, \dots, \delta - 1$ initial pushes before triggering the opcode.
You can access$\delta$ through the $\delta = \delta_0$ and go through all positive values of $\delta_0$ . We can also include the final one (which won't raise an exception.)
OpCodeData
. As suggested by @lorenzo.gentile you can batch these considering the set of all instructions withstackOverflowException
You just have to do something like
Almost unique instructions
Those two should essentially be already done (though checking it won't hurt):
RETURNDATACOPY
(OOB)JUMP
andJUMPI
(OOB)Those would be new:
CALL
,SSTORE
,SELFDESTRUCT
,LOG's
,CREATE(2)
,SSTORE
RETURN
during a deploymentRETURN
during a deployment (we may already have stuff in place for this in OOB)INVALID
and any byte that isn't an opcode.The text was updated successfully, but these errors were encountered: