vyperlang / vyper

Pythonic Smart Contract Language for the EVM
https://vyperlang.org
Other
4.85k stars 791 forks source link

fuzzer error #4061

Closed charles-cooper closed 4 months ago

charles-cooper commented 4 months ago

Version Information

What's your issue about?

tracking for https://github.com/vyperlang/vyper/actions/runs/9284199442/job/25546107337?pr=4060#step:6:150. have not triaged, but it appears to be a bug in the test setup

copy-pasted from the job output:

FAILED tests/functional/codegen/test_call_graph_stability.py::test_call_graph_stability_fuzz - vyper.exceptions.NamespaceCollision: Member 'foo' already exists in self

 (previously declared at):
  contract "VyperContract.vy:5", line 5:0 
       4 @pure
  ---> 5 def foo() -> uint256:
  -------^
       6     return 0

  contract "VyperContract.vy:10", line 10:0 
        9 @external
  ---> 10 def foo():
  --------^
       11   self.foo()

Falsifying example: test_call_graph_stability_fuzz(
    funcs=[('@pure', 'foo')],
)

You can reproduce this example by temporarily adding @reproduce_failure('6.103.0', b'AAEAAQUBDgEOAAA=') as a decorator on your test case
charles-cooper commented 4 months ago

apparently, hypothesis is generating a function named "foo", which conflicts with a name in the test harness. i suspect there is some update in the latest hypothesis release (https://pypi.org/project/hypothesis/6.103.0/, released 9 hours ago!) which generates common names as part of the standard strategies

Screenshot from 2024-05-29 08-37-42