Repository navigation
Update hevm with arithmetic abstraction and execution optimizations - #1639
Merged
Merged
Conversation
Integrate the optimization settings and conditional preimage recording from PR #1621. Keep recording throughout symbolic campaigns and verify that both solvers recover earlier transaction inputs after replaying a symbolic counterexample.
elopez
approved these changes
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable arithmetic abstraction for symbolic execution and reduce concrete execution overhead. Stack and Nix now pin hevm to
b36def2111d4edc60107ea5753d7b51ce30b4249from argotorg/hevm#1075. This revision already contains the hevm changes referenced by #1621.Integrate #1621's remaining optimizations: build hevm with
-O2in Stack and Nix, and disable Keccak preimage recording for campaigns without symbolic execution. For symbolic campaigns, recording stays enabled from VM initialization through deployment and concrete transaction replay, so later solver calls receive the earlier preimages. FFI configuration is preserved.Arithmetic abstraction is enabled for exploration and verification through the internal
symExecAbstractArith = Trueswitch. YAML and CLI configuration are deferred.Regression coverage under Z3 and Bitwuzla checks completed arithmetic proofs, rejection of spurious multiplication models, and concrete replay of division/multiplication counterexamples. The small
arithmetic-abstraction.solfixture proves multiplication monotonicity with bounds preventing overflow. With solc 0.8.25 and a 30-second SMT budget, the measured CLI comparison (including compilation) was:The Keccak regression first solves a hash check using a constructor preimage and replays the generated transaction. It then records a new hash in another transaction and solves a second check. It requires the exact original arguments and successful reproduction of each assertion failure. A separate case verifies that concrete-only campaigns still hash correctly without collecting preimages.
Validation:
-Werror; all 60 selected configuration, symbolic, assertion, overflow, replay, and cheatcode tests passed with solc 0.8.25.0instead of the stored secret. Restoring the preimages made them pass.hlint lib srcandgit diff --checkpassed.