Giter VIP home page Giter VIP logo

evm-simulator's People

Contributors

tanmaster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

evm-simulator's Issues

Stack visualization

The stack probably would be easier to read if it either grew from top to bottom, starting at the top, or from bottom to top (like now), but starting at the bottom. The idea would be to keep stack positions at the same place when pushing or popping. At some point, when the stack exceeds the window, it has of course to start scrolling, but even then, if the stack jumped by several lines, the visualization of the stack would stay in place most of the time.

Error in tests as well when I used the sample contract then it crash at MLOAD

(venv) ➜  EVM-Simulator git:(master) ✗ pytest tests/     

==================================================== test session starts =====================================================
platform linux -- Python 3.10.6, pytest-7.1.3, pluggy-1.0.0
rootdir: /home/devraj/work/playground/EVM-Simulator
collected 12 items                                                                                                           

tests/core/test_contracts.py FFFFFFFF                                                                                  [ 66%]
tests/core/test_evmhandler.py FF..                                                                                     [100%]

========================================================== FAILURES ==========================================================
__________________________________________________ TestContracts.test_call ___________________________________________________

self = <tests.core.test_contracts.TestContracts testMethod=test_call>

    def test_call(self):
        """
        Tries to create a contract which has a function that calls itself 10 times recursively.
        """
        call_contract = get_contract("Call")
>       self.create_contract_and_set_address(call_contract, False)

tests/core/test_contracts.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/core/test_contracts.py:181: in create_contract_and_set_address
    self.evm_handler.create_contract(
app/evmhandler.py:105: in create_contract
    self._mine_block()
app/evmhandler.py:282: in _mine_block
    nonce, mix_hash = mine_pow_nonce(
venv/lib/python3.10/site-packages/eth/consensus/pow.py:92: in mine_pow_nonce
    cache = get_cache(block_number)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

block_number = 1

    def get_cache(block_number: int) -> bytes:
        epoch_index = block_number // EPOCH_LENGTH
    
        # doing explicit caching, because functools.lru_cache is 70% slower in the tests
    
        # Get the cache if already generated, marking it as recently used
        if epoch_index in cache_by_epoch:
            c = cache_by_epoch.pop(epoch_index)  # pop and append at end
            cache_by_epoch[epoch_index] = c
            return c
    
        # Generate the cache if it was not already in memory
        # Simulate requesting mkcache by block number: multiply index by epoch length
>       c = mkcache_bytes(epoch_index * EPOCH_LENGTH)
E       SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

venv/lib/python3.10/site-packages/eth/consensus/pow.py:49: SystemError
_________________________________________________ TestContracts.test_create __________________________________________________

self = <tests.core.test_contracts.TestContracts testMethod=test_create>

    def test_create(self):
        """
        Tries to create a contract which internally creates another contract. The inner contract is passed a
        parameter during construction, that is queried and compared with what was passed to the outer contract.
        :return:
        """
        create_contract = get_contract("Creation")
        factory_contract = get_contract("Factory")
    
>       self.create_contract_and_set_address(factory_contract, False)

tests/core/test_contracts.py:49: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/core/test_contracts.py:181: in create_contract_and_set_address
    self.evm_handler.create_contract(
app/evmhandler.py:105: in create_contract
    self._mine_block()
app/evmhandler.py:282: in _mine_block
    nonce, mix_hash = mine_pow_nonce(
venv/lib/python3.10/site-packages/eth/consensus/pow.py:92: in mine_pow_nonce
    cache = get_cache(block_number)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

block_number = 1

    def get_cache(block_number: int) -> bytes:
        epoch_index = block_number // EPOCH_LENGTH
    
        # doing explicit caching, because functools.lru_cache is 70% slower in the tests
    
        # Get the cache if already generated, marking it as recently used
        if epoch_index in cache_by_epoch:
            c = cache_by_epoch.pop(epoch_index)  # pop and append at end
            cache_by_epoch[epoch_index] = c
            return c
    
        # Generate the cache if it was not already in memory
        # Simulate requesting mkcache by block number: multiply index by epoch length
>       c = mkcache_bytes(epoch_index * EPOCH_LENGTH)
E       SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

venv/lib/python3.10/site-packages/eth/consensus/pow.py:49: SystemError
________________________________________________ TestContracts.test_delegate _________________________________________________

self = <tests.core.test_contracts.TestContracts testMethod=test_delegate>

    def test_delegate(self):
        """
        Creates two contracts, base and front. Front delegates all calls to base. Base changes a variable in the front's
        storage. The variable is queried and checked if new value matches up with what was passed.
        :return:
        """
        base_contract = get_contract("DelegateBase")
        front_contract = get_contract("DelegateFront")
>       self.create_contract_and_set_address(base_contract, False)

tests/core/test_contracts.py:77: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/core/test_contracts.py:181: in create_contract_and_set_address
    self.evm_handler.create_contract(
app/evmhandler.py:105: in create_contract
    self._mine_block()
app/evmhandler.py:282: in _mine_block
    nonce, mix_hash = mine_pow_nonce(
venv/lib/python3.10/site-packages/eth/consensus/pow.py:92: in mine_pow_nonce
    cache = get_cache(block_number)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

block_number = 1

    def get_cache(block_number: int) -> bytes:
        epoch_index = block_number // EPOCH_LENGTH
    
        # doing explicit caching, because functools.lru_cache is 70% slower in the tests
    
        # Get the cache if already generated, marking it as recently used
        if epoch_index in cache_by_epoch:
            c = cache_by_epoch.pop(epoch_index)  # pop and append at end
            cache_by_epoch[epoch_index] = c
            return c
    
        # Generate the cache if it was not already in memory
        # Simulate requesting mkcache by block number: multiply index by epoch length
>       c = mkcache_bytes(epoch_index * EPOCH_LENGTH)
E       SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

venv/lib/python3.10/site-packages/eth/consensus/pow.py:49: SystemError
__________________________________________________ TestContracts.test_event __________________________________________________

self = <tests.core.test_contracts.TestContracts testMethod=test_event>

    def test_event(self):
        """
        Creates a contract that fires an event. The logs of the receipt are read and it is asserted that they are not
        empty.
        :return:
        """
        event_contract = get_contract("Event")
>       self.create_contract_and_set_address(event_contract, False)

tests/core/test_contracts.py:103: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/core/test_contracts.py:181: in create_contract_and_set_address
    self.evm_handler.create_contract(
app/evmhandler.py:105: in create_contract
    self._mine_block()
app/evmhandler.py:282: in _mine_block
    nonce, mix_hash = mine_pow_nonce(
venv/lib/python3.10/site-packages/eth/consensus/pow.py:92: in mine_pow_nonce
    cache = get_cache(block_number)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

block_number = 1

    def get_cache(block_number: int) -> bytes:
        epoch_index = block_number // EPOCH_LENGTH
    
        # doing explicit caching, because functools.lru_cache is 70% slower in the tests
    
        # Get the cache if already generated, marking it as recently used
        if epoch_index in cache_by_epoch:
            c = cache_by_epoch.pop(epoch_index)  # pop and append at end
            cache_by_epoch[epoch_index] = c
            return c
    
        # Generate the cache if it was not already in memory
        # Simulate requesting mkcache by block number: multiply index by epoch length
>       c = mkcache_bytes(epoch_index * EPOCH_LENGTH)
E       SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

venv/lib/python3.10/site-packages/eth/consensus/pow.py:49: SystemError
________________________________________________ TestContracts.test_modifier _________________________________________________

self = <tests.core.test_contracts.TestContracts testMethod=test_modifier>

    def test_modifier(self):
        """
        Creates a contract that uses a modifier which checks whether msg.value > 1. A variable is incremented if true.
        The function is first called with a value of 1 wei which should increment the value.
        Then the function is called with a value of 0 wei which should show_result_cb in an error and the value should remain 1.
        :return:
        """
        modifier_contract = get_contract("Modifier")
>       self.create_contract_and_set_address(modifier_contract, False)

tests/core/test_contracts.py:118: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/core/test_contracts.py:181: in create_contract_and_set_address
    self.evm_handler.create_contract(
app/evmhandler.py:105: in create_contract
    self._mine_block()
app/evmhandler.py:282: in _mine_block
    nonce, mix_hash = mine_pow_nonce(
venv/lib/python3.10/site-packages/eth/consensus/pow.py:92: in mine_pow_nonce
    cache = get_cache(block_number)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

block_number = 1

    def get_cache(block_number: int) -> bytes:
        epoch_index = block_number // EPOCH_LENGTH
    
        # doing explicit caching, because functools.lru_cache is 70% slower in the tests
    
        # Get the cache if already generated, marking it as recently used
        if epoch_index in cache_by_epoch:
            c = cache_by_epoch.pop(epoch_index)  # pop and append at end
            cache_by_epoch[epoch_index] = c
            return c
    
        # Generate the cache if it was not already in memory
        # Simulate requesting mkcache by block number: multiply index by epoch length
>       c = mkcache_bytes(epoch_index * EPOCH_LENGTH)
E       SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

venv/lib/python3.10/site-packages/eth/consensus/pow.py:49: SystemError
_________________________________________________ TestContracts.test_payable _________________________________________________

self = <tests.core.test_contracts.TestContracts testMethod=test_payable>

    def test_payable(self):
        """
        Creates a payable contract and tries to send wei to it.
        :return:
        """
        payable_contract = get_contract("Payable")
>       self.create_contract_and_set_address(payable_contract, True)

tests/core/test_contracts.py:140: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/core/test_contracts.py:181: in create_contract_and_set_address
    self.evm_handler.create_contract(
app/evmhandler.py:105: in create_contract
    self._mine_block()
app/evmhandler.py:282: in _mine_block
    nonce, mix_hash = mine_pow_nonce(
venv/lib/python3.10/site-packages/eth/consensus/pow.py:92: in mine_pow_nonce
    cache = get_cache(block_number)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

block_number = 1

    def get_cache(block_number: int) -> bytes:
        epoch_index = block_number // EPOCH_LENGTH
    
        # doing explicit caching, because functools.lru_cache is 70% slower in the tests
    
        # Get the cache if already generated, marking it as recently used
        if epoch_index in cache_by_epoch:
            c = cache_by_epoch.pop(epoch_index)  # pop and append at end
            cache_by_epoch[epoch_index] = c
            return c
    
        # Generate the cache if it was not already in memory
        # Simulate requesting mkcache by block number: multiply index by epoch length
>       c = mkcache_bytes(epoch_index * EPOCH_LENGTH)
E       SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

venv/lib/python3.10/site-packages/eth/consensus/pow.py:49: SystemError
______________________________________________ TestContracts.test_selfdestruct _______________________________________________

self = <tests.core.test_contracts.TestContracts testMethod=test_selfdestruct>

    def test_selfdestruct(self):
        """
        Creates a contract with inital value of 1 wei which then selfdestructs onto address 0x00...01 whose vale is then
        asserted to be 1.
        :return:
        """
        destroy_contract = get_contract("SelfDestruct")
>       self.create_contract_and_set_address(destroy_contract, True)

tests/core/test_contracts.py:156: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/core/test_contracts.py:181: in create_contract_and_set_address
    self.evm_handler.create_contract(
app/evmhandler.py:105: in create_contract
    self._mine_block()
app/evmhandler.py:282: in _mine_block
    nonce, mix_hash = mine_pow_nonce(
venv/lib/python3.10/site-packages/eth/consensus/pow.py:92: in mine_pow_nonce
    cache = get_cache(block_number)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

block_number = 1

    def get_cache(block_number: int) -> bytes:
        epoch_index = block_number // EPOCH_LENGTH
    
        # doing explicit caching, because functools.lru_cache is 70% slower in the tests
    
        # Get the cache if already generated, marking it as recently used
        if epoch_index in cache_by_epoch:
            c = cache_by_epoch.pop(epoch_index)  # pop and append at end
            cache_by_epoch[epoch_index] = c
            return c
    
        # Generate the cache if it was not already in memory
        # Simulate requesting mkcache by block number: multiply index by epoch length
>       c = mkcache_bytes(epoch_index * EPOCH_LENGTH)
E       SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

venv/lib/python3.10/site-packages/eth/consensus/pow.py:49: SystemError
__________________________________________________ TestContracts.test_types __________________________________________________

self = <tests.core.test_contracts.TestContracts testMethod=test_types>

    def test_types(self):
        """
        Creates a contract which makes use of varying types in solidity.
        :return:
        """
        type_contract = get_contract("Types")
>       self.create_contract_and_set_address(type_contract, False)

tests/core/test_contracts.py:170: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/core/test_contracts.py:181: in create_contract_and_set_address
    self.evm_handler.create_contract(
app/evmhandler.py:105: in create_contract
    self._mine_block()
app/evmhandler.py:282: in _mine_block
    nonce, mix_hash = mine_pow_nonce(
venv/lib/python3.10/site-packages/eth/consensus/pow.py:92: in mine_pow_nonce
    cache = get_cache(block_number)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

block_number = 1

    def get_cache(block_number: int) -> bytes:
        epoch_index = block_number // EPOCH_LENGTH
    
        # doing explicit caching, because functools.lru_cache is 70% slower in the tests
    
        # Get the cache if already generated, marking it as recently used
        if epoch_index in cache_by_epoch:
            c = cache_by_epoch.pop(epoch_index)  # pop and append at end
            cache_by_epoch[epoch_index] = c
            return c
    
        # Generate the cache if it was not already in memory
        # Simulate requesting mkcache by block number: multiply index by epoch length
>       c = mkcache_bytes(epoch_index * EPOCH_LENGTH)
E       SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

venv/lib/python3.10/site-packages/eth/consensus/pow.py:49: SystemError
____________________________________ TestEVMHandler.test__mine_block_and_get_block_number ____________________________________

self = <tests.core.test_evmhandler.TestEVMHandler testMethod=test__mine_block_and_get_block_number>

    def test__mine_block_and_get_block_number(self):
        """
        Tries to mine a block and checks whether the correct block number is returned.
        :return:
        """
        genesis = self.evm_handler.get_block_number()
        assert genesis == 1
>       self.evm_handler._mine_block()

tests/core/test_evmhandler.py:70: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
app/evmhandler.py:282: in _mine_block
    nonce, mix_hash = mine_pow_nonce(
venv/lib/python3.10/site-packages/eth/consensus/pow.py:92: in mine_pow_nonce
    cache = get_cache(block_number)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

block_number = 1

    def get_cache(block_number: int) -> bytes:
        epoch_index = block_number // EPOCH_LENGTH
    
        # doing explicit caching, because functools.lru_cache is 70% slower in the tests
    
        # Get the cache if already generated, marking it as recently used
        if epoch_index in cache_by_epoch:
            c = cache_by_epoch.pop(epoch_index)  # pop and append at end
            cache_by_epoch[epoch_index] = c
            return c
    
        # Generate the cache if it was not already in memory
        # Simulate requesting mkcache by block number: multiply index by epoch length
>       c = mkcache_bytes(epoch_index * EPOCH_LENGTH)
E       SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

venv/lib/python3.10/site-packages/eth/consensus/pow.py:49: SystemError
________________________________ TestEVMHandler.test_send_wei_and_get_balance_and_set_balance ________________________________

self = <tests.core.test_evmhandler.TestEVMHandler testMethod=test_send_wei_and_get_balance_and_set_balance>

    def test_send_wei_and_get_balance_and_set_balance(self):
        """
        Tries to set the balance of a contract with 1) normal transactions and 2) dirtily by setting the value and
        omitting block validation. The actual value is compared with the expected
        :return:
        """
        addr1 = Address(decode_hex("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
        addr2 = Address(decode_hex("bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"))
        addr3 = Address(decode_hex("9742421b7279129e6791e67921d9787df9779fa7"))
        assert 0 == self.evm_handler.get_balance(addr1)
        assert 0 == self.evm_handler.get_balance(addr2)
        assert 0 == self.evm_handler.get_balance(addr3)
>       self.evm_handler.send_wei(addr1, to_wei(20, "finney"))

tests/core/test_evmhandler.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
app/evmhandler.py:85: in send_wei
    self._mine_block()
app/evmhandler.py:282: in _mine_block
    nonce, mix_hash = mine_pow_nonce(
venv/lib/python3.10/site-packages/eth/consensus/pow.py:92: in mine_pow_nonce
    cache = get_cache(block_number)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

block_number = 1

    def get_cache(block_number: int) -> bytes:
        epoch_index = block_number // EPOCH_LENGTH
    
        # doing explicit caching, because functools.lru_cache is 70% slower in the tests
    
        # Get the cache if already generated, marking it as recently used
        if epoch_index in cache_by_epoch:
            c = cache_by_epoch.pop(epoch_index)  # pop and append at end
            cache_by_epoch[epoch_index] = c
            return c
    
        # Generate the cache if it was not already in memory
        # Simulate requesting mkcache by block number: multiply index by epoch length
>       c = mkcache_bytes(epoch_index * EPOCH_LENGTH)
E       SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

venv/lib/python3.10/site-packages/eth/consensus/pow.py:49: SystemError
====================================================== warnings summary ======================================================
venv/lib/python3.10/site-packages/eth_utils/toolz.py:2
  /home/devraj/work/playground/EVM-Simulator/venv/lib/python3.10/site-packages/eth_utils/toolz.py:2: DeprecationWarning: The toolz.compatibility module is no longer needed in Python 3 and has been deprecated. Please import these utilities directly from the standard library. This module will be removed in a future release.
    from cytoolz import (

venv/lib/python3.10/site-packages/eth_keys/datatypes.py:28
  /home/devraj/work/playground/EVM-Simulator/venv/lib/python3.10/site-packages/eth_keys/datatypes.py:28: DeprecationWarning: The eth_utils.typing module will be deprecated in favor of eth-typing in the next major version bump.
    from eth_utils.typing import (

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================== short test summary info ===================================================
FAILED tests/core/test_contracts.py::TestContracts::test_call - SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#'...
FAILED tests/core/test_contracts.py::TestContracts::test_create - SystemError: PY_SSIZE_T_CLEAN macro must be defined for '...
FAILED tests/core/test_contracts.py::TestContracts::test_delegate - SystemError: PY_SSIZE_T_CLEAN macro must be defined for...
FAILED tests/core/test_contracts.py::TestContracts::test_event - SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#...
FAILED tests/core/test_contracts.py::TestContracts::test_modifier - SystemError: PY_SSIZE_T_CLEAN macro must be defined for...
FAILED tests/core/test_contracts.py::TestContracts::test_payable - SystemError: PY_SSIZE_T_CLEAN macro must be defined for ...
FAILED tests/core/test_contracts.py::TestContracts::test_selfdestruct - SystemError: PY_SSIZE_T_CLEAN macro must be defined...
FAILED tests/core/test_contracts.py::TestContracts::test_types - SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#...
FAILED tests/core/test_evmhandler.py::TestEVMHandler::test__mine_block_and_get_block_number - SystemError: PY_SSIZE_T_CLEAN...
FAILED tests/core/test_evmhandler.py::TestEVMHandler::test_send_wei_and_get_balance_and_set_balance - SystemError: PY_SSIZE...
========================================== 10 failed, 2 passed, 2 warnings in 5.11s ==========================================

Breakpoints

Option to make breakpoints at given opcodes until which the code will run, regardless of how many steps it takes.

Stepping

Make it possible to step forward/backward through the execution process.

Save/Load world state

Make it possible to save the state of the blockchain & load it at a later point of time.

Stack and memory window too narrow

The stack and memory window are too narrow by a few pixels, such that often, e.g. when coloured, the last two digits are replaced by dots.
Screenshot from 2020-07-16 20-57-33
Screenshot from 2020-07-16 20-58-26

Use non-proportional typewriter font for all hex number

Currently, the stack window uses a proportional font. The memory window partially uses a typewriter font, but sometimes elements are inserted in a proportional font, like the seventh line below:
Screenshot from 2020-07-17 20-09-54
Using consistently typewriter font would lead to better alignment.

Instruction panel: restructure information?

  • Usually, in assembler listings, the first column is the address of the instruction in hex, starting with 0x0, and the second column is the mnemonic code of the instruction. If the instruction has arguments, they are appended to the mnemonic code and do not occupy additional lines.
    Screenshot from 2020-07-16 21-58-30
  • The mnemonic code INVALID is actually a valid instruction with opcode 0xfe. For undefined opcodes it would be better to choose e.g. MISSING with the opcode as an argument, like:
    Screenshot from 2020-07-16 22-03-00
  • The gas column could be made more narrow, if space is needed.
  • If desired, the hex opcode could be added as an extra column, maybe followed by the arguments.
  • The PC value should also be displayed in hex, to match the address column and the format of the jump addresses pushed on the stack.

Tie external calls to user input if result is Null or undefined

If a contract executes e.g. EXTCODESIZE, and the address that's queried is not a contract (e.g. it returns null), provide means to the user to provide the data themselves.

This could be helpful in situations where re-creating the entire state of the blockchain is too much work to do manually.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.