a16z / halmos

A symbolic testing tool for EVM smart contracts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support configuration via halmos.toml

karmacoma-eth opened this issue · comments

Problem

Currently, halmos only supports configuration via command line arguments. There are problems with this:

  • the number of arguments is growing quite a bit, and likely to continue doing so
  • after 3 or 4 arguments, the command line gets unwieldy
  • knowledge about how to run halmos on a given repository gets lost

Solution

Having a config file that one can check in to version control would help with all these.

Halmos would first look for that config file, load these settings as a baseline, and then use command line arguments as an override.

Alternatives

Couple options:

  1. use halmos.toml, modeled after foundry.toml. We can similarly imagine having different profiles, where we can do light checks on dev machines but longer checks on CI
  2. use a [symbolic] profile in foundry.toml, an approach seen in https://github.com/baolean/symexec-bench/blob/symtest/SymTest/foundry.toml

(2.) is nice because it lets developers use a well known format, and the [symbolic] section feels right at home next to [fuzz], but I think overall I prefer (1.) because it reduces coupling with foundry. Foundry is nice, but it would seem weird to force users to use it if we support different frontends in the future (e.g. vyper)

This is a good feature.

It would be nice to also have a halmos init command, similar to medusa init, that automatically generates a boilerplate configuration file with common predefined values and comments explaining what they are.