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

Bump nixpkgs and hevm dependencies #938

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7bb2456
Bump nixpkgs and hevm dependencies
arcz Apr 19, 2022
0e749f5
nix: bump nixpkgs to latest unstable
d-xo May 6, 2022
3f764d4
nix: add libcxx to extra-lib-dirs
d-xo May 10, 2022
f517e92
nix: hevm: depend on libc++
d-xo May 10, 2022
0078ccf
nix: hevm: rm libcxx
d-xo May 10, 2022
f84fb76
hevm: cabal: link against correct libc++ impl
d-xo May 10, 2022
fa44d7e
🖖 add solc 0.8.14 and keep dapptools up-to-date
pcaversaccio May 17, 2022
923d6fe
Merge pull request #939 from pcaversaccio/solc-0.8.14
d-xo May 18, 2022
826ae1b
Update README.md
moodmosaic May 31, 2022
9ff53fe
Merge pull request #942 from moodmosaic/patch-1
d-xo May 31, 2022
d37c0d8
🖖 add solc 0.8.15 and keep dapptools up-to-date
pcaversaccio Jun 16, 2022
d140ba0
Merge pull request #945 from pcaversaccio/solc-support-0.8.15
d-xo Jun 20, 2022
0660842
dapp: readme: fixup tutorial
d-xo Jun 20, 2022
75e0249
hevm: unit tests: handle concrete returndata for symbolic tests
d-xo Jun 20, 2022
94c2e03
hevm: tests: add testcase for symbolic test with concrete returndata
d-xo Jun 20, 2022
36dc24a
hevm: changelog: update
d-xo Jun 20, 2022
317f50a
nix: bump to 22.05
d-xo Jun 20, 2022
e4d1468
hevm: scrap static binaries
d-xo Jun 20, 2022
0c92831
dapp-tests: bump testnet timeout to 30 mins
d-xo Jun 20, 2022
6f33001
Merge pull request #946 from dapphub/symexec-tutorial
d-xo Jun 20, 2022
dfce866
dapp-tests: bump testnet sleep in ci
d-xo Jun 20, 2022
5a4cc7d
Add support for compilation via Yul IR
CodeSandwich Jun 3, 2022
da2da6e
dapp: nix-run: fixup nix invocation for nix 2.4 compat
d-xo Jun 21, 2022
e84ae75
Merge pull request #943 from CodeSandwich/via-ir
d-xo Jun 21, 2022
1822ffd
dapp: testnet-launch: fixup args to geth
d-xo Jun 21, 2022
51b3aa2
dapp-tests: drop sleep time to 90s in ci
d-xo Jun 21, 2022
589b350
nix: revert to nix 2.3
d-xo Jun 22, 2022
82be468
nix: geth: bump to latest
d-xo Jun 22, 2022
97f73ec
hevm: bump version
d-xo Jun 28, 2022
51f68a4
hevm: fix prove tests for latest ds-test
d-xo Jun 29, 2022
cb2e4ca
Merge pull request #948 from dapphub/fix-prove-tests-for-global-fail
d-xo Jun 29, 2022
24fd076
Bump nixpkgs and hevm dependencies
arcz Apr 19, 2022
3b52f0b
Merge remote-tracking branch 'upstream/bump-nixpkgs' into nixpkgs-22.05
arcz Jul 27, 2022
b673211
Fix nonce comparisons in dapp address
arcz Jul 27, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{ system ? builtins.currentSystem , ... }:

let
rev = "aa576357673d609e618d87db43210e49d4bb1789";
rev = "bd4dffcdb7c577d74745bd1eff6230172bd176d5";
nixpkgs = builtins.fetchTarball {
name = "nixpkgs-release-21.05";
name = "nixpkgs-unstable-2022-04-17";
url = "https://github.com/nixos/nixpkgs/tarball/${rev}";
sha256 = "1868s3mp0lwg1jpxsgmgijzddr90bjkncf6k6zhdjqihf0i1n2np";
sha256 = "18zacrykj2k5x42d0grr7g1y7xhy5ppq7j0gm3lrghwflyrdkslj";
};
in
# Now return the Nixpkgs configured to use our overlay.
Expand Down
2 changes: 1 addition & 1 deletion nix/geth.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ in buildGoModule rec {
sha256 = "sha256-4lapkoxSKdXlD6rmUxnlSKrfH+DeV6/wV05CqJjuzjA=";
};

runVend = true;
proxyVendor = true;
vendorSha256 = "sha256-5qi01y0SIEI0WRYu2I2RN94QFS8rrlioFvnRqqp6wtk=";

doCheck = false;
Expand Down
3 changes: 2 additions & 1 deletion nix/solc-static.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ stdenv.mkDerivation rec {
sha256 = "${sha256}";
};

nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
nativeBuildInputs = [ makeWrapper ]
++ lib.optional stdenv.isLinux autoPatchelfHook;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the build failed for me, it tried to patch the macos binary


postFixup = if (platform == "linux-amd64") then ''
wrapProgram $out/bin/solc-${version} \
Expand Down
8 changes: 4 additions & 4 deletions src/dapp/libexec/dapp/dapp-address
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ nonce=$(seth --to-hex "$2")

# manually create the rlp encoding of [sender,nonce], with length prefix
# `192+len(sender)+len(nonce):len(sender):sender:128+len(nonce):nonce`
if [[ $nonce -eq 0x00 ]]; then
if [[ $nonce = 0x00 ]]; then
# encoding of scalar 0 is special and requires the length prefix
rlp="0xd694${sender##0x}80"
elif [[ $nonce -lt 0x80 ]]; then
elif [[ $nonce < 0x80 ]]; then
nonce=$(printf "0x%02x" "$nonce")
# no length prefix if nonce < 128
rlp="0xd694${sender##0x}${nonce##0x}"
elif [[ $nonce -lt 0x100 ]]; then
elif [[ $nonce < 0x100 ]]; then
# even padding for hex
nonce=$(printf "0x%02x" "$nonce")
rlp="0xd794${sender##0x}81${nonce##0x}"
elif [[ $nonce -lt 0x10000 ]]; then
elif [[ $nonce < 0x10000 ]]; then
# even padding for hex
nonce=$(printf "0x%04x" "$nonce")
rlp="0xd894${sender##0x}82${nonce##0x}"
Expand Down
4 changes: 2 additions & 2 deletions src/ethsign/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ buildGoModule rec {

src = ./.;

vendorSha256 = "1zbsq1lyqinyzv5x4p1xgkxsyb7y92fbmf44gyaix34xrag5s27m";
runVend = true;
vendorSha256 = "sha256-LSnwKW79m70RiVv9INJb8oEzDmouJtiqYLHNBD8KAzY=";
proxyVendor = true;

meta = {
homepage = http://github.com/dapphub/dapptools;
Expand Down
13 changes: 0 additions & 13 deletions src/ethsign/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,7 @@ module github.com/dapphub/ethsign
go 1.13

require (
github.com/OneOfOne/xxhash v1.2.5 // indirect
github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847 // indirect
github.com/aws/aws-sdk-go v1.25.48 // indirect
github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa // indirect
github.com/ethereum/go-ethereum v1.10.6
github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222 // indirect
github.com/robertkrimen/otto v0.0.0-20170205013659-6a77b7cbc37d // indirect
github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521 // indirect
github.com/spaolacci/murmur3 v1.0.1-0.20190317074736-539464a789e9 // indirect
github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570 // indirect
github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3 // indirect
github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208 // indirect
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2
golang.org/x/mobile v0.0.0-20200801112145-973feb4309de // indirect
gopkg.in/sourcemap.v1 v1.0.5 // indirect
gopkg.in/urfave/cli.v1 v1.20.0
)
554 changes: 554 additions & 0 deletions src/ethsign/go.sum

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions src/hevm/hevm.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ library
ghc-options:
-Wall -Wno-deprecations
extra-libraries:
secp256k1, ff
secp256k1, ff, c++
c-sources:
ethjet/tinykeccak.c, ethjet/ethjet.c
cxx-sources:
Expand All @@ -88,7 +88,7 @@ library
transformers >= 0.5.6 && < 0.6,
tree-view >= 0.5 && < 0.6,
abstract-par >= 0.3.3 && < 0.4,
aeson >= 1.5.6 && < 1.6,
aeson >= 2.0 && < 2.1,
bytestring >= 0.10.8 && < 0.11,
scientific >= 0.3.6 && < 0.4,
binary >= 0.8.6 && < 0.9,
Expand All @@ -97,21 +97,21 @@ library
vector >= 0.12.1 && < 0.13,
ansi-wl-pprint >= 0.6.9 && < 0.7,
base16-bytestring >= 1.0.0 && < 2.0,
brick >= 0.58 && < 0.63,
brick >= 0.58 && < 0.69,
megaparsec >= 9.0.0 && < 10.0,
mtl >= 2.2.2 && < 2.3,
directory >= 1.3.3 && < 1.4,
filepath >= 1.4.2 && < 1.5,
vty >= 5.25.1 && < 5.34,
cereal >= 0.5.8 && < 0.6,
cryptonite >= 0.27 && <= 0.29,
memory >= 0.14.18 && < 0.16,
memory >= 0.14.18 && < 0.20,
data-dword >= 0.3.1 && < 0.4,
fgl >= 5.7.0 && < 5.8,
free >= 5.1.3 && < 5.2,
haskeline >= 0.8.0 && < 0.9,
process >= 1.6.5 && < 1.7,
lens >= 4.17.1 && < 4.20,
lens >= 4.17.1 && < 5.1,
lens-aeson >= 1.0.2 && < 1.2,
monad-par >= 0.3.5 && < 0.4,
multiset >= 0.3.4 && < 0.4,
Expand All @@ -124,7 +124,6 @@ library
sbv >= 8.9,
semver-range >= 0.2.7 && < 0.3,
temporary >= 1.3 && < 1.4,
text-format >= 0.3.2 && < 0.4,
witherable >= 0.3.5 && < 0.5,
wreq >= 0.5.3 && < 0.6,
regex-tdfa >= 1.2.3 && < 1.4,
Expand Down Expand Up @@ -190,7 +189,6 @@ executable hevm
sbv,
temporary,
text,
text-format,
unordered-containers,
vector,
vty
Expand Down
5 changes: 3 additions & 2 deletions src/hevm/src/EVM/Solidity.hs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ import Control.Monad
import Control.Lens hiding (Indexed, (.=))
import qualified Data.String.Here as Here
import Data.Aeson hiding (json)
import qualified Data.Aeson.KeyMap as KeyMap
import Data.Aeson.Types
import Data.Aeson.Lens
import Data.Scientific
Expand Down Expand Up @@ -714,8 +715,8 @@ astIdMap = foldMap f
f :: Value -> Map Int Value
f (Array x) = foldMap f x
f v@(Object x) =
let t = foldMap f (HMap.elems x)
in case HMap.lookup "id" x of
let t = foldMap f (KeyMap.elems x)
in case KeyMap.lookup "id" x of
d-xo marked this conversation as resolved.
Show resolved Hide resolved
Nothing -> t
Just (Number i) -> t <> Map.singleton (round i) v
Just _ -> t
Expand Down
4 changes: 2 additions & 2 deletions src/hevm/src/EVM/SymExec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ type EquivalenceResult = ProofResult ([VM], [VM]) VM ()

-- | Convenience functions for generating large symbolic byte strings
sbytes32, sbytes128, sbytes256, sbytes512, sbytes1024 :: Query ([SWord 8])
sbytes32 = toBytes <$> freshVar_ @ (WordN 256)
sbytes128 = toBytes <$> freshVar_ @ (WordN 1024)
sbytes32 = toBytes <$> freshVar_ @(WordN 256)
sbytes128 = toBytes <$> freshVar_ @(WordN 1024)
sbytes256 = liftA2 (++) sbytes128 sbytes128
sbytes512 = liftA2 (++) sbytes256 sbytes256
sbytes1024 = liftA2 (++) sbytes512 sbytes512
Expand Down
8 changes: 4 additions & 4 deletions src/hevm/src/EVM/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -434,17 +434,17 @@ readN s = fromIntegral (read s :: Integer)
readNull :: Read a => a -> String -> a
readNull x = fromMaybe x . Text.Read.readMaybe

wordField :: JSON.Object -> Text -> JSON.Parser W256
wordField :: JSON.Object -> Key -> JSON.Parser W256
d-xo marked this conversation as resolved.
Show resolved Hide resolved
wordField x f = ((readNull 0) . Text.unpack)
<$> (x .: f)

addrField :: JSON.Object -> Text -> JSON.Parser Addr
addrField :: JSON.Object -> Key -> JSON.Parser Addr
addrField x f = (read . Text.unpack) <$> (x .: f)

addrFieldMaybe :: JSON.Object -> Text -> JSON.Parser (Maybe Addr)
addrFieldMaybe :: JSON.Object -> Key -> JSON.Parser (Maybe Addr)
addrFieldMaybe x f = (Text.Read.readMaybe . Text.unpack) <$> (x .: f)

dataField :: JSON.Object -> Text -> JSON.Parser ByteString
dataField :: JSON.Object -> Key -> JSON.Parser ByteString
dataField x f = hexText <$> (x .: f)

toWord512 :: W256 -> Word512
Expand Down
8 changes: 5 additions & 3 deletions src/jays/src/Jays.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
module Jays where

import Data.Aeson
import qualified Data.Aeson.Key as Key
import qualified Data.Aeson.KeyMap as KeyMap
import Data.ByteString.Lazy (ByteString)
import Data.ByteString.Lazy (fromStrict, toStrict)
import Data.Foldable (toList)
Expand Down Expand Up @@ -147,7 +149,7 @@ work stk ops =
(xs, OpNewValue v : ops') -> work (v : xs) ops'

(v : Object o : xs, OpInsert k : ops') ->
work (Object (Map.insert k v o) : xs) ops'
work (Object (KeyMap.insert (Key.fromText k) v o) : xs) ops'
(v : Array o : xs, OpInsert "append" : ops') ->
work (Array (snoc o v) : xs) ops'
(_, OpInsert "append" : _) ->
Expand All @@ -156,7 +158,7 @@ work stk ops =
Left "error in -i"

(Object o : xs, OpExtract k : ops') ->
case Map.lookup k o of
case KeyMap.lookup (Key.fromText k) o of
Nothing ->
Left ("error in -e: no such key: " <> k)
Just x ->
Expand Down Expand Up @@ -185,7 +187,7 @@ work stk ops =
Left "error in -t"

(Object o : xs, OpKeys : ops') ->
(map (fromStrict . encodeUtf8) (sort (Map.keys o)) ++) <$> work xs ops'
(map (fromStrict . encodeUtf8 . Key.toText) (sort (KeyMap.keys o)) ++) <$> work xs ops'
(_, OpKeys : _) ->
Left "error in -k"

Expand Down