Commit Graph
72 Commits
Author SHA1 Message Date
e899c10c3c Improved support for foundry tests (#1499)
* improved support for foundry tests

* Extend Foundry support testing (#1512)

* Fix lint failures

* ci: bump python version to 3.10, clone submodules

* some fixes when using foundry mode

* Update hevm to `542986dea3bec4f5898731ff48877a7a21811bf4`

* Fix bugs in Foundry test generation (#1516)

* Fix fallback function bug in Foundry test generation

* Fix null byte in argument bug in Foundry test generation

* Remove unnecessary config file

* Remove unused/redundant imports

* Disable Slither in Foundry test gen tests

* Conditionally run forge-std tests based on the solc version

* Reduce unnecessary test grouping and improve failed assertion messages

---------

Co-authored-by: Emilio López <[email protected]>

* Update hevm to `41e6d1304411749ea8c816d131991663b5dca67a`

* Fix linter and build errors (#1521)

* improve foundry stateful invariant testing

* fix

* Fix foundry test generation linter hints and tests (#1522)

* Foundry updates (#1525)

* Rename dapptest to foundry and support foundry assertX in assertion mode

* Rename basic foundry test contracts dir to `foundry-basic`

* Add testing modes to `README`

* fixes

* fixes

* Add support for Foundry assume (#1528)

* flake: sync hevm version with stack.yaml

* Clarify `optimization` test mode in `README` (#1529)

* IS_TEST fix

---------

Co-authored-by: Radu Bahmata <[email protected]>
Co-authored-by: Emilio López <[email protected]>
Co-authored-by: Emilio López <[email protected]>
2026-03-13 15:49:41 +01:00
Emilio López 5ab7bc068c Update hevm to 41e6d1304411749ea8c816d131991663b5dca67a (#1519)
* Update hevm to `542986dea3bec4f5898731ff48877a7a21811bf4`

* Update hevm to `41e6d1304411749ea8c816d131991663b5dca67a`
2026-02-01 18:20:05 -03:00
Emilio López 9b22b9288a Update hevm to release/0.57.0 (#1515) 2026-01-10 08:44:27 +01:00
Emilio Lópezandgustavo-grieco a31c5f8c26 Update hevm to 9ba5e52fc7ec7ae6f7f3a25d5ee426625d2aa9d (#1487)
* Update `hevm` to `9ba5e52fc7ec7ae6f7f3a25d5ee426625d2aa9d`

* CLAUDE.md: document import order

* tree-wide: sort imports

* Fix symbolic tests after hevm update

* update the fetching code for the new hevm

* improved rpc fetching

---------

Co-authored-by: gustavo-grieco <[email protected]>
2025-12-12 14:59:25 -03:00
Gustavo GriecoandEmilio López 458ae15404 Echidna 2.3 RC (#1467)
* Upgrade `hevm` to `95b5e074c9f27f970011ed53f38f1643d70c3c8a`

* Refactor cache use after hevm upgrade

* fixes

* Added rpc cache serialization code and fixes

* fixes

* fixes

* fixes

* refactor verification code to make sure tests are correctly labeled when the verifiction finishes

* revert b899481b65

* disable RPC logs

* update to the latest hevm

* updated flake

* updated flake

* avoid crashing when trying to do symbolic execution in fallback

* silence RPC warning when there is no RPC configured

* hlint fixes

* switch to stack based loop detection

* Clean up comment, whitespace

---------

Co-authored-by: Emilio López <[email protected]>
2025-11-29 17:02:04 -03:00
gustavo-grieco 3c06e7d098 updated hevm 2025-09-14 17:27:41 -03:00
gustavo-grieco 7728227531 upgraded hevm 2025-09-08 15:15:23 +02:00
gustavo-grieco 2bbfb77ea2 refactored vm symbolify and enable onlyDeployed 2025-09-05 20:59:41 +02:00
gustavo-grieco 4720db7b50 refactored symbolic decoding 2025-09-05 11:53:32 +02:00
Emilio López 093f6b8836 Update references to hevm repository
These repositories were moved to `argotorg`
2025-08-27 22:15:57 -03:00
Emilio López ea87657432 flake: update nixpkgs, foundry, flake.lock 2025-08-20 13:05:28 -03:00
Emilio López 3418d1fad2 Update hevm to 9982c580ed19b88ebab9744d29d940fd2f0bd8c6 2025-08-12 19:06:01 -03:00
Emilio López c9ec9fcc30 Update hevm to 874d8b4dca11fce9aec001c7cb30d0c5c881abc4 2025-08-11 21:09:32 -03:00
Gustavo Grieco c267104904 Reworked symbolic execution code (#1394)
* removed old solc versions, use 0.8.x only instead

* fixed harvey test

* started to fix symexec using latest hevm

* added RPC support for symbolic execution + some clean up

* better constraints for block timestamp and number

* improved and simplified symexec code

* removed useless code

* some test fixes

* increase the number of random symbolic transaction if the corpus is empty

* added comments on why we only take one method from the shuffle list when doing symbolic exploration

* allow user to select smt solver

* use slither to filter functions with assert, if any

* started adding full verification mode for stateless campaigns

* refactored tons of code

* improved code for exploration/verification

* finished implementation and get back to hevm master

* fixed issue in addBlockConstraints and upgraded hevm

* disable debug mode when using interactive mode

* corrected array size in symbolic output

* fix decoding of negative numbers

* simplified code for decoding of negative numbers

* removed initialize field from default

* use verification mode for sym-assert test

* added some basic verification tests

* make the harvey test more reliable

* simplified exploration code and added shrinking

* added new test for exploration mode (but disabled so far)

* worker related refactoring code to allow other parts of the codebase to send events

* make sure symExecTarget is used to select methods

* keccak preimage support enabled

* reduced code duplication

* added documentation

* use new types in Types/Config.hs

* removed killed-related files
2025-08-06 09:29:22 -03:00
Emilio López 966be6f956 Update hevm to 0.55.0 2025-07-21 10:24:48 -03:00
Emilio López efa7a3dff2 Update hevm to d282dff6e0d9ea9f7cf02e17e8ac0b268ef634da 2025-07-07 15:55:48 -03:00
Emilio López 73567c7508 Update hevm to 7fa6a959bea935f476100037aa84531523cd9d8a
This also updates nixpkgs, secp256k1, and GHC to 9.8.4
2025-06-27 20:29:22 -03:00
Emilio López fe2b067665 Update hevm to f09f4e1a99ab6446db4ca7b2cd74e96d4e3b35f2 2025-06-27 20:29:22 -03:00
Emilio López b902f47e3a Update hevm to 598811d6c563db7fae2694721a30eb987bb5c871 2025-06-27 20:29:22 -03:00
Emilio López 452c52c1bf Update hevm to 14028174a2cd5329fa1c834a222e409e0aab9792 2025-06-27 20:29:22 -03:00
Emilio López fd0b8bdf6e Update hevm to 0b19122972b4bffffcffc5a065c51e0ade2cd228 2025-06-27 20:29:22 -03:00
Emilio López 1296ede842 Update hevm to 9924e80dd0226c1f3e1eda651bbeb3558f419843 2025-05-20 20:17:41 +02:00
Emilio López f316aacbc4 Update hevm to 561eeb3a13e3452f60ed318eac331fe4af6ca728 2025-05-06 12:01:12 +02:00
Emilio López d50c07f554 Update hevm to bdaaa13fde8f6b96f2032aef2931f9c7bc87e159 2025-05-02 20:23:55 +02:00
Emilio López 4647dae73a Update hevm to 6d79cd5d42c7f0d9a9a167464efeee3a2ddb1486 2025-04-29 11:27:08 +02:00
Emilio López 43d8fa7933 Update hevm to 0f08514c6cbd9f9688a5c7199915c78df59109fe 2025-04-29 11:27:08 +02:00
Emilio López c06552466d Update hevm to 5f48aaa93e18cf8f42b46109c04a76234b746dc6 2025-04-29 11:27:08 +02:00
Emilio López ee747c7cde Upgrade hevm to release/0.54.2
Commit `037ff11779d0089378f01cb103db1171dc642be2`
2024-12-13 12:28:02 +01:00
Emilio López 2831aec8f8 Upgrade hevm to upstream main
Commit f1f45d3c0d9767a38df04f398d1eab8b66dbe7fc

Includes fixes and new cheatcodes.
2024-10-07 19:14:55 +02:00
Artur Cygan d03c34afc3 Bump nixpkgs and cleanup cc hack 2024-09-16 14:06:38 +02:00
Emilio López 7fc18798a0 Upgrade hevm to upstream main
Commit c779777d18c8ff60867f009d434b44ce08188e01
2024-09-16 13:58:17 +02:00
Emilio López 28adea9141 Upgrade hevm to echidna-patches-20240826 2024-08-26 14:56:16 +02:00
Emilio López 182580e645 Upgrade build to GHC 9.6 (#1245)
* Upgrade hevm to latest `echidna-patches` commit

* Upgrade build to GHC 9.6

* Refactor terminal and signal support in preparation for Windows UI

* Enable UI on all platforms

* Use pkgsStatic for Linux

pkgsMusl fails to build for some reason.

* Remove conditional UI compilation

All platforms now support the Echidna UI

* Enable UI on ConHost as well

See the introduction on https://hackage.haskell.org/package/ansi-terminal-1.1.1/docs/System-Console-ANSI.html

* Enable `eager-blackholing`

Observed a ~2% speedup on longer runs when compiling both hevm and
echidna with this flag. Besides, the Haskell documentation encourages
enabling it for parallel code:

https://downloads.haskell.org/~ghc/9.6.5/docs/users_guide/using-concurrent.html#compile-time-options-for-smp-parallelism

* Resolve hlint warnings

* Update Linux Stack CI to 9.6

* Fix compilation failure after merge

* Upgrade hevm to `echidna-patches-20240725`

* Fix lint warnings, unused imports

* flake: align nixpkgs with hevm

* flake: fix libiconv for x86_64 darwin

       > app/utf8-troubleshoot/cbits/locale.c:10:10: error:
       >      fatal error: 'libcharset.h' file not found
       >    |
       > 10 | #include <libcharset.h>
       >    |          ^
       > #include <libcharset.h>
       >          ^~~~~~~~~~~~~~

Also link iconv dynamically on Darwin as well
2024-07-25 13:54:13 +02:00
Gustavo GriecoandSam Alws 08041e4b6e Initial support for tstore/tload (#1286)
* switch to tstore branch on hevm fork. all we should need now is a call to clearTStorages

* call clearTStorages after each transaction

* test case

* bump hevm

* bump hevm again

---------

Co-authored-by: Sam Alws <[email protected]>
2024-07-11 15:28:59 +02:00
Emilio López 1babeca6ee Upgrade hevm to latest echidna-patches commit (#1243) 2024-05-08 14:24:13 -03:00
5d55003b73 Add symbolic execution (#1216)
* Add symbolic execution

Co-authored-by: Ben Siraphob <[email protected]>
Co-authored-by: Sam Alws <[email protected]>

* Add support for concolic execution

---------

Co-authored-by: Artur Cygan <[email protected]>
Co-authored-by: Ben Siraphob <[email protected]>
2024-05-03 15:21:26 +02:00
Artur Cygan 92f30c66a7 Update hevm to 0.53.0 (#1189) 2024-02-27 13:47:43 +01:00
Artur Cygan f6e8fbb016 Use trace printing from hevm (#1157) 2024-01-05 08:49:01 +01:00
Artur Cygan ce70a8e958 hevm: update to 0.52.0 2023-12-28 18:10:28 +01:00
Artur CyganandEmilio López e03efba8d2 Update to GHC 9.4 (#1096)
* Update to GHC 9.4

* ci: Update to GHC 9.4

* ci: fix GHC 9.4 support on Windows

GHC 9.4 has changed toolchains to Clang, which causes issues when building
with our current setup. We perform the following changes to support
GHC 9.4 and later:

  * Use MSYS2 CLANG64 MSYS. See https://gitlab.haskell.org/ghc/ghc/-/issues/22561
  * Use MSYS2 minimal $PATH. There's many things in the default GitHub
    environment that cause conflicts. To achieve this, we have to also
    manually re-add the Stack, Cabal and GHC paths.
  * Bump the Stack resolver. GHC 9.4.7 has some compilation fixes that
    are good to have around.
  * Replace the GHC linker with our MSYS2 linker. The GHC linker is old
    (~LLVM 14?) and does not fully understand the static libraries
    produced by the newer Clang 17 in MSYS2.
  * Refactor the way we invoke Stack and take advantage of the Stack
    config to indicate extra library and include paths.
  * Drop the 'strip' workaround for the test suite, as it is not needed
    any longer.
  * Fix the linking of the standard C++ library. GHC 9.4 introduces a
    nice way to do it in a platform-independent way, but unfortunately
    it does not work properly in Nix and it attempts to link clang++
    instead of libc++.so, so we have to use some trickery.

        addDLL: stdc++ or dependencies not loaded. (Win32 error 126)

See also:
  * https://gitlab.haskell.org/ghc/ghc/-/issues/22738
  * https://gitlab.haskell.org/ghc/ghc/-/wikis/migration/9.4?version_id=b60e52482a666d25638d59cd7e86851ddf971dc1#link-against-system-cxx-std-lib-instead-of-stdc

* hevm: pin to newer version supporting GHC 9.4

* ci: linux: update to GHC 9.4.7

* ci: do not cache Stack config

---------

Co-authored-by: Emilio López <[email protected]>
2023-10-25 17:23:34 +02:00
Artur Cygan f4dfed28e1 Update hevm to 0.51.3 (#1090) 2023-07-17 10:42:57 +02:00
Artur Cygan 2f067ecd8c hevm 0.50.5 (#1023) 2023-04-18 20:00:41 +02:00
Artur Cygan 618228c93b Bump dependencies (#1022)
* Bump dependencies

* Use hevm from nixpkgs
2023-04-11 13:09:07 +02:00
Artur Cygan 93ee9db6e5 hevm 0.50.4 (#986)
* hevm 0.50.4

* Bump stack and flake.lock
2023-03-18 14:27:51 +01:00
Emilio López c29bb61418 Update hevm reference to upstream
The Windows changes have been merged upstream now.
2023-02-24 08:52:43 -03:00
Emilio López 7a2ea7777a Update hevm 2023-02-17 17:26:57 -03:00
Emilio López 56250ae8a8 Try dynamic build 2023-02-17 17:26:57 -03:00
Emilio López e8764a2927 Disable UI on Windows 2023-02-17 16:40:21 -03:00
Artur Cygan 640cc5bb30 Update hevm to 0.50.3 (#942)
* Update hevm to 0.50.3

* Fix stack

* Cosmetic fixes

* Warnings
2023-02-17 19:11:27 +01:00
Gustavo Grieco 0ac89ae5a7 experimental prank support (#897) 2023-01-10 11:20:57 -03:00