-
Notifications
You must be signed in to change notification settings - Fork 76
Retesteth commands
Download the test repo: https://github.com/ethereum/tests
By default retesteth
reads path to the test repo from env variable ETHEREUM_TEST_PATH
This could be overwritten with --testpath
option:
./retesteth -- --testpath "/path/to/the/test/repo"
Check default client config:
~/.retesteth/default
And create a config folder for you client.
https://github.com/ethereum/retesteth/wiki/Add-client-configuration-to-Retesteth
./retesteth -t GeneralStateTests -- --clients "default"
Replace "default"
with your newly created client config folder. If you configured the client to work via TCP socket, make sure that specified port is open and listening for connections by the instance of a client.
The basic tests suites to run:
GeneralStateTests - minimum EVM coverage of one transaction call execution testing opcode execution scenarios.
./retesteth -t GeneralStateTests --
BlockchainTests - tests with many blocks each block could have many transactions. including malicious blocks.
./retesteth -t BlockchainTests --
By adding a --testfile
option you could run a custom test file from any location
./retesteth -t GeneralStateTests -- --testfile /home/wins/Ethereum/tests/GeneralStateTests/stExample/add11.json
Simply add --filltests
option after selecting the test suite.
./retesteth -t GeneralStateTests -- --filltests
In this mode retesteth
will ask the post state from the client after transaction execution and write this information as the actual test, replacing the test files in the test folder. The post condition check will also be performed and if the result post state from the client does not match post condition specified in the test source, you will see the error.
Guide to test generation: https://github.com/ethereum/retesteth/wiki/Creating-a-State-Test-with-retesteth
Setting up the log level when running the commands [N:1-6]:
--verbosity <N>
Output vm steps in json format for transaction execution
--vmtrace
When a post state is huge, retesteth
will put it's hash to the generated test. This could be disabled by --fullstate
option. When filling the tests, option --poststate
will print result post state for debug.
./retesteth -t GeneralStateTests/stExample -- --filltests --fullstate --poststate