Skip to content
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

In planning: Improve call sequence shrinking #229

Open
anishnaik opened this issue Sep 13, 2023 · 4 comments
Open

In planning: Improve call sequence shrinking #229

anishnaik opened this issue Sep 13, 2023 · 4 comments

Comments

@anishnaik
Copy link
Collaborator

It seems like echidna has a different heuristic for call sequence shrinking that might be more optimal than medusa's. There should be research into the differences b/w the two strategies and whether medusa can benefit from employing echidna's strategy more closely.

@0xalpharush
Copy link
Member

I'm not sure why this isn't 100% given we want to try to shrink the value every single time

ShrinkValueProbability: 0.1,

Echidna will consistently shrink to roughly setStruct((10, 87489408786382356735958, "\NUL", (80, false))) but medusa will not (run ./medusa fuzz --target fuzzing/testdata/contracts/value_generation/match_structs_xy.sol in the root of the repo). Perhaps the string shrinking should have a mutation that returns an empty string "".

@aviggiano
Copy link

aviggiano commented Dec 29, 2023

Interestingly, on a very simple test & microbenchmark, it seems like Medusa wins:

foundry-rs/foundry#6683

Maybe this needs a real benchmark

@0xalpharush
Copy link
Member

One consideration is that the stateless example in this PR should be able to shrunk to 1 call consistently
#363

@0xalpharush
Copy link
Member

Remove reverts when shrinking crytic/echidna#1250

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants