diff options
author | Yoichi Hirai <i@yoichihirai.com> | 2018-03-15 22:16:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-15 22:16:03 +0800 |
commit | 5f257e3ecdb5a325c54550517743e3eae4a0191e (patch) | |
tree | 51732d6adfc24cf97aa44f3fa357845ae5ef206b /src | |
parent | 61185fe4b8762118fe9ee318539683b47cb04ed6 (diff) | |
parent | c58d59a3e9384a009e0937b51ac06a7694fcd6eb (diff) | |
download | dexon-tests-5f257e3ecdb5a325c54550517743e3eae4a0191e.tar.gz dexon-tests-5f257e3ecdb5a325c54550517743e3eae4a0191e.tar.zst dexon-tests-5f257e3ecdb5a325c54550517743e3eae4a0191e.zip |
Merge pull request #429 from ethereum/identity-to-bigger
Identity to bigger
Diffstat (limited to 'src')
2 files changed, 152 insertions, 0 deletions
diff --git a/src/BlockchainTestsFiller/GeneralStateTests/stPreCompiledContracts/identity_to_bigger_d0g0v0Filler.json b/src/BlockchainTestsFiller/GeneralStateTests/stPreCompiledContracts/identity_to_bigger_d0g0v0Filler.json new file mode 100644 index 000000000..e11a23d3e --- /dev/null +++ b/src/BlockchainTestsFiller/GeneralStateTests/stPreCompiledContracts/identity_to_bigger_d0g0v0Filler.json @@ -0,0 +1,86 @@ +{ + "identity_to_bigger_d0g0v0" : { + "blocks" : [ + { + "blockHeaderPremine" : { + "difficulty" : "0x020000", + "gasLimit" : "0x05f5e100", + "timestamp" : "0x03e8", + "updatePoW" : "1" + }, + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x030d40", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x5082ac608c80290af68a18d44edf0526a3abc6ea3652ab46f63e8953eb813b57", + "s" : "0x6b1bc1f0b9eb8de1e19d159c9efb8607c2f24643982b112c98ade3e28af22722", + "to" : "0xc305c901078781c232a2a521c2af7980f8385ee9", + "v" : "0x1b", + "value" : "0x00" + } + ], + "uncleHeaders" : [ + ] + } + ], + "expect" : [ + { + "network" : "Byzantium", + "result" : { + "0xc305c901078781c232a2a521c2af7980f8385ee9" : { + "balance" : "0x00", + "storage" : { + "0x00" : "0x10" + } + } + } + }, + { + "network" : "Constantinople", + "result" : { + "0xc305c901078781c232a2a521c2af7980f8385ee9" : { + "balance" : "0x00", + "storage" : { + "0x00" : "0x10" + } + } + } + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "3535353535353535353535353535353535353535", + "difficulty" : "131072", + "extraData" : "0x42", + "gasLimit" : "0x05f5e100", + "gasUsed" : "0", + "mixHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "nonce" : "0x0102030405060708", + "number" : "0", + "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "0xf99eb1626cfa6db435c0836235942d7ccaa935f1ae247d3f1c21e495685f903a", + "timestamp" : "0x03b6", + "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "pre" : { + "0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1" : { + "balance" : "0x0de0b6b3a761fe12", + "code" : "", + "nonce" : "0x01", + "storage" : { + } + }, + "0xc305c901078781c232a2a521c2af7980f8385ee9" : { + "balance" : "0x00", + "code" : "0x7f112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00600052602060106010600060006004620186a0f1503d600055", + "nonce" : "0x21", + "storage" : { + } + } + } + } +}
\ No newline at end of file diff --git a/src/GeneralStateTestsFiller/stPreCompiledContracts/identity_to_biggerFiller.json b/src/GeneralStateTestsFiller/stPreCompiledContracts/identity_to_biggerFiller.json new file mode 100644 index 000000000..1d90eda66 --- /dev/null +++ b/src/GeneralStateTestsFiller/stPreCompiledContracts/identity_to_biggerFiller.json @@ -0,0 +1,66 @@ +{ + "identity_to_bigger": { + "_info" : + { + "comment" : "have a call to e.g. identity built-in that specifies output size more than input size. Check that only the short amount is available with RETURNDATA. CALL is with 100000 as gas, address 4 as destination, 0 as value, 0 as in-offset, 16 as in-size, 16 as out-offset, 32 as out-size. The returndatasize should see 16." + }, + "env": { + "currentCoinbase": "0x3535353535353535353535353535353535353535", + "currentDifficulty": "0x020000", + "currentGasLimit": "0x5f5e100", + "currentNumber": "0x01", + "currentTimestamp": "1000", + "previousHash": "0xc6745cf3cada515bbfb9573261c82547e0b8f9e3d5dd382e464704a84e47b5ad" + }, + "pre": { + "82a978b3f5962a5b0957d9ee9eef472ee55b42f1": { + "balance": "999999999999868434", + "nonce": "1", + "code": "0x", + "storage": {} + }, + "0xc305c901078781c232a2a521c2af7980f8385ee9" : + { + "balance" : "0", + "nonce" : "33", + "storage" : + { + }, + "code" : "{(seq (MSTORE 0 0x112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00) (CALL 100000 4 0 0 16 16 32) (SSTORE 0 (RETURNDATASIZE)))}" + } + }, + "transaction": { + "data": [ "" ], + "gasLimit": [ "200000" ], + "gasPrice": "0x01", + "nonce": "0x01", + "secretKey": "0x044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "to": "0xc305c901078781c232a2a521c2af7980f8385ee9", + "value": [ + "0x" + ] + }, + "expect": [ + { + "indexes": { + "data": 0, + "gas": -1, + "value": 0 + }, + "network": [ + ">=Byzantium" + ], + "result": { + "0xc305c901078781c232a2a521c2af7980f8385ee9" : + { + "balance" : "0", + "storage" : + { + "0x00" : "0x10" + } + } + } + } + ] + } +} |