You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are two separate compiles of a contract from solidity. One was compiled with solc version 0.5.7+commit.6da8b019.Emscripten.clang and another with solc version 0.5.3+commit.10d17f24.Emscripten.clang - both were made with the compiler on remix.ethereum.org. One works just fine, the other has an opcode which causes an exception in pyevm.
Traceback (most recent call last):
File "/REDACTED/venv/lib/python3.7/site-packages/eth_tester/utils/formatting.py", line 85, in wrapper
return to_wrap(*args, **kwargs)
File "/REDACTED/venv/lib/python3.7/site-packages/eth_tester/backends/pyevm/main.py", line 511, in estimate_gas
return self.chain.estimate_gas(spoofed_transaction)
File "/REDACTED/venv/lib/python3.7/site-packages/eth/chains/base.py", line 615, in estimate_gas
return self.gas_estimator(state, transaction)
File "cytoolz/functoolz.pyx", line 232, in cytoolz.functoolz.curry.__call__
File "/REDACTED/venv/lib/python3.7/site-packages/eth/estimators/gas.py", line 65, in binary_gas_search
raise error
File "/REDACTED/venv/lib/python3.7/site-packages/eth/vm/computation.py", line 560, in apply_computation
opcode_fn(computation=computation)
File "/REDACTED/venv/lib/python3.7/site-packages/eth/vm/logic/invalid.py", line 16, in __call__
computation.code.pc - 1,
eth.exceptions.InvalidInstruction: Invalid opcode 0x1c @ 31
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "example.py", line 52, in test_hello_world
hw = self.contract_object.functions.bar().call()
File "/REDACTED/venv/lib/python3.7/site-packages/web3/contract.py", line 1115, in call
**self.kwargs
File "/REDACTED/venv/lib/python3.7/site-packages/web3/contract.py", line 1364, in call_contract_function
return_data = web3.eth.call(call_transaction, block_identifier=block_id)
File "/REDACTED/venv/lib/python3.7/site-packages/eth_utils/functional.py", line 46, in inner
return callback(fn(*args, **kwargs))
File "/REDACTED/venv/lib/python3.7/site-packages/web3/eth.py", line 295, in call
[transaction, block_identifier],
File "/REDACTED/venv/lib/python3.7/site-packages/web3/manager.py", line 110, in request_blocking
response = self._make_request(method, params)
File "/REDACTED/venv/lib/python3.7/site-packages/web3/manager.py", line 93, in _make_request
return request_func(method, params)
File "cytoolz/functoolz.pyx", line 232, in cytoolz.functoolz.curry.__call__
File "/REDACTED/venv/lib/python3.7/site-packages/web3/middleware/formatting.py", line 50, in apply_formatters
response = make_request(method, params)
File "/REDACTED/venv/lib/python3.7/site-packages/web3/middleware/gas_price_strategy.py", line 18, in middleware
return make_request(method, params)
File "cytoolz/functoolz.pyx", line 232, in cytoolz.functoolz.curry.__call__
File "/REDACTED/venv/lib/python3.7/site-packages/web3/middleware/formatting.py", line 48, in apply_formatters
response = make_request(method, formatted_params)
File "/REDACTED/venv/lib/python3.7/site-packages/web3/middleware/attrdict.py", line 18, in middleware
response = make_request(method, params)
File "cytoolz/functoolz.pyx", line 232, in cytoolz.functoolz.curry.__call__
File "/REDACTED/venv/lib/python3.7/site-packages/web3/middleware/formatting.py", line 48, in apply_formatters
response = make_request(method, formatted_params)
File "/REDACTED/venv/lib/python3.7/site-packages/web3/middleware/normalize_errors.py", line 9, in middleware
result = make_request(method, params)
File "cytoolz/functoolz.pyx", line 232, in cytoolz.functoolz.curry.__call__
File "/REDACTED/venv/lib/python3.7/site-packages/web3/middleware/formatting.py", line 48, in apply_formatters
response = make_request(method, formatted_params)
File "cytoolz/functoolz.pyx", line 232, in cytoolz.functoolz.curry.__call__
File "/REDACTED/venv/lib/python3.7/site-packages/web3/middleware/formatting.py", line 48, in apply_formatters
response = make_request(method, formatted_params)
File "/REDACTED/venv/lib/python3.7/site-packages/web3/providers/eth_tester/middleware.py", line 313, in middleware
fill_default_gas,
File "cytoolz/functoolz.pyx", line 589, in cytoolz.functoolz.pipe
File "cytoolz/functoolz.pyx", line 565, in cytoolz.functoolz.c_pipe
File "cytoolz/functoolz.pyx", line 232, in cytoolz.functoolz.curry.__call__
File "/REDACTED/venv/lib/python3.7/site-packages/web3/providers/eth_tester/middleware.py", line 299, in fill_default
guess_val = guess_func(web3, transaction)
File "/REDACTED/venv/lib/python3.7/site-packages/web3/providers/eth_tester/middleware.py", line 291, in guess_gas
return web3.eth.estimateGas(transaction) * 2
File "/REDACTED/venv/lib/python3.7/site-packages/web3/eth.py", line 305, in estimateGas
[transaction],
File "/REDACTED/venv/lib/python3.7/site-packages/web3/manager.py", line 110, in request_blocking
response = self._make_request(method, params)
File "/REDACTED/venv/lib/python3.7/site-packages/web3/manager.py", line 93, in _make_request
return request_func(method, params)
File "cytoolz/functoolz.pyx", line 232, in cytoolz.functoolz.curry.__call__
File "/REDACTED/venv/lib/python3.7/site-packages/web3/middleware/formatting.py", line 50, in apply_formatters
response = make_request(method, params)
File "/REDACTED/venv/lib/python3.7/site-packages/web3/middleware/gas_price_strategy.py", line 18, in middleware
return make_request(method, params)
File "cytoolz/functoolz.pyx", line 232, in cytoolz.functoolz.curry.__call__
File "/REDACTED/venv/lib/python3.7/site-packages/web3/middleware/formatting.py", line 48, in apply_formatters
response = make_request(method, formatted_params)
File "/REDACTED/venv/lib/python3.7/site-packages/web3/middleware/attrdict.py", line 18, in middleware
response = make_request(method, params)
File "cytoolz/functoolz.pyx", line 232, in cytoolz.functoolz.curry.__call__
File "/REDACTED/venv/lib/python3.7/site-packages/web3/middleware/formatting.py", line 48, in apply_formatters
response = make_request(method, formatted_params)
File "/REDACTED/venv/lib/python3.7/site-packages/web3/middleware/normalize_errors.py", line 9, in middleware
result = make_request(method, params)
File "cytoolz/functoolz.pyx", line 232, in cytoolz.functoolz.curry.__call__
File "/REDACTED/venv/lib/python3.7/site-packages/web3/middleware/formatting.py", line 48, in apply_formatters
response = make_request(method, formatted_params)
File "cytoolz/functoolz.pyx", line 232, in cytoolz.functoolz.curry.__call__
File "/REDACTED/venv/lib/python3.7/site-packages/web3/middleware/formatting.py", line 48, in apply_formatters
response = make_request(method, formatted_params)
File "/REDACTED/venv/lib/python3.7/site-packages/web3/providers/eth_tester/middleware.py", line 324, in middleware
return make_request(method, [filled_transaction] + params[1:])
File "/REDACTED/venv/lib/python3.7/site-packages/web3/middleware/fixture.py", line 12, in middleware
return make_request(method, params)
File "cytoolz/functoolz.pyx", line 232, in cytoolz.functoolz.curry.__call__
File "/REDACTED/venv/lib/python3.7/site-packages/web3/middleware/formatting.py", line 48, in apply_formatters
response = make_request(method, formatted_params)
File "/REDACTED/venv/lib/python3.7/site-packages/web3/providers/eth_tester/main.py", line 46, in make_request
response = delegator(self.ethereum_tester, params)
File "cytoolz/functoolz.pyx", line 232, in cytoolz.functoolz.curry.__call__
File "/REDACTED/venv/lib/python3.7/site-packages/web3/providers/eth_tester/defaults.py", line 36, in call_eth_tester
return getattr(eth_tester, fn_name)(*fn_args, **fn_kwargs)
File "/REDACTED/venv/lib/python3.7/site-packages/eth_tester/main.py", line 445, in estimate_gas
raw_gas_estimate = self.backend.estimate_gas(raw_transaction)
File "/REDACTED/venv/lib/python3.7/site-packages/eth_tester/utils/formatting.py", line 88, in wrapper
raise old_to_new_exceptions[type(e)] from e
eth_tester.exceptions.TransactionFailed
The text was updated successfully, but these errors were encountered:
@pipermerriam Fix is here - was able to get the test passing in the above script by updating the default vm rules to Constantinople. Will merge / cut release if it looks 👍 - we'll also need to cut new web3 releases (v4 & v5) so the fix is available via pip install web3[tester]
pip freeze
):What is wrong?
Here are two separate compiles of a contract from solidity. One was compiled with solc version 0.5.7+commit.6da8b019.Emscripten.clang and another with solc version 0.5.3+commit.10d17f24.Emscripten.clang - both were made with the compiler on remix.ethereum.org. One works just fine, the other has an opcode which causes an exception in pyevm.
First the solidity source:
And now the python used to run it:
And finally, the error that you get:
The text was updated successfully, but these errors were encountered: