mythril icon indicating copy to clipboard operation
mythril copied to clipboard

feat: support only detect paths initiating from a function

Open yxliang01 opened this issue 5 years ago • 4 comments

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

yxliang01 avatar May 04 '19 06:05 yxliang01

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 .

norhh avatar May 04 '19 08:05 norhh

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?

yxliang01 avatar May 04 '19 09:05 yxliang01

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

norhh avatar May 04 '19 10:05 norhh

@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.

JoranHonig avatar May 06 '19 13:05 JoranHonig