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

Add --quick-mode to configure Manticore for fast exploration #1555

Merged
merged 7 commits into from
Nov 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions manticore/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,13 @@ def positive(value):
help="Do not generate testcases for invalid/throwing states when analysis finishes",
)

eth_flags.add_argument(
"--quick-mode",
action="store_true",
help="Configure Manticore for quick exploration. Disable gas, generate testcase only for alive states, "
"do not explore constant functions. Disable all detectors.",
)

config_flags = parser.add_argument_group("Constants")
config.add_config_vars_to_argparse(config_flags)

Expand Down
8 changes: 8 additions & 0 deletions manticore/ethereum/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ def choose_detectors(args):

def ethereum_main(args, logger):
m = ManticoreEVM(workspace_url=args.workspace)

if args.quick_mode:
args.avoid_constant = True
args.exclude_all = True
args.only_alive_testcases = True
consts_evm = config.get_group("evm")
consts_evm.oog = "ignore"

with WithKeyboardInterruptAs(m.kill):
m.register_plugin(KeepOnlyIfStorageChanges())

Expand Down