cmd/evm: update readmes for the tests (#26841)
This commit is contained in:
parent
5395362e0f
commit
08f6a2a89d
134
cmd/evm/testdata/10/readme.md
vendored
134
cmd/evm/testdata/10/readme.md
vendored
@ -9,71 +9,77 @@ INFO [05-09|22:11:59.436] rejected tx index=3 hash=
|
|||||||
Output:
|
Output:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"alloc": {
|
"alloc": {
|
||||||
"0x1111111111111111111111111111111111111111": {
|
"0x1111111111111111111111111111111111111111": {
|
||||||
"code": "0xfe",
|
"code": "0xfe",
|
||||||
"balance": "0x10000000000",
|
"balance": "0x10000000000",
|
||||||
"nonce": "0x1"
|
"nonce": "0x1"
|
||||||
|
},
|
||||||
|
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
|
||||||
|
"balance": "0x10000000000",
|
||||||
|
"nonce": "0x1"
|
||||||
|
},
|
||||||
|
"0xd02d72e067e77158444ef2020ff2d325f929b363": {
|
||||||
|
"balance": "0xff5beffffc95",
|
||||||
|
"nonce": "0x4"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
|
"result": {
|
||||||
"balance": "0x10000000000",
|
"stateRoot": "0xf91a7ec08e4bfea88719aab34deabb000c86902360532b52afa9599d41f2bb8b",
|
||||||
"nonce": "0x1"
|
"txRoot": "0xda925f2306a52fa24c15d5cd212d736ee016415fd8dd0c45fd368de7917d64bb",
|
||||||
},
|
"receiptsRoot": "0x439a25f7fc424c10fb1f89800e4aa1df74156b137239d9ac3eaa7c911c353cd5",
|
||||||
"0xd02d72e067e77158444ef2020ff2d325f929b363": {
|
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
|
||||||
"balance": "0xff5beffffc95",
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
"nonce": "0x4"
|
"receipts": [
|
||||||
|
{
|
||||||
|
"type": "0x2",
|
||||||
|
"root": "0x",
|
||||||
|
"status": "0x0",
|
||||||
|
"cumulativeGasUsed": "0x10000001",
|
||||||
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
|
"logs": null,
|
||||||
|
"transactionHash": "0x88980f6efcc5358d9c359663e7b9414722d430497637340ea056b076bc206701",
|
||||||
|
"contractAddress": "0x0000000000000000000000000000000000000000",
|
||||||
|
"gasUsed": "0x10000001",
|
||||||
|
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||||
|
"transactionIndex": "0x0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "0x2",
|
||||||
|
"root": "0x",
|
||||||
|
"status": "0x0",
|
||||||
|
"cumulativeGasUsed": "0x20000001",
|
||||||
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
|
"logs": null,
|
||||||
|
"transactionHash": "0xd7bf3886f4e2aef74d525ae072c680f3846f550254401b67cbfda4a233757582",
|
||||||
|
"contractAddress": "0x0000000000000000000000000000000000000000",
|
||||||
|
"gasUsed": "0x10000000",
|
||||||
|
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||||
|
"transactionIndex": "0x1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "0x2",
|
||||||
|
"root": "0x",
|
||||||
|
"status": "0x0",
|
||||||
|
"cumulativeGasUsed": "0x30000001",
|
||||||
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
|
"logs": null,
|
||||||
|
"transactionHash": "0x50308296760f01f1eeec7500e9e73cad67469249b1f59e9a9f55e6625a4923db",
|
||||||
|
"contractAddress": "0x0000000000000000000000000000000000000000",
|
||||||
|
"gasUsed": "0x10000000",
|
||||||
|
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||||
|
"transactionIndex": "0x2"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rejected": [
|
||||||
|
{
|
||||||
|
"index": 3,
|
||||||
|
"error": "gas limit reached"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"currentDifficulty": "0x20000",
|
||||||
|
"gasUsed": "0x30000001",
|
||||||
|
"currentBaseFee": "0x36b"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"result": {
|
|
||||||
"stateRoot": "0xf91a7ec08e4bfea88719aab34deabb000c86902360532b52afa9599d41f2bb8b",
|
|
||||||
"txRoot": "0xda925f2306a52fa24c15d5cd212d736ee016415fd8dd0c45fd368de7917d64bb",
|
|
||||||
"receiptRoot": "0x439a25f7fc424c10fb1f89800e4aa1df74156b137239d9ac3eaa7c911c353cd5",
|
|
||||||
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
|
|
||||||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
||||||
"receipts": [
|
|
||||||
{
|
|
||||||
"type": "0x2",
|
|
||||||
"root": "0x",
|
|
||||||
"status": "0x0",
|
|
||||||
"cumulativeGasUsed": "0x10000001",
|
|
||||||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
||||||
"logs": null,
|
|
||||||
"transactionHash": "0x88980f6efcc5358d9c359663e7b9414722d430497637340ea056b076bc206701",
|
|
||||||
"contractAddress": "0x0000000000000000000000000000000000000000",
|
|
||||||
"gasUsed": "0x10000001",
|
|
||||||
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
||||||
"transactionIndex": "0x0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "0x2",
|
|
||||||
"root": "0x",
|
|
||||||
"status": "0x0",
|
|
||||||
"cumulativeGasUsed": "0x20000001",
|
|
||||||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
||||||
"logs": null,
|
|
||||||
"transactionHash": "0xd7bf3886f4e2aef74d525ae072c680f3846f550254401b67cbfda4a233757582",
|
|
||||||
"contractAddress": "0x0000000000000000000000000000000000000000",
|
|
||||||
"gasUsed": "0x10000000",
|
|
||||||
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
||||||
"transactionIndex": "0x1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "0x2",
|
|
||||||
"root": "0x",
|
|
||||||
"status": "0x0",
|
|
||||||
"cumulativeGasUsed": "0x30000001",
|
|
||||||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
||||||
"logs": null,
|
|
||||||
"transactionHash": "0x50308296760f01f1eeec7500e9e73cad67469249b1f59e9a9f55e6625a4923db",
|
|
||||||
"contractAddress": "0x0000000000000000000000000000000000000000",
|
|
||||||
"gasUsed": "0x10000000",
|
|
||||||
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
||||||
"transactionIndex": "0x2"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"rejected": [
|
|
||||||
3
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
45
cmd/evm/testdata/12/readme.md
vendored
45
cmd/evm/testdata/12/readme.md
vendored
@ -11,29 +11,32 @@ dir=./testdata/12 && ./evm t8n --state.fork=London --input.alloc=$dir/alloc.json
|
|||||||
With the fix applied, the result is:
|
With the fix applied, the result is:
|
||||||
```
|
```
|
||||||
dir=./testdata/12 && ./evm t8n --state.fork=London --input.alloc=$dir/alloc.json --input.txs=$dir/txs.json --input.env=$dir/env.json --output.alloc=stdout --output.result=stdout
|
dir=./testdata/12 && ./evm t8n --state.fork=London --input.alloc=$dir/alloc.json --input.txs=$dir/txs.json --input.env=$dir/env.json --output.alloc=stdout --output.result=stdout
|
||||||
INFO [07-21|19:03:50.276] rejected tx index=0 hash=ccc996..d83435 from=0xa94f5374Fce5edBC8E2a8697C15331677e6EbF0B error="insufficient funds for gas * price + value: address 0xa94f5374Fce5edBC8E2a8697C15331677e6EbF0B have 84000000 want 84000032"
|
INFO [03-09|10:43:12.649] rejected tx index=0 hash=ccc996..d83435 from=0xa94f5374Fce5edBC8E2a8697C15331677e6EbF0B error="insufficient funds for gas * price + value: address 0xa94f5374Fce5edBC8E2a8697C15331677e6EbF0B have 84000000 want 84000032"
|
||||||
INFO [07-21|19:03:50.276] Trie dumping started root=e05f81..6597a5
|
INFO [03-09|10:43:12.650] Trie dumping started root=e05f81..6597a5
|
||||||
INFO [07-21|19:03:50.276] Trie dumping complete accounts=1 elapsed="39.549µs"
|
INFO [03-09|10:43:12.650] Trie dumping complete accounts=1 elapsed="46.393µs"
|
||||||
{
|
{
|
||||||
"alloc": {
|
"alloc": {
|
||||||
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
|
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
|
||||||
"balance": "0x501bd00"
|
"balance": "0x501bd00"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"stateRoot": "0xe05f81f8244a76503ceec6f88abfcd03047a612a1001217f37d30984536597a5",
|
||||||
|
"txRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
||||||
|
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
||||||
|
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
|
||||||
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
|
"receipts": [],
|
||||||
|
"rejected": [
|
||||||
|
{
|
||||||
|
"index": 0,
|
||||||
|
"error": "insufficient funds for gas * price + value: address 0xa94f5374Fce5edBC8E2a8697C15331677e6EbF0B have 84000000 want 84000032"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"currentDifficulty": "0x20000",
|
||||||
|
"gasUsed": "0x0",
|
||||||
|
"currentBaseFee": "0x20"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"result": {
|
|
||||||
"stateRoot": "0xe05f81f8244a76503ceec6f88abfcd03047a612a1001217f37d30984536597a5",
|
|
||||||
"txRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
|
||||||
"receiptRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
|
||||||
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
|
|
||||||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
||||||
"receipts": [],
|
|
||||||
"rejected": [
|
|
||||||
{
|
|
||||||
"index": 0,
|
|
||||||
"error": "insufficient funds for gas * price + value: address 0xa94f5374Fce5edBC8E2a8697C15331677e6EbF0B have 84000000 want 84000032"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
24
cmd/evm/testdata/14/readme.md
vendored
24
cmd/evm/testdata/14/readme.md
vendored
@ -5,36 +5,40 @@ This test shows how the `evm t8n` can be used to calculate the (ethash) difficul
|
|||||||
Calculating it (with an empty set of txs) using `London` rules (and no provided unclehash for the parent block):
|
Calculating it (with an empty set of txs) using `London` rules (and no provided unclehash for the parent block):
|
||||||
```
|
```
|
||||||
[user@work evm]$ ./evm t8n --input.alloc=./testdata/14/alloc.json --input.txs=./testdata/14/txs.json --input.env=./testdata/14/env.json --output.result=stdout --state.fork=London
|
[user@work evm]$ ./evm t8n --input.alloc=./testdata/14/alloc.json --input.txs=./testdata/14/txs.json --input.env=./testdata/14/env.json --output.result=stdout --state.fork=London
|
||||||
INFO [08-30|20:43:09.352] Trie dumping started root=6f0588..7f4bdc
|
INFO [03-09|10:43:57.070] Trie dumping started root=6f0588..7f4bdc
|
||||||
INFO [08-30|20:43:09.352] Trie dumping complete accounts=2 elapsed="82.533µs"
|
INFO [03-09|10:43:57.070] Trie dumping complete accounts=2 elapsed="214.663µs"
|
||||||
INFO [08-30|20:43:09.352] Wrote file file=alloc.json
|
INFO [03-09|10:43:57.071] Wrote file file=alloc.json
|
||||||
{
|
{
|
||||||
"result": {
|
"result": {
|
||||||
"stateRoot": "0x6f058887ca01549716789c380ede95aecc510e6d1fdc4dbf67d053c7c07f4bdc",
|
"stateRoot": "0x6f058887ca01549716789c380ede95aecc510e6d1fdc4dbf67d053c7c07f4bdc",
|
||||||
"txRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
"txRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
||||||
"receiptRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
||||||
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
|
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
|
||||||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
"receipts": [],
|
"receipts": [],
|
||||||
"currentDifficulty": "0x2000020000000"
|
"currentDifficulty": "0x2000020000000",
|
||||||
|
"gasUsed": "0x0",
|
||||||
|
"currentBaseFee": "0x500"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
Same thing, but this time providing a non-empty (and non-`emptyKeccak`) unclehash, which leads to a slightly different result:
|
Same thing, but this time providing a non-empty (and non-`emptyKeccak`) unclehash, which leads to a slightly different result:
|
||||||
```
|
```
|
||||||
[user@work evm]$ ./evm t8n --input.alloc=./testdata/14/alloc.json --input.txs=./testdata/14/txs.json --input.env=./testdata/14/env.uncles.json --output.result=stdout --state.fork=London
|
[user@work evm]$ ./evm t8n --input.alloc=./testdata/14/alloc.json --input.txs=./testdata/14/txs.json --input.env=./testdata/14/env.uncles.json --output.result=stdout --state.fork=London
|
||||||
INFO [08-30|20:44:33.102] Trie dumping started root=6f0588..7f4bdc
|
INFO [03-09|10:44:20.511] Trie dumping started root=6f0588..7f4bdc
|
||||||
INFO [08-30|20:44:33.102] Trie dumping complete accounts=2 elapsed="72.91µs"
|
INFO [03-09|10:44:20.511] Trie dumping complete accounts=2 elapsed="184.319µs"
|
||||||
INFO [08-30|20:44:33.102] Wrote file file=alloc.json
|
INFO [03-09|10:44:20.512] Wrote file file=alloc.json
|
||||||
{
|
{
|
||||||
"result": {
|
"result": {
|
||||||
"stateRoot": "0x6f058887ca01549716789c380ede95aecc510e6d1fdc4dbf67d053c7c07f4bdc",
|
"stateRoot": "0x6f058887ca01549716789c380ede95aecc510e6d1fdc4dbf67d053c7c07f4bdc",
|
||||||
"txRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
"txRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
||||||
"receiptRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
||||||
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
|
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
|
||||||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
"receipts": [],
|
"receipts": [],
|
||||||
"currentDifficulty": "0x1ff8020000000"
|
"currentDifficulty": "0x1ff8020000000",
|
||||||
|
"gasUsed": "0x0",
|
||||||
|
"currentBaseFee": "0x500"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
16
cmd/evm/testdata/19/readme.md
vendored
16
cmd/evm/testdata/19/readme.md
vendored
@ -6,4 +6,20 @@ this time on `GrayGlacier` (Eip 5133).
|
|||||||
Calculating it (with an empty set of txs) using `GrayGlacier` rules (and no provided unclehash for the parent block):
|
Calculating it (with an empty set of txs) using `GrayGlacier` rules (and no provided unclehash for the parent block):
|
||||||
```
|
```
|
||||||
[user@work evm]$ ./evm t8n --input.alloc=./testdata/19/alloc.json --input.txs=./testdata/19/txs.json --input.env=./testdata/19/env.json --output.result=stdout --state.fork=GrayGlacier
|
[user@work evm]$ ./evm t8n --input.alloc=./testdata/19/alloc.json --input.txs=./testdata/19/txs.json --input.env=./testdata/19/env.json --output.result=stdout --state.fork=GrayGlacier
|
||||||
|
INFO [03-09|10:45:26.777] Trie dumping started root=6f0588..7f4bdc
|
||||||
|
INFO [03-09|10:45:26.777] Trie dumping complete accounts=2 elapsed="176.471µs"
|
||||||
|
INFO [03-09|10:45:26.777] Wrote file file=alloc.json
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"stateRoot": "0x6f058887ca01549716789c380ede95aecc510e6d1fdc4dbf67d053c7c07f4bdc",
|
||||||
|
"txRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
||||||
|
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
||||||
|
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
|
||||||
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
|
"receipts": [],
|
||||||
|
"currentDifficulty": "0x2000000004000",
|
||||||
|
"gasUsed": "0x0",
|
||||||
|
"currentBaseFee": "0x500"
|
||||||
|
}
|
||||||
|
}
|
||||||
```
|
```
|
370
cmd/evm/testdata/7/readme.md
vendored
370
cmd/evm/testdata/7/readme.md
vendored
@ -3,5 +3,373 @@ DAO-transition works
|
|||||||
|
|
||||||
Example:
|
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
|
./evm t8n --input.alloc=./testdata/7/alloc.json --input.txs=./testdata/7/txs.json --input.env=./testdata/7/env.json --output.alloc=stdout --state.fork=HomesteadToDaoAt5
|
||||||
|
INFO [03-09|10:47:37.255] Trie dumping started root=157847..2891b7
|
||||||
|
INFO [03-09|10:47:37.256] Trie dumping complete accounts=120 elapsed="715.635µs"
|
||||||
|
INFO [03-09|10:47:37.256] Wrote file file=result.json
|
||||||
|
{
|
||||||
|
"alloc": {
|
||||||
|
"0x005f5cee7a43331d5a3d3eec71305925a62f34b6": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x0101f3be8ebb4bbd39a2e3b9a3639d4259832fd9": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x057b56736d32b86616a10f619859c6cd6f59092a": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x06706dd3f2c9abf0a21ddcc6941d9b86f0596936": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x0737a6b837f97f46ebade41b9bc3e1c509c85c53": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x07f5c1e1bc2c93e0402f23341973a0e043f7bf8a": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x0e0da70933f4c7849fc0d203f5d1d43b9ae4532d": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x0ff30d6de14a8224aa97b78aea5388d1c51c1f00": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x12e626b0eebfe86a56d633b9864e389b45dcb260": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x1591fc0f688c81fbeb17f5426a162a7024d430c2": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x17802f43a0137c506ba92291391a8a8f207f487d": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x1975bd06d486162d5dc297798dfc41edd5d160a7": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x1ca6abd14d30affe533b24d7a21bff4c2d5e1f3b": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x1cba23d343a983e9b5cfd19496b9a9701ada385f": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x200450f06520bdd6c527622a273333384d870efb": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x21c7fdb9ed8d291d79ffd82eb2c4356ec0d81241": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x23b75c2f6791eef49c69684db4c6c1f93bf49a50": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x24c4d950dfd4dd1902bbed3508144a54542bba94": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x253488078a4edf4d6f42f113d1e62836a942cf1a": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x27b137a85656544b1ccb5a0f2e561a5703c6a68f": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x2a5ed960395e2a49b1c758cef4aa15213cfd874c": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x2b3455ec7fedf16e646268bf88846bd7a2319bb2": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x2c19c7f9ae8b751e37aeb2d93a699722395ae18f": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x304a554a310c7e546dfe434669c62820b7d83490": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x319f70bab6845585f412ec7724b744fec6095c85": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x35a051a0010aba705c9008d7a7eff6fb88f6ea7b": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x3ba4d81db016dc2890c81f3acec2454bff5aada5": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x3c02a7bc0391e86d91b7d144e61c2c01a25a79c5": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x40b803a9abce16f50f36a77ba41180eb90023925": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x440c59b325d2997a134c2c7c60a8c61611212bad": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x4486a3d68fac6967006d7a517b889fd3f98c102b": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x4613f3bca5c44ea06337a9e439fbc6d42e501d0a": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x47e7aa56d6bdf3f36be34619660de61275420af8": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x4863226780fe7c0356454236d3b1c8792785748d": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x492ea3bb0f3315521c31f273e565b868fc090f17": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x4cb31628079fb14e4bc3cd5e30c2f7489b00960c": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x4deb0033bb26bc534b197e61d19e0733e5679784": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x4fa802324e929786dbda3b8820dc7834e9134a2a": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x4fd6ace747f06ece9c49699c7cabc62d02211f75": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x51e0ddd9998364a2eb38588679f0d2c42653e4a6": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x52c5317c848ba20c7504cb2c8052abd1fde29d03": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x542a9515200d14b68e934e9830d91645a980dd7a": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x5524c55fb03cf21f549444ccbecb664d0acad706": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x579a80d909f346fbfb1189493f521d7f48d52238": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x58b95c9a9d5d26825e70a82b6adb139d3fd829eb": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x5c6e67ccd5849c0d29219c4f95f1a7a93b3f5dc5": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x5c8536898fbb74fc7445814902fd08422eac56d0": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x5d2b2e6fcbe3b11d26b525e085ff818dae332479": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x5dc28b15dffed94048d73806ce4b7a4612a1d48f": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x5f9f3392e9f62f63b8eac0beb55541fc8627f42c": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x6131c42fa982e56929107413a9d526fd99405560": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x6231b6d0d5e77fe001c2a460bd9584fee60d409b": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x627a0a960c079c21c34f7612d5d230e01b4ad4c7": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x63ed5a272de2f6d968408b4acb9024f4cc208ebf": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x6966ab0d485353095148a2155858910e0965b6f9": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x6b0c4d41ba9ab8d8cfb5d379c69a612f2ced8ecb": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x6d87578288b6cb5549d5076a207456a1f6a63dc0": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x6f6704e5a10332af6672e50b3d9754dc460dfa4d": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x7602b46df5390e432ef1c307d4f2c9ff6d65cc97": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x779543a0491a837ca36ce8c635d6154e3c4911a6": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x77ca7b50b6cd7e2f3fa008e24ab793fd56cb15f6": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x782495b7b3355efb2833d56ecb34dc22ad7dfcc4": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x807640a13483f8ac783c557fcdf27be11ea4ac7a": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x8163e7fb499e90f8544ea62bbf80d21cd26d9efd": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x84ef4b2357079cd7a7c69fd7a37cd0609a679106": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x86af3e9626fce1957c82e88cbf04ddf3a2ed7915": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x8a8eafb1cf62bfbeb1741769dae1a9dd47996192": {
|
||||||
|
"balance": "0xfeedbead"
|
||||||
|
},
|
||||||
|
"0x8d9edb3054ce5c5774a420ac37ebae0ac02343c6": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x914d1b8b43e92723e64fd0a06f5bdb8dd9b10c79": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x97f43a37f595ab5dd318fb46e7a155eae057317a": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x9aa008f65de0b923a2a4f02012ad034a5e2e2192": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x9c15b54878ba618f494b38f0ae7443db6af648ba": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x9c50426be05db97f5d64fc54bf89eff947f0a321": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x9da397b9e80755301a3b32173283a91c0ef6c87e": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x9ea779f907f0b315b364b0cfc39a0fde5b02a416": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x9f27daea7aca0aa0446220b98d028715e3bc803d": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0x9fcd2deaff372a39cc679d5c5e4de7bafb0b1339": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xa2f1ccba9395d7fcb155bba8bc92db9bafaeade7": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xa3acf3a1e16b1d7c315e23510fdd7847b48234f6": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xa5dc5acd6a7968a4554d89d65e59b7fd3bff0f90": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xa82f360a8d3455c5c41366975bde739c37bfeb8a": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
|
||||||
|
"balance": "0x5ffd4878be161d74",
|
||||||
|
"nonce": "0xac"
|
||||||
|
},
|
||||||
|
"0xac1ecab32727358dba8962a0f3b261731aad9723": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xaccc230e8a6e5be9160b8cdf2864dd2a001c28b6": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xacd87e28b0c9d1254e868b81cba4cc20d9a32225": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xadf80daec7ba8dcf15392f1ac611fff65d94f880": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xaeeb8ff27288bdabc0fa5ebb731b6f409507516c": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xb136707642a4ea12fb4bae820f03d2562ebff487": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xb2c6f0dfbb716ac562e2d85d6cb2f8d5ee87603e": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xb3fb0e5aba0e20e5c49d252dfd30e102b171a425": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xb52042c8ca3f8aa246fa79c3feaa3d959347c0ab": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xb9637156d330c0d605a791f1c31ba5890582fe1c": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xbb9bc244d798123fde783fcc1c72d3bb8c189413": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xbc07118b9ac290e4622f5e77a0853539789effbe": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xbcf899e6c7d9d5a215ab1e3444c86806fa854c76": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xbe8539bfe837b67d1282b2b1d61c3f723966f049": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xbf4ed7b27f1d666546e30d74d50d173d20bca754": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xc4bbd073882dd2add2424cf47d35213405b01324": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xc94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xca544e5c4687d109611d0f8f928b53a25af72448": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xcbb9d3703e651b0d496cdefb8b92c25aeb2171f7": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xcc34673c6c40e791051898567a1222daf90be287": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xceaeb481747ca6c540a000c1f3641f8cef161fa7": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xd131637d5275fd1a68a3200f4ad25c71a2a9522e": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xd164b088bd9108b60d0ca3751da4bceb207b0782": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xd1ac8b1ef1b69ff51d1d401a476e7e612414f091": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xd343b217de44030afaa275f54d31a9317c7f441e": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xd4fe7bc31cedb7bfb8a345f31e668033056b2728": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xd9aef3a1e38a39c16b31d1ace71bca8ef58d315b": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xda2fef9e4a3230988ff17df2165440f37e8b1708": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xdbe9b615a3ae8709af8b93336ce9b477e4ac0940": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xe308bd1ac5fda103967359b2712dd89deffb7973": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xe4ae1efdfc53b73893af49113d8694a057b9c0d1": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xec8e57756626fdc07c63ad2eafbd28d08e7b0ca5": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xecd135fa4f61a655311e86238c92adcd779555d2": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xf0b1aa0eb660754448a7937c022e30aa692fe0c5": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xf1385fb24aad0cd7432824085e42aff90886fef5": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xf14c14075d6c4ed84b86798af0956deef67365b5": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xf4c64518ea10f995918a454158c6b61407ea345c": {
|
||||||
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xfe24cdd8648121a43a7c86d289be4dd2951ed49f": {
|
||||||
|
"balance": "0x0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
```
|
```
|
38
cmd/evm/testdata/8/readme.md
vendored
38
cmd/evm/testdata/8/readme.md
vendored
@ -23,41 +23,37 @@ There are three transactions, each invokes the contract above.
|
|||||||
|
|
||||||
Running it yields:
|
Running it yields:
|
||||||
```
|
```
|
||||||
dir=./testdata/8 && ./evm t8n --state.fork=Berlin --input.alloc=$dir/alloc.json --input.txs=$dir/txs.json --input.env=$dir/env.json --trace && cat trace-* | grep SLOAD
|
dir=./testdata/8 && ./evm t8n --state.fork=Berlin --input.alloc=$dir/alloc.json --input.txs=$dir/txs.json --input.env=$dir/env.json --trace 2>/dev/null && cat trace-* | grep SLOAD
|
||||||
{"pc":1,"op":84,"gas":"0x484be","gasCost":"0x834","memory":"0x","memSize":0,"stack":["0x0"],"returnStack":[],"returnData":"0x","depth":1,"refund":0,"opName":"SLOAD","error":""}
|
{"pc":1,"op":84,"gas":"0x484be","gasCost":"0x834","memSize":0,"stack":["0x0"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||||
{"pc":4,"op":84,"gas":"0x47c86","gasCost":"0x834","memory":"0x","memSize":0,"stack":["0x3"],"returnStack":[],"returnData":"0x","depth":1,"refund":0,"opName":"SLOAD","error":""}
|
{"pc":4,"op":84,"gas":"0x47c86","gasCost":"0x834","memSize":0,"stack":["0x3"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||||
{"pc":1,"op":84,"gas":"0x49cf6","gasCost":"0x834","memory":"0x","memSize":0,"stack":["0x0"],"returnStack":[],"returnData":"0x","depth":1,"refund":0,"opName":"SLOAD","error":""}
|
{"pc":1,"op":84,"gas":"0x49cf6","gasCost":"0x834","memSize":0,"stack":["0x0"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||||
{"pc":4,"op":84,"gas":"0x494be","gasCost":"0x834","memory":"0x","memSize":0,"stack":["0x3"],"returnStack":[],"returnData":"0x","depth":1,"refund":0,"opName":"SLOAD","error":""}
|
{"pc":4,"op":84,"gas":"0x494be","gasCost":"0x834","memSize":0,"stack":["0x3"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||||
{"pc":1,"op":84,"gas":"0x484be","gasCost":"0x64","memory":"0x","memSize":0,"stack":["0x0"],"returnStack":[],"returnData":"0x","depth":1,"refund":0,"opName":"SLOAD","error":""}
|
{"pc":1,"op":84,"gas":"0x484be","gasCost":"0x64","memSize":0,"stack":["0x0"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||||
{"pc":4,"op":84,"gas":"0x48456","gasCost":"0x64","memory":"0x","memSize":0,"stack":["0x3"],"returnStack":[],"returnData":"0x","depth":1,"refund":0,"opName":"SLOAD","error":""}
|
{"pc":4,"op":84,"gas":"0x48456","gasCost":"0x64","memSize":0,"stack":["0x3"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Simlarly, we can provide the input transactions via `stdin` instead of as file:
|
Simlarly, we can provide the input transactions via `stdin` instead of as file:
|
||||||
|
|
||||||
```
|
```
|
||||||
dir=./testdata/8 \
|
$ dir=./testdata/8 \
|
||||||
&& cat $dir/txs.json | jq "{txs: .}" \
|
&& cat $dir/txs.json | jq "{txs: .}" \
|
||||||
| ./evm t8n --state.fork=Berlin \
|
| ./evm t8n --state.fork=Berlin \
|
||||||
--input.alloc=$dir/alloc.json \
|
--input.alloc=$dir/alloc.json \
|
||||||
--input.txs=stdin \
|
--input.txs=stdin \
|
||||||
--input.env=$dir/env.json \
|
--input.env=$dir/env.json \
|
||||||
--trace \
|
--trace \
|
||||||
|
2>/dev/null \
|
||||||
&& cat trace-* | grep SLOAD
|
&& cat trace-* | grep SLOAD
|
||||||
|
{"pc":1,"op":84,"gas":"0x484be","gasCost":"0x834","memSize":0,"stack":["0x0"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||||
{"pc":1,"op":84,"gas":"0x484be","gasCost":"0x834","memory":"0x","memSize":0,"stack":["0x0"],"returnStack":[],"returnData":"0x","depth":1,"refund":0,"opName":"SLOAD","error":""}
|
{"pc":4,"op":84,"gas":"0x47c86","gasCost":"0x834","memSize":0,"stack":["0x3"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||||
{"pc":4,"op":84,"gas":"0x47c86","gasCost":"0x834","memory":"0x","memSize":0,"stack":["0x3"],"returnStack":[],"returnData":"0x","depth":1,"refund":0,"opName":"SLOAD","error":""}
|
{"pc":1,"op":84,"gas":"0x49cf6","gasCost":"0x834","memSize":0,"stack":["0x0"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||||
{"pc":1,"op":84,"gas":"0x49cf6","gasCost":"0x834","memory":"0x","memSize":0,"stack":["0x0"],"returnStack":[],"returnData":"0x","depth":1,"refund":0,"opName":"SLOAD","error":""}
|
{"pc":4,"op":84,"gas":"0x494be","gasCost":"0x834","memSize":0,"stack":["0x3"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||||
{"pc":4,"op":84,"gas":"0x494be","gasCost":"0x834","memory":"0x","memSize":0,"stack":["0x3"],"returnStack":[],"returnData":"0x","depth":1,"refund":0,"opName":"SLOAD","error":""}
|
{"pc":1,"op":84,"gas":"0x484be","gasCost":"0x64","memSize":0,"stack":["0x0"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||||
{"pc":1,"op":84,"gas":"0x484be","gasCost":"0x64","memory":"0x","memSize":0,"stack":["0x0"],"returnStack":[],"returnData":"0x","depth":1,"refund":0,"opName":"SLOAD","error":""}
|
{"pc":4,"op":84,"gas":"0x48456","gasCost":"0x64","memSize":0,"stack":["0x3"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||||
{"pc":4,"op":84,"gas":"0x48456","gasCost":"0x64","memory":"0x","memSize":0,"stack":["0x3"],"returnStack":[],"returnData":"0x","depth":1,"refund":0,"opName":"SLOAD","error":""}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
If we try to execute it on older rules:
|
If we try to execute it on older rules:
|
||||||
```
|
```
|
||||||
dir=./testdata/8 && ./evm t8n --state.fork=Istanbul --input.alloc=$dir/alloc.json --input.txs=$dir/txs.json --input.env=$dir/env.json
|
$ dir=./testdata/8 && ./evm t8n --state.fork=Istanbul --input.alloc=$dir/alloc.json --input.txs=$dir/txs.json --input.env=$dir/env.json
|
||||||
INFO [01-21|23:21:51.265] rejected tx index=0 hash=d2818d..6ab3da error="tx type not supported"
|
ERROR(10): failed signing transactions: ERROR(10): tx 0: failed to sign tx: transaction type not supported
|
||||||
INFO [01-21|23:21:51.265] rejected tx index=1 hash=26ea00..81c01b from=0xa94f5374Fce5edBC8E2a8697C15331677e6EbF0B error="nonce too high: address 0xa94f5374Fce5edBC8E2a8697C15331677e6EbF0B, tx: 1 state: 0"
|
|
||||||
INFO [01-21|23:21:51.265] rejected tx index=2 hash=698d01..369cee error="tx type not supported"
|
|
||||||
```
|
```
|
||||||
Number `1` and `3` are not applicable, and therefore number `2` has wrong nonce.
|
|
58
cmd/evm/testdata/9/readme.md
vendored
58
cmd/evm/testdata/9/readme.md
vendored
@ -22,35 +22,37 @@ There are two transactions, each invokes the contract above.
|
|||||||
|
|
||||||
Running it yields:
|
Running it yields:
|
||||||
```
|
```
|
||||||
$ dir=./testdata/9 && ./evm t8n --state.fork=London --input.alloc=$dir/alloc.json --input.txs=$dir/txs.json --input.env=$dir/env.json --trace && cat trace-* | grep SLOAD
|
$ dir=./testdata/9 && ./evm t8n --state.fork=London --input.alloc=$dir/alloc.json --input.txs=$dir/txs.json --input.env=$dir/env.json --trace 2>/dev/null && cat trace-* | grep SLOAD
|
||||||
{"pc":2,"op":84,"gas":"0x48c28","gasCost":"0x834","memory":"0x","memSize":0,"stack":["0x0","0x1"],"returnStack":null,"returnD
|
{"pc":1,"op":84,"gas":"0x484be","gasCost":"0x834","memSize":0,"stack":["0x0"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||||
ata":"0x","depth":1,"refund":0,"opName":"SLOAD","error":""}
|
{"pc":4,"op":84,"gas":"0x47c86","gasCost":"0x834","memSize":0,"stack":["0x3"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||||
{"pc":3,"op":84,"gas":"0x483f4","gasCost":"0x64","memory":"0x","memSize":0,"stack":["0x0","0x0"],"returnStack":null,"returnDa
|
{"pc":2,"op":84,"gas":"0x48c28","gasCost":"0x834","memSize":0,"stack":["0x0","0x1"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||||
ta":"0x","depth":1,"refund":0,"opName":"SLOAD","error":""}
|
{"pc":3,"op":84,"gas":"0x483f4","gasCost":"0x64","memSize":0,"stack":["0x0","0x0"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||||
{"pc":2,"op":84,"gas":"0x49cf4","gasCost":"0x834","memory":"0x","memSize":0,"stack":["0x0","0x1"],"returnStack":null,"returnD
|
{"pc":1,"op":84,"gas":"0x49cf6","gasCost":"0x834","memSize":0,"stack":["0x0"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||||
ata":"0x","depth":1,"refund":0,"opName":"SLOAD","error":""}
|
{"pc":4,"op":84,"gas":"0x494be","gasCost":"0x834","memSize":0,"stack":["0x3"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||||
{"pc":3,"op":84,"gas":"0x494c0","gasCost":"0x834","memory":"0x","memSize":0,"stack":["0x0","0x0"],"returnStack":null,"returnD
|
{"pc":2,"op":84,"gas":"0x49cf4","gasCost":"0x834","memSize":0,"stack":["0x0","0x1"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||||
ata":"0x","depth":1,"refund":0,"opName":"SLOAD","error":""}
|
{"pc":3,"op":84,"gas":"0x494c0","gasCost":"0x834","memSize":0,"stack":["0x0","0x0"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||||
|
{"pc":1,"op":84,"gas":"0x484be","gasCost":"0x64","memSize":0,"stack":["0x0"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||||
|
{"pc":4,"op":84,"gas":"0x48456","gasCost":"0x64","memSize":0,"stack":["0x3"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||||
```
|
```
|
||||||
|
|
||||||
We can also get the post-alloc:
|
We can also get the post-alloc:
|
||||||
```
|
```
|
||||||
$ dir=./testdata/9 && ./evm t8n --state.fork=London --input.alloc=$dir/alloc.json --input.txs=$dir/txs.json --input.env=$dir/env.json --output.alloc=stdout
|
$ dir=./testdata/9 && ./evm t8n --state.fork=London --input.alloc=$dir/alloc.json --input.txs=$dir/txs.json --input.env=$dir/env.json --output.alloc=stdout 2>/dev/null
|
||||||
{
|
{
|
||||||
"alloc": {
|
"alloc": {
|
||||||
"0x000000000000000000000000000000000000aaaa": {
|
"0x000000000000000000000000000000000000aaaa": {
|
||||||
"code": "0x58585454",
|
"code": "0x58585454",
|
||||||
"balance": "0x3",
|
"balance": "0x3",
|
||||||
"nonce": "0x1"
|
"nonce": "0x1"
|
||||||
},
|
},
|
||||||
"0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": {
|
"0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": {
|
||||||
"balance": "0x5bb10ddef6e0"
|
"balance": "0x5bb10ddef6e0"
|
||||||
},
|
},
|
||||||
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
|
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
|
||||||
"balance": "0xff745ee8832120",
|
"balance": "0xff745ee8832120",
|
||||||
"nonce": "0x2"
|
"nonce": "0x2"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -65,10 +67,12 @@ by feeding it presigned transactions, located in `txs_signed.json`.
|
|||||||
|
|
||||||
```
|
```
|
||||||
dir=./testdata/9 && ./evm t8n --state.fork=Berlin --input.alloc=$dir/alloc.json --input.txs=$dir/txs_signed.json --input.env=$dir/env.json
|
dir=./testdata/9 && ./evm t8n --state.fork=Berlin --input.alloc=$dir/alloc.json --input.txs=$dir/txs_signed.json --input.env=$dir/env.json
|
||||||
INFO [05-07|12:28:42.072] rejected tx index=0 hash=b4821e..536819 error="transaction type not supported"
|
WARN [03-09|11:06:22.065] rejected tx index=0 hash=334e09..f8dce5 error="transaction type not supported"
|
||||||
INFO [05-07|12:28:42.072] rejected tx index=1 hash=a9c6c6..fa4036 from=0xa94f5374Fce5edBC8E2a8697C15331677e6EbF0B error="nonce too high: address 0xa94f5374Fce5edBC8E2a8697C15331677e6EbF0B, tx: 1 state: 0"
|
INFO [03-09|11:06:22.066] rejected tx index=1 hash=a9c6c6..fa4036 from=0xa94f5374Fce5edBC8E2a8697C15331677e6EbF0B error="nonce too high: address 0xa94f5374Fce5edBC8E2a8697C15331677e6EbF0B, tx: 1 state: 0"
|
||||||
INFO [05-07|12:28:42.073] Wrote file file=alloc.json
|
INFO [03-09|11:06:22.066] Trie dumping started root=6eebe9..a0fda5
|
||||||
INFO [05-07|12:28:42.073] Wrote file file=result.json
|
INFO [03-09|11:06:22.066] Trie dumping complete accounts=2 elapsed="55.844µs"
|
||||||
|
INFO [03-09|11:06:22.066] Wrote file file=alloc.json
|
||||||
|
INFO [03-09|11:06:22.066] Wrote file file=result.json
|
||||||
```
|
```
|
||||||
|
|
||||||
Number `0` is not applicable, and therefore number `1` has wrong nonce, and both are rejected.
|
Number `0` is not applicable, and therefore number `1` has wrong nonce, and both are rejected.
|
||||||
|
37
cmd/evm/testdata/9/txs_signed.json
vendored
Normal file
37
cmd/evm/testdata/9/txs_signed.json
vendored
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"gas": "0x4ef00",
|
||||||
|
"maxFeePerGas": "0x2",
|
||||||
|
"maxPriorityFeePerGas": "0x12A05F200",
|
||||||
|
"chainId": "0x1",
|
||||||
|
"input": "0x",
|
||||||
|
"nonce": "0x0",
|
||||||
|
"to": "0x000000000000000000000000000000000000aaaa",
|
||||||
|
"value": "0x0",
|
||||||
|
"type" : "0x2",
|
||||||
|
"accessList": [
|
||||||
|
{"address": "0x000000000000000000000000000000000000aaaa",
|
||||||
|
"storageKeys": [
|
||||||
|
"0x0000000000000000000000000000000000000000000000000000000000000000"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"v": "0x1",
|
||||||
|
"r": "0xd77c8ff989789b5d9d99254cbae2e2996dc7e6215cba4d55254c14e6d6b9f314",
|
||||||
|
"s": "0x5cc021481e7e6bb444bbb87ab32071e8fd0a8d1e125c7bb352d2879bd7ff5c0a",
|
||||||
|
"secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gas": "0x4ef00",
|
||||||
|
"gasPrice": "0x12A05F200",
|
||||||
|
"chainId": "0x1",
|
||||||
|
"input": "0x",
|
||||||
|
"nonce": "0x1",
|
||||||
|
"to": "0x000000000000000000000000000000000000aaaa",
|
||||||
|
"value": "0x0",
|
||||||
|
"v": "0x25",
|
||||||
|
"r": "0xbee5ec9f6650020266bf3455a852eece2b073a2fa918c4d1836a1af69c2aa50c",
|
||||||
|
"s": "0x556c897a58dbc007a6b09814e1fba7502adb76effd2146da4365816926f387ce",
|
||||||
|
"secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8"
|
||||||
|
}
|
||||||
|
]
|
Loading…
Reference in New Issue
Block a user