You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
Currently, the basic logic for testing EVM interpreter already exists. Function compare_stack_unit_test in symExec.py is triggered when a program path is terminated (Line 474) and the flag UNIT_TEST is set. This is because normally a unit test's code has only one branch and is meant to check only one opcode. What do we want to check in our evm interpreter:
The stack implementation (how many items left after the execution and the values of such items)
The storage implementation (how many new variables are stored/ removed and their values)
We may also want to care about the account balance, gas after each opcode.
Thus, for this issue, we have to implement two major things. First, we need to create a lot of test cases for most of our opcodes. For each test case, we need to prepare:
The environment (initial stack, storage, etc)
The opcode being checked
The post-condition (stack state, storage state, account balance, etc).
To make our job easy, we should the existing evm tests in https://github.com/ethereum/tests/tree/develop/VMTests. We only need to modify the json files and make it compatible with our codebase.
Second, we need to implement the code to setup the environment and the checks for the stack, storage and account balances, etc in our codebase.
There are existing tests built for evm virtual machines https://github.com/ethereum/tests/tree/develop/VMTests
We may use these tests to test the correctness of our vm implementation.
The text was updated successfully, but these errors were encountered: