Storage change tests
chfast opened this issue · 5 comments
chfast commented
In preparation for EIP-1087.
For a single SSTORE of a given key, we have following cases:
- z: 0 -> 0 (zero),
- a: 0 -> X (added),
- d: X -> 0 (deleted),
- m: X -> Y (modified).
- u: X -> X (unchanged).
Make sure we have proper tests for all cases (probably yes).
Now let's create a set of test cases where we combine each possibility into sequence of two SSTORES:
- zz: 0 -> 0 -> 0
- za: 0 -> 0 -> X
- ad: 0 -> X -> 0
- am: 0 -> X -> Y
- au: 0 -> X -> X
- dz: X -> 0 -> 0
- da: X -> 0 -> X
- da2: X -> 0 -> Y
- md: X -> Y -> 0
- mm: X -> Y -> Z
- mm2: X -> Y -> X
- mu: X -> Y -> Y
- ud: X -> X -> 0
- um: X -> X -> Y
- uu: X -> X -> X
winsvega commented
sorpaas commented
Two additional test cases for reset and set again:
- ada: 0 -> X -> 0 -> X
- dad: X -> 0 -> X -> 0
chfast commented
Can this be closed now?
winsvega commented
No. The cases have not been added to the repo yet.
In fact tests not written yet.