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

Conversation

arcz
Copy link
Contributor

@arcz arcz commented Apr 19, 2022

Description

hevm is currently broken in nixpkgs because text-format doesn't support the new GHC that was bumped in this PR (NixOS/nixpkgs#160733). Fortunately, hevm appears to not use text-format so it can be removed from dependencies. To make hevm compatible with the upcoming 22.05 release of nixpkgs, I bumped nixpkgs to the latest unstable (it will branch off to become 22.05 soon NixOS/nixpkgs#165792) and updated the code to work with the newer version of GHC and dependencies (aeson in particular).

Checklist

  • tested locally
  • added automated tests
  • updated the docs
  • updated the changelog

@@ -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

src/hevm/src/EVM/Solidity.hs Show resolved Hide resolved
src/hevm/src/EVM/Types.hs Show resolved Hide resolved
@d-xo
Copy link
Contributor

d-xo commented Apr 20, 2022

Thanks! Looks like ci is failing when trying to build cln. Not sure what's going on there...

Does this also bump us to a newer ghc version with support for arm macs (fine if not, just asking to understand).

@arcz
Copy link
Contributor Author

arcz commented Apr 22, 2022

This should enable M1 support if it was not working already. We are building M1 releases in Echidna which obviously uses hevm and everything works. I hope fix the build over the weekend.

@d-xo
Copy link
Contributor

d-xo commented Apr 22, 2022

great news :)

@arcz
Copy link
Contributor Author

arcz commented May 9, 2022

I'm still on it, I'm struggling to get the CI tests working after all the updates

@d-xo
Copy link
Contributor

d-xo commented May 10, 2022

@arcz sorry I should have commented here. I've been playing around with this a bit since the ghc compiler version update is a blocker for me atm.

So far I've managed to fix the cln build issue and get the shared hevm build working, but I'm still stuck on the static build. My current progress is here: https://github.com/dapphub/dapptools/compare/bump-nixpkgs.

d-xo and others added 12 commits June 21, 2022 15:29
Add support for compilation via Yul IR
Since dapphub/ds-test#30 calls to `failed()` can
contain reverting branches due to the call into abi.decode().

This meant that using prove tests with the latest ds-test version would
always fail with a hard error.

This change updates the symbolic test stepper to correctly report
`bailed` as true for branches that reverted during the call to
`failed()`.
…l-fail

hevm: fix prove tests for latest ds-test
@arcz
Copy link
Contributor Author

arcz commented Jul 27, 2022

@d-xo I merged your branch and fixed the build but I don't know why this test fails:

	Running test_4byte ... FAILURE
 expected [transfer(address,uint256)] but was []

It first failed on my local build but then it worked fine. Not sure what's going on there.
The static build is indeed broken and I'm not sure how to fix it.

@arcz arcz mentioned this pull request Sep 8, 2022
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants