Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support configuration via halmos.toml #125

Closed
karmacoma-eth opened this issue Jul 19, 2023 · 1 comment · Fixed by #296
Closed

Support configuration via halmos.toml #125

karmacoma-eth opened this issue Jul 19, 2023 · 1 comment · Fixed by #296
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@karmacoma-eth
Copy link
Collaborator

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)

@karmacoma-eth karmacoma-eth added enhancement New feature or request good first issue Good for newcomers labels Jul 19, 2023
@aviggiano
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants