-
Notifications
You must be signed in to change notification settings - Fork 77
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:
https://github.com/ethereum/tests/tree/develop/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 --
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>
When a post state is huge, retesteth
will put it's hash to the generated hash. 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