Open montyly opened 4 years ago
# Disable gas computation
from manticore.utils import config
consts_evm = config.get_group("evm")
consts_evm.oog = "ignore"
from manticore.ethereum.plugins import SkipRevertBasicBlocks, FilterFunctions
m = Manticore(...)
# Do not explore path that will revert
m.register_plugin(SkipRevertBasicBlocks())
# Do not explore constant/view/pure functions
filter_nohuman_constants = FilterFunctions(regexp=r".*", depth="human", mutability="constant", include=False)
m.register_plugin(filter_nohuman_constants)
m = Manticore(...)
# When calling finalize, only generate testcases that did not revert
m.finalize(only_alive_states=True)
This would speed-up many analyses that do not require the detectors/gas consumption.
We could add a section "tips to optimize scripts", or something like that, that will explain how to just disable the gas, etc