Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EIP4758 test cases #1024

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions GeneralStateTests/stEIP4758/sendallBasic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"sendallBasic" : {
"_info" : {
"comment" : "",
"filling-rpc-server" : "evm version 1.10.16-unstable-259df372-20220408",
"filling-tool-version" : "retesteth-0.2.1-difficulty+commit.5d84e4d6.Linux.g++",
"generatedTestHash" : "65dc1c297e88a2434562f7fb15db3ae3433beb2f186968d289a7270a3c4e0884",
"lllcversion" : "Version: 0.5.14-develop.2022.4.7+commit.401d5358.Linux.g++",
"source" : "src/GeneralStateTestsFiller/stEIP4758/sendallBasicFiller.json",
"sourceHash" : "b76ade103b0c44a19133bbd3069e654ece6077ef5dd2e874029a935085333631"
},
"env" : {
"currentBaseFee" : "0x0a",
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "0x020000",
"currentGasLimit" : "0x0f4240",
"currentNumber" : "0x01",
"currentTimestamp" : "0x03e8",
"previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"post" : {
"EIP4758" : [
{
"hash" : "0x57658f4bd729afb7ebc9c3f97c7eadd295428e32bf31b7553a05216bd25cf65b",
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"txbytes" : "0xf860800a83061a8094bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb80801ba0a7a7bdbe9a66d07ecd9439612352c4364c77acdb80a5343b7d279562c500104fa021aa2eff8617f16642b2e11264ce92f971afb78fc1bbfdd20922fbea7a943c1b"
}
]
},
"pre" : {
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "0x0de0b6b3a7640000",
"code" : "0x",
"nonce" : "0x00",
"storage" : {
}
},
"0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" : {
"balance" : "0x0de0b6b3a7640000",
"code" : "0x73aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaff",
"nonce" : "0x00",
"storage" : {
}
}
},
"transaction" : {
"data" : [
"0x"
],
"gasLimit" : [
"0x061a80"
],
"gasPrice" : "0x0a",
"nonce" : "0x00",
"secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"to" : "0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"value" : [
"0x00"
]
}
}
}
68 changes: 68 additions & 0 deletions GeneralStateTests/stEIP4758/sendallToSelf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"sendallToSelf" : {
"_info" : {
"comment" : "",
"filling-rpc-server" : "evm version 1.10.16-unstable-259df372-20220408",
"filling-tool-version" : "retesteth-0.2.1-difficulty+commit.5d84e4d6.Linux.g++",
"generatedTestHash" : "93a734ae0cfc093f441b54d63ea8c9aeaec81e98cac6f2ffc30baf4b0784a43e",
"lllcversion" : "Version: 0.5.14-develop.2022.4.7+commit.401d5358.Linux.g++",
"source" : "src/GeneralStateTestsFiller/stEIP4758/sendallToSelfFiller.json",
"sourceHash" : "c40e58dbf7b9f7574622425e1ebb909e7560d12eb62353d8699358eb34731d3e"
},
"env" : {
"currentBaseFee" : "0x0a",
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "0x020000",
"currentGasLimit" : "0x0f4240",
"currentNumber" : "0x01",
"currentTimestamp" : "0x03e8",
"previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"post" : {
"EIP4758" : [
{
"hash" : "0xae6526981d45303633e7d335e8a6f2c7d8aa53b2958ad32acbb2f22c27bd530d",
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"txbytes" : "0xf860800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d8780801ba072ed817487b84ba367d15d2f039b5fc5f087d0a8882fbdf73e8cb49357e1ce30a0403d800545b8fc544f92ce8124e2255f8c3c6af93f28243a120585d4c4c6a2a3"
}
]
},
"pre" : {
"0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
"balance" : "0x0de0b6b3a7640000",
"code" : "0x73095e7baea6a6c7c4c2dfeb977efac326af552d87ff",
"nonce" : "0x00",
"storage" : {
"0x00" : "0x01"
}
},
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "0x0de0b6b3a7640000",
"code" : "0x",
"nonce" : "0x00",
"storage" : {
}
}
},
"transaction" : {
"data" : [
"0x"
],
"gasLimit" : [
"0x061a80"
],
"gasPrice" : "0x0a",
"nonce" : "0x00",
"secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"to" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87",
"value" : [
"0x00"
]
}
}
}
75 changes: 75 additions & 0 deletions src/GeneralStateTestsFiller/stEIP4758/sendallBasicFiller.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"sendallBasic" : {
"env" : {
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "0x20000",
"currentGasLimit" : "1000000",
"currentNumber" : "1",
"currentTimestamp" : "1000",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
"currentBaseFee": "10"
},
"expect" : [
{
"indexes" : {
"data" : -1,
"gas" : -1,
"value" : -1
},
"network" : [">=EIP4758"],
"result" : {
"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" : {
"balance" : "0",
"code" : "0x73aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaff",
"nonce" : "0",
"storage" : {
}
},
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" : {
"balance" : "1000000000000000000",
"storage" : {
}
},
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"code" : "0x",
"nonce" : "1",
"storage" : {
}
}
}
}
],
"pre" : {
"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" : {
"balance" : "1000000000000000000",
"// code" : "PUSH20 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa SELFDESTRUCT",
"code" : ":raw 0x73aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaff",
"nonce" : "0",
"storage" : {
}
},
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "1000000000000000000",
"code" : "0x",
"nonce" : "0",
"storage" : {
}
}
},
"transaction" : {
"data" : [
""
],
"gasLimit" : [
"400000"
],
"gasPrice" : "10",
"nonce" : "0",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"to" : "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"value" : [
"0"
]
}
}
}
71 changes: 71 additions & 0 deletions src/GeneralStateTestsFiller/stEIP4758/sendallToSelfFiller.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"sendallToSelf" : {
"env" : {
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "0x20000",
"currentGasLimit" : "1000000",
"currentNumber" : "1",
"currentTimestamp" : "1000",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
"currentBaseFee": "10"
},
"expect" : [
{
"indexes" : {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indexes can be removed as it is -1 by default

"data" : -1,
"gas" : -1,
"value" : -1
},
"network" : [">=EIP4758"],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to convert to Merge+4758

"result" : {
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
"balance" : "1000000000000000000",
"code" : "0x73095e7baea6a6c7c4c2dfeb977efac326af552d87ff",
"storage" : {
"0x00": "0x01"
}
},
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"code" : "0x",
"nonce" : "1",
"storage" : {
}
}
}
}
],
"pre" : {
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
"balance" : "1000000000000000000",
"// code" : "PUSH20 095e7baea6a6c7c4c2dfeb977efac326af552d87 SELFDESTRUCT",
"code" : ":raw 0x73095e7baea6a6c7c4c2dfeb977efac326af552d87ff",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can use lllc here or yul

"nonce" : "0",
"storage" : {
"0x00": "0x01"
}
},
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "1000000000000000000",
"code" : "0x",
"nonce" : "0",
"storage" : {
}
}
},
"transaction" : {
"data" : [
""
],
"gasLimit" : [
"400000"
],
"gasPrice" : "10",
"nonce" : "0",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
"value" : [
"0"
]
}
}
}