-
Notifications
You must be signed in to change notification settings - Fork 76
Transition Tool
For those clients that are unable to implement RPC Methods to connect with retesteth there is a new state transition generation approach.
The client can implement a state transition tool based on following example inputs/outputs:
https://github.com/holiman/go-ethereum/tree/state_t8n_tool/cmd/evm/testdata
Recent t8ntool format
https://ethereum-tests.readthedocs.io/en/latest/t8ntool-ref.html?highlight=t8ntool
Here is the geth implementation interface help:
statet8n --help
transition [command options] [arguments...]
OPTIONS:
--trace Output full trace logs to files <txhash>.jsonl
--trace.nomemory Disable full memory dump in traces
--trace.nostack Disable stack output in traces
--output.alloc alloc Determines where to put the alloc of the post-state.
`stdout` - into the stdout output
`stderr` - into the stderr output
<file> - into the file <file> (default: "alloc.json")
--output.result result Determines where to put the result (stateroot, txroot etc) of the post-state.
`stdout` - into the stdout output
`stderr` - into the stderr output
<file> - into the file <file> (default: "result.json")
--input.alloc stdin stdin or file name of where to find the prestate alloc to use. (default: "alloc.json")
--input.env stdin stdin or file name of where to find the prestate env to use. (default: "env.json")
--input.txs stdin stdin or file name of where to find the transactions to apply. (default: "txs.json")
--state.fork value Name of ruleset to use.
Available forknames:
Byzantium
Constantinople
ConstantinopleFix
EIP150
EIP158
Frontier
Homestead
HomesteadToDaoAt5
Istanbul
YOLOv1
Available extra eips:
1344, 1884, 2200, 2315
Syntax <forkname>(+ExtraEip) (default: "Istanbul")
--state.chainid value ChainID to use (default: 1)
--state.reward value Mining reward. Set to -1 to disable (default: 0)
--verbosity value sets the verbosity level (default: 3)
Retesteth can execute this tool converting existing tests into the inputs, and read outputs from the tool to generate a new test case, or to check if the existing test case is running correctly with the tool.
To connect retesteth with the tool there is a new config type in .retesteth/t8ntool configuration folder.
by default retesteth seek the statet8n
tool in the system /bin/statet8n
folder. Place your tool implementation there and run retesteth with following flag -- clients "t8ntool"