Skip to content

Commit

Permalink
Merge pull request #756 from ethereum/htest
Browse files Browse the repository at this point in the history
Suicide test around eip2929
  • Loading branch information
winsvega authored Nov 19, 2020
2 parents bfcd07f + 726c675 commit c816f15
Show file tree
Hide file tree
Showing 2 changed files with 175 additions and 0 deletions.
96 changes: 96 additions & 0 deletions GeneralStateTests/stSpecialTest/selfdestructEIP2929.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"selfdestructEIP2929" : {
"_info" : {
"comment" : "Martin: @tkstanczak requested a state-test regarding selfdestructs in relation to EIP-2929. I made one, which tests different variants of hot/cold accounts, and even precompile beneficiaries. https://github.com/holiman/goevmlab/blob/selfdestruct_2929/examples/selfdestruct_2929/main.go#L94",
"filling-rpc-server" : "evm version 1.9.24-unstable-b63e3c37-20201029",
"filling-tool-version" : "retesteth-0.0.9-berlin+commit.7f9c4602.Linux.g++",
"lllcversion" : "Version: 0.5.14-develop.2020.6.22+commit.9189ad7a.Linux.g++",
"source" : "src/GeneralStateTestsFiller/stSpecialTest/selfdestructEIP2929Filler.json",
"sourceHash" : "309ee007573a587660801cd184bfff9900ba814789bbbc7466931dc7886e62c0"
},
"env" : {
"currentCoinbase" : "0xb94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"currentDifficulty" : "0x020000",
"currentGasLimit" : "0x26e1f476fe1e22",
"currentNumber" : "0x01",
"currentTimestamp" : "0x03e8",
"previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"post" : {
"Berlin" : [
{
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"hash" : "0x4f4318aead0fec21e384875ca97040aa5ceb9f7a1165e138b6c97ca61ba3018c",
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
}
],
"Istanbul" : [
{
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"hash" : "0x823d7cc302607792a76f1f8aac5b2514e9698816dc20abbf11261b48bd3b8d9c",
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
}
]
},
"pre" : {
"0x00000000000000000000000000000000000000aa" : {
"balance" : "0x00",
"code" : "0x",
"nonce" : "0x01",
"storage" : {
}
},
"0x00000000000000000000000000000000000000cc" : {
"balance" : "0x00",
"code" : "0x",
"nonce" : "0x01",
"storage" : {
}
},
"0x000000000000000000000000000000000000c411" : {
"balance" : "0x01",
"code" : "0x6000600060006000600060cc6000f1506000600060006000600060dd6000f1506000600060006000600060036000f15060aa6000526000600060206000600061dead5af15060aa6000526000600060206000600061dead5af15060bb6000526000600060206000600061dead5af15060bb6000526000600060206000600061dead5af15060cc6000526000600060206000600061dead5af15060cc6000526000600060206000600061dead5af15060dd6000526000600060206000600061dead5af15060dd6000526000600060206000600061dead5af15060016000526000600060206000600061dead5af15060016000526000600060206000600061dead5af15060026000526000600060206000600061dead5af15060026000526000600060206000600061dead5af15060036000526000600060206000600061dead5af1506001600155",
"nonce" : "0x01",
"storage" : {
}
},
"0x000000000000000000000000000000000000dead" : {
"balance" : "0x01",
"code" : "0x60003574ffffffffffffffffffffffffffffffffffffffffff16ff",
"nonce" : "0x01",
"storage" : {
}
},
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "0x0de0b6b3a7640000",
"code" : "0x",
"nonce" : "0x00",
"storage" : {
}
}
},
"transaction" : {
"data" : [
"0x"
],
"gasLimit" : [
"0x7a1200"
],
"gasPrice" : "0x01",
"nonce" : "0x00",
"secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"to" : "0x000000000000000000000000000000000000c411",
"value" : [
"0x00"
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"selfdestructEIP2929": {
"_info" : {
"comment" : "Martin: @tkstanczak requested a state-test regarding selfdestructs in relation to EIP-2929. I made one, which tests different variants of hot/cold accounts, and even precompile beneficiaries. https://github.com/holiman/goevmlab/blob/selfdestruct_2929/examples/selfdestruct_2929/main.go#L94"
},
"env": {
"currentCoinbase": "b94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"currentDifficulty": "0x20000",
"currentGasLimit": "0x26e1f476fe1e22",
"currentNumber": "0x1",
"currentTimestamp": "0x3e8",
"previousHash": "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : [
{
"indexes" : {
"data" : -1,
"gas" : -1,
"value" : -1
},
"network" : [">=Istanbul"],
"result" : {
"0x000000000000000000000000000000000000c411" : {
"storage" : {
"0x01" : "0x01"
}
}
}
}
],
"pre": {
"0x00000000000000000000000000000000000000aa": {
"code": "0x",
"storage": {},
"balance": "0x0",
"nonce": "0x1"
},
"0x00000000000000000000000000000000000000cc": {
"code": "0x",
"storage": {},
"balance": "0x0",
"nonce": "0x1"
},
"0x000000000000000000000000000000000000c411": {
"code": ":raw 0x6000600060006000600060cc6000f1506000600060006000600060dd6000f1506000600060006000600060036000f15060aa6000526000600060206000600061dead5af15060aa6000526000600060206000600061dead5af15060bb6000526000600060206000600061dead5af15060bb6000526000600060206000600061dead5af15060cc6000526000600060206000600061dead5af15060cc6000526000600060206000600061dead5af15060dd6000526000600060206000600061dead5af15060dd6000526000600060206000600061dead5af15060016000526000600060206000600061dead5af15060016000526000600060206000600061dead5af15060026000526000600060206000600061dead5af15060026000526000600060206000600061dead5af15060036000526000600060206000600061dead5af1506001600155",
"storage": {},
"balance": "0x1",
"nonce": "0x1"
},
"0x000000000000000000000000000000000000dead": {
"code": ":raw 0x60003574ffffffffffffffffffffffffffffffffffffffffff16ff",
"storage": {},
"balance": "0x1",
"nonce": "0x1"
},
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
"code": "0x",
"storage": {},
"balance": "0xde0b6b3a7640000",
"nonce": "0x0"
}
},
"transaction": {
"gasPrice": "0x1",
"nonce": "0x0",
"to": "0x000000000000000000000000000000000000C411",
"data": [
""
],
"gasLimit": [
"0x7a1200"
],
"value": [
"0x0"
],
"secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8"
}
}
}

0 comments on commit c816f15

Please sign in to comment.