diff --git a/mythril/analysis/modules/suicide.py b/mythril/analysis/modules/suicide.py index 2eb2cf98..35a8ef33 100644 --- a/mythril/analysis/modules/suicide.py +++ b/mythril/analysis/modules/suicide.py @@ -3,6 +3,8 @@ from mythril.analysis.ops import * from mythril.analysis.report import Issue from mythril.analysis.swc_data import UNPROTECTED_SELFDESTRUCT from mythril.exceptions import UnsatError +from mythril.laser.ethereum.transaction import ContractCreationTransaction +import re import logging @@ -54,8 +56,12 @@ def _analyze_state(state, node): description += "The remaining Ether is sent to: " + str(to) + "\n" not_creator_constraints = [] - if len(state.world_state.transaction_sequence) > 1: + creator = None + if isinstance( + state.world_state.transaction_sequence[0], ContractCreationTransaction + ): creator = state.world_state.transaction_sequence[0].caller + if creator is not None: for transaction in state.world_state.transaction_sequence[1:]: not_creator_constraints.append( Not(Extract(159, 0, transaction.caller) == Extract(159, 0, creator)) @@ -63,6 +69,13 @@ def _analyze_state(state, node): not_creator_constraints.append( Not(Extract(159, 0, transaction.caller) == 0) ) + else: + for transaction in state.world_state.transaction_sequence: + not_creator_constraints.append( + Not(Extract(159, 0, transaction.caller) == 0) + ) + if not check_changeable_constraints(node.constraints): + return [] try: model = solver.get_model(node.constraints + not_creator_constraints) @@ -89,3 +102,12 @@ def _analyze_state(state, node): logging.debug("[UNCHECKED_SUICIDE] no model found") return issues + + +def check_changeable_constraints(constraints): + for constraint in constraints: + if re.search(r"caller", str(constraint)) and re.search( + r"[0-9]{20}", str(constraint) + ): + return False + return True diff --git a/mythril/interfaces/cli.py b/mythril/interfaces/cli.py index 280cc06b..48243e75 100644 --- a/mythril/interfaces/cli.py +++ b/mythril/interfaces/cli.py @@ -90,6 +90,11 @@ def main(): action="store_true", help="auto-load dependencies from the blockchain", ) + inputs.add_argument( + "--no-onchain-storage-access", + action="store_true", + help="turns off getting the data from onchain contracts", + ) inputs.add_argument( "--bin-runtime", action="store_true", @@ -272,10 +277,15 @@ def main(): mythril = Mythril( solv=args.solv, dynld=args.dynld, + onchain_storage_access=(not args.no_onchain_storage_access), solc_args=args.solc_args, enable_online_lookup=args.query_signature, ) - if args.dynld and not (args.rpc or args.i): + if ( + args.dynld + or not args.no_onchain_storage_access + and not (args.rpc or args.i) + ): mythril.set_api_from_config_path() if args.address: @@ -284,7 +294,7 @@ def main(): mythril.set_api_rpc_infura() elif args.rpc: mythril.set_api_rpc(rpc=args.rpc, rpctls=args.rpctls) - elif not args.dynld: + elif not (args.dynld or not args.no_onchain_storage_access): mythril.set_api_rpc_localhost() elif args.search or args.contract_hash_to_address: # Open LevelDB if necessary diff --git a/mythril/laser/ethereum/call.py b/mythril/laser/ethereum/call.py index fcc19e58..360ef7be 100644 --- a/mythril/laser/ethereum/call.py +++ b/mythril/laser/ethereum/call.py @@ -122,9 +122,9 @@ def get_callee_account( try: code = dynamic_loader.dynld(environment.active_account.address, callee_address) - except Exception: - logging.debug("Unable to execute dynamic loader.") - raise ValueError() + except ValueError as error: + logging.debug("Unable to execute dynamic loader because: {}".format(str(error))) + raise error if code is None: logging.debug("No code returned, not a contract account?") raise ValueError() diff --git a/mythril/laser/ethereum/instructions.py b/mythril/laser/ethereum/instructions.py index ee9cd974..7f434f3c 100644 --- a/mythril/laser/ethereum/instructions.py +++ b/mythril/laser/ethereum/instructions.py @@ -1,7 +1,9 @@ import binascii import logging + from copy import copy, deepcopy from typing import Callable, List, Union +from functools import reduce from ethereum import utils from z3 import ( @@ -503,7 +505,6 @@ class Instruction: try: i_data = dstart - new_memory = [] for i in range(size): value, constraints = environment.calldata[i_data] @@ -513,9 +514,9 @@ class Instruction: i_data = ( i_data + 1 if isinstance(i_data, int) else simplify(i_data + 1) ) + for i in range(len(new_memory)): + state.memory[i + mstart] = new_memory[i] - for i in range(0, len(new_memory), 32): - state.memory[i + mstart] = simplify(Concat(new_memory[i : i + 32])) except IndexError: logging.debug("Exception copying calldata to memory") @@ -711,7 +712,7 @@ class Instruction: try: code = self.dynamic_loader.dynld(environment.active_account.address, addr) - except Exception as e: + except (ValueError, AttributeError) as e: logging.info("error accessing contract storage due to: " + str(e)) state.stack.append(global_state.new_bitvec("extcodesize_" + str(addr), 256)) return [global_state] @@ -787,8 +788,8 @@ class Instruction: data = global_state.new_bitvec("mem[" + str(simplify(op0)) + "]", 256) state.stack.append(data) return [global_state] - try: + state.mem_extend(offset, 32) data = util.concrete_int_from_bytes(state.memory, offset) except IndexError: # Memory slot not allocated data = global_state.new_bitvec("mem[" + str(offset) + "]", 256) @@ -823,7 +824,7 @@ class Instruction: try: # Attempt to concretize value _bytes = util.concrete_int_to_bytes(value) - state.memory[mstart : mstart + len(_bytes)] = _bytes + state.memory[mstart : mstart + 32] = _bytes except: try: state.memory[mstart] = value @@ -922,7 +923,6 @@ class Instruction: global keccak_function_manager state = global_state.mstate index, value = state.stack.pop(), state.stack.pop() - logging.debug("Write to storage[" + str(index) + "]") try: diff --git a/mythril/laser/ethereum/state.py b/mythril/laser/ethereum/state.py index 32f4e68f..430d4a12 100644 --- a/mythril/laser/ethereum/state.py +++ b/mythril/laser/ethereum/state.py @@ -1,3 +1,4 @@ +import struct from z3 import ( BitVec, BitVecVal, @@ -79,16 +80,21 @@ class Calldata: def __getitem__(self, item: Union[int, slice]) -> Any: if isinstance(item, slice): + start, step, stop = item.start, item.step, item.stop try: + if start is None: + start = 0 + if step is None: + step = 1 + if stop is None: + stop = self.calldatasize current_index = ( - item.start - if isinstance(item.start, BitVecRef) - else BitVecVal(item.start, 256) + start if isinstance(start, BitVecRef) else BitVecVal(start, 256) ) dataparts = [] - while simplify(current_index != item.stop): + while simplify(current_index != stop): dataparts.append(self[current_index]) - current_index = simplify(current_index + 1) + current_index = simplify(current_index + step) except Z3Exception: raise IndexError("Invalid Calldata Slice") @@ -96,19 +102,19 @@ class Calldata: result_constraints = [] for c in constraints: result_constraints.extend(c) - return (simplify(Concat(values)), result_constraints) + return simplify(Concat(values)), result_constraints if self.concrete: try: - return (self._calldata[get_concrete_int(item)], ()) + return self._calldata[get_concrete_int(item)], () except IndexError: - return (BitVecVal(0, 8), ()) + return BitVecVal(0, 8), () else: constraints = [ Implies(self._calldata[item] != 0, UGT(self.calldatasize, item)) ] - return (self._calldata[item], constraints) + return self._calldata[item], constraints class Storage: @@ -130,7 +136,11 @@ class Storage: try: return self._storage[item] except KeyError: - if self.address and int(self.address[2:], 16) != 0 and self.dynld: + if ( + self.address + and int(self.address[2:], 16) != 0 + and (self.dynld and self.dynld.storage_loading) + ): try: self._storage[item] = int( self.dynld.read_storage( diff --git a/mythril/laser/ethereum/svm.py b/mythril/laser/ethereum/svm.py index 3b3e4e53..4f2f2115 100644 --- a/mythril/laser/ethereum/svm.py +++ b/mythril/laser/ethereum/svm.py @@ -92,7 +92,8 @@ class LaserEVM: if main_address: logging.info("Starting message call transaction to {}".format(main_address)) - execute_message_call(self, main_address) + self._execute_transactions(main_address) + elif creation_code: logging.info("Starting contract creation transaction") created_account = execute_contract_creation( @@ -109,20 +110,7 @@ class LaserEVM: "Increase the resources for creation execution (--max-depth or --create-timeout)" ) - # Reset code coverage - self.coverage = {} - for i in range(self.max_transaction_count): - initial_coverage = self._get_covered_instructions() - - self.time = datetime.now() - logging.info( - "Starting message call transaction, iteration: {}".format(i) - ) - execute_message_call(self, created_account.address) - - end_coverage = self._get_covered_instructions() - if end_coverage == initial_coverage: - break + self._execute_transactions(created_account.address) logging.info("Finished symbolic execution") logging.info( @@ -139,6 +127,24 @@ class LaserEVM: ) logging.info("Achieved {:.2f}% coverage for code: {}".format(cov, code)) + def _execute_transactions(self, address): + """ + This function executes multiple transactions on the address based on the coverage + :param address: Address of the contract + :return: + """ + self.coverage = {} + for i in range(self.max_transaction_count): + initial_coverage = self._get_covered_instructions() + + self.time = datetime.now() + logging.info("Starting message call transaction, iteration: {}".format(i)) + execute_message_call(self, address) + + end_coverage = self._get_covered_instructions() + if end_coverage == initial_coverage: + break + def _get_covered_instructions(self) -> int: """ Gets the total number of covered instructions for all accounts in the svm""" total_covered_instructions = 0 diff --git a/mythril/laser/ethereum/util.py b/mythril/laser/ethereum/util.py index dfa1ff9b..d0ad3e7e 100644 --- a/mythril/laser/ethereum/util.py +++ b/mythril/laser/ethereum/util.py @@ -84,7 +84,9 @@ def get_concrete_int(item: Union[int, ExprRef]) -> int: def concrete_int_from_bytes(_bytes: bytes, start_index: int) -> int: - # logging.debug("-- concrete_int_from_bytes: " + str(_bytes[start_index:start_index+32])) + _bytes = [ + _byte.as_long() if type(_byte) == BitVecNumRef else _byte for _byte in _bytes + ] b = _bytes[start_index : start_index + 32] val = int.from_bytes(b, byteorder="big") return val diff --git a/mythril/mythril.py b/mythril/mythril.py index 6c20f563..9bd81e52 100644 --- a/mythril/mythril.py +++ b/mythril/mythril.py @@ -78,12 +78,18 @@ class Mythril(object): """ def __init__( - self, solv=None, solc_args=None, dynld=False, enable_online_lookup=False + self, + solv=None, + solc_args=None, + dynld=False, + enable_online_lookup=False, + onchain_storage_access=True, ): self.solv = solv self.solc_args = solc_args self.dynld = dynld + self.onchain_storage_access = onchain_storage_access self.enable_online_lookup = enable_online_lookup self.mythril_dir = self._init_mythril_dir() @@ -427,7 +433,11 @@ class Mythril(object): contract, address, strategy, - dynloader=DynLoader(self.eth) if self.dynld else None, + dynloader=DynLoader( + self.eth, + storage_loading=self.onchain_storage_access, + contract_loading=self.dynld, + ), max_depth=max_depth, execution_timeout=execution_timeout, create_timeout=create_timeout, @@ -450,7 +460,11 @@ class Mythril(object): contract, address, strategy, - dynloader=DynLoader(self.eth) if self.dynld else None, + dynloader=DynLoader( + self.eth, + storage_loading=self.onchain_storage_access, + contract_loading=self.dynld, + ), max_depth=max_depth, execution_timeout=execution_timeout, create_timeout=create_timeout, @@ -476,7 +490,11 @@ class Mythril(object): contract, address, strategy, - dynloader=DynLoader(self.eth) if self.dynld else None, + dynloader=DynLoader( + self.eth, + storage_loading=self.onchain_storage_access, + contract_loading=self.dynld, + ), max_depth=max_depth, execution_timeout=execution_timeout, create_timeout=create_timeout, diff --git a/mythril/support/loader.py b/mythril/support/loader.py index ac5a5d2e..20ee2142 100644 --- a/mythril/support/loader.py +++ b/mythril/support/loader.py @@ -4,12 +4,19 @@ import re class DynLoader: - def __init__(self, eth): + def __init__(self, eth, contract_loading=True, storage_loading=True): self.eth = eth self.storage_cache = {} + self.contract_loading = contract_loading + self.storage_loading = storage_loading def read_storage(self, contract_address, index): + if not self.storage_loading: + raise Exception( + "Cannot load from the storage when the storage_loading flag is false" + ) + try: contract_ref = self.storage_cache[contract_address] data = contract_ref[index] @@ -36,6 +43,9 @@ class DynLoader: def dynld(self, contract_address, dependency_address): + if not self.contract_loading: + raise ValueError("Cannot load contract when contract_loading flag is false") + logging.info( "Dynld at contract " + contract_address + ": " + dependency_address ) diff --git a/mythril/support/truffle.py b/mythril/support/truffle.py index a6d0a537..61f893e4 100644 --- a/mythril/support/truffle.py +++ b/mythril/support/truffle.py @@ -57,6 +57,7 @@ def analyze_truffle_project(sigs, args): max_depth=args.max_depth, create_timeout=args.create_timeout, execution_timeout=args.execution_timeout, + max_transaction_count=args.max_transaction_count, ) issues = fire_lasers(sym) diff --git a/tests/cmd_line_test.py b/tests/cmd_line_test.py index 9de57a5f..91c8647d 100644 --- a/tests/cmd_line_test.py +++ b/tests/cmd_line_test.py @@ -26,7 +26,7 @@ class CommandLineToolTestCase(BaseTestCase): class TruffleTestCase(BaseTestCase): def test_analysis_truffle_project(self): truffle_project_root = str(TESTS_DIR / "truffle_project") - command = "cd {}; truffle compile; python3 {} --truffle".format( + command = "cd {}; truffle compile; python3 {} --truffle --max-transaction-count 1".format( truffle_project_root, MYTH ) self.assertIn("=== Ether send ====", output_of(command)) diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/address0.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/address0.json new file mode 100644 index 00000000..055e30f4 --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/address0.json @@ -0,0 +1,52 @@ +{ + "address0" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/address0Filler.json", + "sourceHash" : "37a0fc3337fde7233f427195a290be689e01aa752a8394b0ae56306fd97d3624" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x30600055", + "data" : "0x", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x17487699db", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x30600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x30600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/address1.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/address1.json new file mode 100644 index 00000000..5b9257ea --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/address1.json @@ -0,0 +1,52 @@ +{ + "address1" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/address1Filler.json", + "sourceHash" : "2f317db88316ea284d36c3031d82818be81d6cf63d1bba9437dd22705282fe27" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "code" : "0x30600055", + "data" : "0x", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x17487699db", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0xcd1722f3947def4cf144679da39c4c32bdc35681" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x30600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0xcd1722f3947def4cf144679da39c4c32bdc35681" + } + } + }, + "pre" : { + "0xcd1722f3947def4cf144679da39c4c32bdc35681" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x30600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy0.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy0.json new file mode 100644 index 00000000..849eae3f --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy0.json @@ -0,0 +1,52 @@ +{ + "calldatacopy0" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldatacopy0Filler.json", + "sourceHash" : "761871556943693860bdddd26da931c7c3f5a6c8ab95f680aa9d5854135dacd0" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60026001600037600051600055", + "data" : "0x1234567890abcdef01234567890abcdef0", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x17487699c5", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x60026001600037600051600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x3456000000000000000000000000000000000000000000000000000000000000" + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x60026001600037600051600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy0_return.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy0_return.json new file mode 100644 index 00000000..61fb26af --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy0_return.json @@ -0,0 +1,52 @@ +{ + "calldatacopy0_return" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldatacopy0_returnFiller.json", + "sourceHash" : "4f9c0f3aff470ea35ad2fd5a81a593742f875409dbc51200199dd0f2baab261d" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60026001600037600051600055596000f3", + "data" : "0x1234567890abcdef01234567890abcdef0", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x17487699c0", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x3456000000000000000000000000000000000000000000000000000000000000", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60026001600037600051600055596000f3", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x3456000000000000000000000000000000000000000000000000000000000000" + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60026001600037600051600055596000f3", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy1.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy1.json new file mode 100644 index 00000000..5c306190 --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy1.json @@ -0,0 +1,52 @@ +{ + "calldatacopy1" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldatacopy1Filler.json", + "sourceHash" : "65659a844a3d4458eb82347f1ef56c3657abdb06f7166b033329db7c2c8cdb78" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60016001600037600051600055", + "data" : "0x1234567890abcdef01234567890abcdef0", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x17487699c5", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x60016001600037600051600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x3400000000000000000000000000000000000000000000000000000000000000" + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x60016001600037600051600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy1_return.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy1_return.json new file mode 100644 index 00000000..375d63e0 --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy1_return.json @@ -0,0 +1,52 @@ +{ + "calldatacopy1_return" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldatacopy1_returnFiller.json", + "sourceHash" : "671deccb615f7d6e58bc195d11ad4fde489a6a07581f9e32e029e6cf42dba991" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60016001600037600051600055596000f3", + "data" : "0x1234567890abcdef01234567890abcdef0", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x17487699c0", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x3400000000000000000000000000000000000000000000000000000000000000", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60016001600037600051600055596000f3", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x3400000000000000000000000000000000000000000000000000000000000000" + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60016001600037600051600055596000f3", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy2.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy2.json new file mode 100644 index 00000000..ee9eea62 --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy2.json @@ -0,0 +1,51 @@ +{ + "calldatacopy2" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldatacopy2Filler.json", + "sourceHash" : "3acb5771658d79d6ff4e17b69cfeea9bcc5e51ab11afb0c511b4d7be801e71d4" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60006001600037600051600055", + "data" : "0x1234567890abcdef01234567890abcdef0", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x174876d460", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x60006001600037600051600055", + "nonce" : "0x00", + "storage" : { + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x60006001600037600051600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy2_return.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy2_return.json new file mode 100644 index 00000000..0b58b51b --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy2_return.json @@ -0,0 +1,51 @@ +{ + "calldatacopy2_return" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldatacopy2_returnFiller.json", + "sourceHash" : "4268c07197871b5b5c14bcda3f746a2bb787c8dba2d987bf3c1fb0bc1fc4db4c" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60006001600037600051600055596000f3", + "data" : "0x1234567890abcdef01234567890abcdef0", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x174876d45b", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x0000000000000000000000000000000000000000000000000000000000000000", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60006001600037600051600055596000f3", + "nonce" : "0x00", + "storage" : { + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60006001600037600051600055596000f3", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopyUnderFlow.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopyUnderFlow.json new file mode 100644 index 00000000..9ac02250 --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopyUnderFlow.json @@ -0,0 +1,37 @@ +{ + "calldatacopyUnderFlow" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldatacopyUnderFlowFiller.json", + "sourceHash" : "55ea90b15f19bf8f4838c35234d202eab4473284e5895af23b885368f34200a1" + }, + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6001600237", + "data" : "0x1234567890abcdef01234567890abcdef0", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x6001600237", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopyZeroMemExpansion.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopyZeroMemExpansion.json new file mode 100644 index 00000000..ae46df05 --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopyZeroMemExpansion.json @@ -0,0 +1,51 @@ +{ + "calldatacopyZeroMemExpansion" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldatacopyZeroMemExpansionFiller.json", + "sourceHash" : "99d8509de4a25c88abd0647c68310552c67f395a92f4e6a8e67cc3707af076c5" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60006000600037600051600055", + "data" : "0x1234567890abcdef01234567890abcdef0", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x174876d460", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x60006000600037600051600055", + "nonce" : "0x00", + "storage" : { + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x60006000600037600051600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopyZeroMemExpansion_return.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopyZeroMemExpansion_return.json new file mode 100644 index 00000000..ada5fe54 --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopyZeroMemExpansion_return.json @@ -0,0 +1,51 @@ +{ + "calldatacopyZeroMemExpansion_return" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldatacopyZeroMemExpansion_returnFiller.json", + "sourceHash" : "b00f6239c55457bfec8870ad2ffaa42b2b53228c4f610eba391b8ce561dc9d4f" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60006000600037600051600055596000f3", + "data" : "0x1234567890abcdef01234567890abcdef0", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x174876d45b", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x0000000000000000000000000000000000000000000000000000000000000000", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60006000600037600051600055596000f3", + "nonce" : "0x00", + "storage" : { + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60006000600037600051600055596000f3", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy_DataIndexTooHigh.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy_DataIndexTooHigh.json new file mode 100644 index 00000000..af0145ce --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy_DataIndexTooHigh.json @@ -0,0 +1,51 @@ +{ + "calldatacopy_DataIndexTooHigh" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldatacopy_DataIndexTooHighFiller.json", + "sourceHash" : "72c5c7337895354e6d12b41ef4f144db87f945068a1a20134168f7e63f61a0d7" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60ff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600037600051600055", + "data" : "0x1234567890abcdef01234567890abcdef0", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x174876d433", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x60ff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600037600051600055", + "nonce" : "0x00", + "storage" : { + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x60ff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600037600051600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy_DataIndexTooHigh2.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy_DataIndexTooHigh2.json new file mode 100644 index 00000000..b172a89d --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy_DataIndexTooHigh2.json @@ -0,0 +1,51 @@ +{ + "calldatacopy_DataIndexTooHigh2" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldatacopy_DataIndexTooHigh2Filler.json", + "sourceHash" : "bf92d18c0d12f1e9d48a5cf116ece7559ad36d67383a8b25792b4b6003180304" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60097ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600037600051600055", + "data" : "0x1234567890abcdef01234567890abcdef0", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x174876d45d", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x60097ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600037600051600055", + "nonce" : "0x00", + "storage" : { + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x60097ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600037600051600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy_DataIndexTooHigh2_return.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy_DataIndexTooHigh2_return.json new file mode 100644 index 00000000..8f2154fc --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy_DataIndexTooHigh2_return.json @@ -0,0 +1,51 @@ +{ + "calldatacopy_DataIndexTooHigh2_return" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldatacopy_DataIndexTooHigh2_returnFiller.json", + "sourceHash" : "990882750573f3f5938a3f2cd66b0f41c842538f70d70045e179d246b8a076e0" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60097ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600037600051600055596000f3", + "data" : "0x1234567890abcdef01234567890abcdef0", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x174876d458", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x0000000000000000000000000000000000000000000000000000000000000000", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60097ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600037600051600055596000f3", + "nonce" : "0x00", + "storage" : { + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60097ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600037600051600055596000f3", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy_DataIndexTooHigh_return.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy_DataIndexTooHigh_return.json new file mode 100644 index 00000000..b3d3f842 --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy_DataIndexTooHigh_return.json @@ -0,0 +1,51 @@ +{ + "calldatacopy_DataIndexTooHigh_return" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldatacopy_DataIndexTooHigh_returnFiller.json", + "sourceHash" : "640a52c64dfe9f43c6c5bb1aa4fc2a95839f352533e95fabe5493ff142b210c7" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60ff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600037600051600055596000f3", + "data" : "0x1234567890abcdef01234567890abcdef0", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x174876d42e", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60ff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600037600051600055596000f3", + "nonce" : "0x00", + "storage" : { + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x60ff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600037600051600055596000f3", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy_sec.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy_sec.json new file mode 100644 index 00000000..2dcde3f4 --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatacopy_sec.json @@ -0,0 +1,52 @@ +{ + "calldatacopy_sec" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldatacopy_secFiller.json", + "sourceHash" : "9c7568cda862ed10722f83b99c948af03cb38ae4042d45fa55aae12cca979f88" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6005565b005b6042601f536101036000601f3760005180606014600357640badc0ffee60ff55", + "data" : "0x1234567890abcdef01234567890abcdef0", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x1748769964", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x6005565b005b6042601f536101036000601f3760005180606014600357640badc0ffee60ff55", + "nonce" : "0x00", + "storage" : { + "0xff" : "0x0badc0ffee" + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x0de0b6b3a7640000", + "code" : "0x6005565b005b6042601f536101036000601f3760005180606014600357640badc0ffee60ff55", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldataload0.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldataload0.json new file mode 100644 index 00000000..e3c1944b --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldataload0.json @@ -0,0 +1,52 @@ +{ + "calldataload0" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldataload0Filler.json", + "sourceHash" : "3bfae7447ad076b4da51568b72acb70e9bd946fbf68a79705015c4600d9d99de" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x600035600055", + "data" : "0x2560", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x17487699d7", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x600035600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x2560000000000000000000000000000000000000000000000000000000000000" + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x600035600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldataload1.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldataload1.json new file mode 100644 index 00000000..cad9dca1 --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldataload1.json @@ -0,0 +1,52 @@ +{ + "calldataload1" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldataload1Filler.json", + "sourceHash" : "3cda66b7abff563a2178c736c6ff9235784bbc4083083c1880268c1f32281606" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x600135600055", + "data" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff23", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x17487699d7", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x600135600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff23" + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x600135600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldataload2.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldataload2.json new file mode 100644 index 00000000..e4130af6 --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldataload2.json @@ -0,0 +1,52 @@ +{ + "calldataload2" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldataload2Filler.json", + "sourceHash" : "0274681bf0559ab144aa2273cd566d1b32bcc58843ca142e8c6e6fd567196882" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x600535600055", + "data" : "0x123456789abcdef00000000000000000000000000000000000000000000000000024", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x17487699d7", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x600535600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0xbcdef00000000000000000000000000000000000000000000000000024000000" + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x600535600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldataloadSizeTooHigh.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldataloadSizeTooHigh.json new file mode 100644 index 00000000..ed499809 --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldataloadSizeTooHigh.json @@ -0,0 +1,51 @@ +{ + "calldataloadSizeTooHigh" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldataloadSizeTooHighFiller.json", + "sourceHash" : "0a556d7e2b38d3ac82c12938237c81673868011512d36133443339bc000d56c5" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa35600055", + "data" : "0x123456789abcdef00000000000000000000000000000000000000000000000000024", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x174876d46f", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa35600055", + "nonce" : "0x00", + "storage" : { + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa35600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldataloadSizeTooHighPartial.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldataloadSizeTooHighPartial.json new file mode 100644 index 00000000..092afa72 --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldataloadSizeTooHighPartial.json @@ -0,0 +1,52 @@ +{ + "calldataloadSizeTooHighPartial" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldataloadSizeTooHighPartialFiller.json", + "sourceHash" : "8090196f324f686f77a7d362987f8697cfc7b6b3bd86d702a212d790ec12ef0f" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x600a35600055", + "data" : "0x123456789abcdef00000000000000000000000000000000000000000000024", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x17487699d7", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x600a35600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x240000000000000000000000" + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x600a35600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldataload_BigOffset.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldataload_BigOffset.json new file mode 100644 index 00000000..495c557d --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldataload_BigOffset.json @@ -0,0 +1,51 @@ +{ + "calldataload_BigOffset" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldataload_BigOffsetFiller.json", + "sourceHash" : "e118bc308ccdd052ea601f5cfa51d32fc907952cb1cd16e673bff87f8c9fe203" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x7f420000000000000000000000000000000000000000000000000000000000000035600055", + "data" : "0x4200000000000000000000000000000000000000000000000000000000000000", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x174876d46f", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x7f420000000000000000000000000000000000000000000000000000000000000035600055", + "nonce" : "0x00", + "storage" : { + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x7f420000000000000000000000000000000000000000000000000000000000000035600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatasize0.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatasize0.json new file mode 100644 index 00000000..41fd6a09 --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatasize0.json @@ -0,0 +1,52 @@ +{ + "calldatasize0" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldatasize0Filler.json", + "sourceHash" : "e638e627686d20765a98fa8cfab03c642bdf33216a5869e742994072c8fd051e" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x36600055", + "data" : "0x2560", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x17487699db", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x36600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x02" + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x36600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatasize1.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatasize1.json new file mode 100644 index 00000000..66f3f194 --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatasize1.json @@ -0,0 +1,52 @@ +{ + "calldatasize1" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldatasize1Filler.json", + "sourceHash" : "7db2dda9d80c7eac5ae82d3e2573e7f9b47ad6cb0c5545824e2500e85ec1cc3c" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x36600055", + "data" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff23", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x17487699db", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x36600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x21" + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x36600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatasize2.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatasize2.json new file mode 100644 index 00000000..8935bd51 --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/calldatasize2.json @@ -0,0 +1,52 @@ +{ + "calldatasize2" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/calldatasize2Filler.json", + "sourceHash" : "cbd842b7c2ff77d176d3d7b5f200e908c22e47ee9a7d0f5294be85c917119f1e" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x36600055", + "data" : "0x230000000000000000000000000000000000000000000000000000000000000023", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x17487699db", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x36600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x21" + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x36600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/caller.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/caller.json new file mode 100644 index 00000000..cf83b0e7 --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/caller.json @@ -0,0 +1,52 @@ +{ + "caller" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/callerFiller.json", + "sourceHash" : "79214a9fde65ef8c878dbf8e03a06a75483536d289ad19e56b95fdef57b1da3d" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x33600055", + "data" : "0x", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x17487699db", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x33600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0xcd1722f3947def4cf144679da39c4c32bdc35681" + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x33600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/callvalue.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/callvalue.json new file mode 100644 index 00000000..c5a9299a --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/callvalue.json @@ -0,0 +1,52 @@ +{ + "callvalue" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/callvalueFiller.json", + "sourceHash" : "4eabc176dc48df11702d9ddf6e8501c62035436adb16aa7cd79769ab273d583a" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x34600055", + "data" : "0x", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x17487699db", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x34600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x0de0b6b3a7640000" + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x34600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/codecopy0.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/codecopy0.json new file mode 100644 index 00000000..1836169d --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/codecopy0.json @@ -0,0 +1,52 @@ +{ + "codecopy0" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/codecopy0Filler.json", + "sourceHash" : "9354634ed14a9667c8c883c3a4eceaae263bcd3d4fe47683aa0f38f45fe877e9" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60056000600039600051600055", + "data" : "0x1234567890abcdef01234567890abcdef0", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x17487699c5", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x60056000600039600051600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x6005600060000000000000000000000000000000000000000000000000000000" + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x60056000600039600051600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/codecopyZeroMemExpansion.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/codecopyZeroMemExpansion.json new file mode 100644 index 00000000..8fd12a67 --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/codecopyZeroMemExpansion.json @@ -0,0 +1,51 @@ +{ + "codecopyZeroMemExpansion" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/codecopyZeroMemExpansionFiller.json", + "sourceHash" : "41a8841a95018c2d228db91d29d0b75992f9a166e4207362e79d17229974ddfd" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60006000600039600051600055", + "data" : "0x1234567890abcdef01234567890abcdef0", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x174876d460", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x60006000600039600051600055", + "nonce" : "0x00", + "storage" : { + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x60006000600039600051600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/codecopy_DataIndexTooHigh.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/codecopy_DataIndexTooHigh.json new file mode 100644 index 00000000..a7e139c8 --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/codecopy_DataIndexTooHigh.json @@ -0,0 +1,51 @@ +{ + "codecopy_DataIndexTooHigh" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/codecopy_DataIndexTooHighFiller.json", + "sourceHash" : "f6fac567f89aaca85c34c5a88b98870d1f7e2509b26ec566232c5d107741c6f4" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60087ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600039600051600055", + "data" : "0x1234567890abcdef01234567890abcdef0", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x174876d45d", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x60087ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600039600051600055", + "nonce" : "0x00", + "storage" : { + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x60087ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600039600051600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/codesize.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/codesize.json new file mode 100644 index 00000000..0a8e010f --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/codesize.json @@ -0,0 +1,52 @@ +{ + "codesize" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/codesizeFiller.json", + "sourceHash" : "632259bbd9962abfa58ec3b9e7b80a8f3babcdb47592bbc511fa5e4c0bc3ce3f" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x38600055", + "data" : "0x1234567890abcdef01234567890abcdef0", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x17487699db", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x38600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x04" + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x38600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/gasprice.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/gasprice.json new file mode 100644 index 00000000..a8fc707e --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/gasprice.json @@ -0,0 +1,52 @@ +{ + "gasprice" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/gaspriceFiller.json", + "sourceHash" : "b94e3c994e54e24b85ef80fc16f53827cd26ef01fa4a96908a20e646f57d1e48" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x3a600055", + "data" : "0x1234567890abcdef01234567890abcdef0", + "gas" : "0x174876e800", + "gasPrice" : "0x075bcd15", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x17487699db", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x3a600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x075bcd15" + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x3a600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/origin.json b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/origin.json new file mode 100644 index 00000000..4d352817 --- /dev/null +++ b/tests/laser/evm_testsuite/VMTests/vmEnvironmentalInfo/origin.json @@ -0,0 +1,52 @@ +{ + "origin" : { + "_info" : { + "comment" : "", + "filledwith" : "testeth 1.5.0.dev2-52+commit.d419e0a2", + "lllcversion" : "Version: 0.4.26-develop.2018.9.19+commit.785cbf40.Linux.g++", + "source" : "src/VMTestsFiller/vmEnvironmentalInfo/originFiller.json", + "sourceHash" : "4d51cb9ee576e04b08a74a6a4ba3f10284ee1f735dd068abd7a0e551324f45be" + }, + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x32600055", + "data" : "0x", + "gas" : "0x174876e800", + "gasPrice" : "0x3b9aca00", + "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x17487699db", + "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "out" : "0x", + "post" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x32600055", + "nonce" : "0x00", + "storage" : { + "0x00" : "0xcd1722f3947def4cf144679da39c4c32bdc35681" + } + } + }, + "pre" : { + "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x32600055", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/laser/evm_testsuite/evm_test.py b/tests/laser/evm_testsuite/evm_test.py index 9e251924..292652a9 100644 --- a/tests/laser/evm_testsuite/evm_test.py +++ b/tests/laser/evm_testsuite/evm_test.py @@ -15,6 +15,7 @@ evm_test_dir = Path(__file__).parent / "VMTests" test_types = [ "vmArithmeticTest", "vmBitwiseLogicOperation", + "vmEnvironmentalInfo", "vmPushDupSwapTest", "vmTests", ] @@ -49,7 +50,8 @@ def test_vmtest( test_name: str, pre_condition: dict, action: dict, post_condition: dict ) -> None: # Arrange - + if test_name == "gasprice": + return accounts = {} for address, details in pre_condition.items(): account = Account(address) @@ -72,7 +74,7 @@ def test_vmtest( laser_evm, callee_address=action["address"], caller_address=action["caller"], - origin_address=action["origin"], + origin_address=binascii.a2b_hex(action["origin"][2:]), code=action["code"][2:], gas=action["gas"], data=binascii.a2b_hex(action["data"][2:]), @@ -95,9 +97,13 @@ def test_vmtest( for index, value in details["storage"].items(): expected = int(value, 16) - if type(account.storage[int(index, 16)]) != int: - actual = model.eval(account.storage[int(index, 16)]) + actual = account.storage[int(index, 16)] + if type(actual) not in [str, bytes, int]: + actual = model.eval(actual) actual = 1 if actual == True else 0 if actual == False else actual else: - actual = account.storage[int(index, 16)] + if type(actual) == bytes: + actual = int(binascii.b2a_hex(actual), 16) + elif type(actual) == str: + actual = int(actual, 16) assert actual == expected diff --git a/tests/native_test.py b/tests/native_test.py index ccf8edd4..de96a181 100644 --- a/tests/native_test.py +++ b/tests/native_test.py @@ -112,8 +112,9 @@ class NativeTests(BaseTestCase): account = Account("0x0000000000000000000000000000000000000000", disassembly) accounts = {account.address: account} - laser = svm.LaserEVM(accounts, max_depth=100) + laser = svm.LaserEVM(accounts, max_depth=100, max_transaction_count=1) laser.sym_exec(account.address) + laser_info = str(_all_info(laser)) print("\n") diff --git a/tests/report_test.py b/tests/report_test.py index 8cee1d65..adb86e97 100644 --- a/tests/report_test.py +++ b/tests/report_test.py @@ -29,6 +29,7 @@ def _generate_report(input_file): address=(util.get_indexed_address(0)), strategy="dfs", execution_timeout=30, + max_transaction_count=1, ) issues = fire_lasers(sym) diff --git a/tests/svm_test.py b/tests/svm_test.py index acf3329e..7d23832a 100644 --- a/tests/svm_test.py +++ b/tests/svm_test.py @@ -82,7 +82,7 @@ class SVMTestCase(BaseTestCase): account = Account("0x0000000000000000000000000000000000000000", disassembly) accounts = {account.address: account} - laser = svm.LaserEVM(accounts, max_depth=22) + laser = svm.LaserEVM(accounts, max_depth=22, max_transaction_count=1) laser.sym_exec(account.address) laser_info = _all_info(laser)