Releases: argotorg/hevm
0.56.0
Changes since 0.55.1:
Added
- Output geth compatible jsonl traces in
hevm execvia--json-trace - Allow dumping unsolved SMT files via
--dump-unsolved - Allow resolving unknown addresses to only those that are already deployed
via option--only-deployed - New empty solver option that simply makes sure that all SMT queries return
unknown - Allow
verifyInputsto return partial expressions - Counterexamples are now validated when running in
hevm testmode - RPC mocking framework that allows users to mock responses from an RPC
node via--mock-file FILE.json. This will improve reliability of
tests that depend on RPC responses - We now map back (add,pc) warnings to lines of source code
- Calldata decoding is now more robust: we try to decode
as much as possible even in case of trailing bytes
Fixed
- We now extract more Keccak computations than before from the Props to assert
more Keccak equalities. - Fixed false positive caused by loss of information about concrete
Keccak computations. - Faster word256Bytes and word160Bytes functions to help concrete execution
performance - We avoid crashing if a cheatcode or a precompiled is invalid or not implemented in concrete mode
- RPC fetching was sometimes incorrect in case of writing to storage
before fetching it via RPC - We no longer increment branch depth twice when branching both ways
- We now take into account loop heuristic setting for
test - We no longer fetch
Latestmore than once, thereby potentially having
more than one interpretation ofLatest. Instead, we fetch it once, and
fix any furtherLatestblock to the previously fetched fixed block number - RPC fetching is now done through a single HTTPS session.
- RPC cache is now more effective, as it's persisted through different
threads of the symbolic execution - During running in --only-deployed mode, we forgot to force the address
in the constraints to be the one we computed it to be. Fixed. - We now properly collect all storage reads from the program and build
a proper counterexample. Previously, some information might have been missing. - Fixed int calldata decoding of solc's v1 ABI encoding
Changed
- Updated forge to 1.2.3 and forge-std to 60acb7aa (1.9.7+)
- We now gather Keccak axioms during
setUp()and inject them into the SMT solver.
This helps us finding more correct Keccak preimages - The "origin" address is now symbolic by default when running in
symbolicmode - The printed expressions when running in
symbolicmode are now simplified - The printed reachable expression is now simplified
- hevm and solidity has been moved to under github.com/argotorg
- Extra range constraints for ABI symbolic types are no longer added. They are
not needed as they are enforced in the bytecode. - We no longer try to fuzz the Expr to find a concrete value that satisfies
the expression. This was not very effective and made the system more complex
to maintain. Echidna is an excellent fuzzer that can be used instead. - Shrinking of the calldata is now more aggressive, shrinking even small (<1024B)
buffers - Rename confusing function name runSolidityTest to runForgeTest
PRs merged
- Add cost centers to opcodes, optimize by @elopez in #803
- Minor cleanup -- less brackets by @msooseth in #810
- More complete keccak computation by @msooseth in #812
- Update forge and forge-std to latest stable by @msooseth in #809
- Optimize
word256Bytes,word160Bytesby @elopez in #808 - Collect keccaks during concrete running and inject them into the Props during query by @msooseth in #806
- Update readme to be more user-friendly by @msooseth in #813
- Use maxWidth instead of hardcoded value by @msooseth in #817
- Revert "Use maxWidth instead of hardcoded value" by @msooseth in #820
- Allow dumping unsolved SMT files by @msooseth in #814
- Add empty solver as an option by @msooseth in #815
- Better error propagation in reading bytecode from JSON by @blishko in #821
- Solidity: Reduce duplication of code by @blishko in #823
- Added missing assert condition to catch failures in solc < 0.8 by @gustavo-grieco in #824
- With
--only-deployed, only resolve addresses to deployed contracts by @msooseth in #818 - Update quick install guide by @msooseth in #826
- Solidity: Refactor reading standard JSON from solc by @blishko in #825
- Allow verifyInputs to return partial expressions by @gustavo-grieco in #822
- Simplifications: Avoid unnecessary memory allocations by @blishko in #830
- SMT: Fix collecting storage reads by @blishko in #834
- Nix: Update nixpkgs by @blishko in #835
- SymExec: Pre-filter safe branches by @blishko in #833
- Expr: Avoid unnecessary allocations in
Exprsimplifications by @blishko in #836 - Implement
toStringcheatcode by @elopez in #838 - SymEx: Do not simplify whole program representation by @blishko in #843
- Bump dependency upper bounds by @elopez in #846
- Fixing missing loop heuristic usage in Test by @msooseth in #853
- Fixing double depth incrementing by @msooseth in #852
- SMT: Avoid unnecessary allocations during Expr translation by @blishko in #845
- We should simplify the printed expression by @msooseth in #858
- Mapping back of warnings to lines of code by @msooseth in #851
- Fixing RPC fetching and reading of slots, adding mocking to RPC for testing by @msooseth in #837
- Check that CEX-es can be reproduced in
testmode by @msooseth in #827 - Explain warnings and validation issues in hevm.dev by @msooseth in #844
- Adding forcing of value for runAll by @msooseth in #856
- Initial SMT refactoring by @blishko in #860
- Make "origin" address symbolic in
symbolicmode + simplify printed expression by @msooseth in #859 - SMT: Do not return unnecessary information from checkSatWithProps by @blishko in #864
- SMT: Do not parse term in get-val response by @blishko in #865
- SMT: Small changes towards efficiency by @blishko in #866
- Adding session use for RPC, along with shared cache and fixed Latest Block by @msooseth in #861
- Fixing build after RPC merging due to unused variable by @msooseth in #869
- SMT: Fix Keccak constraints to use definitions by @blishko in #867
- Moving repository to argotorg, adding Argot Collective by @msooseth in #870
- Fixing github page publishing via SSH deploy key by @msooseth in #871
- Simplifications: Normalize and add one more rule by @blishko in #872
- This flake lock update is automatic, adding as a change by @msooseth in #873
- Update symbolic benchmark runner to use Bitwuzla by @blishko in #874
- ABI: Do not add extra constraints for symbolic arguments by @blishko in #875
- Expr: Fix maxLitSigned by @blishko in #876
- Expr: Fix collecting reads from abstract storage by @blishko in #881
- Removing Cex fuzzer by @msooseth in #879
- cli/exec: expose json tracing option by @d-xo in #878
- Export a few more functions from Fetch by @gustavo-grieco in #885
- Expr: Add missing simplification for read over copyslice by @blishko in #877
- Fix GHC 9.10 warnings by @elopez in #883
- Fix missing information about concrete Keccak computations by @blishko in #888
- Rename confusing function name by @msooseth in #891
- More robust calldata decoding, more shrinking by @msooseth in #887
- Avoid unnecessary code duplication by @blishko in #892
- Revert instead of crash when a missing cheatcode or precompile is used in concrete mode by @gustavo-grieco in #840
- Fix int decoding when upper bits are not set by @gustavo-grieco in #894
- Bump version for new release, 0.56.0 by @msooseth in #896
- Fix re...
0.55.1
Added
- When a staticcall is made to a contract that does not exist, we overapproximate
and return symbolic values - More simplification rules for Props
- JoinBytes simplification rule
- New simplification rule to help deal with abi.encodeWithSelector
- More simplification rules for Props
- Using the SMT solver to get a single concrete value for a symbolic expression
and continue running, whenever possible - STATICCALL abstraction is now performed in case of symbolic arguments
- Better error messages for JSON parsing
- Multiple solutions are allowed for a single symbolic expression, and they are
generated via iterative calls to the SMT solver for quicker solving - Aliasing works much better for symbolic and concrete addresses
- Constant propagation for symbolic values
- Allow reading bytecode via --code-file or --code-a-file/--code-b-file. Strips
\n, spaces, and ignores leading0xto make it easier to use via e.g.
jq '.deplayedBytecode.object file.json > file.txt'to parse Forge JSON output
This alleviates the issue when the contract is large and does not fit the command line
limit of 8192 characters - Two more simplification rules:
ReadByte&ReadWordwhen theCopySlice
it is reading from is writing after the position being read, so the
CopySlicecan be ignored - More simplification rules that help avoid symbolic copyslice in case of
STATICCALL overapproximation - Test to make sure we don't accidentally overapproximate a working, good STATICCALL
- Allow EXTCODESIZE/HASH, BALANCE to be abstracted to a symbolic value.
- Allow CALL to be extracted in case
--promise-no-reentis given, promising
no reentrancy of contracts. This may skip over reentrancy vulnerabilities
but allows much more thorough exploration of the contract - Allow controlling the max buffer sizes via --max-buf-size to something smaller than 2**64
so we don't get too large buffers as counterexamples - More symbolic overapproximation for Balance and ExtCodeHash opcodes, fixing
CodeHash SMT representation - Add deployment code flag to the
equivalenceCheckfunction - PNeg + PGT/PGEq/PLeq/PLT simplification rules
- We no longer dispatch Props to SMT that can be solved by a simplification
- Allow user to change the verbosity level via
--verb. For the moment, this is only to
print some warnings related to zero-address dereference and to printhemv test's
output in case of failure - Simple test cases for the CLI
- Allow limiting the branch depth and width limitation via --max-depth and --max-width
- When there are zero solutions to a multi-solution query it means that the
currently executed branch is in fact impossible. In these cases, unwind all
frames and return a Revert with empty returndata. - More rewrite rules for PEq, PNeg, missing eqByte call, and distributivity for And
- Allow changing of the prefix from "prove" via --prefix in
testmode - More complete simplification during interpretation
- SMT-based resolving of addresses now works for delegatecall and staticcall
opcodes as well - UNSAT cache is now in
Solvers.hsand is therefore shared across all threads.
Hence, it is now active even during branch queries. - Rewrite rule to deal with some forms of argument packing by Solidity
via masking - More rewrite rules for (PLT (Lit 0) _) and (PEq (Lit 1) _)
- Simplification can now be turned off from the cli via --no-simplify
- When doing Keccak concretization, and simplification is enabled,
we do both until fixedpoint - When gathering Keccak axioms, we simplify the bytestring that
the keccak is applied to - More rewrite rules for MulMod, AddMod, SHL, SHR, SLT, and SignExtend
- PLEq is now concretized in case it can be computed
- More SignExtend test cases
- Rewrite rules to deal with specific exponentiation patterns
- Added missing simplification and concretization of the SAR instruction
Fixed
- We now try to simplify expressions fully before trying to cast them to a concrete value
This should improve issues when "Unexpected Symbolic Arguments to Opcode" was
unnecessarily output - Not all testcases ran due to incorrect filtering, fixed
- Removed dead code related to IOAct in the now deprecated and removed debugger
- Base case of exponentiation to 0 was not handled, leading to infinite loop
- Better exponential simplification
- Dumping of END states (.prop) files is now default for
--debug - When cheatcode is missing, we produce a partial execution warning
- Size of calldata can be up to 2**64, not 256. This is now reflected in the documentation
- We now have less noise during test runs, and assert more about symbolic copyslice tests
- CopySlice rewrite rule is now less strict while still being sound
- Assumptions about reading from buffer after its size are now the same in all cases.
Previously, they were too weak in case of reading 32 bytes. - The equivalence checker now is able to prove that an empty store is
equivalent to a store with all slots initialized to 0. - Equivalence checking was incorrectly assuming that overapproximated values
were sequentially equivalent. We now distinguish these symbolic values with
A-andB- - Buffer of all zeroes was interpreted as an empty buffer during parsing SMT model.
The length of the buffer is now properly taken into account. - It was possible to enter an infinite recursion when trying to shrink a buffer found by
the SMT solver. We now properly detect that it is not possible to shrink the buffer. - Pretty printing of buffers is now more robust. Instead of throwing an
internal error,
we now try best to print everything we can, and print an appropriate error message
instead of crashing. - We no longer produce duplicate SMT assertions regarding concrete keccak values.
- Ord is now correctly implemented for Prop.
- Signed and unsigned integers have more refined ranges.
- Symbolic interpretation of assertGe/Gt/Le/Lt over signed integers now works correctly.
- SignExtend is now correctly being constant-folded
- Some of our property-based testing was ineffective because of inadvertent
simplification happening before calling the SMT solver. This has now been fixed. - When pranking an address, we used the non-pranked address' nonce
to calculate the new address. This was incorrect, and lead to address clash,
as the nonce was never incremented. - We only report FAIL in
testmode for assertion failures that match the
string prefix "assertion failed", or match function selector Panic(uint256)
with a parameter 0x1. Previously,require(a==b, "reason")was a cause for
FAIL in case a!=b was possible. This has now been fixed. - Out of bounds reads could occur in Haskell when trying to determine
valid jump destinations. This has now been fixed.
Changed
- Warnings now lead printing FAIL. This way, users don't accidentally think that
their contract is correct when there were cases/branches that hevm could not
fully explore. Printing of issues is also now much more organized - Expressions that are commutative are now canonicalized to have the smaller
value on the LHS. This can significantly help with simplifications, automatically
determining when (Eq a b) is true when a==b modulo commutativity hevm test's flag--verboseis now--verb, which also increases verbosity
for other elements of the system- Add
--arrays-expto cvc5 options. - We now use Options.Applicative and a rather different way of parsing CLI options.
This should give us much better control over the CLI options and their parsing. - block.number can now be symbolic. This only affects library use of hevm
- Removed
--smtoutputsince it was never used - We now build with -DCMAKE_POLICY_VERSION_MINIMUM=3.5 libff, as cmake deprecated 3.5
- CheckSatResult has now been unified with ProofResult via SMTResult
- If counterexample would require a buffer that's larger than 1GB, we abandon
shrinking it. - If solver is not able to solve a query while attempting to shrink the model, we
abandon the attempt gracefully instead of crashing with internal error. - Buffers are now handled more lazily when inspecting a model, which avoids some
unnecesary internal errors. - EVM memory is now grown on demand using a 2x factor, to avoid repeated smaller
increases which hurt concrete execution performance due to their linear cost. - The concrete MCOPY implementation has been optimized to avoid freezing the whole
EVM memory. - We no longer accept
checkas a prefix for test cases by default. - The way we print warnings for
symbolicmode now matches that oftestmode.
PRs merged
- Adding a note about prank and delegatecall by @msooseth in #623
- There is no interactive debugger by @msooseth in #627
- Cleanups in preparation of GHC 9.8 by @elopez in #612
- Fixing missing
concKeccakSimpExprforwordToAddr,maybeLitByte, etc. by @msooseth in #619 - More Prop simplification rules by @msooseth in #628
- Allow dealing with abi.encodeWithSelector by @msooseth in #625
- Use the SMT solver to convert symbolic to concrete value(s) by @msooseth in #629
- Overapproximate staticcall in case we can't resolve callee by @msooseth in #620
- Removing IOAct which was not used by @msooseth in #630
- Adding an example using raw bytecodes to equivalence checking tutorial by @msooseth in #635
- Fixing staticcall abstraction, test case search, and commenting out bug with solidity by @msooseth in https://github.com/ethereum/h...
0.54.2
[0.54.2] - 2024-12-12
Changed
- Improved printing of results. Should be more intuitive to understand what hevm found.
- More complete and precise array/mapping slot rewrite, along with a copySlice improvement
- Use a let expression in copySlice to decrease expression size
- The
--debugflag now dumps the internal expressions as well - hevm now uses the forge-std library's way of detecting failures, i.e. through
reverting with a specific error code unless --assertion-type DSTest is passed - Default max iterations is 5 now.
--max-iters -1now signals no bound. This change is to match other
symbolic execution frameworks' default bound and to not go into an infinite loop by default when
there could be other, interesting and reachable bugs in the code - Update to GHC version 9.6.5
- Abstraction-refinement is no longer an option, it was never really useful and not well-tested
Added
- More POr and PAnd rules
- Array/Map slot decomposition can be turned off via a flag
- More PEq, PLEq, and PLT rules
- New
labelcheatcode. - Updated Bitwuzla to newer version
- New cheatcodes
startPrank()&stopPrank() - ARM64 and x86_64 Mac along with Linux x86_64 static binaries for releases
- Tutorial for symbolic execution
- PAnd props are now recursively flattened
- Double negation in Prop are removed
- Updated forge to modern version, thereby fixing JSON parsing of new forge JSONs
- Fixed RPC fetching of contract data
- Symbolic ABI encoding for tuples, fuzzer for encoder
- Printing
Addrswhen runningsymbolicfor counterexamples and reachable end states - Improved symbolic execution tutorial
- More Mod, SMod, Div, and SDiv simplification rules
- Add
freshAddressesfield inVMOptsso that initial fresh address can be given as input - Add documentation about limitations and workarounds
- More verbose error messages in case of symbolic arguments to opcode
- Tests to enforce that in Expr and Prop, constants are on the LHS whenever possible
- Support for MCOPY and TSTORE/TLOAD, i.e. EIP 5656 + 1153 + 4788
- All fuzz tests now run twice, once with expected SAT and once with expected UNSAT to check
against incorrectly trivial UNSAT queries - Allow --num-solvers option for equivalence checking, use num cores by default
- Preliminary support for multi-threaded Z3
- Skip over SMT generation issues due to e.g. CopySlice with symbolic arguments, and return
partial results instead of erroring out - Fix interpreter's MCOPY handling so that it doesn't error out on symbolic arguments
- More desciptive errors in case of a cheatcode issue
- Better and more pretty debug messages
- Many env* cheatcodes are now supported
Fixed
vm.prankis now respected during calls to createconcatis a 2-ary, not an n-ary function in SMT2LIB, declare-const does not exist in QF_AUFBV, replacing
with declare-fun- CVC5 needs
--incrementalflag to work properly in abstraction-refinement mode - cli.hs now uses with-utf8 so no release binary will have locale issues anymore
- Took ideas for simplification rules from "Super-optimization of Smart Contracts" paper by Albert et al.
- Printing panic uint256 as hex, not as int
- Decomposition does not take place when entire states are compared, as that would necessitate
a different approach. initial-storageoption ofhevm symbolicis respectedcalleroption ofhevm symbolicis now respected- Thanks to the new simplification rules, we can now enable more conformance tests
- Multi-threaded running of Tracing.hs was not possible due to IO race. Fixed.
- Fixed multi-threading bug in symbolic interpretation
- Fixed simplification of concrete CopySlice with destination offset beyond destination size
- Fixed a bug in our SMT encoding of reading multiple consecutive bytes from concrete index
- Fixed bug in SMT encoding that caused empty and all-zero byte arrays to be considered equal
and hence lead to false negatives through trivially UNSAT SMT expressions - Respect --smt-timeout in equivalence checking
- Fixed the handling of returndata with an abstract size during transaction finalization
- Error handling for user-facing cli commands is much improved
- Fixed call signature generation for test cases
- Fixing prank so it doesn't override the sender address on lower call frames
- Fixed GitHub release action to upload release binaries
0.53.0
Changed
- Minimum distance requirements are now asserted for Keccak function calls. They assert that it's hard to generate two Keccak's that are less than 256 afar.
- Keccak concretization is now done only after all simplifications are performed. This helps with simplification pre-concretization
- Added an IllegalOverflow error in case the system tries to allocate a large amount of memory during
abstract gas execution but concrete running. In these cases, the interpreter can out-of-heap
as the only check is that the size allocated is less than$2**{64}$ , but that is too large to fit in memory. Now,
we check more stringently, and still return an IllegalOverflow - Fixed
--rootoption for thetestsubcommand
Added
- Optimized smt queries that significantly improve performance when dealing with solidity mappings and arrays
- Support for using Bitwuzla as a solver
- More efficient encoding for failure in ds-test style tests
- Symbolic tests now support statically sized arrays as parameters
hevm testnow has anum-solversparameter that controls how many solver instances to spawn- New solc-specific simplification rules that should make the final Props a lot more readable
- Prop is now correctly ordered, better BufLength and Max simplifications of Expr,
and further solc-specific simplifications of Expr - Simplify earlier and don't check reachability for things statically determined to be FALSE
- New concrete fuzzer that can be controlled via
--num-cex-fuzz - Partial support for dynamic jumps when the jump destination can be computed
given already available information - Added three forking cheatcodes:
createFork,selectFork, andactiveFork
Fixed
- Traces now correctly perform source mapping to display contract details
- Event traces now correctly display indexed arguments and argument names
- JSON reading of foundry JSONs was dependent on locale and did not work with many locales.
- CVC5 needs
--incrementalflag to work properly in abstraction-refinement mode
0.52.0
This is a major breaking release that removes several user facing features and includes non trivial breakage for library users. These changes mean the code is significantly simpler, more performant, and allow support for new features like fully symbolic addresses.
In addition to the changes below, this release includes significant work on performance optimization for symbolic execution.
Added
The major new user facing feature in this release is support for fully symbolic addresses (including fully symbolic addresses for deployed contracts). This allows tests to be writen that call vm.prank with a symbolic value, making some tests (e.g. access control, token transfer logic) much more comprehensive.
Some restrictions around reading balances from and transfering value between symbolic addresses are currently in place. Currently, if the address is symbolic, then you will only be able to read it's balance, or transfer value to/from it, if it is the address of a contract that is actually deployed. This is required to ensure soundness in the face of aliasing between symbolic addresses. We intend to lift this restriction in a future release.
Other
- Support for
vm.deal - Support for
vm.assume(this is semantically identical to usingrequire, but does simplify the
process of porting exisitng fuzz tests to be symbolic) - the
checkprefix now recognized for symbolic tests hevm testnow takes a--numberargument to specify which block should be used when making rpc queries
Changed
Revert Semantics in Solidity Tests
solidity tests no longer consider reverts to be a failure, and check only for the ds-test failed bit
or user defined assertion failures (i.e. Panic(0x01)). This makes writing tests much easier as users no longer have to consider trivial reverts (e.g. arithmetic overflow).
A positive (i.e. prove/check) test with no reachable assertion violations that does not have any successful branches will still be considered a failure.
Removed
hevm has been around for a while, and over time has accumulated many features. We decided to remove some of these features in the interest of focusing our attention, increasing our iteration speed and simplifying maintenance. The following user facing features have been removed from this release:
- The visual debugger has been removed
- All concrete ds-test executors have been removed (i.e. plain, fuzzer, invariant)
- Rpc caching and state serialization has been removed (i.e. all
--cache/--stateflags) - The various
DAPP_TESTvariables are no longer observed - The
--initial-storageflag no longer accepts a concrete prestore (valid values are nowEmptyorAbstract)
Fixed
This release also includes many small bugfixes:
- CopySlice wraparound issue especially during CopyCallBytesToMemory
- Contracts deployed during symbolic execution are created with an empty storage (instead of abstract in previous versions)
- EVM.Solidity.toCode to include contractName in error string
- Better cex reconstruction in cases where branches do not refer to all input variables in calldata
- Correctly handle empty bytestring compiled contracts' JSON
- No more false positives when keccak is called with inputs of different sizes
testnow falls back to displaying an unecoded bytestring for calldata when the model returned by the solver has a different length the length of the arguments in the test signature.- we now generate correct counterexamples for branches where only a subset of input variables are referenced by the path conditions
vm.pranknow works correctly when passed a symbolic address- storage layout information will now be parsed from the output of
forge buildif it is available
API Changes
Reworked Storage Model / Symbolic Addresses
Adding symbolic addresses required some fairly significant changes to the way that we model storage. We introduced a new address type to Expr (Expr EAddr), that allows us to model fully symbolic addresses. Instead of modelling storage as a global symbolic 2D map (address -> word -> word) in
vm.env, each contract now has it's own symbolic 1D map (word -> word), that is stored in the vm.contracts mapping. vm.contracts is now keyed on Expr EAddr instead of Addr. Addresses that are keys to the vm.contracts mapping are asserted to be distinct in our smt encoding. This allows us to support symbolic addresses in a fully static manner (i.e. we do not currently need to make any extra smt queries when looking up storage for a symbolic address).
Mutable Memory & ST
We now use a mutable representation of memory if it is currently completely concrete. This is a significant performance improvement, and fixed a particulary egregious memory leak. It does entail the use of the ST monad, and introduces a new type parameter to the VM type that tags a given instance with it's thread local state. Library users will now need to either use the ST moand and runST or stToIO to compose and sequence vm executions.
GHC 9.4
Hevm is now built with ghc9.4. While earlier compiler versions may continue to work for now, they are no longer explicitly tested or supported.
Other
- Contract balances can now be fully symbolic
- Contract code can now be fully abstract. Calls into contracts with unknown code will fail with
UnexpectedSymbolicArg. - Run expression simplification on branch conditions
- SLoad/SStore simplifications based on assumptions regarding Keccak non-collision&preimage
- Improved Prop simplification
- CopySlice+WriteWord+ConcreteBuf now truncates ConcreteBuf in special cases
- Better simplification of Eq IR elements
- Run a toplevel constant folding reasoning system on branch conditions
evalPropis renamed tosimplifyPropfor consistency- Mem explosion in
writeWordfunction was possible in caseoffsetwas close to 2^256. Fixed. - BufLength was not simplified via bufLength function. Fixed.
VMOptsno longer takes an initial store, and instead takes abaseState
which can be eitherEmptyBaseorAbstractBase. This controls whether
storage should be inialized as empty or fully abstract. Regardless of this
setting contracts that are deployed at runtime via a call to
CREATE/CREATE2have zero initialized storage.
0.51.3
Fixed
- Path joining on Windows
- Fixed overflow issue in stripWrites
- Automatic tests are now more reproducible
Changed
- Removed sha3Crack which has been deprecated for keccakEqs
Added
- Added flag
-f debugto add debug flags to cabal/GHC
0.51.2
Fixed
- SMT encoding of Expr now has assertions for the range of environment values that are less than word size (256 bits).
- Trace now contains the cheat code calls
- More consistent error messages
Changed
- SMT2 scripts are now being reprocessed to put one sexpr per line. Having sepxrs that span across multiple lines trigers a bug in CVC5.
- Removing long-running tests so we can finish all unit tests in approx 10 minutes on a current-gen laptop CPU
- Added git revision to
hevm version
Added
- execution traces are now shown for failed
prove_tests
0.51.1
Fixed
- hevm now gracefully handles missing
outdirectories - Constraints are correctly propogated to the final output expression during symbolic execution
Changed
- HEVM is now fully compliant with the Shanghai hard fork
0.51.0
Added
hevmcan now execute unit tests in foundry projects. Just runhevm testfrom the root of a foundry repo, and all unit tests will be executed (including prove tests).- A new stack based loop detection heuristic
- Analysis of partial execution traces is now supported
- Stack traces are displayed for counterexamples from
provetests
Changed
hevm dapp-testhas been replaced withhevm test --project-type DappTools.hevm testno longer supports parsing solidity output in the combined json format.- The default value for
--ask-smt-iterationshas been changed to 1 - The SMT solver is never queried for branch conditions that do not occur in a loop (as determined by the loop detection heuristic)
Fixed
--max-iterationsis respected in cases where path conditions have become inconsistent--max-iterationsis now respected for loops with a concrete branch condition- Fixed a bug where underflow was possible when transfering eth
0.50.5
Changed
- The
--storage-modelparameter has been replaced with--initial-storage - The
--smttimeoutargument now expects a value in seconds not milliseconds - The default smt timeout has been set to 5 minutes
hevm symbolicnow searches only for user defined assertions by default
Fixed
- The
prankcheatcode now transfers value from the correct address - Fixed an off-by-one error in
EVM.Debug.srcMapCodePos