Skip to content
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

fix OOGX tests #1685

Open
lorenzogentile404 opened this issue Jan 9, 2025 · 0 comments
Open

fix OOGX tests #1685

lorenzogentile404 opened this issue Jan 9, 2025 · 0 comments
Assignees
Labels

Comments

@lorenzogentile404
Copy link
Collaborator

lorenzogentile404 commented Jan 9, 2025

The OOGX tests are missing stuff. It's the same type of issue we already had with PUSH's but for SLOAD (and potentially for SSTORE). The issue is that in the tests storage is empty when tested. So SLOAD (which triggers OOGX) dredges up 0, which is indistinguishable from not writing anything. But when storage is nonempty the associated constraint storage-instruction---setting-storage-slot-values---doing-for-SLOAD blows up in case of an OOGX.

We may also have the same issue with MLOAD / MSTORE / MSTORE8 / CALLDATALOAD if the OOGX tests have, respectively:

  • empty memory
  • empty call data

We need ensure nontrivial results for the following opcodes:

// special crafted values
SIGNEXTEND
BYTE
SHR
SAR

// 0
ISZERO

// 1 and 1
AND
EQ

// some address in the state with nontrivial balance and code
BALANCE
EXTCODEHASH

// a value that is close to NUMBER
BLOCKHASH

// have nonempty RAM or nonempty CALLDATA
MLOAD
CALLDATALOAD

// should be called after having expanded memory once
MSIZE

// generic 7 * i + 5 will do:
ADD
MUL
SUB
DIV
SDIV
MOD
SMOD
ADDMOD
MULMOD
EXP
GT
SGT
EQ
SHL
PUSHX
SWAPX
DUPX

// generic 128 - 3 * i or so
LT
SLT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant