Open mesozoic-technology opened 3 years ago
Which version of solidity are you using?
0.8.2
On Sun, Jun 20, 2021 at 3:08 AM Ben Hauser @.***> wrote:
Which version of solidity are you using?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eth-brownie/brownie/issues/1118#issuecomment-864510136, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADG5UGMOSCC7CVTOQMBJ3K3TTWHYPANCNFSM467UE2RA .
Sorry for whatever reason the version of brownie didn't make it into this issue either - Brownie v1.14.6 - Python development framework for Ethereum. Updated at the top...
Here's the offending code. The contract size here is only about 16k actually, and it is giving this very strange pop from empty deque error.
@iamdefinitelyahuman what's the status on a bug fix for this? it would make it very difficult for me to use brownie to develop my codebase if it can't compile my code with the optimizer.
changing the optimizer runs to 800 seems to solve this problem
Having the same issue when compiling with 200 optimizer runs (but 800 works):
brownie
Version: 1.14.6ganache-cli
Version: 6.12.2solc
Version: 0.8.6+commit.11564f7e.Linux.g++$ brownie compile
Brownie v1.14.6 - Python development framework for Ethereum
Compiling contracts...
Solc version: 0.8.6
Optimizer: Enabled Runs: 200
EVM Version: Istanbul
Generating build data...
[a bunch of unique contract names]
File "brownie/_cli/__main__.py", line 64, in main
importlib.import_module(f"brownie._cli.{cmd}").main()
File "brownie/_cli/compile.py", line 50, in main
proj = project.load()
File "brownie/project/main.py", line 745, in load
return Project(name, project_path)
File "brownie/project/main.py", line 180, in __init__
self.load()
File "brownie/project/main.py", line 235, in load
self._compile(changed, self._compiler_config, False)
File "brownie/project/main.py", line 92, in _compile
build_json = compiler.compile_and_format(
File "brownie/project/compiler/__init__.py", line 142, in compile_and_format
build_json.update(generate_build_json(input_json, output_json, compiler_data, silent))
File "brownie/project/compiler/__init__.py", line 313, in generate_build_json
build_json[contract_alias] = solidity._get_unique_build_json(
File "brownie/project/compiler/solidity.py", line 260, in _get_unique_build_json
pc_map, statement_map, branch_map = _generate_coverage_data(
File "brownie/project/compiler/solidity.py", line 359, in _generate_coverage_data
pc_list.append({"op": opcodes.popleft(), "pc": pc})
IndexError: pop from an empty deque
Maybe this is related? https://github.com/eth-brownie/brownie/issues/963 https://github.com/eth-brownie/brownie/pull/974
I have the same issue. Also managed to work around it by increasing the optimiser runs (using a binary search I figured out that the threshold was 581, but I figure that probably depends on the contracts).
brownie
: 1.16.3ganache-cli
: 6.12.2solc
: 0.8.7+commit.e28d00a7.Darwin.appleclangReplicated the issue with a minimal contract in Vyper 0.3.0.
Creating the following env:
mainFolder
– contracts
–– example.vy
example.vy
# @version ^0.3.0
a: uint256
@internal
def _func(_value : uint256):
self.a = _value
Throws IndexError: pop from an empty deque
on brownie compile
Workaround: Use Vyper 0.2.16
brownie
Version: v1.16.4ganache-cli
Version: v6.12.2Vyper
Version: 0.3.0experienced this with brownie v1.19.0 upgrading to v1.19.1 resolved the issue
Using vyper 0.2.16 does solve this issue
Environment information
brownie
Version: v1.14.6ganache-cli
Version: 6.12.2solc
Version: 0.8.2What was wrong?
brownie compile
err'd out with this stack trace:It doesn't have to do only with the contract size being exceeded because I removed some small parts of the code and it worked, but the size was still exceeded. But it seems to happen when the size has been exceeded or is very large.
How can it be fixed?
When I turned the optimizer off this problem stopped