-
Notifications
You must be signed in to change notification settings - Fork 71
Added rpc cache serialization code #893
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
Added rpc cache serialization code #893
Conversation
|
Ah, this looks really interesting actually, thanks! This can replace my very simple JSON writing/reading, right? If so, can we replace it entirely with this? This seems more systematic and more serious :) |
|
In theory, this new code can replace the old serialization, however, there is a catch: this serialization only happens at the startup (to restore into the cache) and when the exploration and solving already finished (to save the cache). This means that in order to debug a case, you need to wait until the end. With the current code, just enabling the |
That's actually okay! and then we could remove the RPCContract and other stuff, so we could be lean and mean :) I only wrote that code so we can replay a full, running, example. So it would be a perfect, in fact, better, replacement! Could you maybe adjust the PR to do that? It'd be awesome, because it'd be less code and actually more powerful. Would be really nice. Otherwise, I can also do this change if you like, as a PR to your PR :) Let me know what you think! |
|
@msooseth the old code was replaced by the cache save/load. I also changed the old cli RPC test with the new one, using a cache file for the particular block used and it seems to be working. |
msooseth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WOW nice! I just checked, and it's a LOT better than my mocking code. Thanks! I left some potential changes
Can you please add a line to the chanagelog? I'd rather have this documented, because (1) it's a big change (2) it's a nice change (3) it changes the CLI options :)
Co-authored-by: Mate Soos @ Argot <[email protected]>
|
@msooseth Already added the line in the changelog and addressed all the other comments. |
Description
This PR contains some little changes in the RPC api and some code to serialize and deserialize the cache. This is essential for tools like Echidna, as it allows to quickly re-run a fuzzing campaign without the need to re-fetching the slots (which gives native speed execution). While there was some code to save individual slots for debugging that approach is too slow to use in a cache, which can be called hundreds of times per second.
Checklist