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

Slither results caching is re-used even if compilation target changes #561

Open
ggrieco-tob opened this issue Feb 5, 2025 · 2 comments
Open
Labels
bug Something isn't working on hold This issue was marked as not desirable to complete for now very-low-priority

Comments

@ggrieco-tob
Copy link
Member

I did some tests using medusa in a single directory, where different a number of contracts are available to compile individually (e.g. tests). The workflow looks like this:

  1. medusa fuzz --compilation-target src/X.sol
  2. medusa fuzz --compilation-target src/Y.sol

The first command will work correctly, the slither results will be saved to "slither_results.json", however, the second run will use the incorrect result. This can cause medusa to be less effective since the constants will not be extracted.

I think we should consider re-running slither if the compilation target changes.

@ggrieco-tob ggrieco-tob added the bug Something isn't working label Feb 5, 2025
@anishnaik
Copy link
Collaborator

There is nothing we can do about this. It would require us to cache additional information about the compilation target. In a real scenario (e.g. testing curvance or something), the compilation target does not change. Thus, we won't fix this and it's a known limitation of caching.

@anishnaik
Copy link
Collaborator

Re-opening for visibility but will but this issue on hold for reasons mentioned above.

@anishnaik anishnaik reopened this Feb 5, 2025
@anishnaik anishnaik added on hold This issue was marked as not desirable to complete for now very-low-priority labels Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working on hold This issue was marked as not desirable to complete for now very-low-priority
Projects
None yet
Development

No branches or pull requests

2 participants