cmd/evm: add state transition tool for testing (#20958)

This PR implements the EVM state transition tool, which is intended
to be the replacement for our retesteth client implementation.
Documentation is present in the cmd/evm/README.md file.

Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
Martin Holst Swende
2020-06-30 10:12:51 +02:00
committed by GitHub
parent dd91c7ce6a
commit e376d2fb31
37 changed files with 1509 additions and 48 deletions

12
cmd/evm/testdata/7/alloc.json vendored Normal file
View File

@ -0,0 +1,12 @@
{
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
"balance": "0x5ffd4878be161d74",
"code": "0x",
"nonce": "0xac",
"storage": {}
},
"0x8a8eafb1cf62bfbeb1741769dae1a9dd47996192":{
"balance": "0xfeedbead",
"nonce" : "0x00"
}
}

7
cmd/evm/testdata/7/env.json vendored Normal file
View File

@ -0,0 +1,7 @@
{
"currentCoinbase": "0xc94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"currentDifficulty": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffff020000",
"currentGasLimit": "0x750a163df65e8a",
"currentNumber": "5",
"currentTimestamp": "1000"
}

7
cmd/evm/testdata/7/readme.md vendored Normal file
View File

@ -0,0 +1,7 @@
This is a test for HomesteadToDao, checking if the
DAO-transition works
Example:
```
./statet8n --input.alloc=./testdata/7/alloc.json --input.txs=./testdata/7/txs.json --input.env=./testdata/7/env.json --output.alloc=stdout --state.fork=HomesteadToDaoAt5
```

1
cmd/evm/testdata/7/txs.json vendored Normal file
View File

@ -0,0 +1 @@
[]