mythril
mythril copied to clipboard
feat: support only detect paths initiating from a function
Description
As for as I know, currently, Mythril only supports specifying the contract of interest, but not function of interest. I think would be great if it supports specifying function of interest.
Background
When Mythril detected a smart contract is vulnerable, we would want to modify the reportedly vulnerable statements. Thus, to verify we have successfully addressed the problem, we only need Mythril care about the paths starting from the modified functions, not every path in the smart contract. So, supporting such functionality would allow faster debugging time (arguable, Mythril can be very slow under some smart contracts, run > 20 mins).
Thanks
i should still do some refactoring for this feature(and it's not in our current priority list), meanwhile you can try this branch https://github.com/ConsenSys/mythril-classic/pull/979 .
Thanks! This looks to be exactly but a more generic solution to the feature I am talking about @norhh . Any estimate for this being stably merged?
It might take quite a while, as it’s not in the v1 roadmap currently, I might probably be able to put a pr in a week or 2 but I am not sure when it might get merged
@yxliang01 While @norhh's approach allows you to force mythril towards some executions. It won't solve your problem entirely @yxliang01.
The changes in the code can change behaviour that relates to the persistent state, changed code can also be dependent on some persistent variables. Only analyzing a given sequence of functions will only give a limited guarantee that the vulneability is actually patched.