Skip to content

Conversation

@arcz
Copy link
Member

@arcz arcz commented Jul 22, 2023

This changes the CLI interface of Echidna by adding echidna init command that generates a sample echidna.yaml config and moves the current fuzzing interface to echidna fuzz ... command:

Echidna

Usage: echidna [--version] COMMAND

  EVM property-based testing framework

Available options:
  -h,--help                Show this help text
  --version                Show version

Available commands:
  init                     Write a sample config file to echidna.yaml
  fuzz                     Run fuzzing

I reused the existing tests/solidity/basic/default.yaml, which already contains all the config options up to date.
I polished the contents by separating config options into logical groups and improved the descriptions. This file still requires work to be more user-friendly.

Additional ideas to consider:

  • Load the echidna.yaml config by default
  • Add path to echidna init <path>

Closes #940

@arcz arcz requested a review from gustavo-grieco as a code owner July 22, 2023 14:13
# Number of fuzzing workers to run, should not exceed the number of available cores.
workers: 1

# Test mode, one of: property, assertion, overflow, exploration, optimization.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Test mode, one of: property, assertion, overflow, exploration, optimization.
# Test mode, one of: property, assertion, dapptest, overflow, exploration, optimization.

divyaranjan1905 added a commit to divyaranjan1905/echidna that referenced this pull request Aug 20, 2025
divyaranjan1905 added a commit to divyaranjan1905/echidna that referenced this pull request Aug 20, 2025
Resolved conflicts in:
- package.yaml: Kept dependencies from init-config branch (template-haskell, etc.)
- src/Main.hs: Merged CLI subcommand structure with updated imports and functions
- tests/solidity/basic/default.yaml: Used master version (more current configuration)
@dguido
Copy link
Member

dguido commented Aug 25, 2025

@gustavo-grieco I tried to resolve this merge conflict as best as I could

@elopez
Copy link
Member

elopez commented Aug 25, 2025

This is being reworked in #1426

Applied hlint suggestion to use simpler functor composition
in fuzzOptions parser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

echidna init subcommand to generate config file

4 participants