diff --git a/GeneralStateTests/stChainId/chainId.json b/GeneralStateTests/stChainId/chainId.json new file mode 100644 index 00000000000..7d2a737858a --- /dev/null +++ b/GeneralStateTests/stChainId/chainId.json @@ -0,0 +1,64 @@ +{ + "chainId" : { + "_info" : { + "comment" : "", + "filling-rpc-server" : "besu/v1.2.4-dev-9aadbcb9/osx-x86_64/corretto-java-11", + "filling-tool-version" : "retesteth-0.0.1+commit.4382e070.Darwin.appleclang", + "lllcversion" : "Version: 0.5.12-develop.2019.9.16+commit.2d601a4f.Darwin.appleclang", + "source" : "src/GeneralStateTestsFiller/stChainId/chainIdFiller.json", + "sourceHash" : "bfb9e9bcd0567eed6b0121ff03cbc724c7942751affdf0a33a677ea0b3c7b87c" + }, + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x020000", + "currentGasLimit" : "0x02540be400", + "currentNumber" : "0x01", + "currentTimestamp" : "0x03e8", + "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "post" : { + "Istanbul" : [ + { + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + }, + "hash" : "0xbf7140c2bdddefaf68a79a2516ebb350be5f6e51e2dda7c8c81eb7a94fb7bf73", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + } + ] + }, + "pre" : { + "0x1000000000000000000000000000000000000000" : { + "balance" : "0x00", + "code" : "0x4660015500", + "nonce" : "0x00", + "storage" : { + } + }, + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x3635c9adc5dea00000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + }, + "transaction" : { + "data" : [ + "0x" + ], + "gasLimit" : [ + "0x05f5e100" + ], + "gasPrice" : "0x01", + "nonce" : "0x00", + "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "0x1000000000000000000000000000000000000000", + "value" : [ + "0x00" + ] + } + } +} \ No newline at end of file diff --git a/GeneralStateTests/stChainId/chainIdGasCost.json b/GeneralStateTests/stChainId/chainIdGasCost.json new file mode 100644 index 00000000000..fc548b58311 --- /dev/null +++ b/GeneralStateTests/stChainId/chainIdGasCost.json @@ -0,0 +1,64 @@ +{ + "chainIdGasCost" : { + "_info" : { + "comment" : "", + "filling-rpc-server" : "besu/v1.2.4-dev-9aadbcb9/osx-x86_64/corretto-java-11", + "filling-tool-version" : "retesteth-0.0.1+commit.4382e070.Darwin.appleclang", + "lllcversion" : "Version: 0.5.12-develop.2019.9.16+commit.2d601a4f.Darwin.appleclang", + "source" : "src/GeneralStateTestsFiller/stChainId/chainIdGasCostFiller.json", + "sourceHash" : "240e12afa293934d07aa02609b0e40bc3ea843970525545f05fc33ae8a40a1c1" + }, + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x020000", + "currentGasLimit" : "0x02540be400", + "currentNumber" : "0x01", + "currentTimestamp" : "0x03e8", + "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "post" : { + "Istanbul" : [ + { + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + }, + "hash" : "0x5a2faa4d31826fed9b9524014a42a56d19e9b39f4ce887e6e02941278a1df902", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + } + ] + }, + "pre" : { + "0x1000000000000000000000000000000000000000" : { + "balance" : "0x00", + "code" : "0x5a465a905090036002900360015500", + "nonce" : "0x00", + "storage" : { + } + }, + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x3635c9adc5dea00000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + }, + "transaction" : { + "data" : [ + "0x" + ], + "gasLimit" : [ + "0x05f5e100" + ], + "gasPrice" : "0x01", + "nonce" : "0x00", + "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "0x1000000000000000000000000000000000000000", + "value" : [ + "0x00" + ] + } + } +} \ No newline at end of file diff --git a/GeneralStateTests/stSLoadTest/sloadGasCost.json b/GeneralStateTests/stSLoadTest/sloadGasCost.json new file mode 100644 index 00000000000..f8a3d3e3a39 --- /dev/null +++ b/GeneralStateTests/stSLoadTest/sloadGasCost.json @@ -0,0 +1,141 @@ +{ + "sloadGasCost" : { + "_info" : { + "comment" : "", + "filling-rpc-server" : "besu/v1.2.4-dev-9aadbcb9/osx-x86_64/corretto-java-11", + "filling-tool-version" : "retesteth-0.0.1+commit.4382e070.Darwin.appleclang", + "lllcversion" : "Version: 0.5.12-develop.2019.9.16+commit.2d601a4f.Darwin.appleclang", + "source" : "src/GeneralStateTestsFiller/stSLoadTest/sloadGasCostFiller.json", + "sourceHash" : "478582c0b2c5977ffa9a57c3ba417179cb42f2e67404d1ecc60346edaac6110f" + }, + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x020000", + "currentGasLimit" : "0x02540be400", + "currentNumber" : "0x01", + "currentTimestamp" : "0x03e8", + "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "post" : { + "Byzantium" : [ + { + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + }, + "hash" : "0xc85ad1bf7eb936b237602f5f64995dd499e99ecbdf619ff238602357f2ca6f8d", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + } + ], + "Constantinople" : [ + { + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + }, + "hash" : "0xc85ad1bf7eb936b237602f5f64995dd499e99ecbdf619ff238602357f2ca6f8d", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + } + ], + "ConstantinopleFix" : [ + { + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + }, + "hash" : "0xc85ad1bf7eb936b237602f5f64995dd499e99ecbdf619ff238602357f2ca6f8d", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + } + ], + "EIP150" : [ + { + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + }, + "hash" : "0xc85ad1bf7eb936b237602f5f64995dd499e99ecbdf619ff238602357f2ca6f8d", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + } + ], + "EIP158" : [ + { + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + }, + "hash" : "0xc85ad1bf7eb936b237602f5f64995dd499e99ecbdf619ff238602357f2ca6f8d", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + } + ], + "Frontier" : [ + { + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + }, + "hash" : "0x118b5fad5ddd51823bca3079d1e7351dfe1ed0a01c30c5c7e4a49c499389e716", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + } + ], + "Homestead" : [ + { + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + }, + "hash" : "0x118b5fad5ddd51823bca3079d1e7351dfe1ed0a01c30c5c7e4a49c499389e716", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + } + ], + "Istanbul" : [ + { + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + }, + "hash" : "0xe9e3795e916b9ee682f9b05bcd0e6857a76b6835a4061229c3a38e936537f313", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + } + ] + }, + "pre" : { + "0x1000000000000000000000000000000000000000" : { + "balance" : "0x00", + "code" : "0x5a80545a905090036005900360015500", + "nonce" : "0x00", + "storage" : { + } + }, + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x3635c9adc5dea00000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + }, + "transaction" : { + "data" : [ + "0x" + ], + "gasLimit" : [ + "0x05f5e100" + ], + "gasPrice" : "0x01", + "nonce" : "0x00", + "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "0x1000000000000000000000000000000000000000", + "value" : [ + "0x00" + ] + } + } +} \ No newline at end of file diff --git a/GeneralStateTests/stSelfBalance/selfBalance.json b/GeneralStateTests/stSelfBalance/selfBalance.json new file mode 100644 index 00000000000..25bbb94d2f9 --- /dev/null +++ b/GeneralStateTests/stSelfBalance/selfBalance.json @@ -0,0 +1,64 @@ +{ + "selfBalance" : { + "_info" : { + "comment" : "", + "filling-rpc-server" : "besu/v1.2.4-dev-9aadbcb9/osx-x86_64/corretto-java-11", + "filling-tool-version" : "retesteth-0.0.1+commit.4382e070.Darwin.appleclang", + "lllcversion" : "Version: 0.5.12-develop.2019.9.16+commit.2d601a4f.Darwin.appleclang", + "source" : "src/GeneralStateTestsFiller/stSelfBalance/selfBalanceFiller.json", + "sourceHash" : "5c0e27200184ae2b4b3bdd7e41d07f8fea4f339bca87644310d955549b331fcc" + }, + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x020000", + "currentGasLimit" : "0x02540be400", + "currentNumber" : "0x01", + "currentTimestamp" : "0x03e8", + "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "post" : { + "Istanbul" : [ + { + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + }, + "hash" : "0x9643f658f61955b82d5ef1bd8a3e0100ea566d186dde9b2888b5e975a8f82aee", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + } + ] + }, + "pre" : { + "0x1000000000000000000000000000000000000000" : { + "balance" : "0x01f4", + "code" : "0x4760015500", + "nonce" : "0x00", + "storage" : { + } + }, + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x3635c9adc5dea00000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + }, + "transaction" : { + "data" : [ + "0x" + ], + "gasLimit" : [ + "0x05f5e100" + ], + "gasPrice" : "0x01", + "nonce" : "0x00", + "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "0x1000000000000000000000000000000000000000", + "value" : [ + "0x00" + ] + } + } +} \ No newline at end of file diff --git a/GeneralStateTests/stSelfBalance/selfBalanceEqualsBalance.json b/GeneralStateTests/stSelfBalance/selfBalanceEqualsBalance.json new file mode 100644 index 00000000000..61790bb3bb6 --- /dev/null +++ b/GeneralStateTests/stSelfBalance/selfBalanceEqualsBalance.json @@ -0,0 +1,64 @@ +{ + "selfBalanceEqualsBalance" : { + "_info" : { + "comment" : "", + "filling-rpc-server" : "besu/v1.2.4-dev-9aadbcb9/osx-x86_64/corretto-java-11", + "filling-tool-version" : "retesteth-0.0.1+commit.4382e070.Darwin.appleclang", + "lllcversion" : "Version: 0.5.12-develop.2019.9.16+commit.2d601a4f.Darwin.appleclang", + "source" : "src/GeneralStateTestsFiller/stSelfBalance/selfBalanceEqualsBalanceFiller.json", + "sourceHash" : "25d5ef29eeff750567c6438d8a02271078f64f4e07215fc232f0a3a486910ef3" + }, + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x020000", + "currentGasLimit" : "0x02540be400", + "currentNumber" : "0x01", + "currentTimestamp" : "0x03e8", + "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "post" : { + "Istanbul" : [ + { + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + }, + "hash" : "0x76e8d4a35a49bf037aa18854446f92d5b78c1bc06bf154c0a324e9fcf219ea98", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + } + ] + }, + "pre" : { + "0x1000000000000000000000000000000000000000" : { + "balance" : "0x01f4", + "code" : "0x3031471460015500", + "nonce" : "0x00", + "storage" : { + } + }, + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x3635c9adc5dea00000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + }, + "transaction" : { + "data" : [ + "0x" + ], + "gasLimit" : [ + "0x05f5e100" + ], + "gasPrice" : "0x01", + "nonce" : "0x00", + "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "0x1000000000000000000000000000000000000000", + "value" : [ + "0x00" + ] + } + } +} \ No newline at end of file diff --git a/GeneralStateTests/stSelfBalance/selfBalanceGasCost.json b/GeneralStateTests/stSelfBalance/selfBalanceGasCost.json new file mode 100644 index 00000000000..9932a712525 --- /dev/null +++ b/GeneralStateTests/stSelfBalance/selfBalanceGasCost.json @@ -0,0 +1,64 @@ +{ + "selfBalanceGasCost" : { + "_info" : { + "comment" : "", + "filling-rpc-server" : "besu/v1.2.4-dev-9aadbcb9/osx-x86_64/corretto-java-11", + "filling-tool-version" : "retesteth-0.0.1+commit.4382e070.Darwin.appleclang", + "lllcversion" : "Version: 0.5.12-develop.2019.9.16+commit.2d601a4f.Darwin.appleclang", + "source" : "src/GeneralStateTestsFiller/stSelfBalance/selfBalanceGasCostFiller.json", + "sourceHash" : "72fbb11ecf74d7b483a3070727e34f9a327e7097f841a0a137ad210dccb4dab5" + }, + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x020000", + "currentGasLimit" : "0x02540be400", + "currentNumber" : "0x01", + "currentTimestamp" : "0x03e8", + "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "post" : { + "Istanbul" : [ + { + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + }, + "hash" : "0x734634c3ab7385473db79fddef4533643bd3743e07c51849439e7de83efeefcf", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + } + ] + }, + "pre" : { + "0x1000000000000000000000000000000000000000" : { + "balance" : "0x00", + "code" : "0x5a475a905090036002900360015500", + "nonce" : "0x00", + "storage" : { + } + }, + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x3635c9adc5dea00000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + }, + "transaction" : { + "data" : [ + "0x" + ], + "gasLimit" : [ + "0x05f5e100" + ], + "gasPrice" : "0x01", + "nonce" : "0x00", + "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "0x1000000000000000000000000000000000000000", + "value" : [ + "0x00" + ] + } + } +} \ No newline at end of file diff --git a/GeneralStateTests/stSelfBalance/selfBalanceUpdate.json b/GeneralStateTests/stSelfBalance/selfBalanceUpdate.json new file mode 100644 index 00000000000..ddae8989451 --- /dev/null +++ b/GeneralStateTests/stSelfBalance/selfBalanceUpdate.json @@ -0,0 +1,64 @@ +{ + "selfBalanceUpdate" : { + "_info" : { + "comment" : "", + "filling-rpc-server" : "besu/v1.2.4-dev-9aadbcb9/osx-x86_64/corretto-java-11", + "filling-tool-version" : "retesteth-0.0.1+commit.4382e070.Darwin.appleclang", + "lllcversion" : "Version: 0.5.12-develop.2019.9.16+commit.2d601a4f.Darwin.appleclang", + "source" : "src/GeneralStateTestsFiller/stSelfBalance/selfBalanceUpdateFiller.json", + "sourceHash" : "928dc9207aa93670f7bb0a06c73b3ea2960ec433bdfa994e69dcf17bbe8b1230" + }, + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x020000", + "currentGasLimit" : "0x02540be400", + "currentNumber" : "0x01", + "currentTimestamp" : "0x03e8", + "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "post" : { + "Istanbul" : [ + { + "indexes" : { + "data" : 0, + "gas" : 0, + "value" : 0 + }, + "hash" : "0x0ecc7a0a1b83b10575f78f92d8150f7479d5b02ed523fc5ff9ff8e140361c416", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + } + ] + }, + "pre" : { + "0x1000000000000000000000000000000000000000" : { + "balance" : "0x01f4", + "code" : "0x47806001556000600060006000600160006000f1504780600255900360035500", + "nonce" : "0x00", + "storage" : { + } + }, + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x3635c9adc5dea00000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + }, + "transaction" : { + "data" : [ + "0x" + ], + "gasLimit" : [ + "0x05f5e100" + ], + "gasPrice" : "0x01", + "nonce" : "0x00", + "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "0x1000000000000000000000000000000000000000", + "value" : [ + "0x00" + ] + } + } +} \ No newline at end of file diff --git a/JSONSchema/bc-filler-schema.json b/JSONSchema/bc-filler-schema.json index 1d34fee998a..3a9160046c4 100644 --- a/JSONSchema/bc-filler-schema.json +++ b/JSONSchema/bc-filler-schema.json @@ -62,6 +62,9 @@ "expectExceptionHomestead": { "type": "string" }, + "expectExceptionIstanbul": { + "type": "string" + }, "rlp": { "$ref": "#/definitions/BadHexData" }, diff --git a/JSONSchema/bc-schema.json b/JSONSchema/bc-schema.json index 5ef586791a1..a83e6be9b0e 100644 --- a/JSONSchema/bc-schema.json +++ b/JSONSchema/bc-schema.json @@ -46,6 +46,9 @@ "expectExceptionHomestead": { "type": "string" }, + "expectExceptionIstanbul": { + "type": "string" + }, "rlp": { "$ref": "#/definitions/BadHexData" }, diff --git a/JSONSchema/st-schema.json b/JSONSchema/st-schema.json index 93dc2c95252..12b80de75fc 100644 --- a/JSONSchema/st-schema.json +++ b/JSONSchema/st-schema.json @@ -232,6 +232,9 @@ }, "Homestead": { "$ref": "#/definitions/TransactionResults" + }, + "Istanbul": { + "$ref": "#/definitions/TransactionResults" } }, "type": "object" diff --git a/Retesteth/default/genesis/Istanbul.json b/Retesteth/default/genesis/Istanbul.json new file mode 100644 index 00000000000..57f8cb26102 --- /dev/null +++ b/Retesteth/default/genesis/Istanbul.json @@ -0,0 +1,82 @@ +{ + "params" : { + "homesteadForkBlock" : "0x00", + "EIP150ForkBlock" : "0x00", + "EIP158ForkBlock" : "0x00", + "byzantiumForkBlock" : "0x00", + "constantinopleForkBlock" : "0x00", + "constantinopleFixForkBlock" : "0x00", + "istanbulForkBlock" : "0x00" + }, + "accounts" : { + "0x0000000000000000000000000000000000000001" : { + "precompiled" : { + "name" : "ecrecover", + "linear" : { + "base" : 3000, + "word" : 0 + } + } + }, + "0x0000000000000000000000000000000000000002" : { + "precompiled" : { + "name" : "sha256", + "linear" : { + "base" : 60, + "word" : 12 + } + } + }, + "0x0000000000000000000000000000000000000003" : { + "precompiled" : { + "name" : "sha256", + "linear" : { + "base" : 600, + "word" : 120 + } + } + }, + "0x0000000000000000000000000000000000000004" : { + "precompiled" : { + "name" : "identity", + "linear" : { + "base" : 15, + "word" : 3 + } + } + }, + "0x0000000000000000000000000000000000000005" : { + "precompiled" : { + "name" : "modexp" + } + }, + "0x0000000000000000000000000000000000000006" : { + "precompiled" : { + "name" : "alt_bn128_G1_add", + "linear" : { + "base" : 500, + "word" : 0 + } + } + }, + "0x0000000000000000000000000000000000000007" : { + "precompiled" : { + "name" : "alt_bn128_G1_mul", + "linear" : { + "base" : 40000, + "word" : 0 + } + } + }, + "0x0000000000000000000000000000000000000008" : { + "precompiled" : { + "name" : "alt_bn128_pairing_product" + } + }, + "0x0000000000000000000000000000000000000009" : { + "precompiled" : { + "name" : "blake2f" + } + } + } +} diff --git a/src/GeneralStateTestsFiller/stChainId/chainIdFiller.json b/src/GeneralStateTestsFiller/stChainId/chainIdFiller.json new file mode 100644 index 00000000000..19259b69f5f --- /dev/null +++ b/src/GeneralStateTestsFiller/stChainId/chainIdFiller.json @@ -0,0 +1,55 @@ +{ + "chainId": { + "env": { + "currentCoinbase": "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty": "0x20000", + "currentGasLimit": "10000000000", + "currentNumber": "1", + "currentTimestamp": "1000", + "previousHash": "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect": [ + { + "indexes": { + "data": -1, + "gas": -1, + "value": -1 + }, + "network": [">=Istanbul"], + "result": { + "1000000000000000000000000000000000000000": { + "storage": { + "0x01": "0x01" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "balance": "999999999999999958995" + } + } + } + ], + "pre": { + "1000000000000000000000000000000000000000": { + "balance": "", + "code": "{ [[ 1 ]] (CHAINID) }", + "nonce": "0", + "storage": {} + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "balance": "1000000000000000000000", + "code": "", + "nonce": "0", + "storage": {} + } + }, + "transaction": { + "data": ["0x"], + "gasLimit": ["100000000"], + "gasPrice": "1", + "nonce": "0", + "secretKey": "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to": "1000000000000000000000000000000000000000", + "value": ["0"] + } + } +} diff --git a/src/GeneralStateTestsFiller/stChainId/chainIdGasCostFiller.json b/src/GeneralStateTestsFiller/stChainId/chainIdGasCostFiller.json new file mode 100644 index 00000000000..09f4d407fc1 --- /dev/null +++ b/src/GeneralStateTestsFiller/stChainId/chainIdGasCostFiller.json @@ -0,0 +1,54 @@ +{ + "chainIdGasCost": { + "env": { + "currentCoinbase": "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty": "0x20000", + "currentGasLimit": "10000000000", + "currentNumber": "1", + "currentTimestamp": "1000", + "previousHash": "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect": [ + { + "indexes": { + "data": -1, + "gas": -1, + "value": -1 + }, + "network": [">=Istanbul"], + "result": { + "1000000000000000000000000000000000000000": { + "storage": { + "0x01": "2" + } + } + } + } + ], + "pre": { + "1000000000000000000000000000000000000000": { + "balance": "", + "//code": "record the gas, run the operation, then record the gas again. Drop output, subtract 2 for GAS, what is left is the cost of the operation, store in storage 0x01.", + "code": "(asm GAS CHAINID GAS SWAP1 POP SWAP1 SUB 2 SWAP1 SUB 0x01 SSTORE)", + "nonce": "0", + "storage": {} + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "balance": "1000000000000000000000", + "code": "", + "nonce": "0", + "storage": {} + } + }, + "transaction": { + "data": ["0x"], + "gasLimit": ["100000000"], + "gasPrice": "1", + "nonce": "0", + "secretKey": "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to": "1000000000000000000000000000000000000000", + "value": ["0"] + } + } + } + \ No newline at end of file diff --git a/src/GeneralStateTestsFiller/stSLoadTest/sloadGasCostFiller.json b/src/GeneralStateTestsFiller/stSLoadTest/sloadGasCostFiller.json new file mode 100644 index 00000000000..f94d618d43a --- /dev/null +++ b/src/GeneralStateTestsFiller/stSLoadTest/sloadGasCostFiller.json @@ -0,0 +1,84 @@ +{ + "sloadGasCost": { + "env": { + "currentCoinbase": "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty": "0x20000", + "currentGasLimit": "10000000000", + "currentNumber": "1", + "currentTimestamp": "1000", + "previousHash": "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect": [ + { + "indexes": { + "data": -1, + "gas": -1, + "value": -1 + }, + "network": ["Frontier", "Homestead"], + "result": { + "1000000000000000000000000000000000000000": { + "storage": { + "0x01": "50" + } + } + } + }, + { + "indexes": { + "data": -1, + "gas": -1, + "value": -1 + }, + "network": ["EIP150", "EIP158", "Byzantium", "Constantinople", "ConstantinopleFix"], + "result": { + "1000000000000000000000000000000000000000": { + "storage": { + "0x01": "200" + } + } + } + }, + { + "indexes": { + "data": -1, + "gas": -1, + "value": -1 + }, + "network": [">=Istanbul"], + "result": { + "1000000000000000000000000000000000000000": { + "storage": { + "0x01": "800" + } + } + } + } + ], + "pre": { + "1000000000000000000000000000000000000000": { + "balance": "", + "//code": "record the gas, prep and run the operation, then record the gas again. Drop output, subtract 5 for GAS and DUP1, what is left is the cost of the operation, store in storage 0x01.", + "code": "(asm GAS DUP1 SLOAD GAS SWAP1 POP SWAP1 SUB 5 SWAP1 SUB 0x01 SSTORE)", + "nonce": "0", + "storage": {} + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "balance": "1000000000000000000000", + "code": "", + "nonce": "0", + "storage": {} + } + }, + "transaction": { + "data": ["0x"], + "gasLimit": ["100000000"], + "gasPrice": "1", + "nonce": "0", + "secretKey": "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to": "1000000000000000000000000000000000000000", + "value": ["0"] + } + } + } + \ No newline at end of file diff --git a/src/GeneralStateTestsFiller/stSelfBalance/selfBalanceEqualsBalanceFiller.json b/src/GeneralStateTestsFiller/stSelfBalance/selfBalanceEqualsBalanceFiller.json new file mode 100644 index 00000000000..e14dea7f155 --- /dev/null +++ b/src/GeneralStateTestsFiller/stSelfBalance/selfBalanceEqualsBalanceFiller.json @@ -0,0 +1,53 @@ +{ + "selfBalanceEqualsBalance": { + "env": { + "currentCoinbase": "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty": "0x20000", + "currentGasLimit": "10000000000", + "currentNumber": "1", + "currentTimestamp": "1000", + "previousHash": "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect": [ + { + "indexes": { + "data": -1, + "gas": -1, + "value": -1 + }, + "network": [">=Istanbul"], + "result": { + "1000000000000000000000000000000000000000": { + "storage": { + "0x01": "0x01" + } + } + } + } + ], + "pre": { + "1000000000000000000000000000000000000000": { + "balance": "0x01f4", + "code": "{ [[ 1 ]] (EQ (SELFBALANCE) (BALANCE (ADDRESS))) }", + "nonce": "0", + "storage": {} + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "balance": "1000000000000000000000", + "code": "", + "nonce": "0", + "storage": {} + } + }, + "transaction": { + "data": ["0x"], + "gasLimit": ["100000000"], + "gasPrice": "1", + "nonce": "0", + "secretKey": "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to": "1000000000000000000000000000000000000000", + "value": ["0"] + } + } + } + \ No newline at end of file diff --git a/src/GeneralStateTestsFiller/stSelfBalance/selfBalanceFiller.json b/src/GeneralStateTestsFiller/stSelfBalance/selfBalanceFiller.json new file mode 100644 index 00000000000..e5cdfcbce82 --- /dev/null +++ b/src/GeneralStateTestsFiller/stSelfBalance/selfBalanceFiller.json @@ -0,0 +1,54 @@ +{ + "selfBalance": { + "env": { + "currentCoinbase": "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty": "0x20000", + "currentGasLimit": "10000000000", + "currentNumber": "1", + "currentTimestamp": "1000", + "previousHash": "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect": [ + { + "indexes": { + "data": -1, + "gas": -1, + "value": -1 + }, + "network": [">=Istanbul"], + "result": { + "1000000000000000000000000000000000000000": { + "storage": { + "0x01": "0x01f4" + } + } + } + } + ], + "pre": { + "1000000000000000000000000000000000000000": { + "balance": "0x01f4", + "code": "{ [[ 1 ]] (SELFBALANCE) }", + "//code": "0x47600155", + "nonce": "0", + "storage": {} + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "balance": "1000000000000000000000", + "code": "", + "nonce": "0", + "storage": {} + } + }, + "transaction": { + "data": ["0x"], + "gasLimit": ["100000000"], + "gasPrice": "1", + "nonce": "0", + "secretKey": "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to": "1000000000000000000000000000000000000000", + "value": ["0"] + } + } + } + \ No newline at end of file diff --git a/src/GeneralStateTestsFiller/stSelfBalance/selfBalanceGasCostFiller.json b/src/GeneralStateTestsFiller/stSelfBalance/selfBalanceGasCostFiller.json new file mode 100644 index 00000000000..2ac871f356b --- /dev/null +++ b/src/GeneralStateTestsFiller/stSelfBalance/selfBalanceGasCostFiller.json @@ -0,0 +1,54 @@ +{ + "selfBalanceGasCost": { + "env": { + "currentCoinbase": "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty": "0x20000", + "currentGasLimit": "10000000000", + "currentNumber": "1", + "currentTimestamp": "1000", + "previousHash": "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect": [ + { + "indexes": { + "data": -1, + "gas": -1, + "value": -1 + }, + "network": [">=Istanbul"], + "result": { + "1000000000000000000000000000000000000000": { + "storage": { + "0x01": "5" + } + } + } + } + ], + "pre": { + "1000000000000000000000000000000000000000": { + "balance": "", + "//code": "record the gas, run the operation, then record the gas again. Drop output, subtract 2 for GAS, what is left is the cost of the operation, store in storage 0x01.", + "code": "(asm GAS SELFBALANCE GAS SWAP1 POP SWAP1 SUB 2 SWAP1 SUB 0x01 SSTORE)", + "nonce": "0", + "storage": {} + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "balance": "1000000000000000000000", + "code": "", + "nonce": "0", + "storage": {} + } + }, + "transaction": { + "data": ["0x"], + "gasLimit": ["100000000"], + "gasPrice": "1", + "nonce": "0", + "secretKey": "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to": "1000000000000000000000000000000000000000", + "value": ["0"] + } + } + } + \ No newline at end of file diff --git a/src/GeneralStateTestsFiller/stSelfBalance/selfBalanceUpdateFiller.json b/src/GeneralStateTestsFiller/stSelfBalance/selfBalanceUpdateFiller.json new file mode 100644 index 00000000000..f12eb06e6da --- /dev/null +++ b/src/GeneralStateTestsFiller/stSelfBalance/selfBalanceUpdateFiller.json @@ -0,0 +1,55 @@ +{ + "selfBalanceUpdate": { + "env": { + "currentCoinbase": "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty": "0x20000", + "currentGasLimit": "10000000000", + "currentNumber": "1", + "currentTimestamp": "1000", + "previousHash": "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect": [ + { + "indexes": { + "data": -1, + "gas": -1, + "value": -1 + }, + "network": [">=Istanbul"], + "result": { + "1000000000000000000000000000000000000000": { + "storage": { + "0x01": "0x01f4", + "0x02": "0x01f3", + "0x03": "0x01" + } + } + } + } + ], + "pre": { + "1000000000000000000000000000000000000000": { + "balance": "0x01f4", + "code": "(asm SELFBALANCE DUP1 1 SSTORE 0 0 0 0 1 0 0 CALL POP SELFBALANCE DUP1 2 SSTORE SWAP1 SUB 3 SSTORE)", + "nonce": "0", + "storage": {} + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "balance": "1000000000000000000000", + "code": "", + "nonce": "0", + "storage": {} + } + }, + "transaction": { + "data": ["0x"], + "gasLimit": ["100000000"], + "gasPrice": "1", + "nonce": "0", + "secretKey": "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to": "1000000000000000000000000000000000000000", + "value": ["0"] + } + } + } + \ No newline at end of file