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

Make infiniteGas default, add setGas cheatcode #2045

Closed
wants to merge 34 commits into from

Conversation

palinatolmach
Copy link
Contributor

@palinatolmach palinatolmach commented Aug 25, 2023

Closes runtimeverification/kontrol#38 and #2058 (infinite gas prevents setUp from branching on potential out-of-gas caused by SSTORE-ing a symbolic value).

This PR makes the following changes:

  • Turns on infinite gas by default, thereby improving the default performance of Kontrol on Foundry proofs;
  • Adds kevm.setGas(uint256) cheatcode that allows setting the available gas; adds a test for it (GasTest.testSetGas);
  • Removes kevm.infiniteGas() from tests, as it's no longer necessary;
  • Modifies test_foundry_merge_nodes, LoopsTest.sum_N and the associated loop invariant accordingly (adding or removing gas-related cheatcodes changes program counter values and node numbering, which are hardcoded in these two tests).

@palinatolmach palinatolmach marked this pull request as ready for review September 27, 2023 17:06
@ehildenb
Copy link
Member

This PR should be migrated to the new Kontrol repo: runtimeverification/kontrol, instead.

@palinatolmach
Copy link
Contributor Author

@ehildenb Kontrol-specific changes have been moved to runtimeverification/kontrol#57. This PR includes changes to foundry.md which has not been moved to the Kontrol repo yet (issue: runtimeverification/kontrol#61) and duplicates other changes in kontrolx and tests. After a discussion with @tothtamas28, we decided that we might merge this PR first before foundry.md is transferred to Kontrol, and refactor later, if necessary.

@palinatolmach
Copy link
Contributor Author

Closed in favor of the Kontrol PR (runtimeverification/kontrol#57) and a smaller foundry.md change (#2101).

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

Successfully merging this pull request may close these issues.

Use infinite gas by default in Foundry tests
2 participants