py-evm icon indicating copy to clipboard operation
py-evm copied to clipboard

Py-evm returns twice dealing with msg.sender.send(amount)

Open Alleysira opened this issue 2 years ago • 0 comments

What happened?

Hey, I'm running some contracts to test py-evm with other evms. I found that when a contract has msg.sender.send(), there will be two output and gasused in the json output of my script, like {"pc": 0, "op": 0, "gas": "0x8fc", "gasCost": "0x0", "stack": [], "depth": 1, "opName": "STOP", "error": "None" } and {"output": "", "gasUsed": "0x0"} {"output": "0000000000000000000000000000000000000000000000000000000000000001", "gasUsed": "0x196"} in the example. I think it's weird since the first output and gasused is a useless output of opcode STOP. And in the same time, Geth and EthereumJS are doing well with only one output.
I'd like to know whether this is sort of bug or I should change my script to test evm. Thinks in advance. Here is my contract in solidity :

pragma solidity ^0.4.24;

contract Test {
    function sendFund() returns (bool){
        uint amount = msg.value;
        msg.sender.send(amount);
        return true;
    }
}

I use solc version 0.4.24 to compile the contract with solc --bin-runtime manCheck/contract/myContract.sol -o manCheck/contract/ --overwrite, and these are the corresponding bytecodes:

bincode = 608060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063dd0cf15d146044575b600080fd5b348015604f57600080fd5b5060566070565b604051808215151515815260200191505060405180910390f35b6000803490503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050506001915050905600a165627a7a72305820ba348c7cdfa1fbb7dc3341599f5a037ccbd886e54acfcd3d563646ac341fd5f10029

And I use solc --hashes to get signature:

dd0cf15d: sendFund()

Then I run the script with 2 parameters

python3 myscript.py --data bincode --sigName dd0cf15d00000000000000000000000047a8320bfb820ef9098a1de8cf34d70f597c5e94ff > pyevmout.json

At the same time, I test Geth/evm 1.13.4 and EthereumJS 4.1.3 with the same bincode and sigName, their outputs gethout.json jsout.json seem normal to me.

Code that produced the error

from eth import constants
from eth.db.atomic import AtomicDB
from eth import constants
from eth.chains.base import MiningChain
from eth_utils import (to_wei, decode_hex,  to_canonical_address,)
from eth.vm.forks.shanghai import ShanghaiVM
from eth_typing import Address
from eth_keys import keys
from eth.tools.transaction import new_transaction
from cytoolz import assoc
import argparse

def parse_args():
    """
    Parse input arguments
    """
    parser = argparse.ArgumentParser(description='Test a transaction')

    # contract runtime bytecode  $ solc xxx.sol --bin-runtime
    parser.add_argument('--data', dest='data', default='', type=str)
    # function signature bytecode
    parser.add_argument('--sig', dest='signature', default='', type=str)

    args = parser.parse_args()
    return args

def funded_address_initial_balance():
    return to_wei(0xffff, 'ether')

def base_genesis_state(funded_address, funded_address_initial_balance):
    return {
        funded_address: {
            'balance': funded_address_initial_balance,
            'nonce': 0,
            'code': b'',
            'storage': {},
        }
    }

def funded_address_private_key():
    return keys.PrivateKey(
        decode_hex('0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8')
    )

def genesis_state(base_genesis_state,simple_contract_address, bytecode):
    # base_genesis_state is a dict, simple_contract_address is key, {b,n,c,s} is value :)
    result = assoc(
        base_genesis_state,
        simple_contract_address,
        {
            'balance': 0,
            'nonce': 0,
            'code': decode_hex(bytecode),  # contract bytecode
            'storage': {},
        },
    )
    return result

GENESIS_PARAMS = {
     'coinbase': constants.ZERO_ADDRESS,
     'transaction_root': constants.BLANK_ROOT_HASH,
     'receipt_root': constants.BLANK_ROOT_HASH,
     'difficulty': 0,
     'gas_limit': constants.GENESIS_GAS_LIMIT,
     'timestamp': 0,
     'extra_data': constants.GENESIS_EXTRA_DATA,
     'nonce': b'\x00' * 8
}

def main():
    args = parse_args()

    init_address = to_canonical_address("8888f1f195afa192cfee860698584c030f4c9db1")

    base_state = base_genesis_state(init_address, funded_address_initial_balance())

    # with chain code
    simple_contract_address = to_canonical_address("0x692a70d2e424a56d2c6c27aa97d1a86395877b3a")

    klass = MiningChain.configure(
        __name__='MyTestChain',
        vm_configuration=(
            (constants.GENESIS_BLOCK_NUMBER,ShanghaiVM),
        )
    )

    SENDER = to_canonical_address("0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b")
    SENDER_PRIVATE_KEY = funded_address_private_key()
    
    # RECEIVER = to_canonical_address("0x692a70d2e424a56d2c6c27aa97d1a86395877b3a")
    GENESIS_STATE = genesis_state(base_state, simple_contract_address,args.data)
    chain = klass.from_genesis(AtomicDB(), GENESIS_PARAMS, GENESIS_STATE)
    
    call_txn = new_transaction(
        chain.get_vm(),
        SENDER,
        simple_contract_address,
        private_key=SENDER_PRIVATE_KEY,
        gas=0xffff,
        # data=function_selector,
        data=decode_hex(args.signature),
    )
    result_bytes = chain.get_transaction_result(call_txn, chain.get_canonical_head())

if __name__ == '__main__':
    main()

Full error output

// pyevmout.json
{"pc": 0, "op": 96, "gas": "0xac37", "gasCost": "0x3", "stack": [], "depth": 0, "opName": "PUSH1", "error": "None" }
{"pc": 2, "op": 96, "gas": "0xac34", "gasCost": "0x3", "stack": ["0x80"], "depth": 0, "opName": "PUSH1", "error": "None" }
{"pc": 4, "op": 82, "gas": "0xac31", "gasCost": "0x3", "stack": ["0x80", "0x40"], "depth": 0, "opName": "MSTORE", "error": "None" }
{"pc": 5, "op": 96, "gas": "0xac25", "gasCost": "0x3", "stack": [], "depth": 0, "opName": "PUSH1", "error": "None" }
{"pc": 7, "op": 54, "gas": "0xac22", "gasCost": "0x2", "stack": ["0x4"], "depth": 0, "opName": "CALLDATASIZE", "error": "None" }
{"pc": 8, "op": 16, "gas": "0xac20", "gasCost": "0x3", "stack": ["0x4", "0x25"], "depth": 0, "opName": "LT", "error": "None" }
{"pc": 9, "op": 96, "gas": "0xac1d", "gasCost": "0x3", "stack": ["0x0"], "depth": 0, "opName": "PUSH1", "error": "None" }
{"pc": 11, "op": 87, "gas": "0xac1a", "gasCost": "0xa", "stack": ["0x0", "0x3f"], "depth": 0, "opName": "JUMPI", "error": "None" }
{"pc": 12, "op": 96, "gas": "0xac10", "gasCost": "0x3", "stack": [], "depth": 0, "opName": "PUSH1", "error": "None" }
{"pc": 14, "op": 53, "gas": "0xac0d", "gasCost": "0x3", "stack": ["0x0"], "depth": 0, "opName": "CALLDATALOAD", "error": "None" }
{"pc": 15, "op": 124, "gas": "0xac0a", "gasCost": "0x3", "stack": ["0xfd734cfe81d8a09f90e82fb0b32a8470000000000000000000000005df10cdd"], "depth": 0, "opName": "PUSH29", "error": "None" }
{"pc": 45, "op": 144, "gas": "0xac07", "gasCost": "0x3", "stack": ["0xfd734cfe81d8a09f90e82fb0b32a8470000000000000000000000005df10cdd", "0x1"], "depth": 0, "opName": "SWAP1", "error": "None" }
{"pc": 46, "op": 4, "gas": "0xac04", "gasCost": "0x5", "stack": ["0x1", "0xfd734cfe81d8a09f90e82fb0b32a8470000000000000000000000005df10cdd"], "depth": 0, "opName": "DIV", "error": "None" }
{"pc": 47, "op": 99, "gas": "0xabff", "gasCost": "0x3", "stack": ["0xdd0cf15d"], "depth": 0, "opName": "PUSH4", "error": "None" }
{"pc": 52, "op": 22, "gas": "0xabfc", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0xffffffff"], "depth": 0, "opName": "AND", "error": "None" }
{"pc": 53, "op": 128, "gas": "0xabf9", "gasCost": "0x3", "stack": ["0xdd0cf15d"], "depth": 0, "opName": "DUP1", "error": "None" }
{"pc": 54, "op": 99, "gas": "0xabf6", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0xdd0cf15d"], "depth": 0, "opName": "PUSH4", "error": "None" }
{"pc": 59, "op": 20, "gas": "0xabf3", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0xdd0cf15d", "0x5df10cdd"], "depth": 0, "opName": "EQ", "error": "None" }
{"pc": 60, "op": 96, "gas": "0xabf0", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x1"], "depth": 0, "opName": "PUSH1", "error": "None" }
{"pc": 62, "op": 87, "gas": "0xabed", "gasCost": "0xa", "stack": ["0xdd0cf15d", "0x1", "0x44"], "depth": 0, "opName": "JUMPI", "error": "None" }
{"pc": 68, "op": 91, "gas": "0xabe3", "gasCost": "0x1", "stack": ["0xdd0cf15d"], "depth": 0, "opName": "JUMPDEST", "error": "None" }
{"pc": 69, "op": 52, "gas": "0xabe2", "gasCost": "0x2", "stack": ["0xdd0cf15d"], "depth": 0, "opName": "CALLVALUE", "error": "None" }
{"pc": 70, "op": 128, "gas": "0xabe0", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x0"], "depth": 0, "opName": "DUP1", "error": "None" }
{"pc": 71, "op": 21, "gas": "0xabdd", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x0", "0x0"], "depth": 0, "opName": "ISZERO", "error": "None" }
{"pc": 72, "op": 96, "gas": "0xabda", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x0", "0x1"], "depth": 0, "opName": "PUSH1", "error": "None" }
{"pc": 74, "op": 87, "gas": "0xabd7", "gasCost": "0xa", "stack": ["0xdd0cf15d", "0x0", "0x1", "0x4f"], "depth": 0, "opName": "JUMPI", "error": "None" }
{"pc": 79, "op": 91, "gas": "0xabcd", "gasCost": "0x1", "stack": ["0xdd0cf15d", "0x0"], "depth": 0, "opName": "JUMPDEST", "error": "None" }
{"pc": 80, "op": 80, "gas": "0xabcc", "gasCost": "0x2", "stack": ["0xdd0cf15d", "0x0"], "depth": 0, "opName": "POP", "error": "None" }
{"pc": 81, "op": 96, "gas": "0xabca", "gasCost": "0x3", "stack": ["0xdd0cf15d"], "depth": 0, "opName": "PUSH1", "error": "None" }
{"pc": 83, "op": 96, "gas": "0xabc7", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56"], "depth": 0, "opName": "PUSH1", "error": "None" }
{"pc": 85, "op": 86, "gas": "0xabc4", "gasCost": "0x8", "stack": ["0xdd0cf15d", "0x56", "0x70"], "depth": 0, "opName": "JUMP", "error": "None" }
{"pc": 112, "op": 91, "gas": "0xabbc", "gasCost": "0x1", "stack": ["0xdd0cf15d", "0x56"], "depth": 0, "opName": "JUMPDEST", "error": "None" }
{"pc": 113, "op": 96, "gas": "0xabbb", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56"], "depth": 0, "opName": "PUSH1", "error": "None" }
{"pc": 115, "op": 128, "gas": "0xabb8", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0"], "depth": 0, "opName": "DUP1", "error": "None" }
{"pc": 116, "op": 52, "gas": "0xabb5", "gasCost": "0x2", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0"], "depth": 0, "opName": "CALLVALUE", "error": "None" }
{"pc": 117, "op": 144, "gas": "0xabb3", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0x0"], "depth": 0, "opName": "SWAP1", "error": "None" }
{"pc": 118, "op": 80, "gas": "0xabb0", "gasCost": "0x2", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0x0"], "depth": 0, "opName": "POP", "error": "None" }
{"pc": 119, "op": 51, "gas": "0xabae", "gasCost": "0x2", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0"], "depth": 0, "opName": "CALLER", "error": "None" }
{"pc": 120, "op": 115, "gas": "0xabac", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0x9a1b286a10a2d3308b422f6c5fdd248d2549d3da"], "depth": 0, "opName": "PUSH20", "error": "None" }
{"pc": 141, "op": 22, "gas": "0xaba9", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0x9a1b286a10a2d3308b422f6c5fdd248d2549d3da", "0xffffffffffffffffffffffffffffffffffffffff"], "depth": 0, "opName": "AND", "error": "None" }
{"pc": 142, "op": 97, "gas": "0xaba6", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a"], "depth": 0, "opName": "PUSH2", "error": "None" }
{"pc": 145, "op": 130, "gas": "0xaba3", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a", "0xfc08"], "depth": 0, "opName": "DUP3", "error": "None" }
{"pc": 146, "op": 144, "gas": "0xaba0", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a", "0xfc08", "0x0"], "depth": 0, "opName": "SWAP1", "error": "None" }
{"pc": 147, "op": 129, "gas": "0xab9d", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a", "0x0", "0xfc08"], "depth": 0, "opName": "DUP2", "error": "None" }
{"pc": 148, "op": 21, "gas": "0xab9a", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a", "0x0", "0xfc08", "0x0"], "depth": 0, "opName": "ISZERO", "error": "None" }
{"pc": 149, "op": 2, "gas": "0xab97", "gasCost": "0x5", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a", "0x0", "0xfc08", "0x1"], "depth": 0, "opName": "MUL", "error": "None" }
{"pc": 150, "op": 144, "gas": "0xab92", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a", "0x0", "0x8fc"], "depth": 0, "opName": "SWAP1", "error": "None" }
{"pc": 151, "op": 96, "gas": "0xab8f", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a", "0x8fc", "0x0"], "depth": 0, "opName": "PUSH1", "error": "None" }
{"pc": 153, "op": 81, "gas": "0xab8c", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a", "0x8fc", "0x0", "0x40"], "depth": 0, "opName": "MLOAD", "error": "None" }
{"pc": 154, "op": 96, "gas": "0xab89", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a", "0x8fc", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000"], "depth": 0, "opName": "PUSH1", "error": "None" }
{"pc": 156, "op": 96, "gas": "0xab86", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a", "0x8fc", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x0"], "depth": 0, "opName": "PUSH1", "error": "None" }
{"pc": 158, "op": 81, "gas": "0xab83", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a", "0x8fc", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x0", "0x40"], "depth": 0, "opName": "MLOAD", "error": "None" }
{"pc": 159, "op": 128, "gas": "0xab80", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a", "0x8fc", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000"], "depth": 0, "opName": "DUP1", "error": "None" }
{"pc": 160, "op": 131, "gas": "0xab7d", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a", "0x8fc", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x8000000000000000000000000000000000000000000000000000000000000000"], "depth": 0, "opName": "DUP4", "error": "None" }
{"pc": 161, "op": 3, "gas": "0xab7a", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a", "0x8fc", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x8000000000000000000000000000000000000000000000000000000000000000"], "depth": 0, "opName": "SUB", "error": "None" }
{"pc": 162, "op": 129, "gas": "0xab77", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a", "0x8fc", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x0"], "depth": 0, "opName": "DUP2", "error": "None" }
{"pc": 163, "op": 133, "gas": "0xab74", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a", "0x8fc", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000"], "depth": 0, "opName": "DUP6", "error": "None" }
{"pc": 164, "op": 136, "gas": "0xab71", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a", "0x8fc", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x0"], "depth": 0, "opName": "DUP9", "error": "None" }
{"pc": 165, "op": 136, "gas": "0xab6e", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a", "0x8fc", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a"], "depth": 0, "opName": "DUP9", "error": "None" }
{"pc": 166, "op": 241, "gas": "0xab6b", "gasCost": "0x0", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a", "0x8fc", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a", "0x8fc"], "depth": 0, "opName": "CALL", "error": "None" }
{"pc": 0, "op": 0, "gas": "0x8fc", "gasCost": "0x0", "stack": [], "depth": 1, "opName": "STOP", "error": "None" }
{"output": "", "gasUsed": "0x0"}
{"pc": 167, "op": 147, "gas": "0xab07", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a", "0x8fc", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x1"], "depth": 0, "opName": "SWAP4", "error": "None" }
{"pc": 168, "op": 80, "gas": "0xab04", "gasCost": "0x2", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0x1", "0x8fc", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0xdad349258d24dd5f6c2f428b30d3a2106a281b9a"], "depth": 0, "opName": "POP", "error": "None" }
{"pc": 169, "op": 80, "gas": "0xab02", "gasCost": "0x2", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0x1", "0x8fc", "0x0", "0x8000000000000000000000000000000000000000000000000000000000000000"], "depth": 0, "opName": "POP", "error": "None" }
{"pc": 170, "op": 80, "gas": "0xab00", "gasCost": "0x2", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0x1", "0x8fc", "0x0"], "depth": 0, "opName": "POP", "error": "None" }
{"pc": 171, "op": 80, "gas": "0xaafe", "gasCost": "0x2", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0x1", "0x8fc"], "depth": 0, "opName": "POP", "error": "None" }
{"pc": 172, "op": 80, "gas": "0xaafc", "gasCost": "0x2", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0x1"], "depth": 0, "opName": "POP", "error": "None" }
{"pc": 173, "op": 96, "gas": "0xaafa", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0"], "depth": 0, "opName": "PUSH1", "error": "None" }
{"pc": 175, "op": 145, "gas": "0xaaf7", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x0", "0x0", "0x1"], "depth": 0, "opName": "SWAP2", "error": "None" }
{"pc": 176, "op": 80, "gas": "0xaaf4", "gasCost": "0x2", "stack": ["0xdd0cf15d", "0x56", "0x1", "0x0", "0x0"], "depth": 0, "opName": "POP", "error": "None" }
{"pc": 177, "op": 80, "gas": "0xaaf2", "gasCost": "0x2", "stack": ["0xdd0cf15d", "0x56", "0x1", "0x0"], "depth": 0, "opName": "POP", "error": "None" }
{"pc": 178, "op": 144, "gas": "0xaaf0", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x56", "0x1"], "depth": 0, "opName": "SWAP1", "error": "None" }
{"pc": 179, "op": 86, "gas": "0xaaed", "gasCost": "0x8", "stack": ["0xdd0cf15d", "0x1", "0x56"], "depth": 0, "opName": "JUMP", "error": "None" }
{"pc": 86, "op": 91, "gas": "0xaae5", "gasCost": "0x1", "stack": ["0xdd0cf15d", "0x1"], "depth": 0, "opName": "JUMPDEST", "error": "None" }
{"pc": 87, "op": 96, "gas": "0xaae4", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x1"], "depth": 0, "opName": "PUSH1", "error": "None" }
{"pc": 89, "op": 81, "gas": "0xaae1", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x1", "0x40"], "depth": 0, "opName": "MLOAD", "error": "None" }
{"pc": 90, "op": 128, "gas": "0xaade", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x1", "0x8000000000000000000000000000000000000000000000000000000000000000"], "depth": 0, "opName": "DUP1", "error": "None" }
{"pc": 91, "op": 130, "gas": "0xaadb", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x1", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x8000000000000000000000000000000000000000000000000000000000000000"], "depth": 0, "opName": "DUP3", "error": "None" }
{"pc": 92, "op": 21, "gas": "0xaad8", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x1", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x1"], "depth": 0, "opName": "ISZERO", "error": "None" }
{"pc": 93, "op": 21, "gas": "0xaad5", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x1", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x0"], "depth": 0, "opName": "ISZERO", "error": "None" }
{"pc": 94, "op": 21, "gas": "0xaad2", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x1", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x1"], "depth": 0, "opName": "ISZERO", "error": "None" }
{"pc": 95, "op": 21, "gas": "0xaacf", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x1", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x0"], "depth": 0, "opName": "ISZERO", "error": "None" }
{"pc": 96, "op": 129, "gas": "0xaacc", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x1", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x1"], "depth": 0, "opName": "DUP2", "error": "None" }
{"pc": 97, "op": 82, "gas": "0xaac9", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x1", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x1", "0x8000000000000000000000000000000000000000000000000000000000000000"], "depth": 0, "opName": "MSTORE", "error": "None" }
{"pc": 98, "op": 96, "gas": "0xaac0", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x1", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x8000000000000000000000000000000000000000000000000000000000000000"], "depth": 0, "opName": "PUSH1", "error": "None" }
{"pc": 100, "op": 1, "gas": "0xaabd", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x1", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x20"], "depth": 0, "opName": "ADD", "error": "None" }
{"pc": 101, "op": 145, "gas": "0xaaba", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x1", "0x8000000000000000000000000000000000000000000000000000000000000000", "0xa0"], "depth": 0, "opName": "SWAP2", "error": "None" }
{"pc": 102, "op": 80, "gas": "0xaab7", "gasCost": "0x2", "stack": ["0xdd0cf15d", "0xa0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x1"], "depth": 0, "opName": "POP", "error": "None" }
{"pc": 103, "op": 80, "gas": "0xaab5", "gasCost": "0x2", "stack": ["0xdd0cf15d", "0xa0", "0x8000000000000000000000000000000000000000000000000000000000000000"], "depth": 0, "opName": "POP", "error": "None" }
{"pc": 104, "op": 96, "gas": "0xaab3", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0xa0"], "depth": 0, "opName": "PUSH1", "error": "None" }
{"pc": 106, "op": 81, "gas": "0xaab0", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0xa0", "0x40"], "depth": 0, "opName": "MLOAD", "error": "None" }
{"pc": 107, "op": 128, "gas": "0xaaad", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0xa0", "0x8000000000000000000000000000000000000000000000000000000000000000"], "depth": 0, "opName": "DUP1", "error": "None" }
{"pc": 108, "op": 145, "gas": "0xaaaa", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0xa0", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x8000000000000000000000000000000000000000000000000000000000000000"], "depth": 0, "opName": "SWAP2", "error": "None" }
{"pc": 109, "op": 3, "gas": "0xaaa7", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x8000000000000000000000000000000000000000000000000000000000000000", "0xa0"], "depth": 0, "opName": "SUB", "error": "None" }
{"pc": 110, "op": 144, "gas": "0xaaa4", "gasCost": "0x3", "stack": ["0xdd0cf15d", "0x8000000000000000000000000000000000000000000000000000000000000000", "0x20"], "depth": 0, "opName": "SWAP1", "error": "None" }
{"pc": 111, "op": 243, "gas": "0xaaa1", "gasCost": "0x0", "stack": ["0xdd0cf15d", "0x20", "0x8000000000000000000000000000000000000000000000000000000000000000"], "depth": 0, "opName": "RETURN", "error": "None" }
{"output": "0000000000000000000000000000000000000000000000000000000000000001", "gasUsed": "0x196"}

Fill this section in if you know how this could or should be fixed

Not know

py-evm Version

0.8.0b1

Python Version

3.8.10

Operating System

linux

Output from pip-freeze

cached-property==1.5.2
contourpy==1.1.1
cycler==0.12.1
cytoolz==0.12.2
eth-bloom==2.0.0
eth-hash==0.5.2
eth-keys==0.4.0
eth-typing==3.4.0
eth-utils==2.2.1
exceptiongroup==1.1.3
fonttools==4.44.0
hexbytes==0.3.1
importlib-resources==6.1.0
iniconfig==2.0.0
kiwisolver==1.4.5
lru-dict==1.2.0
matplotlib==3.7.3
mypy-extensions==1.0.0
numpy==1.24.4
packaging==23.1
Pillow==10.1.0
pluggy==1.3.0
py-ecc==6.0.0
py-evm==0.8.0b1
pycryptodome==3.19.0
pyethash==0.1.27
pyparsing==3.1.1
pytest==7.4.2
python-dateutil==2.8.2
rlp==3.0.0
six==1.16.0
solc-select==1.0.4
sortedcontainers==2.4.0
tomli==2.0.1
toolz==0.12.0
trie==2.1.1
zipp==3.17.0

Alleysira avatar Dec 07 '23 07:12 Alleysira