Skip to content

Commit 4bd81d3

Browse files
committed
Upgrade hevm to upstream fix_prank
Commit 443c9040f6a8bde7d8b2cfafd99c0cb7dd7d049f
1 parent 602686a commit 4bd81d3

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

flake.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
hevm = pkgs: pkgs.lib.pipe ((hsPkgs pkgs).callCabal2nix "hevm" (pkgs.fetchFromGitHub {
5353
owner = "ethereum";
5454
repo = "hevm";
55-
rev = "f1f45d3c0d9767a38df04f398d1eab8b66dbe7fc";
56-
sha256 = "sha256-3zEUwcZm4uZZLecvFTgVTV5CAm4qMfKPbLdwO88LnrY=";
55+
rev = "443c9040f6a8bde7d8b2cfafd99c0cb7dd7d049f";
56+
sha256 = "sha256-IC/q+2SJoyDansmbTHXfkKFfnhmMy97G13aTPNOkR30=";
5757
}) { secp256k1 = pkgs.secp256k1; })
5858
([
5959
pkgs.haskell.lib.compose.dontCheck

lib/Echidna/SymExec.hs

+4-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ exploreContract conf contract tx vm = do
7777
doneChan <- newEmptyMVar
7878
resultChan <- newEmptyMVar
7979

80-
flip runReaderT defaultEnv $ withSolvers Z3 (fromIntegral conf.campaignConf.symExecNSolvers) timeout $ \solvers -> do
80+
flip runReaderT defaultEnv $ withSolvers Z3 (fromIntegral conf.campaignConf.symExecNSolvers) 1 timeout $ \solvers -> do
8181
threadId <- liftIO $ forkIO $ flip runReaderT defaultEnv $ do
8282
res <- forM methods $ \method -> do
8383
let
@@ -108,7 +108,7 @@ exploreContract conf contract tx vm = do
108108
pure (threadId, resultChan)
109109

110110
-- | Turn the expression returned by `interpret` into into SMT2 values to feed into the solver
111-
manipulateExprInter :: Bool -> Expr End -> [SMT2]
111+
manipulateExprInter :: Bool -> Expr End -> [Either String SMT2]
112112
manipulateExprInter isConc = map (assertProps defaultConfig) . middleStep . map (extractProps . simplify) . flattenExpr . simplify where
113113
middleStep = if isConc then middleStepConc else id
114114
middleStepConc = map singleton . concatMap (go (PBool True))
@@ -155,6 +155,8 @@ frameStateMakeSymbolic fs
155155
, gas = ()
156156
, returndata = fs.returndata
157157
, static = fs.static
158+
, overrideCaller = fs.overrideCaller
159+
, resetCaller = fs.resetCaller
158160
}
159161

160162
frameMakeSymbolic :: Frame Concrete s -> Frame Symbolic s

lib/Echidna/Types/Tx.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ getResult = \case
234234
VMFailure BadJumpDestination -> ErrorBadJumpDestination
235235
VMFailure (Revert _) -> ErrorRevert
236236
VMFailure (OutOfGas _ _) -> ErrorOutOfGas
237-
VMFailure (BadCheatCode _) -> ErrorBadCheatCode
237+
VMFailure (BadCheatCode _ _) -> ErrorBadCheatCode
238238
VMFailure StackLimitExceeded -> ErrorStackLimitExceeded
239239
VMFailure IllegalOverflow -> ErrorIllegalOverflow
240240
VMFailure StateChangeWhileStatic -> ErrorStateChangeWhileStatic

stack.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ packages:
55

66
extra-deps:
77
- git: https://github.com/ethereum/hevm.git
8-
commit: f1f45d3c0d9767a38df04f398d1eab8b66dbe7fc
8+
commit: 443c9040f6a8bde7d8b2cfafd99c0cb7dd7d049f
99

1010
- smt2-parser-0.1.0.1@sha256:1e1a4565915ed851c13d1e6b8bb5185cf5d454da3b43170825d53e221f753d77,1421
1111
- spawn-0.3@sha256:b91e01d8f2b076841410ae284b32046f91471943dc799c1af77d666c72101f02,1162

0 commit comments

Comments
 (0)