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

Increasing gas usage metric precision #603

Open
rappie opened this issue Oct 26, 2024 · 2 comments
Open

Increasing gas usage metric precision #603

rappie opened this issue Oct 26, 2024 · 2 comments

Comments

@rappie
Copy link

rappie commented Oct 26, 2024

I'm using Echidna's optimization mode to find the max amount of gas used by a specific function. However, have noticed significant discrepancies in HEVM's gas usage metrics compared to other tools.

The biggest discrepancy I've encountered in practice on a private codebase is 688957 (echidna) vs 716057 (medusa).

Benchmark:
https://github.com/rappie/fuzzer-gas-metric-benchmark

@d-xo
Copy link
Collaborator

d-xo commented Oct 27, 2024

Interesting. Do you perhaps have any insights as to where the difference might be coming from?

I guess I had assumed that passing the general state tests would be sufficient to ensure accurate gas calculation, but it seems to not be the case :/

@rappie
Copy link
Author

rappie commented Oct 27, 2024

I'm afraid i'm not of much help here. I'm just a echidna (and medusa) user and not a dev.

You can see the code I'm using for the benchmark here: https://github.com/rappie/fuzzer-gas-metric-benchmark/blob/main/src/Benchmark.sol#L13-L17

If you can provide me with code that tests things more specifically, I'd be happy to run it 🙂

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

No branches or pull requests

2 participants