a16z / halmos

A symbolic testing tool for EVM smart contracts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Halmos throws `Counterexample: unknown` warning on solc versions < 0.8.17

PraneshASP opened this issue · comments

Describe the bug
I was recently trying to replicate Solmate's SignedWadMath.sol contract's wadMul() bug (see @karmacoma-eth's tweet). When I ran halmos --smt-div the tests PASSED with the following output:

Screenshot from 2023-08-16 00-37-10

Expected behavior: The test should fail.

To Reproduce

Environment:

  • OS: Linux - Ubuntu 20.04
  • Python version: Python 3.9.17
  • Halmos and other dependency versions: Halmos 0.1.3.dev3+gd2c5d27

Additional context
Halmos produced expected counterexamples when solc version was >= 0.8.17

Screenshot from 2023-08-16 01-09-17

@PraneshASP could you please try again with --solver-timeout-assertion 0, and let us know if you still see the discrepancy between the different solc versions?

Confirmed that the old solc generated bytecode significantly slows down the prover. Will take a look how different the generated smt queries are. Thanks for reporting!