trailofbits / manticore

Symbolic execution tool
https://blog.trailofbits.com/2017/04/27/manticore-symbolic-execution-for-humans/
GNU Affero General Public License v3.0
3.7k stars 472 forks source link

Need a way to save EVM state #1365

Open drortirosh opened 5 years ago

drortirosh commented 5 years ago

OS / Environment

Ubuntu 16.04.5 LTS

Manticore version

0.2.4

Python version

3.7

Dependencies

Summary of the problem

Our contract takes a lot of time to start the first time. just calling solidity_create_contract() (and some initialization transaciton) takes very long, before running each state.

It would be very nice to SAVE the EVM state at this point, and be able to restore it on each run, when we modify the state processing code.

e.g.

m = ManticoreEVM(..)
if !reload:
   myContract = m.solidity_create_contract(...)
   myContract.init (...)
else:
  m.reloadState(...)

...

Step to reproduce the behavior

Expected behavior

Actual behavior

Any relevant logs

disconnect3d commented 5 years ago

Hey,

Yeah, we definetely need it. It is on our roadmap, but it's not number one priority, so it may take some time until we get there.

I am not sure, but maybe it doesn't require that much of work since we can save and load states. Maybe the missing part is serializing/deserializing ManticoreEVM?

@feliam might know more about it.

Anyway, if you really need this feature and you could work on that we can answer some questions either here or on #manticore channel on empire hacking slack (see Manticore readme to join).